Commit 09d4f926d27ceae698feb3d7fac87fa8b61b8f87

Authored by Zambom
1 parent fb729f14

Goals adjusts

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