Commit e9573f817d98bb554aa00d23c5522f0d103140e8
1 parent
0def626f
Exists in
master
and in
3 other branches
modified login required at some pages and texts on buttons
Showing
3 changed files
with
6 additions
and
6 deletions
Show diff stats
categories/views.py
@@ -62,7 +62,7 @@ class IndexView(views.SuperuserRequiredMixin, LoginRequiredMixin, ListView): | @@ -62,7 +62,7 @@ class IndexView(views.SuperuserRequiredMixin, LoginRequiredMixin, ListView): | ||
62 | 62 | ||
63 | return context | 63 | return context |
64 | 64 | ||
65 | -class CreateCategory(views.SuperuserRequiredMixin, HasRoleMixin, LogMixin, CreateView): | 65 | +class CreateCategory(views.SuperuserRequiredMixin, LoginRequiredMixin, HasRoleMixin, LogMixin, CreateView): |
66 | log_component = 'category' | 66 | log_component = 'category' |
67 | log_action = 'create' | 67 | log_action = 'create' |
68 | log_resource = 'category' | 68 | log_resource = 'category' |
@@ -130,7 +130,7 @@ class CreateCategory(views.SuperuserRequiredMixin, HasRoleMixin, LogMixin, Creat | @@ -130,7 +130,7 @@ class CreateCategory(views.SuperuserRequiredMixin, HasRoleMixin, LogMixin, Creat | ||
130 | messages.success(self.request, _('Category "%s" register successfully!')%(objeto)) | 130 | messages.success(self.request, _('Category "%s" register successfully!')%(objeto)) |
131 | return reverse_lazy('categories:index') | 131 | return reverse_lazy('categories:index') |
132 | 132 | ||
133 | -class DeleteCategory(LogMixin, DeleteView): | 133 | +class DeleteCategory(LoginRequiredMixin, LogMixin, DeleteView): |
134 | log_component = 'category' | 134 | log_component = 'category' |
135 | log_action = 'delete' | 135 | log_action = 'delete' |
136 | log_resource = 'category' | 136 | log_resource = 'category' |
subjects/templates/subjects/delete.html
@@ -16,8 +16,8 @@ | @@ -16,8 +16,8 @@ | ||
16 | <!-- Modal Footer --> | 16 | <!-- Modal Footer --> |
17 | <div id="delete-category-footer" class="modal-footer"> | 17 | <div id="delete-category-footer" class="modal-footer"> |
18 | <!-- Don't remove that!!! --> | 18 | <!-- Don't remove that!!! --> |
19 | - <button type="button" class="btn btn-raised btn-default" data-dismiss="modal">{% trans "Close" %}</button> | ||
20 | - <button type="submit" id="button" form="delete_form" class="btn btn-success btn-raised erase-button">{% trans "Delete" %}</button> | 19 | + <button type="button" class="btn btn-raised btn-default" data-dismiss="modal">{% trans "CLOSE" %}</button> |
20 | + <button type="submit" id="button" form="delete_form" class="btn btn-success btn-raised erase-button">{% trans "DELETE" %}</button> | ||
21 | 21 | ||
22 | {% if index %} | 22 | {% if index %} |
23 | <script> | 23 | <script> |
subjects/templates/subjects/subject_card.html
@@ -115,9 +115,9 @@ | @@ -115,9 +115,9 @@ | ||
115 | {% if show_buttons %} | 115 | {% if show_buttons %} |
116 | 116 | ||
117 | {% if request.user in subject.students.all or request.user in subject.professor.all or request.user.is_staff or request.user in subject.category.coordinators.all %} | 117 | {% if request.user in subject.students.all or request.user in subject.professor.all or request.user.is_staff or request.user in subject.category.coordinators.all %} |
118 | - <a href="{% url 'subjects:view' subject.slug %}" class="btn btn-success btn-raised"> {% trans "Access Subject" %}</a> | 118 | + <a href="{% url 'subjects:view' subject.slug %}" class="btn btn-success btn-raised"> {% trans "ACESS SUBJECT" %}</a> |
119 | {% else %} | 119 | {% else %} |
120 | - <a href="{% url 'subjects:subscribe' subject.slug %}?view=index','#subject','#subject')" class="subscribe-subject btn btn-primary btn-raised"> {% trans "Subscribe to Subject" %}</a> | 120 | + <a href="{% url 'subjects:subscribe' subject.slug %}?view=index','#subject','#subject')" class="subscribe-subject btn btn-primary btn-raised"> {% trans "SUBSCRIBE TO SUBJECT" %}</a> |
121 | {% endif %} | 121 | {% endif %} |
122 | 122 | ||
123 | {% endif %} | 123 | {% endif %} |