Add an action menu to evaluations

This commit is contained in:
Eelco Dolstra 2013-10-03 01:34:17 +02:00
parent 4fa2821eea
commit 9801cb76db
2 changed files with 13 additions and 5 deletions

View file

@ -33,11 +33,19 @@ c.uri_for(c.controller('JobsetEval').action_for('view'),
<input name="full" type="hidden" [% HTML.attributes(value => full) %]/>
</form>
[% IF c.user_exists %]
<a class="btn btn-warning pull-right" href="[% c.uri_for(c.controller('JobsetEval').action_for('release'), [eval.id]) %]">Release this evaluation</a>
[% END %]
<ul class="nav nav-tabs">
[% IF c.user_exists %]
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
Actions
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><a href="[% c.uri_for(c.controller('JobsetEval').action_for('release'), [eval.id]) %]">Create a release from this evaluation</a></li>
</ul>
</li>
[% END %]
[% IF nowFail.size > 0 %]
<li><a href="#tabs-now-fail" data-toggle="tab"><span class="text-warning">Newly-failing jobs</span></a></li>
[% END %]

View file

@ -58,7 +58,7 @@ $(document).ready(function() {
/* If no tab is active, show the first one. */
$(".nav-tabs").each(function() {
if ($("li.active", this).length > 0) return;
$("a", $("li", this).first()).tab('show');
$("a", $(this).children("li:not(.dropdown)").first()).tab('show');
});
/* Ensure that pressing the back button on another page