Commit e70ce349be0952d2f66148eef7cfc12256745274
1 parent
1fa1cff5
Exists in
master
and in
3 other branches
resolvendo bugs do tipo Quando a categoria tem um assunto com o mesmo nome, est…
…e assunto não abre, apenas fecha a categoria.
Showing
9 changed files
with
94 additions
and
94 deletions
Show diff stats
amadeus/static/js/category.js
... | ... | @@ -110,7 +110,7 @@ function bindCollapse() { |
110 | 110 | var btn = $(this).parent().find('.fa-angle-right'); |
111 | 111 | |
112 | 112 | btn = btn[0]; |
113 | - | |
113 | + | |
114 | 114 | $(btn).switchClass("fa-angle-right", "fa-angle-down", 250, "easeInOutQuad"); |
115 | 115 | |
116 | 116 | var url = $(this).parent().find('.log_url').val(); |
... | ... | @@ -136,9 +136,9 @@ function bindCollapse() { |
136 | 136 | $('.collapse').on('hide.bs.collapse', function (e) { |
137 | 137 | if($(this).is(e.target)){ |
138 | 138 | var btn = $(this).parent().find('.fa-angle-down'); |
139 | - | |
139 | + | |
140 | 140 | btn = btn[0]; |
141 | - | |
141 | + | |
142 | 142 | $(btn).switchClass("fa-angle-down", "fa-angle-right", 250, "easeInOutQuad"); |
143 | 143 | |
144 | 144 | var url = $(this).parent().find('.log_url').val(); |
... | ... | @@ -165,7 +165,7 @@ $('.category-panel-content').on('shown.bs.collapse', function(e) { |
165 | 165 | if($(this).is(e.target)){ |
166 | 166 | var panel_id = $(this).attr('id'); |
167 | 167 | var holder = $(this).find('.holder'); |
168 | - | |
168 | + | |
169 | 169 | if ($('#' + panel_id + '-accordion').children().length == 0) { |
170 | 170 | var load_sub_url = $(this).find('.load_sub_url').val(); |
171 | 171 | |
... | ... | @@ -209,7 +209,7 @@ $('.category-panel-content').on('hidden.bs.collapse', function(e) { |
209 | 209 | if($(this).is(e.target)){ |
210 | 210 | var panel_id = $(this).attr('id'); |
211 | 211 | var holder = $(this).find('.holder'); |
212 | - | |
212 | + | |
213 | 213 | var items = $('#' + panel_id + '-accordion').children(":visible").length; |
214 | 214 | |
215 | 215 | if (items > 10) { |
... | ... | @@ -229,4 +229,4 @@ function delete_group(url) { |
229 | 229 | |
230 | 230 | $('.modal').modal('show'); |
231 | 231 | }); |
232 | -} | |
233 | 232 | \ No newline at end of file |
233 | +} | ... | ... |
categories/templates/categories/list.html
... | ... | @@ -40,7 +40,7 @@ |
40 | 40 | <li>{% trans "all subjects" %}</li> |
41 | 41 | </ul> |
42 | 42 | </div> |
43 | - {% endif %} | |
43 | + {% endif %} | |
44 | 44 | |
45 | 45 | <!-- Code for listing categories --> |
46 | 46 | <div class="col-md-12 cards-content"> |
... | ... | @@ -52,14 +52,14 @@ |
52 | 52 | <div class="row"> |
53 | 53 | <div class="col-md-12 category-header"> |
54 | 54 | <h4 class="panel-title"> |
55 | - <a class="category-course-link pull-left" data-parent="#accordion" data-toggle="collapse" href="#{{category.slug}}"> | |
55 | + <a class="category-course-link pull-left" data-parent="#accordion" data-toggle="collapse" href="#{{category.slug}}_category"> | |
56 | 56 | <button class="btn btn-default btn-xs text-center cat-selector"><i class="fa fa-angle-right fa-2x" aria-hidden="true"></i></button> {{category.name}} |
57 | 57 | </a> |
58 | 58 | </h4> |
59 | - | |
59 | + | |
60 | 60 | <div class="col-md-5 pull-right category-card-items"> |
61 | 61 | {% if user.is_staff or user in category.coordinators.all %} |
62 | - <a href="" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
62 | + <a href="" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
63 | 63 | <i class="fa fa-ellipsis-v" aria-hidden="true"></i> |
64 | 64 | </a> |
65 | 65 | <ul class="dropdown-menu pull-right" aria-labelledby="moreActions"> |
... | ... | @@ -78,10 +78,10 @@ |
78 | 78 | </div> |
79 | 79 | </div> |
80 | 80 | </div> |
81 | - <div id="{{category.slug}}" class="panel-collapse panel-body collapse category-panel-content"> | |
81 | + <div id="{{category.slug}}_category" class="panel-collapse panel-body collapse category-panel-content"> | |
82 | 82 | <input type="hidden" class="log_url" value="{% url 'categories:view_log' category.id %}" /> |
83 | 83 | <input type="hidden" class="log_id" value="" /> |
84 | - | |
84 | + | |
85 | 85 | {% if category.coordinators.all|length > 0 %} |
86 | 86 | <h4><b>{% trans "Coordinator(s) " %}: </b> |
87 | 87 | {{ category.coordinators.all|join:', ' }} |
... | ... | @@ -89,7 +89,7 @@ |
89 | 89 | {% else %} |
90 | 90 | <h4> {% trans "It doesn't possess coordinators" %} </h4> |
91 | 91 | {% endif %} |
92 | - | |
92 | + | |
93 | 93 | {{category.description|safe}} |
94 | 94 | </div> |
95 | 95 | </div> |
... | ... | @@ -99,14 +99,14 @@ |
99 | 99 | <div class="row"> |
100 | 100 | <div class="col-md-12 category-header"> |
101 | 101 | <h4 class="panel-title"> |
102 | - <a class="category-course-link pull-left" data-parent="#accordion" data-toggle="collapse" href="#{{category.slug}}"> | |
102 | + <a class="category-course-link pull-left" data-parent="#accordion" data-toggle="collapse" href="#{{category.slug}}_category"> | |
103 | 103 | <button class="btn btn-default btn-xs text-center cat-selector"><i class="fa fa-angle-right fa-2x" aria-hidden="true"></i></button> {{category.name}} |
104 | 104 | </a> |
105 | 105 | </h4> |
106 | 106 | |
107 | 107 | <div class="col-md-5 pull-right category-card-items"> |
108 | 108 | {% if user.is_staff or user in category.coordinators.all %} |
109 | - <a href="" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
109 | + <a href="" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
110 | 110 | <i class="fa fa-ellipsis-v" aria-hidden="true"></i> |
111 | 111 | </a> |
112 | 112 | <ul class="dropdown-menu pull-right" aria-labelledby="moreActions"> |
... | ... | @@ -121,10 +121,10 @@ |
121 | 121 | </div> |
122 | 122 | </div> |
123 | 123 | </div> |
124 | - <div id="{{category.slug}}" class="panel-collapse panel-body collapse category-panel-content"> | |
124 | + <div id="{{category.slug}}_category" class="panel-collapse panel-body collapse category-panel-content"> | |
125 | 125 | <input type="hidden" class="log_url" value="{% url 'categories:view_log' category.id %}" /> |
126 | 126 | <input type="hidden" class="log_id" value="" /> |
127 | - | |
127 | + | |
128 | 128 | {% if category.coordinators.all|length > 0 %} |
129 | 129 | <h4><b>{% trans "Coordinator(s) " %}: </b> |
130 | 130 | {{ category.coordinators.all|join:', ' }} |
... | ... | @@ -132,7 +132,7 @@ |
132 | 132 | {% else %} |
133 | 133 | <h4> {% trans "It doesn't possess coordinators" %} </h4> |
134 | 134 | {% endif %} |
135 | - | |
135 | + | |
136 | 136 | {{category.description|safe}} |
137 | 137 | </div> |
138 | 138 | </div> | ... | ... |
subjects/templates/subjects/initial.html
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 | </div> |
14 | 14 | {% endfor %} |
15 | 15 | {% endif %} |
16 | - | |
16 | + | |
17 | 17 | |
18 | 18 | |
19 | 19 | |
... | ... | @@ -43,7 +43,7 @@ |
43 | 43 | <li class="small"><a href="{% url 'subjects:search' %}?search={{tag.0}}">{{tag.0}}</a></li> |
44 | 44 | {% endif %} |
45 | 45 | |
46 | - | |
46 | + | |
47 | 47 | {% endfor %} |
48 | 48 | </ul> |
49 | 49 | </div> |
... | ... | @@ -77,7 +77,7 @@ |
77 | 77 | <li class="small"><a href="{% url 'subjects:search' %}?search={{tag.0}}">{{tag.0}}</a></li> |
78 | 78 | {% endif %} |
79 | 79 | |
80 | - | |
80 | + | |
81 | 81 | {% endfor %} |
82 | 82 | </ul> |
83 | 83 | </div> |
... | ... | @@ -85,10 +85,10 @@ |
85 | 85 | {% endif %} |
86 | 86 | |
87 | 87 | |
88 | - | |
89 | - | |
90 | - | |
91 | - | |
88 | + | |
89 | + | |
90 | + | |
91 | + | |
92 | 92 | <div class="col-md-12 cards-content"> |
93 | 93 | <h2 class=" my-subjects-title"><b><i>{% trans "My Subjects" %} ({{ total_subs }})</i></b></h2> |
94 | 94 | |
... | ... | @@ -97,7 +97,7 @@ |
97 | 97 | {% for subject in subjects %} |
98 | 98 | {% include "subjects/subject_card.html" with accordion_id="subject-accordion" %} |
99 | 99 | {% endfor %} |
100 | - | |
100 | + | |
101 | 101 | {% pagination request paginator page_obj %} |
102 | 102 | </div> |
103 | 103 | {% else %} |
... | ... | @@ -110,9 +110,9 @@ |
110 | 110 | |
111 | 111 | <div id="modal_subject"></div> |
112 | 112 | {% if user.is_staff %} |
113 | - <script type="text/javascript" src="{% static "js/charts/home.js" %}"></script> | |
113 | + <script type="text/javascript" src="{% static 'js/charts/home.js' %}"></script> | |
114 | 114 | {% endif %} |
115 | - | |
116 | - <script type="text/javascript" src="{% static "subjects/js/modal_subject.js" %}"></script> | |
115 | + | |
116 | + <script type="text/javascript" src="{% static 'subjects/js/modal_subject.js' %}"></script> | |
117 | 117 | <script type="text/javascript" src="{% static 'js/category.js' %}"></script> |
118 | -{% endblock content %} | |
119 | 118 | \ No newline at end of file |
119 | +{% endblock content %} | ... | ... |
subjects/templates/subjects/list.html
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | |
6 | 6 | {% block javascript%} |
7 | 7 | {{ block.super }} |
8 | - <script type="text/javascript" src=" {% static "subjects/js/modal_subject.js" %} "></script> | |
8 | + <script type="text/javascript" src=" {% static 'subjects/js/modal_subject.js' %} "></script> | |
9 | 9 | {% endblock%} |
10 | 10 | |
11 | 11 | {% block breadcrumbs %} |
... | ... | @@ -39,7 +39,7 @@ |
39 | 39 | <a href="{% url 'subjects:index' %}"><li class="active">{% trans "My subjects" %} ({{ totals.my_subjects }})</li></a> |
40 | 40 | <a href="{% url 'subjects:index' 'all' %}" ><li>{% trans "All subjects" %} ({{ totals.all_subjects }})</li></a> |
41 | 41 | {% endif %} |
42 | - | |
42 | + | |
43 | 43 | </ul> |
44 | 44 | </div> |
45 | 45 | |
... | ... | @@ -54,9 +54,9 @@ |
54 | 54 | <div class="row"> |
55 | 55 | <div class="col-md-12 category-header"> |
56 | 56 | <h4 class="panel-title"> |
57 | - <a class="category-course-link pull-left" data-parent="#accordion" data-toggle="collapse" href="#{{category.slug}}"> | |
58 | - <button class="btn btn-default btn-xs text-center cat-selector"><i class="fa fa-angle-right fa-2x" aria-hidden="true"></i></button> {{ category.name }} | |
59 | - | |
57 | + <a class="category-course-link pull-left" data-parent="#accordion" data-toggle="collapse" href="#{{category.slug}}_category"> | |
58 | + <button class="btn btn-default btn-xs text-center cat-selector"><i class="fa fa-angle-right fa-2x" aria-hidden="true"></i></button> {{ category.name }} | |
59 | + | |
60 | 60 | {% if not all %} |
61 | 61 | ({{ category|subject_count:user }}) |
62 | 62 | {% else %} |
... | ... | @@ -64,10 +64,10 @@ |
64 | 64 | {% endif %} |
65 | 65 | </a> |
66 | 66 | </h4> |
67 | - | |
67 | + | |
68 | 68 | <div class="col-md-5 pull-right category-card-items"> |
69 | 69 | {% if request.user.is_staff or user in category.coordinators.all %} |
70 | - <a href="" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
70 | + <a href="" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
71 | 71 | <i class="fa fa-ellipsis-v" aria-hidden="true"></i> |
72 | 72 | </a> |
73 | 73 | <ul class="dropdown-menu pull-right" aria-labelledby="moreActions"> |
... | ... | @@ -79,17 +79,17 @@ |
79 | 79 | <a href="javascript:delete_course.get('{% url 'categories:delete' category.slug %}?view=index','#category','#modal_course')" aria-hidden="true"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans 'Remove' %}</a></li> |
80 | 80 | </ul> |
81 | 81 | {% endif %} |
82 | - | |
82 | + | |
83 | 83 | </div> |
84 | 84 | </div> |
85 | 85 | </div> |
86 | 86 | </div> |
87 | - <div id="{{category.slug}}" class="panel-collapse panel-body collapse category-panel-content"> | |
87 | + <div id="{{category.slug}}_category" class="panel-collapse panel-body collapse category-panel-content"> | |
88 | 88 | <input type="hidden" class="log_url" value="{% url 'categories:view_log' category.id %}" /> |
89 | 89 | <input type="hidden" class="log_id" value="" /> |
90 | 90 | |
91 | 91 | <input type="hidden" class="load_sub_url" value="{% url 'subjects:load_view' category.slug %}" /> |
92 | - | |
92 | + | |
93 | 93 | {% if category.coordinators.all|length > 0 %} |
94 | 94 | <h4><b>{% trans "Coordinator(s) " %}: </b> |
95 | 95 | {{ category.coordinators.all|join:', ' }} |
... | ... | @@ -97,16 +97,16 @@ |
97 | 97 | {% else %} |
98 | 98 | <h4> {% trans "It doesn't possess coordinators" %} </h4> |
99 | 99 | {% endif %} |
100 | - | |
100 | + | |
101 | 101 | {{category.description|safe}} |
102 | - | |
102 | + | |
103 | 103 | {% if request.user in category.coordinators.all or request.user.is_staff %} |
104 | 104 | <a href="{% url 'subjects:create' category.slug %}" class="btn btn-raised btn-success btn-block btn-sm">{% trans "Create new subject" %}</a> |
105 | 105 | {% endif %} |
106 | - | |
107 | - <div class="panel-group subject-group" id="{{ category.slug }}-accordion" role="tablist" aria-multiselectable="true"> | |
108 | - | |
109 | - </div> | |
106 | + | |
107 | + <div class="panel-group subject-group" id="{{ category.slug }}_category-accordion" role="tablist" aria-multiselectable="true"> | |
108 | + | |
109 | + </div> | |
110 | 110 | <div class="holder text-center"></div> |
111 | 111 | </div> |
112 | 112 | </div> |
... | ... | @@ -116,8 +116,8 @@ |
116 | 116 | <div class="row"> |
117 | 117 | <div class="col-md-12 category-header"> |
118 | 118 | <h4 class="panel-title"> |
119 | - <a class="category-course-link pull-left" data-parent="#accordion" data-toggle="collapse" href="#{{category.slug}}"> | |
120 | - <button class="btn btn-default btn-xs text-center cat-selector"><i class="fa fa-angle-right fa-2x" aria-hidden="true"></i></button> {{category.name}} | |
119 | + <a class="category-course-link pull-left" data-parent="#accordion" data-toggle="collapse" href="#{{category.slug}}_category"> | |
120 | + <button class="btn btn-default btn-xs text-center cat-selector"><i class="fa fa-angle-right fa-2x" aria-hidden="true"></i></button> {{category.name}} | |
121 | 121 | |
122 | 122 | {% if not all %} |
123 | 123 | ({{ category|subject_count:user }}) |
... | ... | @@ -126,10 +126,10 @@ |
126 | 126 | {% endif %} |
127 | 127 | </a> |
128 | 128 | </h4> |
129 | - | |
129 | + | |
130 | 130 | <div class="col-md-5 pull-right category-card-items"> |
131 | 131 | {% if request.user.is_staff or user in category.coordinators.all %} |
132 | - <a href="" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
132 | + <a href="" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
133 | 133 | <i class="fa fa-ellipsis-v" aria-hidden="true"></i> |
134 | 134 | </a> |
135 | 135 | <ul class="dropdown-menu pull-right" aria-labelledby="moreActions"> |
... | ... | @@ -140,12 +140,12 @@ |
140 | 140 | <li><a href="javascript:delete_course.get('{% url 'categories:delete' category.slug %}?view=index','#category','#modal_course')"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans 'Remove' %}</a></li> |
141 | 141 | </ul> |
142 | 142 | {% endif %} |
143 | - | |
143 | + | |
144 | 144 | </div> |
145 | 145 | </div> |
146 | 146 | </div> |
147 | 147 | </div> |
148 | - <div id="{{category.slug}}" class="panel-collapse panel-body collapse category-panel-content"> | |
148 | + <div id="{{category.slug}}_category" class="panel-collapse panel-body collapse category-panel-content"> | |
149 | 149 | <input type="hidden" class="log_url" value="{% url 'categories:view_log' category.id %}" /> |
150 | 150 | <input type="hidden" class="log_id" value="" /> |
151 | 151 | |
... | ... | @@ -158,15 +158,15 @@ |
158 | 158 | {% else %} |
159 | 159 | <h4> {% trans "It doesn't possess coordinators" %} </h4> |
160 | 160 | {% endif %} |
161 | - | |
161 | + | |
162 | 162 | {{category.description|safe}} |
163 | - | |
163 | + | |
164 | 164 | {% if request.user in category.coordinators.all or request.user.is_staff %} |
165 | 165 | <a href="{% url 'subjects:create' category.slug %}" class="btn btn-raised btn-success btn-block btn-sm">{% trans "Create new subject" %}</a> |
166 | 166 | {% endif %} |
167 | 167 | |
168 | - <div class="panel-group subject-group" id="{{ category.slug }}-accordion" role="tablist" aria-multiselectable="true"> | |
169 | - | |
168 | + <div class="panel-group subject-group" id="{{ category.slug }}_category-accordion" role="tablist" aria-multiselectable="true"> | |
169 | + | |
170 | 170 | </div> |
171 | 171 | </div> |
172 | 172 | </div> |
... | ... | @@ -185,12 +185,12 @@ |
185 | 185 | </div> |
186 | 186 | |
187 | 187 | <div id="modal_subject"></div> |
188 | - | |
188 | + | |
189 | 189 | <script type="text/javascript" src="{% static 'js/category.js' %}"></script> |
190 | - <script type="text/javascript" src="{% static "subjects/js/modal_subject.js" %}"></script> | |
190 | + <script type="text/javascript" src="{% static 'subjects/js/modal_subject.js' %}"></script> | |
191 | 191 | <script type="text/javascript"> |
192 | 192 | $(function (){ |
193 | - var cat_slug = "{{ cat_slug }}" | |
193 | + var cat_slug = "{{ cat_slug }}_category" | |
194 | 194 | |
195 | 195 | if (cat_slug != "") { |
196 | 196 | $("#" + cat_slug).collapse('show'); | ... | ... |
subjects/templates/subjects/list_search.html
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 | |
7 | 7 | {% block javascript%} |
8 | 8 | {{ block.super }} |
9 | - <script type="text/javascript" src=" {% static "js/category.js" %} "></script> | |
9 | + <script type="text/javascript" src=" {% static 'js/category.js' %} "></script> | |
10 | 10 | {% endblock%} |
11 | 11 | |
12 | 12 | |
... | ... | @@ -18,11 +18,11 @@ |
18 | 18 | {% with bread|add:tags as term %} |
19 | 19 | {% breadcrumb term 'subjects:index' %} |
20 | 20 | {% endwith %} |
21 | - | |
21 | + | |
22 | 22 | |
23 | 23 | {% endblock breadcrumbs %} |
24 | 24 | |
25 | - | |
25 | + | |
26 | 26 | {% block content %} |
27 | 27 | |
28 | 28 | {% if messages %} |
... | ... | @@ -51,21 +51,21 @@ |
51 | 51 | <a href="{% url 'subjects:search' 'subjects' %}?search={{tags}}"><li class="active">{% trans "Subjects" %} ({{ totals.my_subjects }})</li></a> |
52 | 52 | <a href="{% url 'subjects:search' 'resources' %}?search={{tags}}" ><li>{% trans "Resources" %} ({{ totals.resources }})</li></a> |
53 | 53 | {% endif %} |
54 | - | |
54 | + | |
55 | 55 | </ul> |
56 | 56 | </div> |
57 | 57 | |
58 | - | |
58 | + | |
59 | 59 | |
60 | 60 | <div class="col-md-12 cards-content"> |
61 | - | |
61 | + | |
62 | 62 | |
63 | 63 | {% if not all %} |
64 | 64 | <div class="panel-group" id="subject-accordion" role="tablist" aria-multiselectable="true"> |
65 | 65 | {% for subject in subjects %} |
66 | 66 | {% include "subjects/subject_card.html" with accordion_id="subject-accordion" %} |
67 | 67 | {% endfor %} |
68 | - | |
68 | + | |
69 | 69 | {% pagination request paginator page_obj %} |
70 | 70 | </div> |
71 | 71 | {% elif resources|length > 0 and all %} |
... | ... | @@ -73,10 +73,10 @@ |
73 | 73 | {% for resource in resources %} |
74 | 74 | {% include "subjects/resource_card.html" with resource=resource accordion_id="subject-accordion" %} |
75 | 75 | {% endfor %} |
76 | - | |
76 | + | |
77 | 77 | {% pagination request paginator page_obj %} |
78 | 78 | </div> |
79 | - {% else %} | |
79 | + {% else %} | |
80 | 80 | {% endif %} |
81 | 81 | |
82 | 82 | </div> |
... | ... | @@ -85,7 +85,7 @@ |
85 | 85 | </div> |
86 | 86 | |
87 | 87 | <div id="modal_subject"></div> |
88 | - | |
88 | + | |
89 | 89 | <script type="text/javascript" src="{% static 'js/category.js' %}"></script> |
90 | - | |
91 | -{% endblock content %} | |
92 | 90 | \ No newline at end of file |
91 | + | |
92 | +{% endblock content %} | ... | ... |
subjects/templates/subjects/resource_card.html
... | ... | @@ -6,11 +6,11 @@ |
6 | 6 | {% if has_resource_permissions %} |
7 | 7 | <div class="panel panel-info resource-panel"> |
8 | 8 | <div class="panel-heading"> |
9 | - | |
9 | + | |
10 | 10 | <div class="row"> |
11 | 11 | <div class="col-md-12 resource-header"> |
12 | 12 | <h4 class="panel-title"> |
13 | - <a class="resource-link pull-left" data-parent="#{% if accordion_id %}{{ accordion_id }}{% else %}{{ subject.category.slug }}-accordion{% endif %}" data-toggle="collapse" href="#{{resource.slug}}"> | |
13 | + <a class="resource-link pull-left" data-parent="#{% if accordion_id %}{{ accordion_id }}{% else %}{{ subject.category.slug }}_category-accordion{% endif %}" data-toggle="collapse" href="#{{resource.slug}}"> | |
14 | 14 | <button class="btn btn-default btn-xs text-center cat-selector"><i class="fa fa-angle-right fa-2x" aria-hidden="true"></i></button> {{ resource }} |
15 | 15 | </a> |
16 | 16 | </h4> |
... | ... | @@ -31,7 +31,7 @@ |
31 | 31 | </div> |
32 | 32 | </div> |
33 | 33 | |
34 | - | |
34 | + | |
35 | 35 | </div> |
36 | 36 | |
37 | 37 | <div id="{{resource.slug}}" class="panel-collapse collapse category-panel-content"> |
... | ... | @@ -55,11 +55,11 @@ |
55 | 55 | </div> |
56 | 56 | {% if resource.brief_description %} |
57 | 57 | <p>{{resource.brief_description|safe}}</p> |
58 | - | |
58 | + | |
59 | 59 | {% endif %} |
60 | 60 | |
61 | 61 | <a href="{{ resource.access_link }}" {% if resource.show_window %}target="_blank"{% endif %} class="btn btn-success btn-raised"> {% trans "Access Resource" %}</a> |
62 | - | |
62 | + | |
63 | 63 | </div> |
64 | 64 | |
65 | 65 | </div> |
... | ... | @@ -67,7 +67,7 @@ |
67 | 67 | {% include "resources/delete.html" with resource=resource %} |
68 | 68 | <script type="text/javascript"> |
69 | 69 | function delete_resource(url) { |
70 | - | |
70 | + | |
71 | 71 | |
72 | 72 | $.get(url, function (modal) { |
73 | 73 | $("#resource_{{ topic.slug }}").parent().after(modal); | ... | ... |
subjects/templates/subjects/subject_card.html
... | ... | @@ -14,14 +14,14 @@ |
14 | 14 | <div class="row"> |
15 | 15 | <div class="col-md-12 category-header"> |
16 | 16 | <h4 class="panel-title"> |
17 | - <a class="category-course-link pull-left" data-parent="#{% if accordion_id %}{{ accordion_id }}{% else %}{{ subject.category.slug }}-accordion{% endif %}" data-toggle="collapse" href="#{{subject.slug}}"> | |
17 | + <a class="category-course-link pull-left" data-parent="#{% if accordion_id %}{{ accordion_id }}{% else %}{{ subject.category.slug }}_category-accordion{% endif %}" data-toggle="collapse" href="#{{subject.slug}}_subject"> | |
18 | 18 | <button class="btn btn-default btn-xs text-center cat-selector"><i class="fa fa-angle-right fa-2x" aria-hidden="true"></i></button> {{ subject }} |
19 | 19 | </a> |
20 | 20 | </h4> |
21 | 21 | |
22 | 22 | <div class="col-md-5 pull-right category-card-items"> |
23 | 23 | {% if has_subject_permissions %} |
24 | - <a href="" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
24 | + <a href="" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
25 | 25 | <i class="fa fa-ellipsis-v" aria-hidden="true"></i> |
26 | 26 | </a> |
27 | 27 | <ul class="dropdown-menu pull-right" aria-labelledby="moreActions"> |
... | ... | @@ -48,7 +48,7 @@ |
48 | 48 | </div> |
49 | 49 | </div> |
50 | 50 | </div> |
51 | - <div id="{{subject.slug}}" class="panel-collapse collapse category-panel-content"> | |
51 | + <div id="{{subject.slug}}_subject" class="panel-collapse collapse category-panel-content"> | |
52 | 52 | <input type="hidden" class="log_url" value="{% url 'subjects:view_log' subject.id %}" /> |
53 | 53 | <input type="hidden" class="log_id" value="" /> |
54 | 54 | |
... | ... | @@ -72,9 +72,9 @@ |
72 | 72 | {% if subject.description_brief %} |
73 | 73 | <p>{{subject.description_brief|safe}}</p> |
74 | 74 | {% endif %} |
75 | - | |
76 | - {% if show_buttons %} | |
77 | - | |
75 | + | |
76 | + {% if show_buttons %} | |
77 | + | |
78 | 78 | {% if has_subject_view_permissions %} |
79 | 79 | <a href="{% url 'subjects:view' subject.slug %}" class="btn btn-success btn-raised"> {% trans "Access Subject" %}</a> |
80 | 80 | {% elif subject.subscribe_end|aftertoday %} | ... | ... |
subjects/templates/subjects/update.html
... | ... | @@ -5,12 +5,12 @@ |
5 | 5 | |
6 | 6 | {% block style %} |
7 | 7 | {{block.super}} |
8 | - <link rel="stylesheet" type="text/css" href="{% static "css/bootstrap-tagsinput.css" %}"> | |
8 | + <link rel="stylesheet" type="text/css" href="{% static 'css/bootstrap-tagsinput.css' %}"> | |
9 | 9 | {% endblock %} |
10 | 10 | |
11 | 11 | {% block javascript %} |
12 | 12 | {{block.super}} |
13 | - <script type="text/javascript" src="{% static "js/bootstrap-tagsinput.js" %} "></script> | |
13 | + <script type="text/javascript" src="{% static 'js/bootstrap-tagsinput.js' %} "></script> | |
14 | 14 | {% endblock %} |
15 | 15 | |
16 | 16 | {% block breadcrumbs %} |
... | ... | @@ -18,9 +18,9 @@ |
18 | 18 | |
19 | 19 | {% breadcrumb subject.category 'subjects:cat_view' subject.category.slug %} |
20 | 20 | {% breadcrumb subject 'subjects:view' subject.slug %} |
21 | - | |
21 | + | |
22 | 22 | {% trans 'Update: ' as bread %} |
23 | - {% with bread|add:object.name as bread_slug %} | |
23 | + {% with bread|add:object.name as bread_slug %} | |
24 | 24 | {% breadcrumb bread_slug 'subjects:update' %} |
25 | 25 | {% endwith %} |
26 | 26 | {% endblock %} |
... | ... | @@ -33,4 +33,4 @@ |
33 | 33 | </div> |
34 | 34 | <br clear="all" /> |
35 | 35 | <br clear="all" /> |
36 | -{% endblock %} | |
37 | 36 | \ No newline at end of file |
37 | +{% endblock %} | ... | ... |
subjects/templates/subjects/view.html
... | ... | @@ -43,7 +43,7 @@ |
43 | 43 | |
44 | 44 | <div class="col-md-5 pull-right category-card-items"> |
45 | 45 | {% if request.user in subject.professor.all or request.user in subject.category.coordinators.all or request.user.is_staff %} |
46 | - <a href="" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
46 | + <a href="" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
47 | 47 | <i class="fa fa-ellipsis-v" aria-hidden="true"></i> |
48 | 48 | </a> |
49 | 49 | <ul class="dropdown-menu pull-right" aria-labelledby="moreActions"> |
... | ... | @@ -55,7 +55,7 @@ |
55 | 55 | <li><a href="javascript:delete_subject.get('{% url 'subjects:delete' subject.slug %}?view=index','#subject','#modal_subject')"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans 'Remove' %}</a></li> |
56 | 56 | </ul> |
57 | 57 | {% endif %} |
58 | - | |
58 | + | |
59 | 59 | <a href="" class="pull-right action_icon"><i class="fa fa-bar-chart" aria-hidden="true"></i></a> |
60 | 60 | <a href="{% url 'notifications:view' subject.slug %}" class="pull-right action_icon"> |
61 | 61 | <i class="fa fa-exclamation-triangle" aria-hidden="true"></i> |
... | ... | @@ -76,14 +76,14 @@ |
76 | 76 | {% if has_subject_permissions %} |
77 | 77 | <a href="{% url 'topics:create' subject.slug %}" class="btn btn-sm btn-success btn-raised btn-block">{% trans "Create new topic" %}</a> |
78 | 78 | {% endif %} |
79 | - | |
79 | + | |
80 | 80 | {% include 'topics/list.html' with subject=subject %} |
81 | 81 | </div> |
82 | 82 | </div> |
83 | 83 | |
84 | 84 | <div id="modal_subject"></div> |
85 | - | |
86 | - | |
85 | + | |
86 | + | |
87 | 87 | <script type="text/javascript"> |
88 | 88 | {% if resource_new_page %} |
89 | 89 | window.open("{{ resource_new_page_url }}"); |
... | ... | @@ -101,4 +101,4 @@ |
101 | 101 | } |
102 | 102 | }); |
103 | 103 | </script> |
104 | -{% endblock content %} | |
105 | 104 | \ No newline at end of file |
105 | +{% endblock content %} | ... | ... |