html reset

This commit is contained in:
Mark Moser
2017-03-20 10:57:50 -05:00
parent cb6f41fe29
commit 0727440a31
58 changed files with 397 additions and 529 deletions

View File

@ -1,33 +1,37 @@
<%= render partial: 'shared/form_model_errors', locals: { obj: user} %>
<%= form_for user, url: action do |form| %>
<div class="form-group">
<div>
<%= form.label :name, "Full Name" %>
<%= form.text_field :name %>
</div>
<div class="form-group">
<div>
<%= form.label :email, "eMail" %>
<%= form.email_field :email %>
</div>
<div class="form-group">
<div>
<%= form.label :role, "Role" %>
<%= form.select :role, admin_role_options(user.role), include_blank: false %>
</div>
<div class="form-group">
<div>
<div><strong>Quiz Review List</strong></div>
<p>
Quizzes this user should be reviewing the results of.<br />
Admins and Recruiters should not have any checked, unless they are expected
to participate in the technical review for that quiz.
</p>
<%= form.collection_check_boxes(:quiz_ids, Quiz.all, :id, :name, {}, {class: 'checkbox'}) do | quiz | %>
<div class="form-group-multiples">
<%= quiz.check_box( checked: user.quizzes.include?(quiz.object)) %>
<%= quiz.label %>
</div>
<% end %>
<ul>
<%= form.collection_check_boxes(:quiz_ids, Quiz.all, :id, :name, {}, {class: ""}) do | quiz | %>
<li>
<%= quiz.check_box( checked: user.quizzes.include?(quiz.object)) %>
<%= quiz.label %>
</li>
<% end %>
</ul>
</div>
<%= form.submit %>

View File

@ -11,7 +11,7 @@
<td><%= link_to user.name, admin_user_path(user.to_i) %></td>
<td><%= mail_to(user.email) %></td>
<td><%= user.role %></td>
<td><%= link_to 'edit', admin_edit_user_path(user.to_i), { class: 'btn tertiary-btn' } if policy(user).edit? %></td>
<td><%= link_to 'edit', admin_edit_user_path(user.to_i), { class: "" } if policy(user).edit? %></td>
</tr>
<% end %>
</table>

View File

@ -1,5 +1,3 @@
<%
content_for :section_title, "Edit: #{@user.name}"
%>
<% content_for :section_title, "Edit: #{@user.name}" %>
<%= render partial: 'form', locals: {user: @user, action: admin_update_user_path } %>

View File

@ -1,7 +1,7 @@
<%
content_for :section_title, "Users"
%>
<% content_for :section_title, "Users" %>
<h1>Users</h1>
<%= render partial: 'admin/user/table_list', locals: { users: @users } %>
<%= link_to('New User', admin_new_user_path, { class: 'btn' }) if policy(User).create? %>
<%= link_to('New User', admin_new_user_path, { class: "" }) if policy(User).create? %>

View File

@ -1,5 +1,3 @@
<%
content_for :section_title, "New User"
%>
<% content_for :section_title, "New User" %>
<%= render partial: 'form', locals: {user: @user, action: admin_create_user_path } %>

View File

@ -1,16 +1,14 @@
<%
content_for :section_title, "#{@user.name}"
%>
<% content_for :section_title, "#{@user.name}" %>
<p><%= @user.name %></p>
<p><%= mail_to(@user.email) %></p>
<p><%= @user.role %></p>
<div><%= @user.name %></div>
<div><%= mail_to(@user.email) %></div>
<div><%= @user.role %></div>
<p>Quizzes:</p>
<div>Quizzes:</div>
<ul>
<% @user.quizzes.each do |quiz| %>
<li><%= quiz.name %></li>
<% end %>
</ul>
<%= link_to('Edit', admin_edit_user_path(@user.to_i), { class: 'btn' }) %>
<%= link_to('Edit', admin_edit_user_path(@user.to_i), { class: "" }) %>