Skip to content

Commit

Permalink
Only show the git version in case it is different
Browse files Browse the repository at this point in the history
In the common case it is the same, so avoid showing it twice
  • Loading branch information
lazka committed Jul 22, 2024
1 parent 1436216 commit da40892
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 21 deletions.
11 changes: 1 addition & 10 deletions app/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,7 @@ <h4 class="card-title">Base Package: <a href="{{ s.name }}">{{ s.name }}</a></h4
</dd>

<dt class="col-sm-3 text-sm-end">Version:</dt>
<dd class="col-sm-9">{{ s.version }}</dd>

<dt class="col-sm-3 text-sm-end">GIT Version:</dt>
<dd class="col-sm-9">
{% if s.git_version %}
<a href="{{ s.source_url }}">{{ s.git_version }}</a>
{% else %}
-
{% endif%}
</dd>
<dd class="col-sm-9">{{ s.version }}{% if s.version != s.git_version %} <span class="text-muted small align-text-bottom ps-1">(<a href="{{ s.source_url }}">{{ s.git_version }}</a> in git)</span>{% endif %}</dd>

<dt class="col-sm-3 text-sm-end mb-2">External:</dt>
<dd class="col-sm-9">
Expand Down
2 changes: 1 addition & 1 deletion app/templates/outofdate.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ <h6 class="card-subtitle mb-2 text-muted">
</template>
</td>
<td><a href="{{ url_for('base', base_name=s.name) }}">{{ s.name }}</a></td>
<td class="text-version">{{ myver }}{% if gitver %} <span class="text-muted small px-2">({{ gitver }} in git)</span>{% endif %}</td>
<td class="text-version">{{ myver }}{% if gitver %} <span class="text-muted small align-text-bottom ps-1">({{ gitver }} in git)</span>{% endif %}</td>
<td></td>
<td class="text-version"><a href="{{ url }}">{{ ver }}</a></td>
{% if s.active_vulnerabilities %}
Expand Down
11 changes: 1 addition & 10 deletions app/templates/package.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,7 @@ <h4 class="card-title">Package: <a href="{{ package_url(p) }}">{{ p.name }}</a><
<dd class="col-sm-9">{{ licenses_to_html(p.licenses)|safe }}</dd>

<dt class="col-sm-3 text-sm-end">Version:</dt>
<dd class="col-sm-9">{{ p.version }}</dd>

<dt class="col-sm-3 text-sm-end">GIT Version:</dt>
<dd class="col-sm-9">
{% if s.git_version %}
<a href="{{ s.source_url }}">{{ s.git_version }}</a>
{% else %}
-
{% endif%}
</dd>
<dd class="col-sm-9">{{ p.version }}{% if p.version != s.git_version %} <span class="text-muted small align-text-bottom ps-1">(<a href="{{ s.source_url }}">{{ s.git_version }}</a> in git)</span>{% endif %}</dd>

<dt class="col-sm-3 text-sm-end mb-2">External:</dt>
<dd class="col-sm-9">
Expand Down

0 comments on commit da40892

Please sign in to comment.