Move Hide/Unhide links for project to toplevel menu.

This commit is contained in:
Rob Vermaas 2012-04-13 16:52:25 +02:00
parent 7f858928df
commit ccc5d38976
2 changed files with 7 additions and 12 deletions

View file

@ -22,7 +22,6 @@
<th>Id</th>
<th>Name</th>
<th>Description</th>
[% IF c.check_user_roles('admin') %]<th>Options</th>[% END %]
</tr>
</thead>
<tbody>
@ -32,15 +31,6 @@
<td>[% INCLUDE renderProjectName project = p.name %]</td>
<td>[% HTML.escape(p.displayname) %]</td>
<td>[% WRAPPER maybeLink uri=p.homepage %][% HTML.escape(p.description) %][% END %]</td>
[% IF c.check_user_roles('admin') %]
<td>
[% IF p.hidden %]
[% INCLUDE maybeButton uri = c.uri_for('/project' p.name 'unhide') content = "Unhide" %]
[% ELSE %]
[% INCLUDE maybeButton uri = c.uri_for('/project' p.name 'hide') content = "Hide" %]
[% END %]
</td>
[% END %]
</tr>
[% END %]
</tbody>

View file

@ -54,6 +54,11 @@
<li class="divider"></li>
[% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('create_jobset'), [project.name]) title = "Create new jobset" %]
[% INCLUDE menuItem uri = c.uri_for('/project' project.name 'edit') title="Edit project" %]
[% IF project.hidden %]
[% INCLUDE menuItem uri = c.uri_for('/project' project.name 'unhide') title = "Unhide" %]
[% ELSE %]
[% INCLUDE menuItem uri = c.uri_for('/project' project.name 'hide') title = "Hide" %]
[% END %]
[% END %]
[% END %]
[% END %]
@ -82,8 +87,8 @@
<li class="divider"></li>
[% INCLUDE menuItem uri = c.uri_for('/jobset' project.name jobset.name 'clone') title="Clone jobset" %]
[% INCLUDE menuItem uri = c.uri_for('/jobset' project.name jobset.name 'edit') title="Edit jobset" %]
[% INCLUDE maybeLink uri = c.uri_for(c.controller('Admin').action_for('force_eval'), project.name, jobset.name) content = "Evaluate" confirmmsg = ("Are you sure you want to force evaluation of jobset " _ project.name _ ":" _ j.name _ "?") %]
[% IF j.hidden %]
[% INCLUDE maybeLink uri = c.uri_for(c.controller('Admin').action_for('force_eval'), project.name, jobset.name) content = "Evaluate" confirmmsg = ("Are you sure you want to force evaluation of jobset " _ project.name _ ":" _ jobset.name _ "?") %]
[% IF jobset.hidden %]
[% INCLUDE menuItem uri = c.uri_for('/jobset' project.name jobset.name 'unhide') title = "Unhide" %]
[% ELSE %]
[% INCLUDE menuItem uri = c.uri_for('/jobset' project.name jobset.name 'hide') title = "Hide" %]