Add a "My jobs" tab to the dashboard

[?]
Nov 5, 2013, 1:35 PM
PF72JKWQ2CLEQUNOSCKQ3ETVDOZ5VQBZEHVZU2YVZCS4WZX5DSTQC

Dependencies

Change contents

  • edit in src/lib/Hydra/Controller/User.pm at line 289
    [2.1249]
    [2.1249]
    sub my_jobs_tab :Chained('user') :PathPart('my-jobs-tab') :Args(0) {
    my ($self, $c) = @_;
    $c->stash->{template} = 'dashboard-my-jobs-tab.tt';
  • edit in src/lib/Hydra/Controller/User.pm at line 295
    [2.1250]
    [2.1250]
    die unless $c->stash->{user}->emailaddress;
  • edit in src/lib/Hydra/Controller/User.pm at line 297
    [2.1251]
    [4.3417]
    # Get all current builds of which this user is a maintainer.
    $c->stash->{builds} = [$c->model('DB::Builds')->search(
    { iscurrent => 1
    , maintainers => { ilike => "%" . $c->stash->{user}->emailaddress . "%" }
    },
    { order_by => ["project", "jobset", "job"] })];
    }
  • edit in src/root/dashboard.tt at line 6
    [2.5808]
    [2.5808]
    <li><a href="#tabs-my-jobs" data-toggle="tab">My jobs</a></li>
  • replacement in src/root/dashboard.tt at line 35
    [2.6635][2.6635:6777]()
    <div class="alert alert-warning">You have no starred jobs. You can add them by visiting a job page and clicking on the ☆ icon.</div>
    [2.6635]
    [2.6777]
    <div class="alert alert-warning">You have no starred jobs. You
    can add them by visiting a job page and clicking on the ☆
    icon.</div>
  • edit in src/root/dashboard.tt at line 43
    [2.6803]
    [2.6803]
    [% INCLUDE makeLazyTab tabName="tabs-my-jobs" uri=c.uri_for(c.controller('User').action_for('my_jobs_tab'), [user.username]) %]