Add a short description for branches to show in drop-down

Allows you to add e.g. "old stable" next to the denzil branch for
clarification.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
Paul Eggleton 2013-03-06 18:30:00 +00:00
parent 94ff843006
commit 4be747582f
2 changed files with 9 additions and 5 deletions

View File

@ -14,6 +14,7 @@ import re
class Branch(models.Model):
name = models.CharField(max_length=50)
bitbake_branch = models.CharField(max_length=50)
short_description = models.CharField(max_length=50, blank=True)
class Meta:
verbose_name_plural = "Branches"

View File

@ -39,11 +39,14 @@
</a>
<ul class="dropdown-menu">
{% for branch in all_branches %}
{% if branch.name = current_branch %}
<li><a href="{% url switch_branch branch.name %}"><b>{{ branch.name }}</b></a></li>
{% else %}
<li><a href="{% url switch_branch branch.name %}">{{ branch.name }}</a></li>
{% endif %}
<li><a href="{% url switch_branch branch.name %}">
{% if branch.name = current_branch %}<b>{% endif %}
{{ branch.name }}
{% if branch.short_description %}
({{ branch.short_description }})
{% endif %}
{% if branch.name = current_branch %}</b>{% endif %}
</a></li>
{% endfor %}
</ul>
</li>