Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
candi-date-tayo
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
George Nicole Balmaceda
candi-date-tayo
Commits
0b6422b3
Commit
0b6422b3
authored
Jul 20, 2016
by
royce-matthew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Alexis: fixed more styles for vote module, consistency of style
parent
ca426a99
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
44 additions
and
17 deletions
+44
-17
image0.png
app/assets/images/image0.png
+0
-0
image2.JPG
app/assets/images/image2.JPG
+0
-0
style.css
app/assets/stylesheets/style.css
+25
-1
index.html.erb
app/views/admin/candidates/index.html.erb
+2
-2
index.html.erb
app/views/admin/positions/index.html.erb
+3
-0
application.html.erb
app/views/layouts/application.html.erb
+2
-2
index.html.erb
app/views/pages/index.html.erb
+2
-0
index.html.erb
app/views/voting/votes/index.html.erb
+10
-12
No files found.
app/assets/images/image0.png
0 → 100644
View file @
0b6422b3
562 KB
app/assets/images/image2.JPG
0 → 100644
View file @
0b6422b3
This diff is collapsed.
Click to expand it.
app/assets/stylesheets/style.css
View file @
0b6422b3
...
...
@@ -21,6 +21,8 @@ a {
color
:
#0070d2
;
font-size
:
16px
;
}
h1
,
h2
,
h3
,
h4
,
h5
,
h6
{
color
:
#16325c
!important
;
font-weight
:
100
;
...
...
@@ -140,7 +142,7 @@ thead {
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
background
:
whitesmoke
;
background
:
#f6f9fb
;
box-sizing
:
border-box
;
padding
:
1em
3em
;
}
...
...
@@ -195,6 +197,28 @@ thead {
.position-container
{
display
:
block
;
margin-top
:
40px
;
margin-bottom
:
40px
;
}
.vote-container
{
display
:
flex
;
flex-direction
:
column
;
box-sizing
:
border-box
;
padding-bottom
:
40px
;
}
.vote-item
{
display
:
flex
;
justify-content
:
space-between
;
background
:
#f2f2f2
;
min-width
:
350px
;
margin-top
:
10px
;
padding
:
3em
2em
;
border-right
:
1px
solid
white
;
}
.vote-item
a
{
text-decoration
:
underline
;
}
.position-container
a
{
...
...
app/views/admin/candidates/index.html.erb
View file @
0b6422b3
<div
class=
"
overlay"
><div
class=
"row-image"
style=
"height: 400px; background: url(
<%=
asset_path
'image1.JPG'
%>
) center center"
></div
></div>
<div
class=
"
row-image"
style=
"height: 400px; background: url(
<%=
asset_path
'image1.JPG'
%>
) center center"
></div>
<%
if
user_signed_in?
%>
<h6
style=
"text-align: left; color: #8e8e8e !important; margin: 0px;"
>
Hi,
<%=
current_user
.
first_name
%>
, you can view the candidates here.
</h6>
<h6
style=
"text-align: left; color: #8e8e8e !important; margin: 0px;"
>
Hi,
<%=
current_user
.
first_name
%>
, you can
add or
view the candidates here.
</h6>
<%
end
%>
<h4>
Roster of Candidates
</h4>
...
...
app/views/admin/positions/index.html.erb
View file @
0b6422b3
<div
class=
"row-image"
style=
"height: 400px; background: url(
<%=
asset_path
'image2.JPG'
%>
) center center"
></div>
<%
if
user_signed_in?
%>
<h6
style=
"text-align: left; color: #8e8e8e !important; margin: 0px;"
>
What position would you like to add or view,
<%=
current_user
.
first_name
%>
?
</h6>
...
...
app/views/layouts/application.html.erb
View file @
0b6422b3
...
...
@@ -38,7 +38,7 @@
<div
class=
"navigation-buttons"
>
<a
href=
"/"
><span
class=
"ion-home"
>
</span>
Home
</a>
<a
href=
"/"
><span
class=
"ion-home"
>
</span>
Home
</a>
<%=
link_to
"Candidates"
,
admin_candidates_path
,{
:class
=>
""
}
%>
<%=
link_to
"Positions"
,
admin_positions_path
,{
:class
=>
""
}
%>
...
...
@@ -53,7 +53,7 @@
<%
if
user_signed_in?
%>
<%=
link_to
"Logout"
,
destroy_user_session_path
,{
method: :delete
,
:class
=>
""
}
%>
<a
href=
"/profile"
class=
"nav-item right"
>
My Profile
</a>
<a
href=
"/profile"
class=
"nav-item right"
>
<span
class=
"ion-person"
>
</span>
<%=
current_user
.
first_name
%>
</a>
<%
else
%>
<%=
link_to
"Log-in"
,
new_user_session_path
,
{
:class
=>
""
}
%>
<%=
link_to
"Register"
,
new_user_registration_path
,
{
:class
=>
""
}
%>
...
...
app/views/pages/index.html.erb
View file @
0b6422b3
<%=
image_tag
"image0.png"
,
{
:style
=>
"width: 300px; display:block;margin: 0 auto; margin-bottom: 20px"
}
%>
<%
if
user_signed_in?
%>
<h6
style=
"text-align: center; color: #8e8e8e !important; margin: 0px;"
>
Welcome to the results page,
<%=
current_user
.
first_name
%>
.
</h6>
...
...
app/views/voting/votes/index.html.erb
View file @
0b6422b3
<h1>
Votes
</h1>
<h6
style=
"text-align: left; color: #8e8e8e !important; margin: 0px;"
>
Hi,
<%=
current_user
.
first_name
%>
, you can vote for your candidate here.
</h6>
<h4>
Vote Now
</h4>
<!--
<%=
link_to
(
"New Vote"
,
new_voting_vote_path
)
%>
<%=
link_to
"Logout"
,
destroy_user_session_path
,
method: :delete
%>
-->
<br>
<td>
Hello
<%=
current_user
.
full_name
%>
</td>
<br>
<br>
<ul>
<div
class=
"vote-container"
>
<%
@positions
.
each
do
|
p
|
%>
<
li>
<%=
p
.
name
%>
<br
>
<
div
class=
"vote-item"
>
<strong>
<span
class=
"ion-person"
></span>
<%=
p
.
name
%>
</strong
>
<%
voted_for
=
false
%>
<%
p
.
candidates
.
each
do
|
c
|
%>
<%
c
.
votes
.
each
do
|
v
|
%>
<%
if
v
.
user_id
==
current_user
.
id
%>
You
have already
voted for
<%=
v
.
candidate
.
full_name
%>
You voted for
<%=
v
.
candidate
.
full_name
%>
<%
voted_for
=
true
%>
<%
end
%>
<%
end
%>
<%
end
%>
</ol>
<%
if
!
voted_for
%>
<%=
link_to
"Vote for a
#{
p
.
name
}
"
,
"/voting/new/
#{
p
.
id
}
"
%>
<%
else
%>
<%
end
%>
</div>
</li>
<%
end
%>
</ul>
<hr>
<br>
</div>
\ No newline at end of file
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