Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MIS21FinalsElection
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
Dean Krisitan Bardeloza
MIS21FinalsElection
Commits
cf427e63
Commit
cf427e63
authored
Jul 17, 2016
by
Alfonso Gabriel R. Arvisu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added pages_controller and index.html.erb for views/pages
parent
4003bdcf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
0 deletions
+22
-0
pages_controller.rb
Election/app/controllers/pages_controller.rb
+6
-0
application.html.erb
Election/app/views/layouts/application.html.erb
+7
-0
index.html.erb
Election/app/views/pages/index.html.erb
+8
-0
routes.rb
Election/config/routes.rb
+1
-0
No files found.
Election/app/controllers/pages_controller.rb
0 → 100644
View file @
cf427e63
class
PagesController
<
ApplicationController
def
index
@positions
=
Position
.
all
render
"pages/index.html.erb"
end
end
\ No newline at end of file
Election/app/views/layouts/application.html.erb
View file @
cf427e63
...
@@ -8,6 +8,13 @@
...
@@ -8,6 +8,13 @@
</head>
</head>
<body>
<body>
<%
if
user_signed_in?
%>
<p>
You are logged in as
<%=
current_user
.
email
%>
.
</p>
<br>
||
<%=
link_to
"Log Out"
,
destroy_user_session_path
,
method: :delete
%>
<%
else
%>
<%=
""
%>
<%
end
%>
<%=
link_to
"Homepage"
,
root_path
%>
<%=
yield
%>
<%=
yield
%>
</body>
</body>
...
...
Election/app/views/pages/index.html.erb
0 → 100644
View file @
cf427e63
<h1>
Official Election Ballot
</h1>
<%
if
user_signed_in?
%>
<h2>
Please take a look at our candidates!
</h2>
<hr>
<%
else
%>
<h4>
You are not signed in. Please
<%=
link_to
"Login"
,
new_user_session_path
%>
or
<%=
link_to
"Sign Up"
,
new_user_registration_path
%>
to proceed with voting.
</h2>
<%
end
%>
\ No newline at end of file
Election/config/routes.rb
View file @
cf427e63
...
@@ -2,4 +2,5 @@ Rails.application.routes.draw do
...
@@ -2,4 +2,5 @@ Rails.application.routes.draw do
devise_for
:users
devise_for
:users
resources
:positions
resources
:positions
resources
:candidates
resources
:candidates
root
to:
"pages#index"
end
end
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