Commits

Andreas Loupasakis committed f58db62

Fixed resources summary in projects_list.html

Comments (0)

Files changed (1)

transifex/templates/projects/project_list.html

       <h3 class="name"><a href="{{ project.get_absolute_url }}">{{ project.name }}</a></h3>
       <p class="description">{{ project.description }}</p>
       <p>
-        <span class="i16 resource compact">
-          {% for resource in project.resources.all|slice:"0:4" %}<a class="resource" title="{% firstof resource.description|escape resource.name|escape %}" href="{{ resource.get_absolute_url }}">{{ resource.name }}</a> {% endfor %}
+       {% with project.resources.all|slice:"0:4" as resources %}
+       {% if resources %}
+        <span class="i16 resource compact">{% trans "Resources:" %}
+          {% for resource in resources %}
+            <a class="resource" title="{% firstof resource.description|escape resource.name|escape %}" href="{{ resource.get_absolute_url }}">{{ resource.name }}</a>
+            {% if not forloop.last %},{% endif %} 
+          {% endfor %}
         </span>
+       {% endif %}
+       {% endwith %}
       {% if project.tags %}| <span class="i16 tag compact">{% trans "Tags:" %} {% for tag in project.tagsobj.all|slice:"0:6" %}<a class="tag" href="{% url project_tag_list tag=tag %}">{{ tag }}</a> {% endfor %}</span>{% endif %}
       </p>
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.