Commit 31ac73407f0e303d37b5c52d478d50897cb4abc0
1 parent
4c63a588
Exists in
master
and in
5 other branches
view category #178
Showing
1 changed file
with
51 additions
and
18 deletions
Show diff stats
courses/templates/category/view.html
1 | {% extends 'app/base.html' %} | 1 | {% extends 'app/base.html' %} |
2 | 2 | ||
3 | +{% load static i18n permission_tags %} | ||
4 | +{% load widget_tweaks %} | ||
3 | {% load static i18n %} | 5 | {% load static i18n %} |
4 | 6 | ||
7 | + | ||
5 | {% block breadcrumbs %} | 8 | {% block breadcrumbs %} |
6 | <ol class="breadcrumb"> | 9 | <ol class="breadcrumb"> |
7 | <li><a href="{% url 'app:index' %}">{% trans 'Home' %}</a></li> | 10 | <li><a href="{% url 'app:index' %}">{% trans 'Home' %}</a></li> |
@@ -10,27 +13,57 @@ | @@ -10,27 +13,57 @@ | ||
10 | {% endblock %} | 13 | {% endblock %} |
11 | 14 | ||
12 | {% block sidebar %} | 15 | {% block sidebar %} |
13 | - <div class="list-group"> | ||
14 | - <a href="{% url 'course:manage_cat' %}" class="list-group-item"> | ||
15 | - {% trans 'Categories' %} | ||
16 | - </a> | ||
17 | - <a href="{% url 'course:create_cat' %}" class="list-group-item"> | ||
18 | - {% trans 'Create Category' %} | ||
19 | - </a> | ||
20 | - <a href="" class="list-group-item"> | ||
21 | - {% trans 'Edit Category' %} | ||
22 | - </a> | ||
23 | - <a href="" class="list-group-item"> | ||
24 | - {% trans 'Remove Category' %} | ||
25 | - </a> | ||
26 | - </div> | 16 | + <div class="panel panel-primary navigation"> |
17 | + <div class="panel-heading"> | ||
18 | + <h5>{% trans 'Menu' %}</h5> | ||
19 | + </div> | ||
20 | + <div class="panel-body"> | ||
21 | + <ul class="nav nav-pills nav-stacked"> | ||
22 | + <li><a href="{% url 'users:profile' %}">{% trans 'Profile' %}</a></li> | ||
23 | + <li><a href="{% url 'course:manage' %}">{% trans 'My Courses' %}</a></li> | ||
24 | + </ul> | ||
25 | + </div> | ||
26 | + </div> | ||
27 | + {% if user|has_role:'professor, system_admin' %} | ||
28 | + | ||
29 | + <div class="panel panel-primary navigation"> | ||
30 | + <div class="panel-heading"> | ||
31 | + <h3 class="panel-title">Actions</h3> | ||
32 | + </div> | ||
33 | + <div class="panel-body"> | ||
34 | + <ul class="nav nav-pills nav-stacked"> | ||
35 | + <li><a href="javascript:void(0)">Replicate Course</a></li> | ||
36 | + <li><a href="{% url 'course:create' %}">Create Course</a></li> | ||
37 | + <li><a href="{% url 'course:create_cat' %}">Create Category</a></li> | ||
38 | + </ul> | ||
39 | + </div> | ||
40 | + </div> | ||
41 | + | ||
42 | + <div class="panel panel-primary navigation"> | ||
43 | + <div class="panel-heading"> | ||
44 | + <h3 class="panel-title">Category</h3> | ||
45 | + </div> | ||
46 | + <div class="panel-body"> | ||
47 | + <ul class="nav nav-pills nav-stacked"> | ||
48 | + <li><a href="{% url 'course:create_cat' %}">Create Category</a></li> | ||
49 | + <li><a href="{% url 'course:manage_cat' %}">List Category</a></li> | ||
50 | + <li><a href="{% url 'course:delete_cat' category.slug %}">Remove Category</a></li> | ||
51 | + <li><a href="{% url 'course:update_cat' category.slug %}">Update Category</a></li> | ||
52 | + </ul> | ||
53 | + </div> | ||
54 | + </div> | ||
55 | + {% endif %} | ||
27 | {% endblock %} | 56 | {% endblock %} |
28 | 57 | ||
29 | {% block content %} | 58 | {% block content %} |
30 | - <div class="row"> | ||
31 | - <div class="col-sm-12"> | ||
32 | - <p><b>{% trans 'Name:' %} </b> {{ category }}</p> | ||
33 | - <p><b>{% trans 'Slug:' %} </b> {{ category.slug }}</p> | 59 | + <div class="card card-content"> |
60 | + <div class="card-body"> | ||
61 | + <div class="row"> | ||
62 | + <div class="col-sm-12"> | ||
63 | + <p><b>{% trans 'Name:' %} </b> {{ category }}</p> | ||
64 | + <p><b>{% trans 'Slug:' %} </b> {{ category.slug }}</p> | ||
65 | + </div> | ||
66 | + </div> | ||
34 | </div> | 67 | </div> |
35 | </div> | 68 | </div> |
36 | {% endblock %} | 69 | {% endblock %} |