Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Validata
Validata UI
Commits
fe3c7dcb
Commit
fe3c7dcb
authored
Jun 24, 2019
by
Christophe Benz
Browse files
Add optgroup to separate tags and branches, with nice names
parent
6aee3dc8
Pipeline
#1086
failed with stage
in 2 minutes and 10 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
validata_ui/templates/schema_info_macros.html
View file @
fe3c7dcb
...
...
@@ -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"
>
Version
s
</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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment