diff --git a/app/views/request_for_comments/_admin_menu.html.slim b/app/views/request_for_comments/_admin_menu.html.slim new file mode 100644 index 00000000..3f71b2ed --- /dev/null +++ b/app/views/request_for_comments/_admin_menu.html.slim @@ -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) diff --git a/app/views/request_for_comments/show.html.erb b/app/views/request_for_comments/show.html.erb index 83741a87..3814ba21 100644 --- a/app/views/request_for_comments/show.html.erb +++ b/app/views/request_for_comments/show.html.erb @@ -44,21 +44,10 @@ <% end %> - - - <% if @current_user.admin? && user.is_a?(ExternalUser) %> -
-
-

Admin Menu

-
- -
+ <% if @current_user.admin? && user.is_a?(ExternalUser) %> + <%= render('admin_menu') %> <% end %> +
<%= t('request_for_comments.howto_title') %>
<%= render_markdown(t('request_for_comments.howto')) %>