make appeals editable
This commit is contained in:
@@ -6,6 +6,10 @@
|
||||
<span class="prose"><em>no reason</em></span>
|
||||
<% end %>
|
||||
|
||||
<% if policy(appeal).edit? %>
|
||||
(<%= link_to "edit", edit_post_appeal_url(appeal) %>)
|
||||
<% end %>
|
||||
|
||||
(<%= link_to_user(appeal.creator) %>, <%= time_ago_in_words_tagged(appeal.created_at) %>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
15
app/views/post_appeals/edit.html.erb
Normal file
15
app/views/post_appeals/edit.html.erb
Normal file
@@ -0,0 +1,15 @@
|
||||
<div id="c-post-appeals">
|
||||
<div id="a-edit">
|
||||
<h1>Edit Appeal</h1>
|
||||
|
||||
<p>
|
||||
Editing appeal for <%= link_to "post ##{@post_appeal.post_id}", @post_appeal.post %>.
|
||||
</p>
|
||||
|
||||
<%= edit_form_for(@post_appeal) do |f| %>
|
||||
<%= f.input :reason, as: :dtext, inline: true %>
|
||||
<%= f.button :submit, "Submit" %>
|
||||
<%= dtext_preview_button "post_appeal_reason" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user