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
ab84e9e3
Commit
ab84e9e3
authored
Jul 20, 2016
by
Wills Gomez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
message
parent
c172c99b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
50 deletions
+16
-50
ver1.css.scss
Halalan/app/assets/stylesheets/ver1.css.scss
+1
-1
show.html.erb
Halalan/app/views/admin/candidates/show.html.erb
+2
-7
index.html.erb
Halalan/app/views/admin/positions/index.html.erb
+2
-9
_navbar.html.erb
Halalan/app/views/layouts/_navbar.html.erb
+9
-11
index.html.erb
Halalan/app/views/pages/index.html.erb
+1
-21
final_project
Halalan/final_project
+1
-1
No files found.
Halalan/app/assets/stylesheets/ver1.css.scss
View file @
ab84e9e3
...
...
@@ -30,4 +30,4 @@ td {
ul
.nav
navbar-nav
navbar-right
{
padding-top
:
20px
;
}
\ No newline at end of file
}
Halalan/app/views/admin/candidates/show.html.erb
View file @
ab84e9e3
<
<<<<<<
HEAD
<h1><center>
<%=
@candidate
.
full_name
%>
</center></h1>
<center>
<%=
link_to
"Edit"
,
edit_admin_candidate_path
(
@candidate
.
id
)
%>
<%=
link_to
"Delete"
,
admin_candidate_path
(
@candidate
.
id
),
method: :delete
%>
</center>
=======
<%
provide
(
:candidate
,
"active"
)
%>
<%
provide
(
:title
,
"
#{
@candidate
.
full_name
}
"
)
%>
<h1>
Name of the Candidate:
<%=
@candidate
.
full_name
%>
</h1>
<%=
link_to
"Edit"
,
edit_admin_candidate_path
(
@candidate
.
id
)
%>
<br>
<%=
link_to
"Delete"
,
admin_candidate_path
(
@candidate
.
id
),
method: :delete
%>
>>>>>>> 2920b0418adc40c16be842ad29c33a2aefaa3052
<br>
<h3>
Position:
<%=
@candidate
.
position
.
name
%>
</h3>
<%
...
...
Halalan/app/views/admin/positions/index.html.erb
View file @
ab84e9e3
<
<<<<<<
HEAD
<h1><center>
POSITIONS
</center></h1>
<center>
<%=
link_to
"Add New Position"
,
new_admin_position_path
%>
</center>
=======
<%
provide
(
:position
,
"active"
)
%>
<%
provide
(
:title
,
"Positions"
)
%>
<h1>
Positions
</h1>
>>>>>>> 2920b0418adc40c16be842ad29c33a2aefaa3052
<hr>
<%
@positions
.
each
do
|
p
|
%>
<h2>
<%=
link_to
p
.
name
,
admin_position_path
(
p
.
id
)
%>
</h2>
<ul>
<%
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/layouts/_navbar.html.erb
View file @
ab84e9e3
...
...
@@ -14,29 +14,27 @@
<div
class=
"collapse navbar-collapse"
id=
"bs-example-navbar-collapse-1"
>
<ul
class=
"nav navbar-nav navbar-right"
>
<
<<<<<<
HEAD
<li><a
href=
"/profile"
>
Hello,
<%=
current_user
.
first_name
%>
!
</a></li>
<li>
<%=
link_to
"Home"
,
root_path
%>
</li>
<li>
<%=
link_to
"Candidates"
,
admin_candidates_path
%>
</li>
<li>
<%=
link_to
"Positions"
,
admin_positions_path
%>
</li>
<li>
<a
href=
"/about"
>
About
</a>
</li>
=======
<li
class=
"
<%=
yield
(
:home
)
%>
"
>
<%=
link_to
"Home"
,
root_path
%>
</li>
<li
class=
"
<%=
yield
(
:candidate
)
%>
"
>
<%=
link_to
"Candidates"
,
admin_candidates_path
%>
</li>
<li
class=
"
<%=
yield
(
:position
)
%>
"
>
<%=
link_to
"Positions"
,
admin_positions_path
%>
</li>
<li
class=
"
<%=
yield
(
:vote
)
%>
"
><a
href=
"/voting/votes"
>
Vote now
</li>
<li
class=
"
<%=
yield
(
:about
)
%>
"
>
<%=
link_to
"About"
,
about_path
%>
</li>
>>>>>>> 2920b0418adc40c16be842ad29c33a2aefaa3052
<%
if
user_signed_in?
%>
<li
class=
"dropdown"
>
<a
href=
"#"
class=
"dropdown-toggle"
data-toggle=
"dropdown"
><b
class=
"caret"
></b></a>
<ul
class=
"dropdown-menu"
>
<li
><a
href=
"/voting/votes"
>
Vote now
</li>
<li>
<%=
link_to
"Logout"
,
destroy_user_session_path
,
method: :delete
%>
</li>
<li
class=
"
<%=
yield
(
:vote
)
%>
"
><a
href=
"/voting/votes"
>
Vote now
</li>
<li>
<%=
link_to
"Logout"
,
destroy_user_session_path
,
method: :delete
%>
</li>
</u1>
</ul>
</li>
<%
else
%>
<li>
<%=
link_to
"Log-in"
,
new_user_session_path
%>
</li>
...
...
Halalan/app/views/pages/index.html.erb
View file @
ab84e9e3
<
<<<<<<
HEAD
=
======
<%
provide
(
:home
,
"active"
)
%>
<%
provide
(
:title
,
"Home"
)
%>
>
>>>>>> 2920b0418adc40c16be842ad29c33a2aefaa3052
<div
class =
"index"
>
<h1><center>
Current Vote Tally
</center></h1>
<br>
<br>
<
<<<<<<
HEAD
=
======
<%
if
user_signed_in?
%>
<%
case
current_user
.
role
%>
<%
when
'voter'
%>
<
h3
>
Welcome,
<%=
current_user
.
first_name
%>
!
</h3>
<%
when
'admin'
%>
<h3>
Welcome, Administrator
</h3>
<%
end
%>
<%
else
%>
<h3>
Welcome
</h3>
<%
end
%>
>>>>>>> 2920b0418adc40c16be842ad29c33a2aefaa3052
<%
@positions
.
each
do
|
p
|
%>
<div
class =
"section"
>
<div
class =
"box"
>
...
...
@@ -44,10 +28,6 @@
<td></td>
<td><center>
<%=
link_to
c
.
full_name
,
admin_candidate_path
(
c
.
id
)
%>
</center></td>
<td><center>
<%=
c
.
votes
.
count
%>
</center></td>
<
<<<<<<
HEAD
=
======
<
td
><center><progress
value=
"
<%=
c
.
votes
.
count
%>
"
max=
"
<%=
@users
.
count
%>
"
>
(
<%=
c
.
votes
.
count
%>
)
</center></td>
>>>>>>> 2920b0418adc40c16be842ad29c33a2aefaa3052
</tr>
<%
end
%>
</table>
...
...
final_project
@
edd4e3e8
Subproject commit
c241defdc6f70a4a33df309c2e1cc91982c37d1a
Subproject commit
edd4e3e875f72343ef8de9564756fdd923aaa085
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