Commit fe3c7dcb authored by Christophe Benz's avatar Christophe Benz

Add optgroup to separate tags and branches, with nice names

parent 6aee3dc8
Pipeline #1086 failed with stage
in 2 minutes and 10 seconds
......@@ -11,14 +11,23 @@
{% if branches or tags %}
<form class="form-inline my-2">
<div class="form-group">
<label for="git_ref" class="mr-2">Version</label>
<label for="git_ref" class="mr-2">Versions</label>
<select class="form-control" id="version_select" name="git_ref">
{% for tag in tags or [] %}
{% if tags %}
<optgroup label="publiées">
{% for tag in tags %}
<option{% if tag.name == schema_current_version %} selected{% endif %}>{{ tag.name }}</option>
{% endfor %}
{% for branch in branches or [] %}
</optgroup>
{% endif %}
{% if branches %}
<optgroup label="en cours">
{% for branch in branches %}
<option{% if branch.name == schema_current_version %} selected{% endif %}>{{ branch.name }}</option>
{% endfor %}
</optgroup>
{% endif %}
</select>
</div>
</form>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment