Turn hiding/unhiding a jobset into a checkbox
[?]
Feb 21, 2013, 1:36 AM
PVIRRARJJC2Z3PYC6XPHJUZPT5IS4IKXUUDGMXXV57PFVVFCUUMACDependencies
- [2]
TNMOG2ZQIndentation - [3]
OX6NYJDVSplit viewing and editing a jobset - [4]
TLJC6BJ3Add a menu item for deleting jobsets - [5]
ODNCGFQ5* Improved the navigation bar: don't include all projects (since that - [6]
LZO3C2KI* Hack around those SQLite timeouts: just retry the transaction. - [7]
QTFVCDIFadded hide feature for project/jobset - [8]
UMFB2767Hydra/64: Leaving number of builds empty gives DBIx error - [9]
I4K2UPCWTweaks - [10]
7ZQAHJQMFix indentation - [11]
OEPUOUNBUsing twitter bootstrap for more consistent looks for Hydra - [*]
3HZY24CX* Make jobsets viewable under - [*]
VS3OUK7Dif no emailoverride specified, use empty string - [*]
QL55ECJ6- adapted ui for hydra, more in line with nixos.org website
Change contents
- edit in src/lib/Hydra/Controller/Jobset.pm at line 136
sub hide : Chained('jobset') PathPart Args(0) {my ($self, $c) = @_; - edit in src/lib/Hydra/Controller/Jobset.pm at line 137
requireProjectOwner($c, $c->stash->{project}); - edit in src/lib/Hydra/Controller/Jobset.pm at line 138[4.19]→[4.134:252](∅→∅),[4.134]→[4.134:252](∅→∅),[4.252]→[4.20:21](∅→∅),[4.21]→[4.257:378](∅→∅),[4.257]→[4.257:378](∅→∅),[4.378]→[4.1093:1096](∅→∅),[4.1093]→[4.1093:1096](∅→∅),[4.1096]→[2.134:135](∅→∅),[2.135]→[4.379:454](∅→∅),[4.1096]→[4.379:454](∅→∅),[4.454]→[4.1096:1097](∅→∅),[4.1096]→[4.1096:1097](∅→∅),[4.1097]→[4.455:506](∅→∅),[4.506]→[4.22:23](∅→∅),[4.23]→[4.511:615](∅→∅),[4.511]→[4.511:615](∅→∅),[4.615]→[4.24:25](∅→∅),[4.25]→[4.620:744](∅→∅),[4.620]→[4.620:744](∅→∅),[4.744]→[2.136:137](∅→∅)
txn_do($c->model('DB')->schema, sub {$c->stash->{jobset}->update({ hidden => 1, enabled => 0 });});$c->res->redirect($c->uri_for($c->controller('Project')->action_for("view"),[$c->stash->{project}->name]));}sub unhide : Chained('jobset') PathPart Args(0) {my ($self, $c) = @_;requireProjectOwner($c, $c->stash->{project});txn_do($c->model('DB')->schema, sub {$c->stash->{jobset}->update({ hidden => 0 });});$c->res->redirect($c->uri_for($c->controller('Project')->action_for("view"),[$c->stash->{project}->name]));} - edit in src/lib/Hydra/Controller/Jobset.pm at line 213
, hidden => defined $c->request->params->{visible} ? 0 : 1 - edit in src/root/edit-jobset.tt at line 56
<div class="controls"><label class="checkbox"><input type="checkbox" name="visible" [% IF !jobset.hidden; 'checked="checked"'; END %]></input>Visible</label></div> - edit in src/root/topbar.tt at line 97
[% 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" %][% END %]