Skip to content

Commit

Permalink
Move “Can’t find an authority” to sidebar
Browse files Browse the repository at this point in the history
Move the “Can’t find an authority” actions on the
/select_authority page to the right of the search
results
  • Loading branch information
garethrees committed Oct 30, 2014
1 parent 96e97ac commit bf31b10
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 1 deletion.
10 changes: 10 additions & 0 deletions app/assets/stylesheets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,16 @@ width:250px;
margin-top:1em;
}

#select_authority_help {
background-color: #FEF1F6;
float: right;
margin-top: 31px;
overflow: hidden;
padding-left: 1em;
padding-right: 1em;
width: 45%;
}

#request_advice ul {
margin:0 auto;
}
Expand Down
13 changes: 13 additions & 0 deletions app/assets/stylesheets/responsive/_new_request_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@
@include grid-row($behavior: nest);
}

#select_authority_help {
@include grid-column(12);
@include respond-min( $main_menu-mobile_menu_cutoff ) {
@include grid-column(6);
@include ie8 {
padding-right: 0.9375em;
}
@include lte-ie7 {
width: 26.188em;
}
}
}

/* /new/[body_name] page */
#request_header {
@include grid-row;
Expand Down
7 changes: 7 additions & 0 deletions app/assets/stylesheets/responsive/_new_request_style.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
/* Styles for pages in making a new request */

/* /select_authority page */
#select_authority_help {
.info {
font-style: italic;
}
}

/* /new/[body_name] page */
.new_info_request {
label {
Expand Down
1 change: 0 additions & 1 deletion app/views/public_body/_search_ahead.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@
<% end %>
</div>
<%= will_paginate WillPaginate::Collection.new(@page, @per_page, @xapian_requests.matches_estimated), :params => {:controller=>"request", :action => "select_authority"} %>
<p><%= raw(_('<a href="{{browse_url}}">Browse all</a> or <a href="{{add_url}}">ask us to add one</a>.', :browse_url => list_public_bodies_default_path.html_safe, :add_url => (help_requesting_path + '#missing_body').html_safe)) %></p>
<% end %>
12 changes: 12 additions & 0 deletions app/views/request/select_authority.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,16 @@
<div id="typeahead_response">
<%= render :partial => 'public_body/search_ahead' %>
</div>

</div>

<div id="select_authority_help">
<p class="info"><%= _("Can&rsquo;t find an authority?") %></p>
<p class="actions">
<%= raw _('<a href="{{browse_url}}">Browse all</a> or <a href="{{add_url}}">ask us to add one</a>',
:browse_url => list_public_bodies_default_path.html_safe,
:add_url => help_requesting_path(:anchor => 'missing_body')
).html_safe %>
</p>

</div>

0 comments on commit bf31b10

Please sign in to comment.