dashboard controller

This commit is contained in:
Mark Moser
2016-09-21 17:04:08 -05:00
parent 4a70b795e5
commit 7774a1e3f2
13 changed files with 94 additions and 76 deletions

View File

@ -1,15 +0,0 @@
<%
content_for :section_title, "Admin Dashboard"
%>
<section>
<h1>Quizzes</h1>
<%= render partial: 'admin/quiz/table_list', locals: { quizzes: @quizzes } %>
<%= link_to('New Quiz', admin_new_quiz_path, { class: 'btn' }) %>
</section>
<section>
<h1>Users</h1>
<%= render partial: 'admin/user/table_list', locals: { users: @users } %>
<%= link_to('New User', admin_new_user_path, { class: 'btn' }) %>
</section>

View File

@ -0,0 +1,35 @@
<%
content_for :section_title, "Admin Dashboard"
%>
<pre>
## Admin
Users | Dept/Unit | Quizzes | Candidates | Results | Profile | Logout
## Manager
Quizzes | Results | Profile | Logout
## Recruiter
Results | Profile | Logout
## Reviewer
Candidates | Profile | Logout
</pre>
<% if policy(Quiz).index? %>
<section>
<h1>Quizzes</h1>
<%= render partial: 'admin/quiz/table_list', locals: { quizzes: @quizzes } %>
<%= link_to('New Quiz', admin_new_quiz_path, { class: 'btn' }) %>
</section>
<% end %>
<% if policy(User).index? %>
<section>
<h1>Users</h1>
<%= render partial: 'admin/user/table_list', locals: { users: @users } %>
<%= link_to('New User', admin_new_user_path, { class: 'btn' }) %>
</section>
<% end %>