Commit 3c790105eb81a8e2dc94f8c08eb900a8332d1e1e

Authored by Filipe Medeiros
1 parent 7f3260da

Corrigindo titulo das paginas [Issue #429]

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