Pull out admin menu
This commit is contained in:
9
app/views/request_for_comments/_admin_menu.html.slim
Normal file
9
app/views/request_for_comments/_admin_menu.html.slim
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
br
|
||||||
|
h4 Admin Menu
|
||||||
|
h5
|
||||||
|
ul
|
||||||
|
li = link_to "User's current status of this exercise", statistics_external_user_exercise_path(id: @request_for_comment.exercise_id, external_user_id: @request_for_comment.user_id)
|
||||||
|
li = link_to "All exercises of this user", statistics_external_user_path(id: @request_for_comment.user_id)
|
||||||
|
ul
|
||||||
|
li = link_to "Implement the exercise yourself", implement_exercise_path(id: @request_for_comment.exercise_id)
|
||||||
|
li = link_to "Show the exercise", exercise_path(id: @request_for_comment.exercise_id)
|
@ -44,21 +44,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<% if @current_user.admin? && user.is_a?(ExternalUser) %>
|
<% if @current_user.admin? && user.is_a?(ExternalUser) %>
|
||||||
<br>
|
<%= render('admin_menu') %>
|
||||||
<br>
|
|
||||||
<h4>Admin Menu</h4>
|
|
||||||
<h5>
|
|
||||||
<ul>
|
|
||||||
<li><%= link_to "User's current status of this exercise", statistics_external_user_exercise_path(id: @request_for_comment.exercise_id, external_user_id: @request_for_comment.user_id) %></li>
|
|
||||||
<li><%= link_to "All exercises of this user", statistics_external_user_path(id: @request_for_comment.user_id) %></li> <br>
|
|
||||||
<li><%= link_to "Implement the exercise yourself", implement_exercise_path(id: @request_for_comment.exercise_id) %> </li>
|
|
||||||
<li><%= link_to "Show the exercise", exercise_path(id: @request_for_comment.exercise_id) %> </li>
|
|
||||||
</ul>
|
|
||||||
</h5>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<h5>
|
<h5>
|
||||||
<u><%= t('request_for_comments.howto_title') %></u><br> <%= render_markdown(t('request_for_comments.howto')) %>
|
<u><%= t('request_for_comments.howto_title') %></u><br> <%= render_markdown(t('request_for_comments.howto')) %>
|
||||||
</h5>
|
</h5>
|
||||||
|
Reference in New Issue
Block a user