Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
final_project
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
evilla_gomez_guian_principe
final_project
Commits
d4f32313
Commit
d4f32313
authored
Jul 19, 2016
by
April Guian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some stuff
parent
446866c2
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
65 additions
and
17 deletions
+65
-17
users_controller.rb
Poller/app/controllers/users_controller.rb
+5
-0
edit.html.erb
Poller/app/views/admin/positions/edit.html.erb
+1
-1
index.html.erb
Poller/app/views/admin/positions/index.html.erb
+2
-0
new.html.erb
Poller/app/views/admin/positions/new.html.erb
+1
-1
edit.html.erb
Poller/app/views/candidates/edit.html.erb
+11
-2
new.html.erb
Poller/app/views/candidates/new.html.erb
+13
-3
index.html.erb
Poller/app/views/pages/index.html.erb
+8
-5
edit.html.erb
Poller/app/views/positions/edit.html.erb
+11
-2
new.html.erb
Poller/app/views/positions/new.html.erb
+13
-3
No files found.
Poller/app/controllers/users_controller.rb
View file @
d4f32313
...
@@ -3,5 +3,10 @@ class UsersController < ApplicationController
...
@@ -3,5 +3,10 @@ class UsersController < ApplicationController
@user
=
User
.
find
(
params
[
:id
])
@user
=
User
.
find
(
params
[
:id
])
render
"users/show.html.erb"
render
"users/show.html.erb"
end
end
def
profile
@user
=
User
.
find
(
params
[
:id
])
render
"users/profile.html.erb"
end
end
end
Poller/app/views/admin/positions/edit.html.erb
View file @
d4f32313
<h1>
Edit Position
</h1>
<h1>
Edit Position
</h1>
<%
if
user_signed_in?
%>
<%
if
user_signed_in?
%>
Hello
User
!
Hello
Admin
!
<%=
render
partial:
"form"
%>
<%=
render
partial:
"form"
%>
...
...
Poller/app/views/admin/positions/index.html.erb
View file @
d4f32313
...
@@ -14,6 +14,8 @@
...
@@ -14,6 +14,8 @@
</ul>
</ul>
<%=
link_to
"View all Candidates under
#{
c
.
name
}
"
,
"admin/positions/
#{
c
.
id
}
"
%>
<%=
link_to
"View all Candidates under
#{
c
.
name
}
"
,
"admin/positions/
#{
c
.
id
}
"
%>
<%=
link_to
(
"Add New Candidate"
,
new_admin_candidate_path
)
%>
<%
end
%>
<%
end
%>
<hr>
<hr>
...
...
Poller/app/views/admin/positions/new.html.erb
View file @
d4f32313
<h1>
Add New Position
</h1>
<h1>
Add New Position
</h1>
<%
if
user_signed_in?
%>
<%
if
user_signed_in?
%>
Hello
User
!
Hello
Admin
!
<%=
render
partial:
"form"
%>
<%=
render
partial:
"form"
%>
...
...
Poller/app/views/candidates/edit.html.erb
View file @
d4f32313
<h1>
Edit Candidate
</h1>
<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
Poller/app/views/candidates/new.html.erb
View file @
d4f32313
<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
Poller/app/views/pages/index.html.erb
View file @
d4f32313
...
@@ -3,9 +3,12 @@
...
@@ -3,9 +3,12 @@
<%=
link_to
"Manage Positions Under Admin"
,
admin_positions_path
%>
<%=
link_to
"Manage Positions Under Admin"
,
admin_positions_path
%>
<br>
<br>
<%=
link_to
"Manage Candidates Under Admin"
,
admin_candidates_path
%>
<%=
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
%>
Poller/app/views/positions/edit.html.erb
View file @
d4f32313
<h1>
Edit Position
</h1>
<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
Poller/app/views/positions/new.html.erb
View file @
d4f32313
<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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment