Group some menu items together under a "Status" menu

This commit is contained in:
Eelco Dolstra 2013-02-20 16:24:54 +01:00
parent c63812afa5
commit 656b1bd45a
2 changed files with 17 additions and 14 deletions

View file

@ -1,8 +1,6 @@
[% WRAPPER layout.tt title="Queue" %] [% WRAPPER layout.tt title="Queue" %]
[% PROCESS common.tt %] [% PROCESS common.tt %]
<p><a class="btn" href="[% c.uri_for('/status') %]">Running build steps</a></p>
[% IF queue.size == 0 %] [% IF queue.size == 0 %]
<p>The queue is empty.</p> <p>The queue is empty.</p>

View file

@ -25,15 +25,24 @@
[% END %] [% END %]
<ul class="nav" id="top-menu"> <ul class="nav" id="top-menu">
[% INCLUDE makeLink
uri = c.uri_for(c.controller('Root').action_for('queue')) [% WRAPPER makeSubMenu title="Status" %]
title = "Queue ("_ nrRunningBuilds _"/"_ nrQueuedBuilds _")" %] [% INCLUDE makeLink
[% INCLUDE makeLink uri = c.uri_for(c.controller('Root').action_for('queue'))
uri = c.uri_for(c.controller('Root').action_for('all')) title = "Queue ("_ nrRunningBuilds _"/"_ nrQueuedBuilds _")" %]
title = "All builds" %] [% INCLUDE makeLink
uri = c.uri_for(c.controller(Root).action_for('status'))
title = "Active build steps" %]
[% INCLUDE makeLink
uri = c.uri_for(c.controller('Admin').action_for('index'))
title = "Machine status" %]
[% INCLUDE makeLink
uri = c.uri_for(c.controller('Root').action_for('all'))
title = "Recent builds" %]
[% END %]
[% IF project %] [% IF project %]
[% WRAPPER makeSubMenu title=("Project: " _ project.name) collapsed=(jobset || job) %] [% WRAPPER makeSubMenu title=("Project: " _ project.name) %]
[% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('view'), [project.name]) title = "Overview" %] [% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('view'), [project.name]) title = "Overview" %]
[% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('all'), [project.name]) title = "All builds" %] [% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('all'), [project.name]) title = "All builds" %]
[% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('jobstatus'), [project.name]) title = "Job status" %] [% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('jobstatus'), [project.name]) title = "Job status" %]
@ -55,7 +64,7 @@
[% END %] [% END %]
[% IF jobset %] [% IF jobset %]
[% WRAPPER makeSubMenu title=("Jobset: " _ jobset.name) collapsed=job %] [% WRAPPER makeSubMenu title=("Jobset: " _ jobset.name) %]
[% INCLUDE makeLink [% INCLUDE makeLink
uri = c.uri_for(c.controller('Jobset').action_for('index'), [project.name, jobset.name]) uri = c.uri_for(c.controller('Jobset').action_for('index'), [project.name, jobset.name])
title = "Overview" %] title = "Overview" %]
@ -141,10 +150,6 @@
[% IF c.user_exists && c.check_user_roles('admin') %] [% IF c.user_exists && c.check_user_roles('admin') %]
[% WRAPPER makeSubMenu title="Admin" %] [% WRAPPER makeSubMenu title="Admin" %]
[% INCLUDE makeLink
uri = c.uri_for(c.controller('Admin').action_for('index'))
title = "Machine status" %]
<li class="divider"></li>
[% INCLUDE makeLink [% INCLUDE makeLink
uri = c.uri_for(c.controller('Admin').action_for('machines')) uri = c.uri_for(c.controller('Admin').action_for('machines'))
title = "Manage machines" %] title = "Manage machines" %]