Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add action menu to footer of request thread #3671

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion 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
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;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this the eu promo overlaps the action menu. I expect this is coming from either the grid-column or the flexbox, but I don't really understand the consequences of not having this floating.

screen shot 2017-01-11 at 13 31 19


.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
9 changes: 9 additions & 0 deletions app/views/request/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,15 @@
</div>
<% end %>

<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>

</div>

Expand Down