Commit 09d4f926d27ceae698feb3d7fac87fa8b61b8f87

Authored by Zambom
1 parent fb729f14

Goals adjusts

goals/views.py
... ... @@ -32,7 +32,7 @@ class Reports(LoginRequiredMixin, generic.ListView):
32 32 slug = self.kwargs.get('slug', '')
33 33 goals = get_object_or_404(Goals, slug = slug)
34 34  
35   - if not has_resource_permissions(request.user, goals):
  35 + if not has_subject_permissions(request.user, goals):
36 36 return redirect(reverse_lazy('subjects:home'))
37 37  
38 38 return super(Reports, self).dispatch(request, *args, **kwargs)
... ... @@ -90,7 +90,7 @@ class AnsweredReport(LoginRequiredMixin, generic.ListView):
90 90 slug = self.kwargs.get('slug', '')
91 91 goals = get_object_or_404(Goals, slug = slug)
92 92  
93   - if not has_resource_permissions(request.user, goals):
  93 + if not has_subject_permissions(request.user, goals):
94 94 return redirect(reverse_lazy('subjects:home'))
95 95  
96 96 return super(AnsweredReport, self).dispatch(request, *args, **kwargs)
... ... @@ -130,7 +130,7 @@ class UnansweredReport(LoginRequiredMixin, generic.ListView):
130 130 slug = self.kwargs.get('slug', '')
131 131 goals = get_object_or_404(Goals, slug = slug)
132 132  
133   - if not has_resource_permissions(request.user, goals):
  133 + if not has_subject_permissions(request.user, goals):
134 134 return redirect(reverse_lazy('subjects:home'))
135 135  
136 136 return super(UnansweredReport, self).dispatch(request, *args, **kwargs)
... ... @@ -164,7 +164,7 @@ class HistoryReport(LoginRequiredMixin, generic.ListView):
164 164 slug = self.kwargs.get('slug', '')
165 165 goals = get_object_or_404(Goals, slug = slug)
166 166  
167   - if not has_resource_permissions(request.user, goals):
  167 + if not has_subject_permissions(request.user, goals):
168 168 return redirect(reverse_lazy('subjects:home'))
169 169  
170 170 return super(HistoryReport, self).dispatch(request, *args, **kwargs)
... ...
topics/locale/pt_BR/LC_MESSAGES/django.po
... ... @@ -118,7 +118,7 @@ msgstr "Editar"
118 118  
119 119 #: topics/templates/resources/list.html:33
120 120 msgid "Reports"
121   -msgstr ""
  121 +msgstr "Relatórios"
122 122  
123 123 #: topics/templates/resources/list.html:35 topics/templates/topics/list.html:29
124 124 msgid "Remove"
... ... @@ -173,10 +173,8 @@ msgid "Webpage"
173 173 msgstr "Página Web"
174 174  
175 175 #: topics/templates/topics/list.html:61
176   -#, fuzzy
177   -#| msgid "Topics"
178 176 msgid "Topic Goals"
179   -msgstr "Tópicos"
  177 +msgstr "Metas do Tópico"
180 178  
181 179 #: topics/templates/topics/list.html:62
182 180 msgid "Questionary"
... ... @@ -197,8 +195,6 @@ msgid "Topic \"%s\" was updated on virtual enviroment \"%s\" successfully!"
197 195 msgstr "Tópico \"%s\" foi atualizado no ambiente virtual \"%s\" com sucesso!"
198 196  
199 197 #: topics/views.py:193
200   -#, fuzzy
201   -#| msgid "Could not remove this topic. It has on or more resources attached."
202 198 msgid "Could not remove this topic. It has one or more resources attached."
203 199 msgstr ""
204 200 "Não é possível remover esse tópico. Ele possui um ou mais recursos "
... ...
topics/templates/topics/list.html
... ... @@ -57,8 +57,8 @@
57 57 <li><a href="#"><i class="fa fa-comments-o"></i> {% trans 'Forum' %}</a></li>
58 58 <li><a href="{% url 'file_links:create' topic.slug %}"><i class="fa fa-file-archive-o"></i> {% trans 'File Link' %}</a></li>
59 59 <li><a href="{% url 'links:create' topic.slug %}" > <i class="fa fa-globe"></i> {% trans "Link to Website" %}</a>
60   - <li><a href="{% url 'webpages:create' topic.slug %}"><i class="fa fa-file-code-o"></i> {% trans 'Webpage' %}</a></li>
61 60 <li><a href="{% url 'goals:create' topic.slug %}"><i class="fa fa-line-chart"></i> {% trans 'Topic Goals' %}</a></li>
  61 + <li><a href="{% url 'webpages:create' topic.slug %}"><i class="fa fa-file-code-o"></i> {% trans 'Webpage' %}</a></li>
62 62 <li><a href="#"><i class="fa fa-question-circle-o"></i> {% trans 'Questionary' %}</a></li>
63 63  
64 64 </ul>
... ...