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
dcb7b837
Commit
dcb7b837
authored
Jul 20, 2016
by
Galen Evilla
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit
parent
8d05d692
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
45 additions
and
23 deletions
+45
-23
users_controller.rb
Halalan/app/controllers/users/users_controller.rb
+2
-0
edit.html.erb
Halalan/app/views/admin/candidates/edit.html.erb
+4
-1
index.html.erb
Halalan/app/views/admin/candidates/index.html.erb
+3
-0
new.html.erb
Halalan/app/views/admin/candidates/new.html.erb
+3
-0
show.html.erb
Halalan/app/views/admin/candidates/show.html.erb
+3
-0
edit.html.erb
Halalan/app/views/admin/positions/edit.html.erb
+4
-1
index.html.erb
Halalan/app/views/admin/positions/index.html.erb
+3
-0
new.html.erb
Halalan/app/views/admin/positions/new.html.erb
+3
-0
show.html.erb
Halalan/app/views/admin/positions/show.html.erb
+3
-0
_navbar.html.erb
Halalan/app/views/layouts/_navbar.html.erb
+5
-5
application.html.erb
Halalan/app/views/layouts/application.html.erb
+1
-1
index.html.erb
Halalan/app/views/pages/index.html.erb
+4
-1
edit.html.erb
Halalan/app/views/voting/votes/edit.html.erb
+0
-5
index.html.erb
Halalan/app/views/voting/votes/index.html.erb
+3
-0
new.html.erb
Halalan/app/views/voting/votes/new.html.erb
+3
-0
show.html.erb
Halalan/app/views/voting/votes/show.html.erb
+0
-8
routes.rb
Halalan/config/routes.rb
+1
-1
No files found.
Halalan/app/controllers/users/users_controller.rb
View file @
dcb7b837
...
...
@@ -7,5 +7,7 @@ module Users
@votes
=
Vote
.
all
render
"pages/profile.html.erb"
end
end
end
Halalan/app/views/admin/candidates/edit.html.erb
View file @
dcb7b837
<h1>
Admin Edit Post
</h1>
<%
provide
(
:candidate
,
"active"
)
%>
<%
provide
(
:title
,
"Edit Candidate"
)
%>
<h1>
Edit Candidate's Information
</h1>
<%=
render
partial:
"form"
%>
...
...
Halalan/app/views/admin/candidates/index.html.erb
View file @
dcb7b837
<%
provide
(
:candidate
,
"active"
)
%>
<%
provide
(
:title
,
"Candidates"
)
%>
<center>
<h1>
CANDIDATES
</h1>
...
...
Halalan/app/views/admin/candidates/new.html.erb
View file @
dcb7b837
<%
provide
(
:candidate
,
"active"
)
%>
<%
provide
(
:title
,
"New Candidate"
)
%>
<h1>
New Candidate
</h1>
<%=
render
partial:
"form"
%>
...
...
Halalan/app/views/admin/candidates/show.html.erb
View file @
dcb7b837
<%
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>
...
...
Halalan/app/views/admin/positions/edit.html.erb
View file @
dcb7b837
<h1>
Admin Edit Post
</h1>
<%
provide
(
:position
,
"active"
)
%>
<%
provide
(
:title
,
"Edit Position"
)
%>
<h1>
Edit Position
</h1>
<%=
render
partial:
"form"
%>
...
...
Halalan/app/views/admin/positions/index.html.erb
View file @
dcb7b837
<%
provide
(
:position
,
"active"
)
%>
<%
provide
(
:title
,
"Positions"
)
%>
<h1>
Positions
</h1>
<%=
link_to
"Add New Position"
,
new_admin_position_path
%>
...
...
Halalan/app/views/admin/positions/new.html.erb
View file @
dcb7b837
<%
provide
(
:position
,
"active"
)
%>
<%
provide
(
:title
,
"New Position"
)
%>
<h1>
New Position
</h1>
<%=
render
partial:
"form"
%>
...
...
Halalan/app/views/admin/positions/show.html.erb
View file @
dcb7b837
<%
provide
(
:position
,
"active"
)
%>
<%
provide
(
:title
,
"
#{
@position
.
name
}
"
)
%>
<h1>
<%=
@position
.
name
%>
</h1>
<%=
link_to
"Edit"
,
edit_admin_position_path
(
@position
.
id
)
%>
...
...
Halalan/app/views/layouts/_navbar.html.erb
View file @
dcb7b837
...
...
@@ -14,11 +14,11 @@
<div
class=
"collapse navbar-collapse"
id=
"bs-example-navbar-collapse-1"
>
<ul
class=
"nav navbar-nav navbar-right"
>
<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=
"/voting/votes"
>
Vote now
</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>
<%
if
user_signed_in?
%>
<li
class=
"dropdown"
>
...
...
Halalan/app/views/layouts/application.html.erb
View file @
dcb7b837
<!DOCTYPE html>
<html>
<head>
<title>
Halalan PH
</title>
<title>
<%=
yield
(
:title
)
%>
|
Halalan PH
</title>
<%=
stylesheet_link_tag
'application'
,
media:
'all'
,
'data-turbolinks-track'
=>
true
%>
<%=
javascript_include_tag
'application'
,
'data-turbolinks-track'
=>
true
%>
<%=
csrf_meta_tags
%>
...
...
Halalan/app/views/pages/index.html.erb
View file @
dcb7b837
<%
provide
(
:home
,
"active"
)
%>
<%
provide
(
:title
,
"Home"
)
%>
<div
class =
"index"
>
<h1><center>
Current Vote Tally
</center></h1>
<br>
...
...
@@ -6,7 +9,7 @@
<%
if
user_signed_in?
%>
<%
case
current_user
.
role
%>
<%
when
'voter'
%>
<h3>
Welcome,
Voter
</h3>
<h3>
Welcome,
<%=
current_user
.
first_name
%>
!
</h3>
<%
when
'admin'
%>
<h3>
Welcome, Administrator
</h3>
<%
end
%>
...
...
Halalan/app/views/voting/votes/edit.html.erb
deleted
100644 → 0
View file @
8d05d692
<h1>
Admin Edit Post
</h1>
<%=
render
partial:
"form"
%>
<%=
link_to
"Back to Posts"
,
admin_posts_path
%>
\ No newline at end of file
Halalan/app/views/voting/votes/index.html.erb
View file @
dcb7b837
<%
provide
(
:vote
,
"active"
)
%>
<%
provide
(
:title
,
"Vote now!"
)
%>
<h1><center>
VOTES
</center></h1>
...
...
Halalan/app/views/voting/votes/new.html.erb
View file @
dcb7b837
<%
provide
(
:vote
,
"active"
)
%>
<%
provide
(
:title
,
"Vote"
)
%>
<h1>
Vote
</h1>
<%=
render
partial:
"form"
%>
...
...
Halalan/app/views/voting/votes/show.html.erb
deleted
100644 → 0
View file @
8d05d692
<h1>
<%=
@post
.
title
%>
</h1>
<h3>
<%=
@post
.
published_at
%>
</h3>
<p>
<%=
@post
.
content
%>
</p>
<hr>
<%=
link_to
"Back to Posts"
,
admin_posts_path
%>
Halalan/config/routes.rb
View file @
dcb7b837
...
...
@@ -5,7 +5,7 @@ Rails.application.routes.draw do
resources
:users
get
"/profile"
,
to:
"users/users#index"
get
"/profile"
,
to:
"users/users#index"
get
"/voting/new/:id"
,
to:
"voting/votes#new"
get
"/about"
=>
"pages#about"
,
as: :about
...
...
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