Commit 53520a28a7eb9d23366de6522f4ab4b0934f63df

Authored by ailsoncgt
1 parent 77d33269

Topic breacbrumbs #355

courses/templates/topic/create.html
1 1 {% extends 'subject/index.html' %}
2 2  
3   -{% load static i18n permission_tags widget_tweaks %}
  3 +{% load static i18n permission_tags widget_tweaks django_bootstrap_breadcrumbs %}
  4 +
  5 +{% block breadcrumbs %}
  6 + {{ block.super }}
  7 + {% breadcrumb 'Create Topic' 'course:create_topic' %}
  8 +{% endblock breadcrumbs %}
4 9  
5 10 {% block content %}
6 11  
... ...
courses/templates/topic/index.html
1   -{% extends 'home.html' %}
  1 +{% extends 'subject/index.html' %}
2 2  
3   -{% load static i18n permission_tags professor_access %}
  3 +{% load static i18n permission_tags professor_access django_bootstrap_breadcrumbs %}
4 4  
5 5  
6 6 {% block javascript %}
... ... @@ -12,18 +12,8 @@
12 12  
13 13  
14 14 {% block breadcrumbs %}
15   -
16   - <ol class="breadcrumb">
17   - <li><a href="{% url 'app:index' %}">{% trans 'Home' %}</a></li>
18   - <li><a href="{% url 'course:view_subject' subject.slug %}">{{ subject }}</a></li>
19   - {% professor_subject subject user as maneger_topic%}
20   - {% if maneger_topic %}
21   - <li class="active">{% trans 'Manage Topic' %}</li>
22   - {% else %}
23   - <li class="active">{{ topic.name }}</li>
24   - {% endif %}
25   -
26   - </ol>
  15 + {{ block.super }}
  16 + {% breadcrumb topic.name 'course:view_topic' %}
27 17 {% endblock %}
28 18  
29 19 {% block content %}
... ...
courses/templates/topic/replicate.html
1 1 {% extends 'subject/index.html' %}
2 2  
3   -{% load static i18n permission_tags widget_tweaks %}
  3 +{% load static i18n permission_tags widget_tweaks django_bootstrap_breadcrumbs %}
  4 +
  5 +{% block breadcrumbs %}
  6 + {{ block.super }}
  7 + {% breadcrumb 'Replicate Topic' 'course:replicate_topic' %}
  8 +{% endblock breadcrumbs %}
4 9  
5 10 {% block content %}
6 11  
... ...
courses/views.py
... ... @@ -639,6 +639,7 @@ class TopicsView(LoginRequiredMixin, LogMixin, generic.ListView):
639 639  
640 640 context['topic'] = topic
641 641 context['subject'] = topic.subject
  642 + context['course'] = topic.subject.course
642 643 context['activitys'] = activitys
643 644 context['students_activit'] = students_activit
644 645 context['materials'] = materials
... ...