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

Extract 'write a reponse/reply' into it's own button #6455

Closed
wants to merge 1 commit 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
3 changes: 2 additions & 1 deletion app/assets/stylesheets/responsive/_global_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@ textarea{
.action-bar__make-request,
.action-bar__follow,
.action-bar__follow-button,
.action-bar__follower-count {
.action-bar__follower-count,
.action-bar__reply {
vertical-align: middle;
font-size: 16px;
margin: 1em 0;
Expand Down
15 changes: 14 additions & 1 deletion app/assets/stylesheets/responsive/_request_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@

.after-actions {
display: inline-block;
margin-bottom: 1em;
@include respond-min( $main_menu-mobile_menu_cutoff) {

margin: 0;
}
.action-menu__button {
width: 100%;
Expand All @@ -95,6 +96,7 @@
margin: 0;
@include respond-min( 30em ){
margin-left: 1em;

}
@include respond-min( $main_menu-mobile_menu_cutoff ){
text-align: right;
Expand All @@ -109,6 +111,17 @@
}
}

.action-bar__reply {
margin-bottom: -1em; //seems easier to do this here than completely override the whole action styles
@media (min-width: 30em){
display: inline-block;
margin: 0 1em 0 0;
}
.button {
line-height: 1.5em;
}
}

.request-header__action-bar__actions--narrow {
//we use --narrow when a profile photo is available
@media (min-width: 30em) {
Expand Down
5 changes: 5 additions & 0 deletions app/views/alaveteli_pro/info_requests/_after_actions.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<%= render partial: 'request/reply',
locals: { info_request: @info_request,
last_response: @last_response } %>

<div id="after_actions" class="after-actions">

<ul class="action-menu after-actions__action-menu">
<li>
<a href="#" class="action-menu__button">Actions</a>
Expand Down
9 changes: 9 additions & 0 deletions app/views/request/_reply.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div class="action-bar__reply">
<% if last_response.nil? %>
<%= link_to _("Send a followup"), new_request_followup_path(:request_id => info_request.id, :anchor => 'followup'),
:class => "action-bar__reply-button" %>
<% else %>
<%= link_to _("Write a reply"), new_request_incoming_followup_path(:request_id => info_request.id, :incoming_message_id => last_response.id, :anchor => 'followup'),
:class => "action-bar__reply-button" %>
<% end %>
</div>
5 changes: 4 additions & 1 deletion app/views/request/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,16 @@
locals: { info_request: @info_request,
last_response: @last_response } %>
<% else %>
<%= render partial: 'request/reply',
locals: { info_request: @info_request,
last_response: @last_response } %>
garethrees marked this conversation as resolved.
Show resolved Hide resolved

<%= render partial: 'request/after_actions',
locals: { info_request: @info_request,
track_thing: @track_thing,
show_owner_update_status_action: @show_owner_update_status_action,
show_other_user_update_status_action: @show_other_user_update_status_action,
last_response: @last_response } %>

Copy link
Member

Choose a reason for hiding this comment

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

Keep this newline

<%= render partial: 'track/tracking_links_simple',
locals: { track_thing: @track_thing,
user: @user,
Expand Down