Commit 5830037b6f17d8c236ae32a43e1885f8b90d0b67
1 parent
f0267a77
Exists in
master
and in
3 other branches
changed resource_card, views and translated a few messages
Showing
4 changed files
with
8 additions
and
11 deletions
Show diff stats
links/locale/pt_BR/LC_MESSAGES/django.po
@@ -93,11 +93,11 @@ msgstr "Editar: " | @@ -93,11 +93,11 @@ msgstr "Editar: " | ||
93 | #: links/views.py:51 links/views.py:64 links/views.py:223 links/views.py:225 | 93 | #: links/views.py:51 links/views.py:64 links/views.py:223 links/views.py:225 |
94 | #: links/views.py:241 links/views.py:243 | 94 | #: links/views.py:241 links/views.py:243 |
95 | msgid "Visualize" | 95 | msgid "Visualize" |
96 | -msgstr "" | 96 | +msgstr "Visualizar" |
97 | 97 | ||
98 | #: links/views.py:124 | 98 | #: links/views.py:124 |
99 | msgid "Create Webiste Link" | 99 | msgid "Create Webiste Link" |
100 | -msgstr "" | 100 | +msgstr "Criar Link de Website" |
101 | 101 | ||
102 | #: links/views.py:135 | 102 | #: links/views.py:135 |
103 | #, python-format | 103 | #, python-format |
subjects/templates/subjects/resource_card.html
@@ -55,11 +55,9 @@ | @@ -55,11 +55,9 @@ | ||
55 | <p>{{resource.brief_description|safe}}</p> | 55 | <p>{{resource.brief_description|safe}}</p> |
56 | 56 | ||
57 | {% endif %} | 57 | {% endif %} |
58 | - {% if resource.link_url %} | ||
59 | - <p>teste</p> | ||
60 | - {% else %} | ||
61 | - <a href="{% url resource.access_link resource.slug %}" class="btn btn-success btn-raised"> {% trans "Access Resource" %}</a> | ||
62 | - {% endif %} | 58 | + |
59 | + <a href="{% url resource.access_link resource.slug %}" class="btn btn-success btn-raised"> {% trans "Access Resource" %}</a> | ||
60 | + | ||
63 | 61 | ||
64 | 62 | ||
65 | </div> | 63 | </div> |
subjects/views.py
@@ -20,7 +20,7 @@ from subjects.models import Subject | @@ -20,7 +20,7 @@ from subjects.models import Subject | ||
20 | from log.mixins import LogMixin | 20 | from log.mixins import LogMixin |
21 | from log.decorators import log_decorator_ajax | 21 | from log.decorators import log_decorator_ajax |
22 | from log.models import Log | 22 | from log.models import Log |
23 | - | 23 | +from itertools import chain |
24 | from .models import Tag | 24 | from .models import Tag |
25 | import time | 25 | import time |
26 | import datetime | 26 | import datetime |
@@ -608,9 +608,8 @@ class SubjectSearchView(LoginRequiredMixin, LogMixin, ListView): | @@ -608,9 +608,8 @@ class SubjectSearchView(LoginRequiredMixin, LogMixin, ListView): | ||
608 | subjects = Subject.objects.filter(q).distinct() | 608 | subjects = Subject.objects.filter(q).distinct() |
609 | self.resources = Resource.objects.filter(q).distinct() | 609 | self.resources = Resource.objects.filter(q).distinct() |
610 | 610 | ||
611 | - | ||
612 | self.totals = {'resources': self.resources.count(), 'my_subjects': subjects.count()} | 611 | self.totals = {'resources': self.resources.count(), 'my_subjects': subjects.count()} |
613 | - | 612 | + |
614 | option = self.kwargs.get('option') | 613 | option = self.kwargs.get('option') |
615 | if option and option == 'resources': | 614 | if option and option == 'resources': |
616 | return self.resources | 615 | return self.resources |
topics/templates/resources/list.html
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | <input type="hidden" class="url_order" value="{% url 'topics:update_resource_order' %}" /> | 14 | <input type="hidden" class="url_order" value="{% url 'topics:update_resource_order' %}" /> |
15 | 15 | ||
16 | <h4 class="pull-left list-group-item-heading"> | 16 | <h4 class="pull-left list-group-item-heading"> |
17 | - <a href="{% url resource.access_link resource.slug %}" class="resource_link" > | 17 | + <a href="{% url resource.access_link resource.slug %}" class="resource_link" {% if resource.show_window %}target="_blank"{% endif %} > |
18 | {{ resource.name }} | 18 | {{ resource.name }} |
19 | </a> | 19 | </a> |
20 | </h4> | 20 | </h4> |