bitbake: toaster: layer rev tooltip only if necessary

On the heading for the layer detail page, only show a tool tip on the
heading revision branch/shaid field if the string is too large to fit
in the 13 character field. That is, don't show a hovering tool tip
with exactly the same string that is shown without the tip.

[YOCTO #7312]

(Bitbake rev: 8a3095a33551a96176fdff83ea33cda5b30311dd)

Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Dave Lerner
2015-02-26 14:29:23 -06:00
committed by Richard Purdie
parent ec8e07f8cf
commit 48c48a41bf

View File

@@ -66,7 +66,11 @@
{% include "layers_dep_modal.html" %}
<div class="row-fluid span11">
<div class="page-header">
<h1>{{layerversion.layer.name}} <small class="commit" data-toggle="tooltip" title="{{layerversion.get_vcs_reference}}">({{layerversion.get_vcs_reference|truncatechars:13}})</small></h1>
<h1>{{layerversion.layer.name}} <small class="commit"
{% if layerversion.get_vcs_reference|length > 13 %}
data-toggle="tooltip" title="{{layerversion.get_vcs_reference}}"
{% endif %}>
({{layerversion.get_vcs_reference|truncatechars:13}})</small></h1>
</div>
</div>