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
a1448dc5
Commit
a1448dc5
authored
Jul 20, 2016
by
Jasmine Principe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
alignments
parent
a3f5bfef
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
20 additions
and
30 deletions
+20
-30
_form.html.erb
Halalan-trial/app/views/admin/candidates/_form.html.erb
+1
-1
index.html.erb
Halalan-trial/app/views/admin/candidates/index.html.erb
+1
-6
new.html.erb
Halalan-trial/app/views/admin/candidates/new.html.erb
+5
-5
index.html.erb
Halalan-trial/app/views/admin/positions/index.html.erb
+1
-7
new.html.erb
Halalan-trial/app/views/admin/positions/new.html.erb
+5
-5
new.html.erb
Halalan-trial/app/views/devise/registrations/new.html.erb
+1
-1
_form.html.erb
Halalan-trial/app/views/voting/votes/_form.html.erb
+1
-1
index.html.erb
Halalan-trial/app/views/voting/votes/index.html.erb
+2
-2
new.html.erb
Halalan-trial/app/views/voting/votes/new.html.erb
+3
-2
No files found.
Halalan-trial/app/views/admin/candidates/_form.html.erb
View file @
a1448dc5
<%=
simple_form_for
([
:admin
,
@candidate
])
do
|
f
|
%>
<%=
simple_form_for
([
:admin
,
@candidate
])
do
|
f
|
%>
<%=
f
.
association
:position
,
label:
'Position: '
%>
<%=
f
.
input
:first_name
,
label:
'First Name: '
%>
<%=
f
.
input
:first_name
,
label:
'First Name: '
%>
<%=
f
.
input
:last_name
,
label:
'Last Name: '
%>
<%=
f
.
input
:last_name
,
label:
'Last Name: '
%>
<%=
f
.
input
:slogan
,
label:
'Slogan: '
%>
<%=
f
.
input
:slogan
,
label:
'Slogan: '
%>
<%=
f
.
association
:position
,
label:
'Position: '
%>
<%=
f
.
submit
%>
<%=
f
.
submit
%>
<%
end
%>
<%
end
%>
Halalan-trial/app/views/admin/candidates/index.html.erb
View file @
a1448dc5
<%
provide
(
:candidate
,
"active"
)
%>
<%
provide
(
:candidate
,
"active"
)
%>
<%
provide
(
:title
,
"Candidates"
)
%>
<%
provide
(
:title
,
"Candidates"
)
%>
<style>
h1
{
letter-spacing
:
2px
;
}
</style>
<div
class =
"container"
>
<div
class =
"container"
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<div
class=
"col-md-12"
>
<left>
<left>
<h1>
C
andidates
</h1>
<h1>
C
ANDIDATES
</h1>
<%=
button_to
"Add a Candidate"
,
new_admin_candidate_path
,
:method
=>
"get"
%>
<%=
button_to
"Add a Candidate"
,
new_admin_candidate_path
,
:method
=>
"get"
%>
</left>
</left>
<%
@positions
.
each
do
|
p
|
%>
<%
@positions
.
each
do
|
p
|
%>
...
...
Halalan-trial/app/views/admin/candidates/new.html.erb
View file @
a1448dc5
...
@@ -3,12 +3,12 @@
...
@@ -3,12 +3,12 @@
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<h1>
New Candidate
</h1>
<h1>
New Candidate
</h1>
<div
class=
"col-md-3"
>
<br>
<%=
render
partial:
"form"
%>
<%=
render
partial:
"form"
%>
<br>
<%=
link_to
"Back to Candidates"
,
admin_candidates_path
%>
<%=
link_to
"
<
Back to Candidates"
,
admin_candidates_path
%>
</div>
</div>
</div>
</div>
</div>
</div>
Halalan-trial/app/views/admin/positions/index.html.erb
View file @
a1448dc5
<%
provide
(
:position
,
"active"
)
%>
<%
provide
(
:position
,
"active"
)
%>
<%
provide
(
:title
,
"Positions"
)
%>
<%
provide
(
:title
,
"Positions"
)
%>
<style>
h1
{
letter-spacing
:
2px
;
}
</style>
<div
class =
"container"
>
<div
class =
"container"
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<div
class=
"col-md-12"
>
<left>
<left>
<h1>
P
ositions
</h1>
<h1>
P
OSITIONS
</h1>
<%=
button_to
"Create a Position"
,
new_admin_position_path
,
:method
=>
"get"
%>
<%=
button_to
"Create a Position"
,
new_admin_position_path
,
:method
=>
"get"
%>
</left>
</left>
<%
@positions
.
each
do
|
p
|
%>
<%
@positions
.
each
do
|
p
|
%>
...
...
Halalan-trial/app/views/admin/positions/new.html.erb
View file @
a1448dc5
...
@@ -3,12 +3,12 @@
...
@@ -3,12 +3,12 @@
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<h1>
New Position
</h1>
<h1>
New Position
</h1>
<div
class=
"col-md-3"
>
<br>
<%=
render
partial:
"form"
%>
<%=
render
partial:
"form"
%>
<br>
<%=
link_to
"Back to Candidates"
,
admin_candidates_path
%>
<%=
link_to
"
<
Back to Candidates"
,
admin_candidates_path
%>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
Halalan-trial/app/views/devise/registrations/new.html.erb
View file @
a1448dc5
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-
12
"
>
<div
class=
"col-md-
3
"
>
<h2>
Sign up
</h2>
<h2>
Sign up
</h2>
<%=
simple_form_for
(
resource
,
as:
resource_name
,
url:
registration_path
(
resource_name
),
:html
=>
{
:role
=>
'form'
})
do
|
f
|
%>
<%=
simple_form_for
(
resource
,
as:
resource_name
,
url:
registration_path
(
resource_name
),
:html
=>
{
:role
=>
'form'
})
do
|
f
|
%>
...
...
Halalan-trial/app/views/voting/votes/_form.html.erb
View file @
a1448dc5
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
%>
%>
<%=
simple_form_for
([
:voting
,
@vote
])
do
|
f
|
%>
<%=
simple_form_for
([
:voting
,
@vote
])
do
|
f
|
%>
I cast my vote for
<%=
f
.
association
:candidate
,
collection:
Candidate
.
where
(
position_id
:@pos
),
label_method: :full_name
,
value_method: :id
%>
<%=
f
.
association
:candidate
,
collection:
Candidate
.
where
(
position_id
:@pos
),
label_method: :full_name
,
value_method: :id
%>
<%=
f
.
input
:comment
,
label:
'Comment:'
%>
<%=
f
.
input
:comment
,
label:
'Comment:'
%>
<%=
f
.
submit
label:
'Cast Vote'
%>
<%=
f
.
submit
label:
'Cast Vote'
%>
...
...
Halalan-trial/app/views/voting/votes/index.html.erb
View file @
a1448dc5
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<h4>
Vote now for:
</h4>
<h4>
Vote now for:
</h4>
<ul>
<ul>
<%
@positions
.
each
do
|
p
|
%>
<%
@positions
.
each
do
|
p
|
%>
<
li>
<%=
p
.
name
%>
<
br>
<br>
<%
voted_for
=
false
%>
<%
voted_for
=
false
%>
<%
p
.
candidates
.
each
do
|
c
|
%>
<%
p
.
candidates
.
each
do
|
c
|
%>
<%
c
.
votes
.
each
do
|
v
|
%>
<%
c
.
votes
.
each
do
|
v
|
%>
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<%=
link_to
"Vote for a
#{
p
.
name
}
"
,
"/voting/new/
#{
p
.
id
}
"
%>
<%=
link_to
"Vote for a
#{
p
.
name
}
"
,
"/voting/new/
#{
p
.
id
}
"
%>
<%
else
%>
<%
else
%>
<%
end
%>
<%
end
%>
</li>
<%
end
%>
<%
end
%>
</ul>
</ul>
<hr>
<hr>
...
...
Halalan-trial/app/views/voting/votes/new.html.erb
View file @
a1448dc5
...
@@ -3,12 +3,13 @@
...
@@ -3,12 +3,13 @@
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-
12
"
>
<div
class=
"col-md-
3
"
>
<h1>
Vote
</h1>
<h1>
Vote
</h1>
<%=
render
partial:
"form"
%>
<%=
render
partial:
"form"
%>
<%=
link_to
"Back to Votes"
,
voting_votes_path
%>
<br>
<%=
link_to
"< Back to Votes"
,
voting_votes_path
%>
</div>
</div>
</div>
</div>
</div>
</div>
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