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
fb786f5d
Commit
fb786f5d
authored
Jul 20, 2016
by
Wills Gomez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vote tally count WIP
parent
6a870e05
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
58 additions
and
26 deletions
+58
-26
application.css.scss
Halalan/app/assets/stylesheets/application.css.scss
+1
-0
ver1.css.scss
Halalan/app/assets/stylesheets/ver1.css.scss
+25
-0
index.html.erb
Halalan/app/views/admin/candidates/index.html.erb
+5
-4
index.html.erb
Halalan/app/views/admin/positions/index.html.erb
+1
-1
index.html.erb
Halalan/app/views/pages/index.html.erb
+23
-19
index.html.erb
Halalan/app/views/voting/votes/index.html.erb
+3
-2
No files found.
Halalan/app/assets/stylesheets/application.css.scss
View file @
fb786f5d
@import
"bootstrap-sprockets"
;
@import
"bootstrap-sprockets"
;
@import
"bootstrap"
;
@import
"bootstrap"
;
@import
"ver1.css.scss"
\ No newline at end of file
Halalan/app/assets/stylesheets/ver1.css.scss
0 → 100644
View file @
fb786f5d
.box
{
width
:
400px
;
height
:
300px
;
background-color
:
white
;
border
:
none
;
padding
:
10px
;
float
:
left
;
}
table
{
width
:
100%
;
padding-left
:
10px
;
padding-right
:
10px
;
}
th
{
height
:
50px
;
padding-left
:
10px
;
}
td
{
padding-left
:
10px
;
}
\ No newline at end of file
Halalan/app/views/admin/candidates/index.html.erb
View file @
fb786f5d
<h1>
Candidates
</h1>
<center>
<h1>
CANDIDATES
</h1>
<%=
link_to
"Add a Candidate"
,
new_admin_candidate_path
%>
<%=
link_to
"Add a candidate"
,
new_admin_candidate_path
%>
</center>
<hr>
<hr>
<%
@positions
.
each
do
|
p
|
%>
<%
@positions
.
each
do
|
p
|
%>
<h
5>
<%=
p
.
name
%>
</h5
>
<h
3>
<%=
p
.
name
%>
</h3
>
<ul
>
<ul
>
<%
p
.
candidates
.
each
do
|
c
|
%>
<%
p
.
candidates
.
each
do
|
c
|
%>
<li>
<%=
link_to
c
.
full_name
,
admin_candidate_path
(
c
.
id
)
%>
</li>
<li>
<%=
link_to
c
.
full_name
,
admin_candidate_path
(
c
.
id
)
%>
</li>
...
...
Halalan/app/views/admin/positions/index.html.erb
View file @
fb786f5d
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<hr>
<hr>
<%
@positions
.
each
do
|
c
|
%>
<%
@positions
.
each
do
|
c
|
%>
<h2>
(
<%=
c
.
id
%>
)
<%=
c
.
name
%
>
</h2>
<h2>
<a
href=
"/admin/positions/show"
>
<%
c
.
name
%>
</a
></h2>
<ul>
<ul>
<%
c
.
candidates
.
each
do
|
p
|
%>
<%
c
.
candidates
.
each
do
|
p
|
%>
<li>
<%=
link_to
"
#{
p
.
first_name
}
#{
p
.
last_name
}
"
,
admin_candidate_path
(
p
.
id
)
%>
</li>
<li>
<%=
link_to
"
#{
p
.
first_name
}
#{
p
.
last_name
}
"
,
admin_candidate_path
(
p
.
id
)
%>
</li>
...
...
Halalan/app/views/pages/index.html.erb
View file @
fb786f5d
<h1>
Halalan PH
</h1>
<h1><center>
Current Vote Tally
</center></h1>
<br>
<br>
<%
@positions
.
each
do
|
p
|
%>
<%
@positions
.
each
do
|
p
|
%>
<h4>
<%=
p
.
name
%>
</h4>
<div
class =
"section"
>
<table>
<div
class =
"box"
>
<thead>
<h4><center>
<%=
p
.
name
%>
</center></h4>
<td>
</td>
<table>
<td>
Name
</td>
<thead>
<td>
Slogan
</td>
<th><center>
</center></th>
<td>
Votes
</td>
<th><center>
Name
</center></th>
<td>
</td>
<th
colspan=
"2"
><center>
Votes
</center></th>
</thead>
<th><center>
</center></th>
<%
total
=
0
%>
</thead>
<%
p
.
candidates
.
each
do
|
c
|
%>
<%
total
=
0
%>
<%
total
=
total
+
c
.
votes
.
count
%>
<%
p
.
candidates
.
each
do
|
c
|
%>
<%
end
%>
<%
total
=
total
+
c
.
votes
.
count
%>
<%
p
.
candidates
.
each
do
|
c
|
%>
<%
end
%>
<%
p
.
candidates
.
each
do
|
c
|
%>
<tr>
<tr>
<td></td>
<td></td>
<td>
<%=
link_to
c
.
full_name
,
admin_candidate_path
(
c
.
id
)
%>
</td>
<td><center>
<%=
link_to
c
.
full_name
,
admin_candidate_path
(
c
.
id
)
%>
</center></td>
<td>
<%=
c
.
slogan
%>
</td>
<td><center>
<%=
c
.
votes
.
count
%>
</center></td>
<td>
<%=
c
.
votes
.
count
%>
</td>
<td><center><progress
value=
"
<%=
c
.
votes
.
count
%>
"
max=
"
<%=
total
%>
"
>
(
<%=
c
.
votes
.
count
%>
)
</center></td>
<td><progress
value=
"
<%=
c
.
votes
.
count
%>
"
max=
"
<%=
total
%>
"
></td>
</tr>
</tr>
<%
end
%>
<%
end
%>
</table>
</table>
</div>
</div>
<%
end
%>
<%
end
%>
\ No newline at end of file
Halalan/app/views/voting/votes/index.html.erb
View file @
fb786f5d
<h1>
Votes
</h1>
<h1>
<center>
VOTES
</center>
</h1>
<h2>
Hello,
<%=
current_user
.
full_name
%>
!
</h2>
<hr>
<hr>
<h2><center>
Hello,
<%=
current_user
.
full_name
%>
!
</center></h2>
<h4>
Vote now for:
</h4>
<h4>
Vote now for:
</h4>
<ul>
<ul>
<%
@positions
.
each
do
|
p
|
%>
<%
@positions
.
each
do
|
p
|
%>
...
...
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