|
1 | 1 | <%# |
2 | | - Full thread view with all the details & actions |
| 2 | + "Full thread view with all the details & actions |
3 | 3 |
|
4 | 4 | Variables: |
5 | 5 | ? comment_id : Comment ID to show even if it would be hidden otherwise |
6 | 6 | inline : whether the thread is diplayed inline with the parent post |
7 | 7 | show_deleted : whether to display deleted comments for those who can see them |
8 | 8 | thread : CommentThread to display |
9 | | -%> |
| 9 | +"%> |
10 | 10 |
|
| 11 | +<% can_only_rename = current_user&.can_rename?(thread) && !current_user&.privilege?('flag_curate') %> |
11 | 12 | <% max_shown_comments = 5 %> |
12 | 13 | <% comment_id ||= defined?(comment_id) ? comment_id : nil %> |
13 | 14 | <% pingable = thread.pingable %> |
|
38 | 39 | <a href="<%= comment_thread_path(thread.id) %>" class="widget--header-link">show thread</a> |
39 | 40 | <a href="javascript:void(0)" class="js-collapse-thread widget--header-link">collapse</a> |
40 | 41 | <% end %> |
| 42 | + <% if can_only_rename %> |
| 43 | + <a href="javascript:void(0)" |
| 44 | + class="widget--header-link" |
| 45 | + data-modal=".js--rename-thread-<%= thread.id %>" |
| 46 | + role="button" |
| 47 | + aria-label="Rename thread"> |
| 48 | + <i class="fas fa-pen fa-fw"></i> rename |
| 49 | + </a> |
| 50 | + <% end %> |
41 | 51 | <% if current_user&.privilege?('flag_curate') %> |
42 | 52 | <%= render 'comments/thread_tools_link', thread: thread %> |
43 | 53 | <% end %> |
|
107 | 117 | <% end %> |
108 | 118 | <% end %> |
109 | 119 |
|
| 120 | +<% if can_only_rename %> |
| 121 | + <%= render 'comments/rename_thread_modal', thread: thread %> |
| 122 | +<% end %> |
| 123 | + |
110 | 124 | <% if current_user&.privilege?('flag_curate') %> |
111 | 125 | <%= render 'comments/thread_actions_modal', thread: thread, user: current_user %> |
112 | 126 | <% end %> |
0 commit comments