File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 user : User that will flag the post
77"%>
88
9- < div class =" post--action-dialog js-flag-box " >
9+ <%= form_tag new_flag_path, method: :post, class: ' post--action-dialog js-flag-box' do % >
1010 <div class ="widget ">
1111 < div class ="widget--header "> Why does this post require attention from curators or moderators?</ div >
1212 <% if user &.active_flags_on? ( post ) %>
2727 </ div >
2828 <% end %>
2929 <% unless post . locked? %>
30- <% PostFlagType . where ( post_type_id : [ post . post_type . id , nil ] ) . where ( active : 1 ) . each do |reason | %>
30+ <% PostFlagType . where ( post_type_id : [ post . post_type . id , nil ] ) . where ( active : 1 ) . each_with_index do |reason , idx | %>
3131 < div class ="widget--body ">
3232 < div class ="grid ">
3333 < div class ="grid--cell ">
3636 name ="flag-reason "
3737 value ="<%= reason . id %> "
3838 id ="flag-reason-<%= reason . id %> _ <%= post . id %> "
39+ <%= 'checked' if idx . zero? %>
3940 data-requires-details ="<%= reason . requires_details %> "
4041 data-response-type ="<%= reason . name == "needs author's attention" ? 'comment' : nil %> " />
4142 </ div >
109110 </ div >
110111 < div class ="widget--footer ">
111112 < button class ="flag-link button is-filled is-muted "
112- data-post-type ="<%= post . question? ? 'Question' : 'Answer' %> "
113- data-post-id ="<%= post . id %> ">
113+ data-post-type ="<%= post . question? ? 'Question' : 'Answer' %> "
114+ data-post-id ="<%= post . id %> ">
114115 Flag for attention
115116 </ button >
116117 </ div >
117118 </ div >
118- </ div >
119+ <% end % >
You can’t perform that action at this time.
0 commit comments