Search: Mark disabled projects/jobsets/jobs

This commit is contained in:
Eelco Dolstra 2013-02-22 16:21:50 +01:00
parent f3f6e8a4e3
commit 4d4ea8c754
3 changed files with 8 additions and 5 deletions

View file

@ -331,7 +331,10 @@ sub search :Local Args(0) {
, "project.hidden" => 0
, "jobset.hidden" => 0
},
{ order_by => ["project", "jobset", "name"], join => ["project", "jobset"] } ) ];
{ order_by => ["enabled_ desc", "project", "jobset", "name"], join => ["project", "jobset"]
, "+select" => [\ "(project.enabled = 1 and jobset.enabled = 1 and exists (select 1 from Builds where project = project.name and jobset = jobset.name and job = me.name and iscurrent = 1)) enabled_"]
, "+as" => ["enabled"]
} ) ];
}

View file

@ -12,7 +12,7 @@
<tbody>
[% FOREACH p IN projects %]
<tr>
<td>[% INCLUDE renderProjectName project=p.name %]</td>
<td><span class="[% IF !p.enabled %]disabled-project[% END %]">[% INCLUDE renderProjectName project=p.name %]</span></td>
<td>[% HTML.escape(p.description) %]</td>
</tr>
[% END %]
@ -32,7 +32,7 @@
<tbody>
[% FOREACH j IN jobsets %]
<tr>
<td>[% INCLUDE renderFullJobsetName project=j.get_column('project') jobset=j.name %]</td>
<td><span class="[% IF !j.enabled %]disabled-jobset[% END %]">[% INCLUDE renderFullJobsetName project=j.get_column('project') jobset=j.name %]</span></td>
<td>[% HTML.escape(j.description) %]</td>
</tr>
[% END %]
@ -52,7 +52,7 @@
<tbody>
[% FOREACH j IN jobs %]
<tr>
<td>[% INCLUDE renderFullJobName project=j.get_column('project') jobset=j.get_column('jobset') job=j.name %]</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 %]</span></td>
</tr>
[% END %]
</tbody>

View file

@ -31,7 +31,7 @@ span:target > span.dep-tree-line {
display: inline-block; /* required for webkit browsers */
}
span.disabled-project, span.disabled-jobset {
span.disabled-project, span.disabled-jobset, span.disabled-job {
text-decoration: line-through;
}