Make some more tables clickable

This commit is contained in:
Eelco Dolstra 2013-02-22 18:11:29 +01:00
parent 9422c9d2a7
commit c0f9c9b4aa
3 changed files with 32 additions and 33 deletions

View file

@ -34,17 +34,17 @@ BLOCK renderJobsetName %]
BLOCK renderJobName %] BLOCK renderJobName %]
<a href="[% c.uri_for('/job' project jobset job) %]"><tt>[% job %]</tt></a> <a [% IF inRow %]class="row-link"[% END %] href="[% c.uri_for('/job' project jobset job) %]"><tt>[% job %]</tt></a>
[% END; [% END;
BLOCK renderFullJobsetName %] BLOCK renderFullJobsetName %]
<tt>[% INCLUDE renderProjectName %]:[% INCLUDE renderJobsetName %]</tt> <tt>[% INCLUDE renderProjectName inRow=0 %]:[% INCLUDE renderJobsetName %]</tt>
[% END; [% END;
BLOCK renderFullJobName %] BLOCK renderFullJobName %]
<tt>[% IF !hideProjectName; INCLUDE renderProjectName %]:[% END; IF !hideJobsetName; INCLUDE renderJobsetName %]:[% END; INCLUDE renderJobName %]</tt> <tt>[% IF !hideProjectName; INCLUDE renderProjectName inRow=0 %]:[% END; IF !hideJobsetName; INCLUDE renderJobsetName inRow=0 %]:[% END; INCLUDE renderJobName %]</tt>
[% END; [% END;

View file

@ -5,14 +5,14 @@
<p>The following projects match your query:</p> <p>The following projects match your query:</p>
<table class="table table-striped table-condensed"> <table class="table table-striped table-condensed clickable-rows">
<thead> <thead>
<tr><th>Project</th><th>Description</th></tr> <tr><th>Project</th><th>Description</th></tr>
</thead> </thead>
<tbody> <tbody>
[% FOREACH p IN projects %] [% FOREACH p IN projects %]
<tr> <tr>
<td><span class="[% IF !p.enabled %]disabled-project[% END %]">[% INCLUDE renderProjectName project=p.name %]</span></td> <td><span class="[% IF !p.enabled %]disabled-project[% END %]">[% INCLUDE renderProjectName project=p.name inRow=1 %]</span></td>
<td>[% HTML.escape(p.description) %]</td> <td>[% HTML.escape(p.description) %]</td>
</tr> </tr>
[% END %] [% END %]
@ -25,14 +25,14 @@
<p>The following jobsets match your query:</p> <p>The following jobsets match your query:</p>
<table class="table table-striped table-condensed"> <table class="table table-striped table-condensed clickable-rows">
<thead> <thead>
<tr><th>Jobset</th><th>Description</th></tr> <tr><th>Jobset</th><th>Description</th></tr>
</thead> </thead>
<tbody> <tbody>
[% FOREACH j IN jobsets %] [% FOREACH j IN jobsets %]
<tr> <tr>
<td><span class="[% IF !j.enabled %]disabled-jobset[% END %]">[% INCLUDE renderFullJobsetName project=j.get_column('project') jobset=j.name %]</span></td> <td><span class="[% IF !j.enabled %]disabled-jobset[% END %]">[% INCLUDE renderFullJobsetName project=j.get_column('project') jobset=j.name inRow=1 %]</span></td>
<td>[% HTML.escape(j.description) %]</td> <td>[% HTML.escape(j.description) %]</td>
</tr> </tr>
[% END %] [% END %]
@ -45,14 +45,14 @@
<p>The following jobs match your query:[% IF jobs.size > limit %] <span class="text-warning">(first [% limit %] results only)</span>[% END %]</p> <p>The following jobs match your query:[% IF jobs.size > limit %] <span class="text-warning">(first [% limit %] results only)</span>[% END %]</p>
<table class="table table-striped table-condensed"> <table class="table table-striped table-condensed clickable-rows">
<thead> <thead>
<tr><th>Job</th></tr> <tr><th>Job</th></tr>
</thead> </thead>
<tbody> <tbody>
[% FOREACH j IN jobs %] [% FOREACH j IN jobs %]
<tr> <tr>
<td><span class="[% IF !j.get_column('enabled') %]disabled-job[% END %]">[% INCLUDE renderFullJobName project=j.get_column('project') jobset=j.get_column('jobset') job=j.name %]</span></td> <td><span class="[% IF !j.get_column('enabled') %]disabled-job[% END %]">[% INCLUDE renderFullJobName project=j.get_column('project') jobset=j.get_column('jobset') job=j.name inRow=1 %]</span></td>
</tr> </tr>
[% END %] [% END %]
</tbody> </tbody>

View file

@ -1,30 +1,29 @@
[% WRAPPER layout.tt title="Users" %] [% WRAPPER layout.tt title="Users" %]
[% PROCESS common.tt %] [% PROCESS common.tt %]
<table class="table table-striped table-condensed"> <table class="table table-striped table-condensed clickable-rows">
<thead> <thead>
<tr> <tr>
<th>Username</th> <th>Username</th>
<th>Name</th> <th>Name</th>
<th>Email</th> <th>Email</th>
<th>Roles</th> <th>Roles</th>
<th>Eval. notifications</th> <th>Eval. notifications</th>
<th>Options</th> <th>Options</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
[% FOREACH u IN users %] [% FOREACH u IN users %]
<tr> <tr>
<td><a href="[% c.uri_for(c.controller('Admin').action_for('user_edit'), [u.username]) %]">[% u.username %]</a></td> <td><a class="row-link" href="[% c.uri_for(c.controller('Admin').action_for('user_edit'), [u.username]) %]">[% u.username %]</a></td>
<td>[% u.fullname %]</td> <td>[% u.fullname %]</td>
<td>[% u.emailaddress %]</td> <td>[% u.emailaddress %]</td>
<td>[% FOREACH r IN u.userroles %]<i>[% r.role %]</i> [% END %]</td> <td>[% FOREACH r IN u.userroles %]<i>[% r.role %]</i> [% END %]</td>
<td>[% IF u.emailonerror %]Yes[% ELSE %]No[% END %]</td> <td>[% IF u.emailonerror %]Yes[% ELSE %]No[% END %]</td>
<td>[% INCLUDE maybeLink uri = c.uri_for(c.controller('Admin').action_for('reset_password'), [u.username]) content = "Reset password" confirmmsg = "Are you sure you want to reset the password for this user?" class = "btn btn-mini" %]</td> <td>[% INCLUDE maybeLink uri = c.uri_for(c.controller('Admin').action_for('reset_password'), [u.username]) content = "Reset password" confirmmsg = "Are you sure you want to reset the password for this user?" class = "btn btn-mini" %]</td>
</tr> </tr>
[% END %] [% END %]
</tbody> </tbody>
</table> </table>
<p><a class="btn" href="[% c.uri_for(c.controller('Admin').action_for('create_user')) %]"> <p><a class="btn" href="[% c.uri_for(c.controller('Admin').action_for('create_user')) %]">