mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
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:
parent
94ff843006
commit
4be747582f
|
@ -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"
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue
Block a user