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"
;
@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>
<%=
link_to
"Add a Candidate"
,
new_admin_candidate_path
%>
<center>
<h1>
CANDIDATES
</h1>
<%=
link_to
"Add a candidate"
,
new_admin_candidate_path
%>
</center>
<hr>
<%
@positions
.
each
do
|
p
|
%>
<h
5>
<%=
p
.
name
%>
</h5
>
<h
3>
<%=
p
.
name
%>
</h3
>
<ul
>
<%
p
.
candidates
.
each
do
|
c
|
%>
<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 @@
<hr>
<%
@positions
.
each
do
|
c
|
%>
<h2>
(
<%=
c
.
id
%>
)
<%=
c
.
name
%
>
</h2>
<h2>
<a
href=
"/admin/positions/show"
>
<%
c
.
name
%>
</a
></h2>
<ul>
<%
c
.
candidates
.
each
do
|
p
|
%>
<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
|
%>
<h4>
<%=
p
.
name
%>
</h4>
<table>
<thead>
<td>
</td>
<td>
Name
</td>
<td>
Slogan
</td>
<td>
Votes
</td>
<td>
</td>
</thead>
<%
total
=
0
%>
<%
p
.
candidates
.
each
do
|
c
|
%>
<%
total
=
total
+
c
.
votes
.
count
%>
<%
end
%>
<%
p
.
candidates
.
each
do
|
c
|
%>
<div
class =
"section"
>
<div
class =
"box"
>
<h4><center>
<%=
p
.
name
%>
</center></h4>
<table>
<thead>
<th><center>
</center></th>
<th><center>
Name
</center></th>
<th
colspan=
"2"
><center>
Votes
</center></th>
<th><center>
</center></th>
</thead>
<%
total
=
0
%>
<%
p
.
candidates
.
each
do
|
c
|
%>
<%
total
=
total
+
c
.
votes
.
count
%>
<%
end
%>
<%
p
.
candidates
.
each
do
|
c
|
%>
<tr>
<td></td>
<td>
<%=
link_to
c
.
full_name
,
admin_candidate_path
(
c
.
id
)
%>
</td>
<td>
<%=
c
.
slogan
%>
</td>
<td>
<%=
c
.
votes
.
count
%>
</td>
<td><progress
value=
"
<%=
c
.
votes
.
count
%>
"
max=
"
<%=
total
%>
"
></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>
</tr>
<%
end
%>
</table>
</div>
</div>
<%
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>
<h2><center>
Hello,
<%=
current_user
.
full_name
%>
!
</center></h2>
<h4>
Vote now for:
</h4>
<ul>
<%
@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