Commit f18db84510dcc08e0170a0ebe9971988beb89132
1 parent
53062ba8
Exists in
master
and in
5 other branches
Included title's and title's translations [Issues:#398,#429]
Showing
1 changed file
with
8 additions
and
6 deletions
Show diff stats
courses/views.py
... | ... | @@ -99,7 +99,7 @@ class IndexView(LoginRequiredMixin, NotificationMixin, generic.ListView): |
99 | 99 | list_courses = self.get_queryset().filter(students__in = [self.request.user]).order_by('name') |
100 | 100 | |
101 | 101 | context['categorys_courses'] = course_category(list_courses) |
102 | - context['title'] = 'Courses' | |
102 | + context['title'] = _('Courses | Amadeus') | |
103 | 103 | return context |
104 | 104 | |
105 | 105 | class AllCoursesView(LoginRequiredMixin, NotificationMixin, generic.ListView): |
... | ... | @@ -137,7 +137,7 @@ class AllCoursesView(LoginRequiredMixin, NotificationMixin, generic.ListView): |
137 | 137 | list_courses = self.get_queryset() |
138 | 138 | |
139 | 139 | context['categorys_courses'] = course_category(list_courses) |
140 | - context['title'] = 'All Courses' | |
140 | + context['title'] = _('All Courses | Amadeus') | |
141 | 141 | |
142 | 142 | return context |
143 | 143 | |
... | ... | @@ -175,7 +175,7 @@ class CreateCourseView(LoginRequiredMixin, HasRoleMixin, LogMixin, NotificationM |
175 | 175 | elif has_role(self.request.user,'professor'): |
176 | 176 | courses = self.request.user.courses_student.all() |
177 | 177 | context['courses'] = courses |
178 | - context['title'] = _("Create Course") | |
178 | + context['title'] = _("Create Course | Amadeus") | |
179 | 179 | context['now'] = date.today() |
180 | 180 | return context |
181 | 181 | |
... | ... | @@ -217,7 +217,7 @@ class ReplicateCourseView(LoginRequiredMixin, HasRoleMixin, LogMixin, Notificati |
217 | 217 | context['courses'] = courses |
218 | 218 | context['course'] = course |
219 | 219 | context['categorys_courses'] = categorys_courses |
220 | - context['title'] = _("Replicate Course") | |
220 | + context['title'] = _("Replicate Course | Amadeus") | |
221 | 221 | context['now'] = date.today() |
222 | 222 | print (course.public) |
223 | 223 | return context |
... | ... | @@ -457,7 +457,7 @@ class IndexCatView(LoginRequiredMixin, generic.ListView): |
457 | 457 | |
458 | 458 | def get_context_data (self, **kwargs): |
459 | 459 | context = super(IndexCatView, self).get_context_data(**kwargs) |
460 | - context['title'] = 'Categories' | |
460 | + context['title'] = _('Categories | Amadeus') | |
461 | 461 | return context |
462 | 462 | |
463 | 463 | class CreateCatView(LoginRequiredMixin, HasRoleMixin, generic.edit.CreateView): |
... | ... | @@ -476,7 +476,7 @@ class CreateCatView(LoginRequiredMixin, HasRoleMixin, generic.edit.CreateView): |
476 | 476 | |
477 | 477 | def get_context_data (self, **kwargs): |
478 | 478 | context = super(CreateCatView, self).get_context_data(**kwargs) |
479 | - context['title'] = 'Create Category' | |
479 | + context['title'] = _('Create Category | Amadeus') | |
480 | 480 | |
481 | 481 | return context |
482 | 482 | |
... | ... | @@ -685,6 +685,7 @@ class CreateTopicView(LoginRequiredMixin, HasRoleMixin, LogMixin, NotificationMi |
685 | 685 | context['course'] = subject.course |
686 | 686 | context['subject'] = subject |
687 | 687 | context['subjects'] = subject.course.subjects.all() |
688 | + context['title'] = _('Create Topic | Amadeus') | |
688 | 689 | return context |
689 | 690 | |
690 | 691 | def form_valid(self, form): |
... | ... | @@ -790,6 +791,7 @@ class CreateSubjectView(LoginRequiredMixin, HasRoleMixin, LogMixin, Notification |
790 | 791 | context['subjects'] = course.subjects.filter(Q(visible=True) | Q(professors__in=[self.request.user])) |
791 | 792 | if (has_role(self.request.user,'system_admin')): |
792 | 793 | context['subjects'] = course.subjects.all() |
794 | + context['title'] = _('Create Subject | Amadeus') | |
793 | 795 | return context |
794 | 796 | |
795 | 797 | def form_valid(self, form): | ... | ... |