Commit f61971065bc24c0a3213c2eeab2f91aa2ac08a9d
1 parent
69992453
Exists in
master
and in
5 other branches
Course subscribe button [Issue: #192]
Showing
1 changed file
with
10 additions
and
1 deletions
Show diff stats
core/templates/guest.html
1 | 1 | {% extends 'base.html' %} |
2 | 2 | |
3 | +{% load i18n custom_filters %} | |
4 | + | |
3 | 5 | {% block breadcrumbs %} |
4 | 6 | <div class="col-md-12"> |
5 | 7 | <form id="searchform" action="{% url 'course:manage' %}" method="get" accept-charset="utf-8"> |
... | ... | @@ -32,7 +34,14 @@ |
32 | 34 | {% for course in courses %} |
33 | 35 | <div class="panel panel-info"> |
34 | 36 | <div class="panel-heading"> |
35 | - <h3 class="panel-title">{{course.name}}</h3> | |
37 | + <h3 class="panel-title"> | |
38 | + {{course.name}} | |
39 | + {% if user|show_course_subscribe:course %} | |
40 | + <div class="pull-right" style="margin-top:-15px"> | |
41 | + <a onclick="subscribe($(this), '{% url 'course:subscribe' course.slug %}' , '{% trans 'Are you sure you want to subscribe to this subject?' %}')" class="btn btn-sm btn-primary btn-raised">{% trans 'Subscribe' %}</a> | |
42 | + </div> | |
43 | + {% endif %} | |
44 | + </h3> | |
36 | 45 | </div> |
37 | 46 | |
38 | 47 | <div class="panel-body"> | ... | ... |