From 38dc92b0a672b193f9cfd7f9e099afb6bd500f3f Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Wed, 11 Jan 2017 12:41:35 +0000 Subject: [PATCH 1/6] Make action bar follower count style global I think we're always going to want to do this, so make it global. --- app/assets/stylesheets/responsive/_global_layout.scss | 4 +++- app/assets/stylesheets/responsive/_request_layout.scss | 4 ---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/responsive/_global_layout.scss b/app/assets/stylesheets/responsive/_global_layout.scss index 0c83e9b8ca..ae9dc1eb7c 100644 --- a/app/assets/stylesheets/responsive/_global_layout.scss +++ b/app/assets/stylesheets/responsive/_global_layout.scss @@ -179,7 +179,9 @@ textarea{ margin-right: 0; } - +.action-bar__follower-count { + font-size: 0.875em; +} /* * Drop-down style action button diff --git a/app/assets/stylesheets/responsive/_request_layout.scss b/app/assets/stylesheets/responsive/_request_layout.scss index b096b22afb..070b8dd171 100644 --- a/app/assets/stylesheets/responsive/_request_layout.scss +++ b/app/assets/stylesheets/responsive/_request_layout.scss @@ -108,10 +108,6 @@ .action-bar__follower-count { margin: 0; } - - .action-bar__follower-count { - font-size: 0.875em; - } } .request-header__action-bar__actions--narrow { From ec753e4d642016e1e0a096e78f683f89b7801cf6 Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Tue, 10 Jan 2017 16:38:25 +0000 Subject: [PATCH 2/6] Add action menu to footer of request thread Use left-aligned action menu. Prevents the footer action menu rendering off-screen on small browser windows, and looks a bit neater on the request header action menu too. --- .../stylesheets/responsive/_global_layout.scss | 2 +- .../stylesheets/responsive/_request_layout.scss | 17 +++++++++++++++++ app/views/request/_after_actions.html.erb | 2 +- app/views/request/show.html.erb | 11 +++++++++++ spec/integration/download_request_spec.rb | 4 +++- 5 files changed, 33 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/responsive/_global_layout.scss b/app/assets/stylesheets/responsive/_global_layout.scss index ae9dc1eb7c..2b19a24b64 100644 --- a/app/assets/stylesheets/responsive/_global_layout.scss +++ b/app/assets/stylesheets/responsive/_global_layout.scss @@ -263,7 +263,7 @@ textarea{ display: none; list-style: none; - margin: 10px 0 0 0; + margin: 10px 0 60px 0; min-width: 100%; @include respond-min( 20em ){ min-width: 280px; diff --git a/app/assets/stylesheets/responsive/_request_layout.scss b/app/assets/stylesheets/responsive/_request_layout.scss index 070b8dd171..e9e23301fb 100644 --- a/app/assets/stylesheets/responsive/_request_layout.scss +++ b/app/assets/stylesheets/responsive/_request_layout.scss @@ -261,6 +261,23 @@ a.track-request-action { display: inline-block; } +/* Request correspondence footer action menu */ +.request-footer__action-bar__actions { + @include grid-column(12, $collapse:true); + @media (min-width: 30em) { + justify-content: flex-start; + @include flexbox(); + align-items: stretch; + } + + float: none; + + .after-actions { + .action-menu__button { + margin-right: 1em; + } + } +} /* Event history details */ #request_details { diff --git a/app/views/request/_after_actions.html.erb b/app/views/request/_after_actions.html.erb index 9e17093e32..10361ba465 100644 --- a/app/views/request/_after_actions.html.erb +++ b/app/views/request/_after_actions.html.erb @@ -3,7 +3,7 @@
  • Actions -
      +
        <% unless @info_request.is_external? %>
      • diff --git a/app/views/request/show.html.erb b/app/views/request/show.html.erb index 7ff5612239..b003b36e36 100644 --- a/app/views/request/show.html.erb +++ b/app/views/request/show.html.erb @@ -165,6 +165,17 @@ <% end %> + <% unless @render_to_file %> + + <% end %> diff --git a/spec/integration/download_request_spec.rb b/spec/integration/download_request_spec.rb index 92b235c410..6930055ea8 100644 --- a/spec/integration/download_request_spec.rb +++ b/spec/integration/download_request_spec.rb @@ -11,7 +11,9 @@ def inspect_zip_download(session, info_request) using_session(session) do visit show_request_path(info_request) - find_link('Download a zip file of all correspondence').click + within('.request-header__action-bar') do + find_link('Download a zip file of all correspondence').click + end Tempfile.open('download') do |f| f.binmode From 12962038a851c04054b7248beeee7a97004bf5be Mon Sep 17 00:00:00 2001 From: Martin Wright Date: Fri, 16 Dec 2016 12:24:24 +0000 Subject: [PATCH 3/6] Action button text alignment now always left --- app/assets/stylesheets/responsive/_request_layout.scss | 1 - 1 file changed, 1 deletion(-) diff --git a/app/assets/stylesheets/responsive/_request_layout.scss b/app/assets/stylesheets/responsive/_request_layout.scss index e9e23301fb..6694666c80 100644 --- a/app/assets/stylesheets/responsive/_request_layout.scss +++ b/app/assets/stylesheets/responsive/_request_layout.scss @@ -84,7 +84,6 @@ margin-bottom: 0.5em; margin-right: 1em; @include respond-min( $main_menu-mobile_menu_cutoff ){ - text-align: center; margin-bottom: 0; } } From d7d2cbb69093b42c10cc3fc2466ba532abcda15e Mon Sep 17 00:00:00 2001 From: Martin Wright Date: Tue, 3 Jan 2017 09:40:44 +0000 Subject: [PATCH 4/6] Make action bars more consistent Authority action bar is now more consistent in appearance with the request page action bar. --- app/views/public_body/show.html.erb | 43 +++++++++++++++-------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/app/views/public_body/show.html.erb b/app/views/public_body/show.html.erb index 6a27a62148..a1bf28c7b9 100644 --- a/app/views/public_body/show.html.erb +++ b/app/views/public_body/show.html.erb @@ -54,30 +54,31 @@ :count => @number_of_visible_requests) %> <% end %> - -
        -
        - <% if @public_body.is_requestable? || @public_body.not_requestable_reason == 'bad_contact' %> - <%= link_to _("Make a request to this authority"), new_request_to_body_path(:url_name => @public_body.url_name), :class => "link_button_green make-request__action" %> - <% end %> -
        - -