Skip to content
This repository has been archived by the owner on Nov 19, 2021. It is now read-only.

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
MariagraziaAlastra committed Apr 3, 2015
2 parents 123a695 + 9113a5d commit 8c5a1cf
Show file tree
Hide file tree
Showing 21 changed files with 201 additions and 39 deletions.
55 changes: 52 additions & 3 deletions lib/DDGC/Web/Controller/InstantAnswer.pm
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,53 @@ sub dev_pipeline_json :Chained('dev_pipeline_base') :PathPart('json') :Args(0) {
qa => \@qa,
ready => \@ready,
};
} elsif ($view eq 'deprecated') {
my @fathead = $rs->search(
{'me.repo' => { '=' => 'fathead'},
'me.dev_milestone' => { '=' => 'deprecated'}},
{
columns => [ qw/ name repo id dev_milestone producer designer developer/ ],
order_by => [ qw/ name/ ],
result_class => 'DBIx::Class::ResultClass::HashRefInflator',
}
)->all;

my @goodies = $rs->search(
{'me.repo' => { '=' => 'goodies'},
'me.dev_milestone' => { '=' => 'deprecated'}},
{
columns => [ qw/ name repo id dev_milestone producer designer developer/ ],
order_by => [ qw/ name/ ],
result_class => 'DBIx::Class::ResultClass::HashRefInflator',
}
)->all;

my @longtail = $rs->search(
{'me.repo' => { '=' => 'longtail'},
'me.dev_milestone' => { '=' => 'deprecated'}},
{
columns => [ qw/ name id repo dev_milestone producer designer developer/ ],
order_by => [ qw/ name/ ],
result_class => 'DBIx::Class::ResultClass::HashRefInflator',
}
)->all;

my @spice = $rs->search(
{'me.repo' => { '=' => 'spice'},
'me.dev_milestone' => { '=' => 'deprecated'}},
{
columns => [ qw/ name id repo dev_milestone producer designer developer/ ],
order_by => [ qw/ name/ ],
result_class => 'DBIx::Class::ResultClass::HashRefInflator',
}
)->all;

$c->stash->{x} = {
fathead => \@fathead,
goodies => \@goodies,
longtail => \@longtail,
spice => \@spice,
};
} elsif ($view eq 'live') {
$rs = $c->d->rs('InstantAnswer::Issues');

Expand Down Expand Up @@ -335,6 +382,8 @@ sub ia_base :Chained('base') :PathPart('view') :CaptureArgs(1) { # /ia/view/cal
$c->stash->{dev_milestone} = $dev_milestone;
if ($dev_milestone eq 'live') {
$c->add_bc('Instant Answers', $c->chained_uri('InstantAnswer','index'));
} elsif ($dev_milestone eq 'deprecated') {
$c->add_bc('Dev Pipeline', $c->chained_uri('InstantAnswer','dev_pipeline', 'deprecated'));
} else {
$c->add_bc('Dev Pipeline', $c->chained_uri('InstantAnswer','dev_pipeline', 'dev'));
}
Expand Down Expand Up @@ -367,7 +416,7 @@ sub ia_json :Chained('ia_base') :PathPart('json') :Args(0) {
author => $issue->author
);

if ($dev_milestone ne 'live' && !$ia->developer) {
if ($dev_milestone ne 'live' && $dev_milestone ne 'deprecated' && !$ia->developer) {
my %dev_hash = (
name => $pull_request{author},
url => 'https://github.com/'.$pull_request{author}
Expand Down Expand Up @@ -441,7 +490,7 @@ sub ia_json :Chained('ia_base') :PathPart('json') :Args(0) {
$permissions = $c->stash->{ia}->users->find($c->user->id);
$is_admin = $c->user->admin;

if (($is_admin || $permissions) && ($ia->dev_milestone eq 'live')) {
if (($is_admin || $permissions) && ($ia->dev_milestone eq 'live' || $ia->dev_milestone eq 'deprecated')) {
$edited = current_ia($c->d, $ia);
$ia_data{edited} = {
name => $edited->{name},
Expand Down Expand Up @@ -520,7 +569,7 @@ sub commit_json :Chained('commit_base') :PathPart('json') :Args(0) {
tab => $ia->tab,
repo => $ia->repo,
answerbar => $ia->answerbar,
src_options => $ia->src_options,
src_options => $ia->src_options? from_json($ia->src_options) : undef,
src_api_documentation => $ia->src_api_documentation,
api_status_page => $ia->api_status_page,
unsafe => $ia->unsafe,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ddg_community_platform",
"version": "0.71.0",
"version": "0.72.0",
"engines": {
"node": ">=0.10.0"
},
Expand Down
1 change: 1 addition & 0 deletions root/static/css/ddgc0.71.0.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions root/static/css/ia0.71.0.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions root/static/js/ddgc0.71.0.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions root/static/js/ia0.71.0.js

Large diffs are not rendered by default.

22 changes: 20 additions & 2 deletions src/ia/css/ia.css
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,12 @@ body.texture {
.ia-single--name .dev_milestone.dev_milestone--live {
color: #4B9E4F;
border-color: #4B9E4F;
}
}

.ia-single--name .dev_milestone.dev_milestone--deprecated {
color: #DE5833;
border-color: #DE5833;
}

#toggle-devpage-view .pager-wrap {
height: 2.5em;
Expand Down Expand Up @@ -1309,7 +1314,16 @@ body.texture {

#pipeline_toggle-view .pager-wrap {
height: 4em;
width: 17.95em;
}

#pipeline_toggle-view .pipeline__toggle-view__button {
box-shadow: none;
}

#pipeline_toggle-live {
margin-left: 5em;
margin-right: 3em;
width: 12em;
}

#pipeline-live-container .list-container--left {
Expand Down Expand Up @@ -1431,3 +1445,7 @@ body.texture {
.ia-single--left--wide #planning {
margin-left: 0;
}

.dev_milestone-container__body__readonly {
word-wrap: break-word;
}
Loading

0 comments on commit 8c5a1cf

Please sign in to comment.