Commit d4f32313 authored by April Guian's avatar April Guian

Fixed some stuff

parent 446866c2
......@@ -3,5 +3,10 @@ class UsersController < ApplicationController
@user = User.find(params[:id])
render "users/show.html.erb"
end
def profile
@user = User.find(params[:id])
render "users/profile.html.erb"
end
end
<h1>Edit Position</h1>
<% if user_signed_in? %>
Hello User!
Hello Admin!
<%= render partial: "form" %>
......
......@@ -14,6 +14,8 @@
</ul>
<%= link_to "View all Candidates under #{c.name}" , "admin/positions/#{c.id}" %>
<%= link_to("Add New Candidate", new_admin_candidate_path) %>
<% end %>
<hr>
......
<h1>Add New Position</h1>
<% if user_signed_in? %>
Hello User!
Hello Admin!
<%= render partial: "form" %>
......
<h1>Edit Candidate</h1>
<%= render partial: "form" %>
<% if user_signed_in? %>
Hello User!
<%= link_to "Back to Candidates", candidates_path %>
<%= render partial: "form" %>
<% else %>
You are not signed in. Please go to login page.
<%= link_to Login, new_user_session_path %>
<% end %>
<%= link_to "Back to List of Candidates", candidates_path %>
\ No newline at end of file
<h1>New Candidate</h1>
<h1>Add New Candidate</h1>
<%= render partial: "form" %>
<% if user_signed_in? %>
Hello User!
<%= link_to "Back to Candidates", candidates_path %>
<%= render partial: "form" %>
<% else %>
You are not signed in. Please go to login page.
<%= link_to Login, new_user_session_path %>
<% end %>
<%= link_to "Back to List of Candidates", candidates_path %>
\ No newline at end of file
......@@ -3,9 +3,12 @@
<%= link_to "Manage Positions Under Admin", admin_positions_path %>
<br>
<%= link_to "Manage Candidates Under Admin", admin_candidates_path %>
<br>
<%= link_to "View Positions", positions_path %>
<br>
<%= link_to "View Candidates", candidates_path %>
<% @positions.each do |c| %>
<h2>(<%= c.id %>) <%= c.name %></h2>
<ul>
<% c.candidates.each do |p| %>
<li><%= link_to "#{p.first_name} #{p.last_name}" , admin_candidate_path(p.id) %></li>
<% end %>
</ul>
<% end %>
<h1>Edit Position</h1>
<%= render partial: "form" %>
<% if user_signed_in? %>
Hello User!
<%= link_to "Back to Positions", positions_path %>
<%= render partial: "form" %>
<% else %>
You are not signed in. Please go to login page.
<%= link_to Login, new_user_session_path %>
<% end %>
<%= link_to "Back to List of Positions", postitions_path %>
\ No newline at end of file
<h1>New Position</h1>
<h1>Add New Position</h1>
<%= render partial: "form" %>
<% if user_signed_in? %>
Hello User!
<%= link_to "Back to Positions", positions_path %>
<%= render partial: "form" %>
<% else %>
You are not signed in. Please go to login page.
<%= link_to Login, new_user_session_path %>
<% end %>
<%= link_to "Back to List of Positions", positions_path %>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment