diff --git a/app/views/admin/auth/login.html.erb b/app/views/admin/auth/login.html.erb
index b54def1..3850506 100644
--- a/app/views/admin/auth/login.html.erb
+++ b/app/views/admin/auth/login.html.erb
@@ -1,21 +1,23 @@
-
- Admin Login
+<%
+ content_for :main_class, "intro_tpl"
+%>
- <% if flash[:error].present? %>
- <%= flash[:error] %>
- <% end %>
+Admin Login
- <%= form_for :auth, url: admin_login_path do |form| %>
-
- <%= form.label :email %>
- <%= form.email_field :email %>
-
+<% if flash[:error].present? %>
+ <%= flash[:error] %>
+<% end %>
-
- <%= form.label :password %>
- <%= form.password_field :password %>
-
+<%= form_for :auth, url: admin_login_path do |form| %>
+
+ <%= form.label :email %>
+ <%= form.email_field :email %>
+
- <%= submit_tag "Log in" %>
- <% end %>
-
+
+ <%= form.label :password %>
+ <%= form.password_field :password %>
+
+
+ <%= submit_tag "Log in" %>
+<% end %>
diff --git a/app/views/admin/dashboard.html.erb b/app/views/admin/dashboard.html.erb
index c19052d..9939146 100644
--- a/app/views/admin/dashboard.html.erb
+++ b/app/views/admin/dashboard.html.erb
@@ -2,17 +2,14 @@
content_for :section_title, "Admin Dashboard"
%>
-
-
- Quizzes
- <%= render partial: 'admin/quiz/table_list', locals: { quizzes: @quizzes } %>
- <%= link_to('New Quiz', admin_new_quiz_path, { class: 'btn' }) %>
-
+
+ Quizzes
+ <%= render partial: 'admin/quiz/table_list', locals: { quizzes: @quizzes } %>
+ <%= link_to('New Quiz', admin_new_quiz_path, { class: 'btn' }) %>
+
-
- Users
- <%= render partial: 'admin/user/table_list', locals: { users: @users } %>
- <%= link_to('New User', admin_new_user_path, { class: 'btn' }) %>
-
-
-
+
+ Users
+ <%= render partial: 'admin/user/table_list', locals: { users: @users } %>
+ <%= link_to('New User', admin_new_user_path, { class: 'btn' }) %>
+
diff --git a/app/views/admin/question/edit.html.erb b/app/views/admin/question/edit.html.erb
index baea6e8..6428daa 100644
--- a/app/views/admin/question/edit.html.erb
+++ b/app/views/admin/question/edit.html.erb
@@ -2,8 +2,5 @@
content_for :section_title, "Questions"
%>
-
- <%= @question.quiz.name %>
-
- <%= render partial: 'form', locals: {question: @question, action: admin_update_question_path } %>
-
+<%= @question.quiz.name %>
+<%= render partial: 'form', locals: {question: @question, action: admin_update_question_path } %>
diff --git a/app/views/admin/question/index.html.erb b/app/views/admin/question/index.html.erb
index 8ec115b..f6f17b0 100644
--- a/app/views/admin/question/index.html.erb
+++ b/app/views/admin/question/index.html.erb
@@ -2,11 +2,9 @@
content_for :section_title, "Questions"
%>
-
- <% quizzes = @questions.group_by{ |q| q.quiz.name } %>
- <% quizzes.each do |quiz, questions| %>
- <%= quiz %>
- <%= render partial: 'admin/question/table_list', locals: { questions: questions } %>
- <%= link_to('Edit Quiz', admin_quiz_path(questions.first.quiz.to_i), { class: 'btn' }) %>
- <% end %>
-
+<% quizzes = @questions.group_by{ |q| q.quiz.name } %>
+<% quizzes.each do |quiz, questions| %>
+ <%= quiz %>
+ <%= render partial: 'admin/question/table_list', locals: { questions: questions } %>
+ <%= link_to('Edit Quiz', admin_quiz_path(questions.first.quiz.to_i), { class: 'btn' }) %>
+<% end %>
diff --git a/app/views/admin/question/new.html.erb b/app/views/admin/question/new.html.erb
index 8bc7a68..351b388 100644
--- a/app/views/admin/question/new.html.erb
+++ b/app/views/admin/question/new.html.erb
@@ -2,6 +2,4 @@
content_for :section_title, "New Question"
%>
-
- <%= render partial: 'form', locals: {question: @question, action: admin_create_question_path } %>
-
+<%= render partial: 'form', locals: {question: @question, action: admin_create_question_path } %>
diff --git a/app/views/admin/question/view.html.erb b/app/views/admin/question/view.html.erb
index 24bba3e..c39789c 100644
--- a/app/views/admin/question/view.html.erb
+++ b/app/views/admin/question/view.html.erb
@@ -2,37 +2,35 @@
content_for :section_title, "Question for #{@question.quiz.name}"
%>
-
-
-
- Category |
- <%= @question.category %> |
-
-
- Type |
- <%= @question.input_type %> |
-
-
- Sort |
- <%= @question.sort %> |
-
-
- |
-
- <%= check_box_tag 'question_active', nil, @question.active?, {disabled: true} %>
- <%= label_tag 'question_active', 'Active' %>
- |
-
-
+
+
+ Category |
+ <%= @question.category %> |
+
+
+ Type |
+ <%= @question.input_type %> |
+
+
+ Sort |
+ <%= @question.sort %> |
+
+
+ |
+
+ <%= check_box_tag 'question_active', nil, @question.active?, {disabled: true} %>
+ <%= label_tag 'question_active', 'Active' %>
+ |
+
+
- Question
- <%= @question.question %>
+Question
+<%= @question.question %>
- <%= fields_for @question do |fields| %>
- <%= render partial: "admin/question/#{@question.input_type}", locals: {question: @question, disable: true, fields: fields } %>
- <% end %>
+<%= fields_for @question do |fields| %>
+ <%= render partial: "admin/question/#{@question.input_type}", locals: {question: @question, disable: true, fields: fields } %>
+<% end %>
- <%= link_to('Edit', admin_edit_question_path(@question.to_i), { class: 'btn' }) %>
+<%= link_to('Edit', admin_edit_question_path(@question.to_i), { class: 'btn' }) %>
- <%= link_to('View Quiz', admin_quiz_path(@question.quiz_id), { class: 'btn' }) %>
-
+<%= link_to('View Quiz', admin_quiz_path(@question.quiz_id), { class: 'btn' }) %>
diff --git a/app/views/admin/quiz/edit.html.erb b/app/views/admin/quiz/edit.html.erb
index a67e234..bf23b0e 100644
--- a/app/views/admin/quiz/edit.html.erb
+++ b/app/views/admin/quiz/edit.html.erb
@@ -2,6 +2,4 @@
content_for :section_title, "Edit: #{@quiz.name}"
%>
-
- <%= render partial: 'form', locals: { quiz: @quiz, action: admin_update_quiz_path } %>
-
+<%= render partial: 'form', locals: { quiz: @quiz, action: admin_update_quiz_path } %>
diff --git a/app/views/admin/quiz/index.html.erb b/app/views/admin/quiz/index.html.erb
index 70b8cf2..1bce4e8 100644
--- a/app/views/admin/quiz/index.html.erb
+++ b/app/views/admin/quiz/index.html.erb
@@ -2,7 +2,5 @@
content_for :section_title, "Quizzes"
%>
-
- <%= render partial: 'admin/quiz/table_list', locals: { quizzes: @quizzes } %>
- <%= link_to('New Quiz', admin_new_quiz_path, { class: 'btn' }) %>
-
+<%= render partial: 'admin/quiz/table_list', locals: { quizzes: @quizzes } %>
+<%= link_to('New Quiz', admin_new_quiz_path, { class: 'btn' }) %>
diff --git a/app/views/admin/quiz/new.html.erb b/app/views/admin/quiz/new.html.erb
index 2d0dd11..2bb5726 100644
--- a/app/views/admin/quiz/new.html.erb
+++ b/app/views/admin/quiz/new.html.erb
@@ -2,6 +2,4 @@
content_for :section_title, "New Quiz"
%>
-
- <%= render partial: 'form', locals: { quiz: @quiz, action: admin_create_quiz_path } %>
-
+<%= render partial: 'form', locals: { quiz: @quiz, action: admin_create_quiz_path } %>
diff --git a/app/views/admin/quiz/view.html.erb b/app/views/admin/quiz/view.html.erb
index 21eb321..f37b865 100644
--- a/app/views/admin/quiz/view.html.erb
+++ b/app/views/admin/quiz/view.html.erb
@@ -2,14 +2,10 @@
content_for :section_title, "#{@quiz.name}"
%>
-
- <%= @quiz.name %>
- <%= @quiz.dept %>
- <%= @quiz.unit %>
- <%= link_to('Edit', admin_edit_quiz_path(@quiz.to_i), { class: 'btn' }) %>
-
+<%= @quiz.name %>
+<%= @quiz.dept %>
+<%= @quiz.unit %>
+<%= link_to('Edit', admin_edit_quiz_path(@quiz.to_i), { class: 'btn' }) %>
-
- <%= render partial: 'admin/question/table_list', locals: { questions: @quiz.questions, disable: true } %>
- <%= link_to('New Question', admin_new_question_path, { class: 'btn' }) %>
-
+<%= render partial: 'admin/question/table_list', locals: { questions: @quiz.questions, disable: true } %>
+<%= link_to('New Question', admin_new_question_path, { class: 'btn' }) %>
diff --git a/app/views/admin/user/edit.html.erb b/app/views/admin/user/edit.html.erb
index 0ccc724..262ff3c 100644
--- a/app/views/admin/user/edit.html.erb
+++ b/app/views/admin/user/edit.html.erb
@@ -2,6 +2,4 @@
content_for :section_title, "Edit: #{@user.name}"
%>
-
- <%= render partial: 'form', locals: {user: @user, action: admin_update_user_path } %>
-
+<%= render partial: 'form', locals: {user: @user, action: admin_update_user_path } %>
diff --git a/app/views/admin/user/index.html.erb b/app/views/admin/user/index.html.erb
index 3092e28..2598812 100644
--- a/app/views/admin/user/index.html.erb
+++ b/app/views/admin/user/index.html.erb
@@ -2,8 +2,6 @@
content_for :section_title, "Users"
%>
-
- Users
- <%= render partial: 'admin/user/table_list', locals: { users: @users } %>
- <%= link_to('New User', admin_new_user_path, { class: 'btn' }) %>
-
+Users
+<%= render partial: 'admin/user/table_list', locals: { users: @users } %>
+<%= link_to('New User', admin_new_user_path, { class: 'btn' }) %>
diff --git a/app/views/admin/user/new.html.erb b/app/views/admin/user/new.html.erb
index dc70d47..0958f6a 100644
--- a/app/views/admin/user/new.html.erb
+++ b/app/views/admin/user/new.html.erb
@@ -2,6 +2,4 @@
content_for :section_title, "New User"
%>
-
- <%= render partial: 'form', locals: {user: @user, action: admin_create_user_path } %>
-
+<%= render partial: 'form', locals: {user: @user, action: admin_create_user_path } %>
diff --git a/app/views/admin/user/view.html.erb b/app/views/admin/user/view.html.erb
index caf2c25..0bd3f52 100644
--- a/app/views/admin/user/view.html.erb
+++ b/app/views/admin/user/view.html.erb
@@ -2,9 +2,7 @@
content_for :section_title, "#{@user.name}"
%>
-
- <%= @user.name %>
- <%= mail_to(@user.email) %>
- <%= @user.role %>
- <%= link_to('Edit', admin_edit_user_path(@user.to_i), { class: 'btn' }) %>
-
+<%= @user.name %>
+<%= mail_to(@user.email) %>
+<%= @user.role %>
+<%= link_to('Edit', admin_edit_user_path(@user.to_i), { class: 'btn' }) %>
diff --git a/app/views/layouts/admin.html.erb b/app/views/layouts/admin.html.erb
index 0beec5b..ed03bd7 100644
--- a/app/views/layouts/admin.html.erb
+++ b/app/views/layouts/admin.html.erb
@@ -30,7 +30,10 @@
- <%= yield %>
+ ">
+ <%= render partial: "shared/generic_flash" %>
+ <%= yield %>
+