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
457b13e5
Commit
457b13e5
authored
Jul 20, 2016
by
Galen Evilla
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tweaks
parent
37e830e0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
pages_controller.rb
Halalan/app/controllers/pages_controller.rb
+1
-0
index.html.erb
Halalan/app/views/admin/positions/index.html.erb
+7
-8
index.html.erb
Halalan/app/views/pages/index.html.erb
+1
-1
No files found.
Halalan/app/controllers/pages_controller.rb
View file @
457b13e5
class
PagesController
<
ApplicationController
def
index
@users
=
User
.
all
@votes
=
Vote
.
all
@candidates
=
Candidate
.
all
@positions
=
Position
.
all
...
...
Halalan/app/views/admin/positions/index.html.erb
View file @
457b13e5
...
...
@@ -3,12 +3,11 @@
<%=
link_to
"Add New Position"
,
new_admin_position_path
%>
<hr>
<%
@positions
.
each
do
|
c
|
%>
<h2>
<%=
c
.
name
%>
</h2>
<%
@positions
.
each
do
|
p
|
%>
<h2>
<%=
link_to
p
.
name
,
admin_position_path
(
p
.
id
)
%>
</h2>
<ul>
<%
c
.
candidates
.
each
do
|
p
|
%>
<li>
<%=
link_to
"
#{
p
.
first_name
}
#{
p
.
last_name
}
"
,
admin_candidate_path
(
p
.
id
)
%>
</li>
<%
p
.
candidates
.
each
do
|
c
|
%>
<li>
<%=
link_to
c
.
full_name
,
admin_candidate_path
(
c
.
id
)
%>
</li>
<%
end
%>
</ul>
<%
end
%>
\ No newline at end of file
Halalan/app/views/pages/index.html.erb
View file @
457b13e5
...
...
@@ -35,7 +35,7 @@
<td></td>
<td><center>
<%=
link_to
c
.
full_name
,
admin_candidate_path
(
c
.
id
)
%>
</center></td>
<td><center>
<%=
c
.
votes
.
count
%>
</center></td>
<td><center><progress
value=
"
<%=
c
.
votes
.
count
%>
"
max=
"
<%=
total
%>
"
>
(
<%=
c
.
votes
.
count
%>
)
</center></td>
<td><center><progress
value=
"
<%=
c
.
votes
.
count
%>
"
max=
"
<%=
@users
.
count
%>
"
>
(
<%=
c
.
votes
.
count
%>
)
</center></td>
</tr>
<%
end
%>
</table>
...
...
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