more headings

This commit is contained in:
Mark Moser 2017-03-20 14:38:57 -05:00
parent 0727440a31
commit 5e743ca2eb
14 changed files with 45 additions and 9 deletions

View File

@ -3,6 +3,8 @@
content_for :title, "Candidates - Skills Assessment Admin"
%>
<h1>Candidates</h1>
<%= link_to("Create New Candidate", admin_new_candidate_path, { class: "" }) if policy(Candidate).create? %>
<table cellspacing="0" cellpadding="0">

View File

@ -3,6 +3,8 @@
content_for :title, "Profile - Skills Assessment Admin"
%>
<h1>Profile</h1>
<div>Name: <%= current_user.name %></div>
<div>email: <%= current_user.email %></div>
<div>Role: <%= current_user.role %></div>

View File

@ -3,6 +3,8 @@
content_for :title, "Questions - Skills Assessment Admin"
%>
<h1>Questions</h1>
<% quizzes = @questions.group_by{ |q| q.quiz.name } %>
<% quizzes.each do |quiz, questions| %>
<h1><%= quiz %></h1>

View File

@ -3,4 +3,6 @@
content_for :title, "New Question - Skills Assessment Admin"
%>
<h1>New Question</h1>
<%= render partial: 'form', locals: {question: @question, action: admin_create_question_path } %>

View File

@ -1,3 +1,8 @@
<% content_for :section_title, "Edit: #{@quiz.name}" %>
<%
content_for :section_title, "Edit: #{@quiz.name}"
content_for :title, "Quizzes - Skills Assessment Admin"
%>
<h1>Edit: <%=@quiz.name %></h1>
<%= render partial: 'form', locals: { quiz: @quiz, action: admin_update_quiz_path } %>

View File

@ -3,5 +3,7 @@
content_for :title, "Quizzes - Skills Assessment Admin"
%>
<h1>Quizzes</h1>
<%= render partial: 'admin/quiz/table_list', locals: { quizzes: @quizzes } %>
<%= link_to('New Quiz', admin_new_quiz_path, { class: "" }) %>

View File

@ -3,4 +3,6 @@
content_for :title, "New Quiz - Skills Assessment Admin"
%>
<h1>New Quiz</h1>
<%= render partial: 'form', locals: { quiz: @quiz, action: admin_create_quiz_path } %>

View File

@ -3,7 +3,8 @@
content_for :title, "Quiz - Skills Assessment Admin"
%>
<div><%= @quiz.name %></div>
<h1><%= @quiz.name %></h1>
<div><%= @quiz.dept %></div>
<div><%= @quiz.unit %></div>
<%= link_to('Edit', admin_edit_quiz_path(@quiz.to_i), { class: "" }) %>

View File

@ -3,6 +3,8 @@
content_for :title, "Quiz Results - Skills Assessment Admin"
%>
<h1>Results</h1>
<table cellspacing="0" cellpadding="0">
<tr>
<th><%= sortable "test_hash", "Test ID" %></th>

View File

@ -1,3 +1,8 @@
<% content_for :section_title, "Edit: #{@user.name}" %>
<%
content_for :section_title, "Edit: #{@user.name}"
content_for :title, "Users - Skills Assessment Admin"
%>
<h1>Edit <%= @user.name %></h1>
<%= render partial: 'form', locals: {user: @user, action: admin_update_user_path } %>

View File

@ -1,4 +1,7 @@
<% content_for :section_title, "Users" %>
<%
content_for :section_title, "Users"
content_for :title, "Users - Skills Assessment Admin"
%>
<h1>Users</h1>

View File

@ -1,3 +1,8 @@
<% content_for :section_title, "New User" %>
<%
content_for :section_title, "Users"
content_for :title, "Users - Skills Assessment Admin"
%>
<h1>New User</h1>
<%= render partial: 'form', locals: {user: @user, action: admin_create_user_path } %>

View File

@ -1,6 +1,9 @@
<% content_for :section_title, "#{@user.name}" %>
<%
content_for :section_title, "Users"
content_for :title, "Users - Skills Assessment Admin"
%>
<div><%= @user.name %></div>
<h1><%= @user.name %></h1>
<div><%= mail_to(@user.email) %></div>
<div><%= @user.role %></div>

View File

@ -44,7 +44,7 @@ module Admin
user = users(:recruiter)
get admin_user_url user.to_i
assert_response :success
assert_select 'div', user.name
assert_select 'h1', user.name
end
test "should get edit" do
@ -62,7 +62,7 @@ module Admin
assert_redirected_to admin_user_path(user.to_i)
get admin_user_url user.to_i
assert_select 'div', 'new name'
assert_select 'h1', 'new name'
end
test "should fail to update user" do