Skip to content

Commit e2d2e76

Browse files
authored
Merge pull request #1744 from codidact/0valt/1123/pending-edit-link
"Suggested edit pending" post tool should be a link to the edit
2 parents 79b3b38 + 3bf0345 commit e2d2e76

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

app/views/posts/_expanded.html.erb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<%#
2-
Full post view, containing all details and interactions.
2+
"Full post view, containing all details and interactions.
33
44
Instance variables:
55
? @category : Category the post belongs to, if any
@@ -13,7 +13,7 @@
1313
Variables:
1414
post : the Post instance to display
1515
? float_notice : whether to display the float notice
16-
%>
16+
"%>
1717

1818
<% float_notice ||= false %>
1919
<% category ||= defined?(@category) && @category.id == post.category_id ? @category : post.category %>
@@ -259,7 +259,9 @@
259259
<% end %>
260260
<% elsif current_user.present? %>
261261
<% if post.pending_suggested_edit? %>
262-
<span class="tools--item">suggested edit pending...</span>
262+
<%= link_to 'suggested edit pending...',
263+
suggested_edit_url(post.pending_suggested_edit.id),
264+
class: "tools--item" %>
263265
<% elsif post_type.is_freely_editable %>
264266
<%= render 'posts/edit_link', post: post %>
265267
<% else %>

0 commit comments

Comments
 (0)