Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Enable specifying a site-wide alert in the config
  • Loading branch information
rwstauner committed Oct 25, 2014
1 parent c9b22a0 commit 0f91aaa
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/MetaCPAN/Web/Controller/Root.pm
Expand Up @@ -100,6 +100,9 @@ sub end : ActionClass('RenderView') {
= $c->stash->{api_external_secure}
. '/oauth2/authorize?client_id='
. $c->config->{consumer_key};

$c->stash->{site_alert_message} = $c->config->{site_alert_message};

$c->res->header( Vary => 'Cookie' );

unless (
Expand Down
5 changes: 5 additions & 0 deletions root/static/less/global.less
Expand Up @@ -496,3 +496,8 @@ form#logout {
padding-left: 15px;
line-height: 20px;
}

.site-alert-message {
text-align: center;
margin: 1px 15% 20px;
}
11 changes: 10 additions & 1 deletion root/wrapper.html
Expand Up @@ -143,6 +143,15 @@
</nav>

<div class="container-fluid">

<% IF site_alert_message %>
<div class="row">
<div class="site-alert-message alert alert-danger" role="alert">
<% site_alert_message %>
</div>
</div>
<% END %>

<% IF req.uri.path != '/' %>
<div class="row hidden-phone">
<div class="head-small-logo col-md-3">
Expand All @@ -168,7 +177,7 @@
</div>
</div>
<% END %>

<div class="row">
<div class="main-content col-md-12">
<% content | none %>
Expand Down

0 comments on commit 0f91aaa

Please sign in to comment.