Skip to content

Commit

Permalink
Merge branch 'hotfix/0.26.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
garethrees committed Jan 12, 2017
2 parents 772f5ea + 1730a17 commit d5d9c31
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 31 deletions.
6 changes: 4 additions & 2 deletions app/assets/stylesheets/responsive/_global_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@ textarea{
margin-right: 0;
}


.action-bar__follower-count {
font-size: 0.875em;
}

/*
* Drop-down style action button
Expand Down Expand Up @@ -261,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;
Expand Down
22 changes: 17 additions & 5 deletions app/assets/stylesheets/responsive/_request_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand All @@ -108,10 +107,6 @@
.action-bar__follower-count {
margin: 0;
}

.action-bar__follower-count {
font-size: 0.875em;
}
}

.request-header__action-bar__actions--narrow {
Expand Down Expand Up @@ -265,6 +260,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 {
Expand Down
43 changes: 22 additions & 21 deletions app/views/public_body/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -54,30 +54,31 @@
:count => @number_of_visible_requests) %>
</div>
<% end %>

<div class="authority__header__action-bar">
<div class="action-bar__make-request">
<% 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 %>
</div>

<div class="action-bar__follow">
<div class="action-bar__follow-button">
<% if @existing_track %>
<%= link_to _("Unfollow"), {:controller => 'track', :action => 'update', :track_id => @existing_track.id, :track_medium => "delete", :r => request.fullpath}, :class => "link_button_green unsubscribe__action" %>
<% else %>
<div class="feed_link">
<%= link_to _("Follow"), do_track_path(@track_thing), :class => "link_button_green track__action" %>
</div>
<div class="authority__header__action-bar-container">
<div class="authority__header__action-bar">
<div class="action-bar__make-request">
<% 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 %>
</div>

<div class="action-bar__follower-count">
<%= n_("{{count}} follower",
"{{count}} followers",
@follower_count,
:count => content_tag(:span, @follower_count, :id => "follow_count")) %>
<div class="action-bar__follow">
<div class="action-bar__follow-button">
<% if @existing_track %>
<%= link_to _("Unfollow"), {:controller => 'track', :action => 'update', :track_id => @existing_track.id, :track_medium => "delete", :r => request.fullpath}, :class => "link_button_green unsubscribe__action" %>
<% else %>
<div class="feed_link">
<%= link_to _("Follow"), do_track_path(@track_thing), :class => "link_button_green track__action" %>
</div>
<% end %>
</div>

<div class="action-bar__follower-count">
<%= n_("{{count}} follower",
"{{count}} followers",
@follower_count,
:count => content_tag(:span, @follower_count, :id => "follow_count")) %>
</div>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/request/_after_actions.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<li>
<a href="#" class="action-menu__button">Actions</a>

<ul class="action-menu__menu action-menu__menu--right">
<ul class="action-menu__menu action-menu__menu--left">
<% unless @info_request.is_external? %>
<li class="action-menu__menu__item">
<span class="action-menu__menu__heading">
Expand Down
11 changes: 11 additions & 0 deletions app/views/request/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,17 @@
</div>
<% end %>
<% unless @render_to_file %>
<div class="request-footer__action-bar-container">
<div class="request-footer__action-bar__actions">
<%= render :partial => 'after_actions' %>
<%= render :partial => 'track/tracking_links_simple',
:locals => { :track_thing => @track_thing,
:own_request => @info_request.user && @info_request.user == @user,
:location => 'toolbar' } %>
</div>
</div>
<% end %>

</div>

Expand Down
2 changes: 1 addition & 1 deletion config/initializers/alaveteli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
load "util.rb"

# Application version
ALAVETELI_VERSION = '0.26.0.0'
ALAVETELI_VERSION = '0.26.0.1'

# Add new inflection rules using the following format
# (all these examples are active by default):
Expand Down
19 changes: 19 additions & 0 deletions doc/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,25 @@

### Changed Templates

# 0.26.0.1

## Highlighted Features

* Minor tweaks to unify the action bars used on the authority and request pages
(Martin Wright)
* Added the new action menu to the bottom of the correspondence thread after
user feedback (Gareth Rees)

## Upgrade Notes

* This hotfix just makes a couple of template and style tweaks. You may need to
update styles for the authority and request page action bars.

### Changed Templates

app/views/admin_public_body/edit.html.erb
app/views/widgets/show.html.erb

# 0.26.0.0

## Highlighted Features
Expand Down
4 changes: 3 additions & 1 deletion spec/integration/download_request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d5d9c31

Please sign in to comment.