Skip to content

Commit

Permalink
Project list widget now displays partners
Browse files Browse the repository at this point in the history
Project partners are now listed with working
links.

. #15
  • Loading branch information
kardan committed Apr 15, 2013
1 parent 45efe6a commit cd605fd
Showing 1 changed file with 6 additions and 29 deletions.
35 changes: 6 additions & 29 deletions akvo/templates/widgets/project_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,33 +129,12 @@ <h2 style="margin-bottom:4px; padding-bottom:0; font-weight:bold"><a href="{% ur
</p>
</td>
<td class="tableRow partnerCell">
{% with project.fieldpartner_set.all as fieldpartners %}
{% if fieldpartners %}
<p class="grey" style="margin-top:2px;">{% trans 'Field Partner' %}{{fieldpartners.count|pluralize}}<br />
{% for fieldpartner in fieldpartners %}
<a href="{{fieldpartner.field_organisation.get_absolute_url}}">{{fieldpartner.field_organisation.name}}</a>{% if not forloop.last %},{% endif %}
{% endfor %}
</p>
{% endif %}
{% endwith %}
{% with project.fundingpartner_set.all as fundingpartners %}
{% if fundingpartners %}
<p class="grey">{% trans 'Funding Partner' %}{{fundingpartners.count|pluralize}}<br />
{% for fundingpartner in fundingpartners %}
<a href="{{fundingpartner.funding_organisation.get_absolute_url}}">{{fundingpartner.funding_organisation.name}}</a>{% if not forloop.last %},{% endif %}
{% endfor %}
</p>
{% endif %}
{% endwith %}
{% with project.supportpartner_set.all as supportpartners %}
{% if supportpartners %}
<p class="grey">{% trans 'Support Partner' %}{{supportpartners.count|pluralize}}<br />
{% for supportpartner in supportpartners %}
<a href="{{supportpartner.support_organisation.get_absolute_url}}">{{supportpartner.support_organisation.name}}</a>{% if not forloop.last %},{% endif %}
{% endfor %}
</p>
{% endif %}
{% endwith %}
<p class="grey" style="margin-top:2px;">
{% for partner in project.partners.all.distinct %}
<a href="{{partner.get_absolute_url}}">
{{partner.name}}</a>{% if not forloop.last %},{% endif %}
{% endfor %}
</p>
</td>
<td class="tableRow fundingCell">
<div style="margin: 0 auto 0 auto; text-align:center;">
Expand All @@ -166,5 +145,3 @@ <h2 style="margin-bottom:4px; padding-bottom:0; font-weight:bold"><a href="{% ur
</table>
</div>
{% endblock content %}


0 comments on commit cd605fd

Please sign in to comment.