Skip to content

Commit

Permalink
[#1330] Capitalize sector (category) names
Browse files Browse the repository at this point in the history
  • Loading branch information
KasperBrandt committed Mar 17, 2015
1 parent 1eb59c3 commit b463e6b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion akvo/codelists/models/sector.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Sector(BaseCodelist):
category_description = models.TextField(_(u'category description'), blank=True, null=False)

def __unicode__(self):
return self.code + ' - ' + self.name
return self.code + ' - ' + self.name.capitalize()

class Meta:
app_label = 'codelists'
Expand Down
2 changes: 1 addition & 1 deletion akvo/codelists/models/sector_category.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class SectorCategory(BaseCodelist):
description = models.TextField(_(u'description'), blank=True, null=False)

def __unicode__(self):
return self.code + ' - ' + self.name
return self.code + ' - ' + self.name.capitalize()

class Meta:
app_label = 'codelists'
Expand Down
6 changes: 3 additions & 3 deletions akvo/templates/project_directory.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ <h1><a href="{% url 'project-main' p.id %}"><i class="fa fa-folder-o"></i> {{p.t
<div class="visible-xs-block hidden-sm">
<p>
{% if p.sector_categories %}
<span class="detailedInfo">{% trans "Sectors" %}</span> {% for sector in p.sector_categories_codes %}{% if not forloop.first %}, {% endif %}<a href="{% url 'project-directory' %}?sector={{sector.0}}">{{sector.1|title}}</a>{% endfor %}<br>
<span class="detailedInfo">{% trans "Sectors" %}</span> {% for sector in p.sector_categories_codes %}{% if not forloop.first %}, {% endif %}<a href="{% url 'project-directory' %}?sector={{sector.0}}">{{sector.1}}</a>{% endfor %}<br>
{% endif %}
<span class="detailedInfo">{% trans "Status" %}</span> {{p.get_status_display}}<br>
<span class="detailedInfo">{% trans "Finance" %}</span>
Expand All @@ -119,7 +119,7 @@ <h1><a href="{% url 'project-main' p.id %}"><i class="fa fa-folder-o"></i> {{p.t
<div class="hidden-xs visible-sm">
<p>
{% if p.sector_categories %}
<span class="detailedInfo">{% trans "Sectors" %}</span> {% for sector in p.sector_categories_codes %}{% if not forloop.first %}, {% endif %}<a href="{% url 'project-directory' %}?sector={{sector.0}}">{{sector.1|title}}</a>{% endfor %}<br>
<span class="detailedInfo">{% trans "Sectors" %}</span> {% for sector in p.sector_categories_codes %}{% if not forloop.first %}, {% endif %}<a href="{% url 'project-directory' %}?sector={{sector.0}}">{{sector.1}}</a>{% endfor %}<br>
{% endif %}
<span class="detailedInfo">{% trans "Status" %}</span> {{p.get_status_display}}<br>
<span class="detailedInfo">{% trans "Finance" %}</span>
Expand All @@ -135,7 +135,7 @@ <h1><a href="{% url 'project-main' p.id %}"><i class="fa fa-folder-o"></i> {{p.t
<div class="col-sm-3 hidden-xs hidden-sm">
{% if p.sector_categories %}
<h4 class="detailedInfo">{% trans "Sectors" %}</h4>
<p>{% for sector in p.sector_categories_codes %}{% if not forloop.first %}<br>{% endif %}<a href="{% url 'project-directory' %}?sector={{sector.0}}">{{sector.1|title}}</a>{% endfor %}</p>
<p>{% for sector in p.sector_categories_codes %}{% if not forloop.first %}<br>{% endif %}<a href="{% url 'project-directory' %}?sector={{sector.0}}">{{sector.1}}</a>{% endfor %}</p>
{% endif %}
<h4 class="detailedInfo">{% trans "Status" %}</h4>
<p class="complete">{{p.get_status_display}}</p>
Expand Down

0 comments on commit b463e6b

Please sign in to comment.