Commit a241f3897028f1e6269d0269146bcb4d07369be0
1 parent
b09f4ecb
Exists in
master
and in
5 other branches
some adjustments: template subjects
Showing
3 changed files
with
4 additions
and
3 deletions
Show diff stats
courses/templates/course/view.html
| ... | ... | @@ -284,7 +284,7 @@ |
| 284 | 284 | {% if user|has_role:'professor' or user|has_role:'system_admin' %} |
| 285 | 285 | |
| 286 | 286 | <div class="form-group"> |
| 287 | - <a href="#" data-toggle="modal" data-target="" class="btn btn-primary btn-lg btn-block btn-raised">{% trans 'Create Subject' %}<div class="ripple-container"></div></a> | |
| 287 | + <a href="{% url 'course:create_subject' course.slug %}" data-toggle="modal" data-target="" class="btn btn-primary btn-lg btn-block btn-raised">{% trans 'Create Subject' %}<div class="ripple-container"></div></a> | |
| 288 | 288 | </div> |
| 289 | 289 | {% endif %} |
| 290 | 290 | ... | ... |
courses/templates/subject/index.html
| ... | ... | @@ -36,11 +36,11 @@ |
| 36 | 36 | <div class="panel panel-info"> |
| 37 | 37 | <div class="panel-heading"> |
| 38 | 38 | <div class="row"> |
| 39 | - <div class="col-md-9 col-sm-9"> | |
| 39 | + <div class="col-md-10 col-sm-9"> | |
| 40 | 40 | <h3>{{subject}}</h3> |
| 41 | 41 | </div> |
| 42 | 42 | {% if user|has_role:'system_admin' or user in subject.professors %} |
| 43 | - <div class="col-xs-4 col-md-3 divMoreActions"> | |
| 43 | + <div class="col-xs-4 col-md-2 divMoreActions"> | |
| 44 | 44 | <div class="btn-group"> |
| 45 | 45 | <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
| 46 | 46 | <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i> | ... | ... |
courses/views.py
| ... | ... | @@ -210,6 +210,7 @@ class CourseView(LoginRequiredMixin, NotificationMixin, generic.DetailView): |
| 210 | 210 | context['subjects_category'] = subjects_category |
| 211 | 211 | context['categorys_subjects'] = categorys_subjects |
| 212 | 212 | context['courses'] = courses |
| 213 | + context['course'] = course | |
| 213 | 214 | context['title'] = course.name |
| 214 | 215 | |
| 215 | 216 | return context | ... | ... |