Commit 3c790105eb81a8e2dc94f8c08eb900a8332d1e1e
1 parent
7f3260da
Exists in
master
and in
5 other branches
Corrigindo titulo das paginas [Issue #429]
Showing
6 changed files
with
21 additions
and
20 deletions
Show diff stats
app/views.py
@@ -35,7 +35,7 @@ class AppIndex(LoginRequiredMixin, ListView, NotificationMixin): | @@ -35,7 +35,7 @@ class AppIndex(LoginRequiredMixin, ListView, NotificationMixin): | ||
35 | else: | 35 | else: |
36 | context['page_template'] = "home_teacher_student_content.html" | 36 | context['page_template'] = "home_teacher_student_content.html" |
37 | 37 | ||
38 | - context['title'] = _('Home | Amadeus') | 38 | + context['title'] = _('Home') |
39 | 39 | ||
40 | if self.request.is_ajax(): | 40 | if self.request.is_ajax(): |
41 | if self.request.user.is_staff: | 41 | if self.request.user.is_staff: |
@@ -79,7 +79,7 @@ class AmadeusSettings(LoginRequiredMixin, HasRoleMixin, generic.CreateView): | @@ -79,7 +79,7 @@ class AmadeusSettings(LoginRequiredMixin, HasRoleMixin, generic.CreateView): | ||
79 | def get_context_data(self, **kwargs): | 79 | def get_context_data(self, **kwargs): |
80 | context = super(AmadeusSettings, self).get_context_data(**kwargs) | 80 | context = super(AmadeusSettings, self).get_context_data(**kwargs) |
81 | context['page'] = self.kwargs.get('page') | 81 | context['page'] = self.kwargs.get('page') |
82 | - context['title'] = _('Settings | Amadeus') | 82 | + context['title'] = _('Settings') |
83 | if not self.request.method == 'POST': | 83 | if not self.request.method == 'POST': |
84 | try: | 84 | try: |
85 | setting = EmailBackend.objects.latest('id') | 85 | setting = EmailBackend.objects.latest('id') |
core/templates/base.html
@@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
6 | 6 | ||
7 | <html> | 7 | <html> |
8 | <head> | 8 | <head> |
9 | - <title>{{ title }}</title> | 9 | + <title>{{ title }} | Amadeus</title> |
10 | 10 | ||
11 | <!-- jQuery & jQuery UI --> | 11 | <!-- jQuery & jQuery UI --> |
12 | <script type="text/javascript" src="{% static 'js/vendor/jquery-3.1.0.min.js' %}"></script> | 12 | <script type="text/javascript" src="{% static 'js/vendor/jquery-3.1.0.min.js' %}"></script> |
core/templates/guest.html
@@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
5 | 5 | ||
6 | <html> | 6 | <html> |
7 | <head> | 7 | <head> |
8 | - <title>{{ title }}</title> | 8 | + <title>{{ title }} | Amadeus</title> |
9 | 9 | ||
10 | <meta http-equiv="Cache-Control" content="no-cache, no-store" /> | 10 | <meta http-equiv="Cache-Control" content="no-cache, no-store" /> |
11 | <link href="{% static 'img/favicon.ico' %}" rel="shortcut icon" /> | 11 | <link href="{% static 'img/favicon.ico' %}" rel="shortcut icon" /> |
core/views.py
@@ -58,6 +58,7 @@ def create_account(request): | @@ -58,6 +58,7 @@ def create_account(request): | ||
58 | 58 | ||
59 | def login(request): | 59 | def login(request): |
60 | context = {} | 60 | context = {} |
61 | + context['title'] = 'Log In' | ||
61 | 62 | ||
62 | if request.POST: | 63 | if request.POST: |
63 | username = request.POST['username'] | 64 | username = request.POST['username'] |
courses/views.py
@@ -101,7 +101,7 @@ class IndexView(LoginRequiredMixin, NotificationMixin, generic.ListView): | @@ -101,7 +101,7 @@ class IndexView(LoginRequiredMixin, NotificationMixin, generic.ListView): | ||
101 | 101 | ||
102 | translated = _('You searched for... ') | 102 | translated = _('You searched for... ') |
103 | context['categorys_courses'] = course_category(list_courses) | 103 | context['categorys_courses'] = course_category(list_courses) |
104 | - context['title'] = _('Courses | Amadeus') | 104 | + context['title'] = _('Courses') |
105 | if self.course_search: | 105 | if self.course_search: |
106 | context['search'] = translated + self.course_search | 106 | context['search'] = translated + self.course_search |
107 | else: | 107 | else: |
@@ -143,7 +143,7 @@ class AllCoursesView(LoginRequiredMixin, NotificationMixin, generic.ListView): | @@ -143,7 +143,7 @@ class AllCoursesView(LoginRequiredMixin, NotificationMixin, generic.ListView): | ||
143 | list_courses = self.get_queryset() | 143 | list_courses = self.get_queryset() |
144 | 144 | ||
145 | context['categorys_courses'] = course_category(list_courses) | 145 | context['categorys_courses'] = course_category(list_courses) |
146 | - context['title'] = _('All Courses | Amadeus') | 146 | + context['title'] = _('All Courses') |
147 | 147 | ||
148 | return context | 148 | return context |
149 | 149 | ||
@@ -180,7 +180,7 @@ class CreateCourseView(LoginRequiredMixin, HasRoleMixin, LogMixin, NotificationM | @@ -180,7 +180,7 @@ class CreateCourseView(LoginRequiredMixin, HasRoleMixin, LogMixin, NotificationM | ||
180 | elif has_role(self.request.user,'professor'): | 180 | elif has_role(self.request.user,'professor'): |
181 | courses = self.request.user.courses_student.all() | 181 | courses = self.request.user.courses_student.all() |
182 | context['courses'] = courses | 182 | context['courses'] = courses |
183 | - context['title'] = _("Create Course | Amadeus") | 183 | + context['title'] = _("Create Course") |
184 | context['now'] = date.today() | 184 | context['now'] = date.today() |
185 | return context | 185 | return context |
186 | 186 | ||
@@ -223,7 +223,7 @@ class ReplicateCourseView(LoginRequiredMixin, HasRoleMixin, LogMixin, Notificati | @@ -223,7 +223,7 @@ class ReplicateCourseView(LoginRequiredMixin, HasRoleMixin, LogMixin, Notificati | ||
223 | context['courses'] = courses | 223 | context['courses'] = courses |
224 | context['course'] = course | 224 | context['course'] = course |
225 | context['categorys_courses'] = categorys_courses | 225 | context['categorys_courses'] = categorys_courses |
226 | - context['title'] = _("Replicate Course | Amadeus") | 226 | + context['title'] = _("Replicate Course") |
227 | context['now'] = date.today() | 227 | context['now'] = date.today() |
228 | return context | 228 | return context |
229 | 229 | ||
@@ -511,7 +511,7 @@ class IndexCatView(LoginRequiredMixin, generic.ListView): | @@ -511,7 +511,7 @@ class IndexCatView(LoginRequiredMixin, generic.ListView): | ||
511 | 511 | ||
512 | def get_context_data (self, **kwargs): | 512 | def get_context_data (self, **kwargs): |
513 | context = super(IndexCatView, self).get_context_data(**kwargs) | 513 | context = super(IndexCatView, self).get_context_data(**kwargs) |
514 | - context['title'] = _('Categories | Amadeus') | 514 | + context['title'] = _('Categories') |
515 | return context | 515 | return context |
516 | 516 | ||
517 | class CreateCatView(LoginRequiredMixin, HasRoleMixin, generic.edit.CreateView): | 517 | class CreateCatView(LoginRequiredMixin, HasRoleMixin, generic.edit.CreateView): |
@@ -530,7 +530,7 @@ class CreateCatView(LoginRequiredMixin, HasRoleMixin, generic.edit.CreateView): | @@ -530,7 +530,7 @@ class CreateCatView(LoginRequiredMixin, HasRoleMixin, generic.edit.CreateView): | ||
530 | 530 | ||
531 | def get_context_data (self, **kwargs): | 531 | def get_context_data (self, **kwargs): |
532 | context = super(CreateCatView, self).get_context_data(**kwargs) | 532 | context = super(CreateCatView, self).get_context_data(**kwargs) |
533 | - context['title'] = _('Create Category | Amadeus') | 533 | + context['title'] = _('Create Category') |
534 | 534 | ||
535 | return context | 535 | return context |
536 | 536 | ||
@@ -724,7 +724,7 @@ class CreateTopicView(LoginRequiredMixin, HasRoleMixin, LogMixin, NotificationMi | @@ -724,7 +724,7 @@ class CreateTopicView(LoginRequiredMixin, HasRoleMixin, LogMixin, NotificationMi | ||
724 | context['course'] = subject.course | 724 | context['course'] = subject.course |
725 | context['subject'] = subject | 725 | context['subject'] = subject |
726 | context['subjects'] = subject.course.subjects.all() | 726 | context['subjects'] = subject.course.subjects.all() |
727 | - context['title'] = _('Create Topic | Amadeus') | 727 | + context['title'] = _('Create Topic') |
728 | return context | 728 | return context |
729 | 729 | ||
730 | def form_valid(self, form): | 730 | def form_valid(self, form): |
@@ -824,7 +824,7 @@ class CreateSubjectView(LoginRequiredMixin, HasRoleMixin, LogMixin, Notification | @@ -824,7 +824,7 @@ class CreateSubjectView(LoginRequiredMixin, HasRoleMixin, LogMixin, Notification | ||
824 | context['subjects'] = course.subjects.filter(Q(visible=True) | Q(professors__in=[self.request.user])) | 824 | context['subjects'] = course.subjects.filter(Q(visible=True) | Q(professors__in=[self.request.user])) |
825 | if (has_role(self.request.user,'system_admin')): | 825 | if (has_role(self.request.user,'system_admin')): |
826 | context['subjects'] = course.subjects.all() | 826 | context['subjects'] = course.subjects.all() |
827 | - context['title'] = _('Create Subject | Amadeus') | 827 | + context['title'] = _('Create Subject') |
828 | return context | 828 | return context |
829 | 829 | ||
830 | def form_valid(self, form): | 830 | def form_valid(self, form): |
users/views.py
@@ -47,7 +47,7 @@ class UsersListView(HasRoleMixin, LoginRequiredMixin, generic.ListView): | @@ -47,7 +47,7 @@ class UsersListView(HasRoleMixin, LoginRequiredMixin, generic.ListView): | ||
47 | 47 | ||
48 | def get_context_data (self, **kwargs): | 48 | def get_context_data (self, **kwargs): |
49 | context = super(UsersListView, self).get_context_data(**kwargs) | 49 | context = super(UsersListView, self).get_context_data(**kwargs) |
50 | - context['title'] = 'Manage Users | Amadeus' | 50 | + context['title'] = 'Manage Users' |
51 | return context | 51 | return context |
52 | 52 | ||
53 | class Create(HasRoleMixin, LoginRequiredMixin, generic.edit.CreateView): | 53 | class Create(HasRoleMixin, LoginRequiredMixin, generic.edit.CreateView): |
@@ -77,7 +77,7 @@ class Create(HasRoleMixin, LoginRequiredMixin, generic.edit.CreateView): | @@ -77,7 +77,7 @@ class Create(HasRoleMixin, LoginRequiredMixin, generic.edit.CreateView): | ||
77 | return super(Create, self).form_valid(form) | 77 | return super(Create, self).form_valid(form) |
78 | def get_context_data (self, **kwargs): | 78 | def get_context_data (self, **kwargs): |
79 | context = super(Create, self).get_context_data(**kwargs) | 79 | context = super(Create, self).get_context_data(**kwargs) |
80 | - context['title'] = "Add User | Amadeus" | 80 | + context['title'] = "Add User" |
81 | return context | 81 | return context |
82 | 82 | ||
83 | class Update(HasRoleMixin, LoginRequiredMixin, generic.UpdateView): | 83 | class Update(HasRoleMixin, LoginRequiredMixin, generic.UpdateView): |
@@ -111,7 +111,7 @@ class Update(HasRoleMixin, LoginRequiredMixin, generic.UpdateView): | @@ -111,7 +111,7 @@ class Update(HasRoleMixin, LoginRequiredMixin, generic.UpdateView): | ||
111 | 111 | ||
112 | def get_context_data (self, **kwargs): | 112 | def get_context_data (self, **kwargs): |
113 | context = super(Update, self).get_context_data(**kwargs) | 113 | context = super(Update, self).get_context_data(**kwargs) |
114 | - context['title'] = "Update User | Amadeus" | 114 | + context['title'] = "Update User" |
115 | return context | 115 | return context |
116 | 116 | ||
117 | class View(LoginRequiredMixin, generic.DetailView): | 117 | class View(LoginRequiredMixin, generic.DetailView): |
@@ -126,7 +126,7 @@ class View(LoginRequiredMixin, generic.DetailView): | @@ -126,7 +126,7 @@ class View(LoginRequiredMixin, generic.DetailView): | ||
126 | 126 | ||
127 | def get_context_data (self, **kwargs): | 127 | def get_context_data (self, **kwargs): |
128 | context = super(View, self).get_context_data(**kwargs) | 128 | context = super(View, self).get_context_data(**kwargs) |
129 | - context['title'] = "User | Amadeus" | 129 | + context['title'] = "User" |
130 | return context | 130 | return context |
131 | 131 | ||
132 | def delete_user(request,username): | 132 | def delete_user(request,username): |
@@ -146,7 +146,7 @@ class Change_password(generic.TemplateView): | @@ -146,7 +146,7 @@ class Change_password(generic.TemplateView): | ||
146 | 146 | ||
147 | def get_context_data (self, **kwargs): | 147 | def get_context_data (self, **kwargs): |
148 | context = super(Change_password, self).get_context_data(**kwargs) | 148 | context = super(Change_password, self).get_context_data(**kwargs) |
149 | - context['title'] = "Change Password | Amadeus" | 149 | + context['title'] = "Change Password" |
150 | return context | 150 | return context |
151 | 151 | ||
152 | class Remove_account(generic.TemplateView): | 152 | class Remove_account(generic.TemplateView): |
@@ -154,7 +154,7 @@ class Remove_account(generic.TemplateView): | @@ -154,7 +154,7 @@ class Remove_account(generic.TemplateView): | ||
154 | 154 | ||
155 | def get_context_data (self, **kwargs): | 155 | def get_context_data (self, **kwargs): |
156 | context = super(Remove_account, self).get_context_data(**kwargs) | 156 | context = super(Remove_account, self).get_context_data(**kwargs) |
157 | - context['title'] = "Remove Account | Amadeus" | 157 | + context['title'] = "Remove Account" |
158 | return context | 158 | return context |
159 | 159 | ||
160 | class UpdateProfile(LoginRequiredMixin, generic.edit.UpdateView): | 160 | class UpdateProfile(LoginRequiredMixin, generic.edit.UpdateView): |
@@ -169,7 +169,7 @@ class UpdateProfile(LoginRequiredMixin, generic.edit.UpdateView): | @@ -169,7 +169,7 @@ class UpdateProfile(LoginRequiredMixin, generic.edit.UpdateView): | ||
169 | 169 | ||
170 | def get_context_data(self, **kwargs): | 170 | def get_context_data(self, **kwargs): |
171 | context = super(UpdateProfile, self).get_context_data(**kwargs) | 171 | context = super(UpdateProfile, self).get_context_data(**kwargs) |
172 | - context['title'] = 'Update Profile | Amadeus' | 172 | + context['title'] = 'Update Profile' |
173 | if has_role(self.request.user, 'system_admin'): | 173 | if has_role(self.request.user, 'system_admin'): |
174 | context['form'] = UpdateProfileFormAdmin(instance = self.object) | 174 | context['form'] = UpdateProfileFormAdmin(instance = self.object) |
175 | else: | 175 | else: |
@@ -207,7 +207,7 @@ class Profile(LoginRequiredMixin, generic.DetailView): | @@ -207,7 +207,7 @@ class Profile(LoginRequiredMixin, generic.DetailView): | ||
207 | 207 | ||
208 | def get_context_data (self, **kwargs): | 208 | def get_context_data (self, **kwargs): |
209 | context = super(Profile, self).get_context_data(**kwargs) | 209 | context = super(Profile, self).get_context_data(**kwargs) |
210 | - context['title'] = "Profile | Amadeus" | 210 | + context['title'] = "Profile" |
211 | return context | 211 | return context |
212 | 212 | ||
213 | class SearchView(LoginRequiredMixin, generic.ListView): | 213 | class SearchView(LoginRequiredMixin, generic.ListView): |