Commit 5830037b6f17d8c236ae32a43e1885f8b90d0b67

Authored by Felipe Henrique de Almeida Bormann
1 parent f0267a77

changed resource_card, views and translated a few messages

links/locale/pt_BR/LC_MESSAGES/django.po
... ... @@ -93,11 +93,11 @@ msgstr "Editar: "
93 93 #: links/views.py:51 links/views.py:64 links/views.py:223 links/views.py:225
94 94 #: links/views.py:241 links/views.py:243
95 95 msgid "Visualize"
96   -msgstr ""
  96 +msgstr "Visualizar"
97 97  
98 98 #: links/views.py:124
99 99 msgid "Create Webiste Link"
100   -msgstr ""
  100 +msgstr "Criar Link de Website"
101 101  
102 102 #: links/views.py:135
103 103 #, python-format
... ...
subjects/templates/subjects/resource_card.html
... ... @@ -55,11 +55,9 @@
55 55 <p>{{resource.brief_description|safe}}</p>
56 56  
57 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 63 </div>
... ...
subjects/views.py
... ... @@ -20,7 +20,7 @@ from subjects.models import Subject
20 20 from log.mixins import LogMixin
21 21 from log.decorators import log_decorator_ajax
22 22 from log.models import Log
23   -
  23 +from itertools import chain
24 24 from .models import Tag
25 25 import time
26 26 import datetime
... ... @@ -608,9 +608,8 @@ class SubjectSearchView(LoginRequiredMixin, LogMixin, ListView):
608 608 subjects = Subject.objects.filter(q).distinct()
609 609 self.resources = Resource.objects.filter(q).distinct()
610 610  
611   -
612 611 self.totals = {'resources': self.resources.count(), 'my_subjects': subjects.count()}
613   -
  612 +
614 613 option = self.kwargs.get('option')
615 614 if option and option == 'resources':
616 615 return self.resources
... ...
topics/templates/resources/list.html
... ... @@ -14,7 +14,7 @@
14 14 <input type="hidden" class="url_order" value="{% url 'topics:update_resource_order' %}" />
15 15  
16 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 18 {{ resource.name }}
19 19 </a>
20 20 </h4>
... ...