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
5a8f703c
Commit
5a8f703c
authored
Jul 18, 2016
by
royce-matthew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added a ton of changes
parent
40a63f06
Changes
20
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
746 additions
and
5 deletions
+746
-5
skeleton.css
app/assets/stylesheets/skeleton.css
+418
-0
style.css
app/assets/stylesheets/style.css
+40
-0
application_controller.rb
app/controllers/application_controller.rb
+10
-1
show.html.erb
app/views/admin/candidates/show.html.erb
+43
-2
new.html.erb
app/views/devise/confirmations/new.html.erb
+16
-0
confirmation_instructions.html.erb
app/views/devise/mailer/confirmation_instructions.html.erb
+5
-0
password_change.html.erb
app/views/devise/mailer/password_change.html.erb
+3
-0
reset_password_instructions.html.erb
app/views/devise/mailer/reset_password_instructions.html.erb
+8
-0
unlock_instructions.html.erb
app/views/devise/mailer/unlock_instructions.html.erb
+7
-0
edit.html.erb
app/views/devise/passwords/edit.html.erb
+19
-0
new.html.erb
app/views/devise/passwords/new.html.erb
+15
-0
edit.html.erb
app/views/devise/registrations/edit.html.erb
+30
-0
new.html.erb
app/views/devise/registrations/new.html.erb
+22
-0
new.html.erb
app/views/devise/sessions/new.html.erb
+15
-0
_links.html.erb
app/views/devise/shared/_links.html.erb
+25
-0
new.html.erb
app/views/devise/unlocks/new.html.erb
+16
-0
application.html.erb
app/views/layouts/application.html.erb
+3
-1
20160718145025_add_columns_to_user.rb
db/migrate/20160718145025_add_columns_to_user.rb
+8
-0
schema.rb
db/schema.rb
+5
-1
q.svg
public/q.svg
+38
-0
No files found.
app/assets/stylesheets/skeleton.css
0 → 100644
View file @
5a8f703c
/*
* Skeleton V2.0.4
* Copyright 2014, Dave Gamache
* www.getskeleton.com
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
* 12/29/2014
*/
/* Table of contents
––––––––––––––––––––––––––––––––––––––––––––––––––
- Grid
- Base Styles
- Typography
- Links
- Buttons
- Forms
- Lists
- Code
- Tables
- Spacing
- Utilities
- Clearing
- Media Queries
*/
/* Grid
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.container
{
position
:
relative
;
width
:
100%
;
max-width
:
960px
;
margin
:
0
auto
;
padding
:
0
20px
;
box-sizing
:
border-box
;
}
.column
,
.columns
{
width
:
100%
;
float
:
left
;
box-sizing
:
border-box
;
}
/* For devices larger than 400px */
@media
(
min-width
:
400px
)
{
.container
{
width
:
85%
;
padding
:
0
;
}
}
/* For devices larger than 550px */
@media
(
min-width
:
550px
)
{
.container
{
width
:
80%
;
}
.column
,
.columns
{
margin-left
:
4%
;
}
.column
:first-child
,
.columns
:first-child
{
margin-left
:
0
;
}
.one.column
,
.one.columns
{
width
:
4.66666666667%
;
}
.two.columns
{
width
:
13.3333333333%
;
}
.three.columns
{
width
:
22%
;
}
.four.columns
{
width
:
30.6666666667%
;
}
.five.columns
{
width
:
39.3333333333%
;
}
.six.columns
{
width
:
48%
;
}
.seven.columns
{
width
:
56.6666666667%
;
}
.eight.columns
{
width
:
65.3333333333%
;
}
.nine.columns
{
width
:
74.0%
;
}
.ten.columns
{
width
:
82.6666666667%
;
}
.eleven.columns
{
width
:
91.3333333333%
;
}
.twelve.columns
{
width
:
100%
;
margin-left
:
0
;
}
.one-third.column
{
width
:
30.6666666667%
;
}
.two-thirds.column
{
width
:
65.3333333333%
;
}
.one-half.column
{
width
:
48%
;
}
/* Offsets */
.offset-by-one.column
,
.offset-by-one.columns
{
margin-left
:
8.66666666667%
;
}
.offset-by-two.column
,
.offset-by-two.columns
{
margin-left
:
17.3333333333%
;
}
.offset-by-three.column
,
.offset-by-three.columns
{
margin-left
:
26%
;
}
.offset-by-four.column
,
.offset-by-four.columns
{
margin-left
:
34.6666666667%
;
}
.offset-by-five.column
,
.offset-by-five.columns
{
margin-left
:
43.3333333333%
;
}
.offset-by-six.column
,
.offset-by-six.columns
{
margin-left
:
52%
;
}
.offset-by-seven.column
,
.offset-by-seven.columns
{
margin-left
:
60.6666666667%
;
}
.offset-by-eight.column
,
.offset-by-eight.columns
{
margin-left
:
69.3333333333%
;
}
.offset-by-nine.column
,
.offset-by-nine.columns
{
margin-left
:
78.0%
;
}
.offset-by-ten.column
,
.offset-by-ten.columns
{
margin-left
:
86.6666666667%
;
}
.offset-by-eleven.column
,
.offset-by-eleven.columns
{
margin-left
:
95.3333333333%
;
}
.offset-by-one-third.column
,
.offset-by-one-third.columns
{
margin-left
:
34.6666666667%
;
}
.offset-by-two-thirds.column
,
.offset-by-two-thirds.columns
{
margin-left
:
69.3333333333%
;
}
.offset-by-one-half.column
,
.offset-by-one-half.columns
{
margin-left
:
52%
;
}
}
/* Base Styles
–––––––––––––––––––––––––––––––––––––––––––––––––– */
/* NOTE
html is set to 62.5% so that all the REM measurements throughout Skeleton
are based on 10px sizing. So basically 1.5rem = 15px :) */
html
{
font-size
:
62.5%
;
}
body
{
font-size
:
1.5em
;
/* currently ems cause chrome bug misinterpreting rems on body element */
line-height
:
1.6
;
font-weight
:
400
;
font-family
:
"Raleway"
,
"HelveticaNeue"
,
"Helvetica Neue"
,
Helvetica
,
Arial
,
sans-serif
;
color
:
#222
;
}
/* Typography
–––––––––––––––––––––––––––––––––––––––––––––––––– */
h1
,
h2
,
h3
,
h4
,
h5
,
h6
{
margin-top
:
0
;
margin-bottom
:
2rem
;
font-weight
:
300
;
}
h1
{
font-size
:
4.0rem
;
line-height
:
1.2
;
letter-spacing
:
-.1rem
;}
h2
{
font-size
:
3.6rem
;
line-height
:
1.25
;
letter-spacing
:
-.1rem
;
}
h3
{
font-size
:
3.0rem
;
line-height
:
1.3
;
letter-spacing
:
-.1rem
;
}
h4
{
font-size
:
2.4rem
;
line-height
:
1.35
;
letter-spacing
:
-.08rem
;
}
h5
{
font-size
:
1.8rem
;
line-height
:
1.5
;
letter-spacing
:
-.05rem
;
}
h6
{
font-size
:
1.5rem
;
line-height
:
1.6
;
letter-spacing
:
0
;
}
/* Larger than phablet */
@media
(
min-width
:
550px
)
{
h1
{
font-size
:
5.0rem
;
}
h2
{
font-size
:
4.2rem
;
}
h3
{
font-size
:
3.6rem
;
}
h4
{
font-size
:
3.0rem
;
}
h5
{
font-size
:
2.4rem
;
}
h6
{
font-size
:
1.5rem
;
}
}
p
{
margin-top
:
0
;
}
/* Links
–––––––––––––––––––––––––––––––––––––––––––––––––– */
a
{
color
:
#1EAEDB
;
}
a
:hover
{
color
:
#0FA0CE
;
}
/* Buttons
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.button
,
button
,
input
[
type
=
"submit"
],
input
[
type
=
"reset"
],
input
[
type
=
"button"
]
{
display
:
inline-block
;
height
:
38px
;
padding
:
0
30px
;
color
:
#555
;
text-align
:
center
;
font-size
:
11px
;
font-weight
:
600
;
line-height
:
38px
;
letter-spacing
:
.1rem
;
text-transform
:
uppercase
;
text-decoration
:
none
;
white-space
:
nowrap
;
background-color
:
transparent
;
border-radius
:
4px
;
border
:
1px
solid
#bbb
;
cursor
:
pointer
;
box-sizing
:
border-box
;
}
.button
:hover
,
button
:hover
,
input
[
type
=
"submit"
]
:hover
,
input
[
type
=
"reset"
]
:hover
,
input
[
type
=
"button"
]
:hover
,
.button
:focus
,
button
:focus
,
input
[
type
=
"submit"
]
:focus
,
input
[
type
=
"reset"
]
:focus
,
input
[
type
=
"button"
]
:focus
{
color
:
#333
;
border-color
:
#888
;
outline
:
0
;
}
.button.button-primary
,
button
.button-primary
,
input
[
type
=
"submit"
]
.button-primary
,
input
[
type
=
"reset"
]
.button-primary
,
input
[
type
=
"button"
]
.button-primary
{
color
:
#FFF
;
background-color
:
#33C3F0
;
border-color
:
#33C3F0
;
}
.button.button-primary
:hover
,
button
.button-primary
:hover
,
input
[
type
=
"submit"
]
.button-primary
:hover
,
input
[
type
=
"reset"
]
.button-primary
:hover
,
input
[
type
=
"button"
]
.button-primary
:hover
,
.button.button-primary
:focus
,
button
.button-primary
:focus
,
input
[
type
=
"submit"
]
.button-primary
:focus
,
input
[
type
=
"reset"
]
.button-primary
:focus
,
input
[
type
=
"button"
]
.button-primary
:focus
{
color
:
#FFF
;
background-color
:
#1EAEDB
;
border-color
:
#1EAEDB
;
}
/* Forms
–––––––––––––––––––––––––––––––––––––––––––––––––– */
input
[
type
=
"email"
],
input
[
type
=
"number"
],
input
[
type
=
"search"
],
input
[
type
=
"text"
],
input
[
type
=
"tel"
],
input
[
type
=
"url"
],
input
[
type
=
"password"
],
textarea
,
select
{
height
:
38px
;
padding
:
6px
10px
;
/* The 6px vertically centers text on FF, ignored by Webkit */
background-color
:
#fff
;
border
:
1px
solid
#D1D1D1
;
border-radius
:
4px
;
box-shadow
:
none
;
box-sizing
:
border-box
;
}
/* Removes awkward default styles on some inputs for iOS */
input
[
type
=
"email"
],
input
[
type
=
"number"
],
input
[
type
=
"search"
],
input
[
type
=
"text"
],
input
[
type
=
"tel"
],
input
[
type
=
"url"
],
input
[
type
=
"password"
],
textarea
{
-webkit-appearance
:
none
;
-moz-appearance
:
none
;
appearance
:
none
;
}
textarea
{
min-height
:
65px
;
padding-top
:
6px
;
padding-bottom
:
6px
;
}
input
[
type
=
"email"
]
:focus
,
input
[
type
=
"number"
]
:focus
,
input
[
type
=
"search"
]
:focus
,
input
[
type
=
"text"
]
:focus
,
input
[
type
=
"tel"
]
:focus
,
input
[
type
=
"url"
]
:focus
,
input
[
type
=
"password"
]
:focus
,
textarea
:focus
,
select
:focus
{
border
:
1px
solid
#33C3F0
;
outline
:
0
;
}
label
,
legend
{
display
:
block
;
margin-bottom
:
.5rem
;
font-weight
:
600
;
}
fieldset
{
padding
:
0
;
border-width
:
0
;
}
input
[
type
=
"checkbox"
],
input
[
type
=
"radio"
]
{
display
:
inline
;
}
label
>
.label-body
{
display
:
inline-block
;
margin-left
:
.5rem
;
font-weight
:
normal
;
}
/* Lists
–––––––––––––––––––––––––––––––––––––––––––––––––– */
ul
{
list-style
:
circle
inside
;
}
ol
{
list-style
:
decimal
inside
;
}
ol
,
ul
{
padding-left
:
0
;
margin-top
:
0
;
}
ul
ul
,
ul
ol
,
ol
ol
,
ol
ul
{
margin
:
1.5rem
0
1.5rem
3rem
;
font-size
:
90%
;
}
li
{
margin-bottom
:
1rem
;
}
/* Code
–––––––––––––––––––––––––––––––––––––––––––––––––– */
code
{
padding
:
.2rem
.5rem
;
margin
:
0
.2rem
;
font-size
:
90%
;
white-space
:
nowrap
;
background
:
#F1F1F1
;
border
:
1px
solid
#E1E1E1
;
border-radius
:
4px
;
}
pre
>
code
{
display
:
block
;
padding
:
1rem
1.5rem
;
white-space
:
pre
;
}
/* Tables
–––––––––––––––––––––––––––––––––––––––––––––––––– */
th
,
td
{
padding
:
12px
15px
;
text-align
:
left
;
border-bottom
:
1px
solid
#E1E1E1
;
}
th
:first-child
,
td
:first-child
{
padding-left
:
0
;
}
th
:last-child
,
td
:last-child
{
padding-right
:
0
;
}
/* Spacing
–––––––––––––––––––––––––––––––––––––––––––––––––– */
button
,
.button
{
margin-bottom
:
1rem
;
}
input
,
textarea
,
select
,
fieldset
{
margin-bottom
:
1.5rem
;
}
pre
,
blockquote
,
dl
,
figure
,
table
,
p
,
ul
,
ol
,
form
{
margin-bottom
:
2.5rem
;
}
/* Utilities
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.u-full-width
{
width
:
100%
;
box-sizing
:
border-box
;
}
.u-max-full-width
{
max-width
:
100%
;
box-sizing
:
border-box
;
}
.u-pull-right
{
float
:
right
;
}
.u-pull-left
{
float
:
left
;
}
/* Misc
–––––––––––––––––––––––––––––––––––––––––––––––––– */
hr
{
margin-top
:
3rem
;
margin-bottom
:
3.5rem
;
border-width
:
0
;
border-top
:
1px
solid
#E1E1E1
;
}
/* Clearing
–––––––––––––––––––––––––––––––––––––––––––––––––– */
/* Self Clearing Goodness */
.container
:after
,
.row
:after
,
.u-cf
{
content
:
""
;
display
:
table
;
clear
:
both
;
}
/* Media Queries
–––––––––––––––––––––––––––––––––––––––––––––––––– */
/*
Note: The best way to structure the use of media queries is to create the queries
near the relevant code. For example, if you wanted to change the styles for buttons
on small devices, paste the mobile query code up in the buttons section and style it
there.
*/
/* Larger than mobile */
@media
(
min-width
:
400px
)
{}
/* Larger than phablet (also point when grid becomes active) */
@media
(
min-width
:
550px
)
{}
/* Larger than tablet */
@media
(
min-width
:
750px
)
{}
/* Larger than desktop */
@media
(
min-width
:
1000px
)
{}
/* Larger than Desktop HD */
@media
(
min-width
:
1200px
)
{}
app/assets/stylesheets/style.css
0 → 100644
View file @
5a8f703c
.nav
{
position
:
fixed
;
top
:
-2px
;
left
:
-2px
;
width
:
calc
(
100vw
+
2px
);
list-style-type
:
none
;
margin
:
0
;
padding
:
0px
;
overflow
:
hidden
;
border
:
1px
solid
#e7e7e7
;
z-index
:
20
;
background-color
:
#f3f3f3
;
}
.nav-item
{
color
:
black
;
text-decoration
:
none
;
margin
:
0px
;
display
:
inline-block
;
padding
:
5px
25px
;
transition
:
ease-out
0.1s
;
font-size
:
18px
;
}
.nav-item
:hover
{
background-color
:
#004e7e
;
color
:
white
;
}
.nohover
:hover
{
background
:
none
;
color
:
black
;
}
.right
{
float
:
right
;
}
\ No newline at end of file
app/controllers/application_controller.rb
View file @
5a8f703c
class
ApplicationController
<
ActionController
::
Base
class
ApplicationController
<
ActionController
::
Base
protect_from_forgery
with: :exception
before_action
:configure_permitted_parameters
,
if: :devise_controller?
protected
def
configure_permitted_parameters
devise_parameter_sanitizer
.
permit
(
:sign_up
,
keys:
[
:first_name
,
:last_name
,
:birthday
,
:gender
])
end
end
end
app/views/admin/candidates/show.html.erb
View file @
5a8f703c
...
@@ -6,8 +6,49 @@
...
@@ -6,8 +6,49 @@
<%=
link_to
"OBOSEN"
,
admin_candidate_path
(
@candidate
.
id
),
{
:style
=>
"font-size:18px; text-decoration:none; color:rgba(200,0,0,0.5)"
,
method: :delete
}
%>
</h1>
<%=
link_to
"OBOSEN"
,
admin_candidate_path
(
@candidate
.
id
),
{
:style
=>
"font-size:18px; text-decoration:none; color:rgba(200,0,0,0.5)"
,
method: :delete
}
%>
</h1>
<h3
style=
"margin-top:3px; color:#004e7e"
>
<%=
@candidate
.
position
.
name
%>
</h3>
<h3
style=
"margin-top:3px; color:#004e7e"
>
<%=
@candidate
.
position
.
name
%>
</h3>
<p>
<p>
<%=
@candidate
.
slogan
%>
<%
</p>
m
=
0
f
=
0
o
=
0
%>
<%
m
=
0
f
=
0
o
=
0
@candidate
.
votes
.
each
do
|
v
|
if
v
.
user
!=
nil
if
v
.
user
.
gender
==
"Male"
m
=
m
+
1
else
if
v
.
user
.
gender
==
"Female"
f
=
f
+
1
else
o
=
o
+
1
end
end
end
%>
<%
end
%>
<div
class=
"row"
>
<div
class=
"six columns"
style=
"font-size:30px; margin:30px auto; text-align:center"
><br>
“
<%=
@candidate
.
slogan
%>
”
</div>
<table
class=
"five columns"
>
<tr><td>
Male Votes
</td><td>
<%=
m
%>
</td></tr>
<tr><td>
Female Votes
</td><td>
<%=
f
%>
</td></tr>
<tr><td>
Other Votes
</td><td>
<%=
o
%>
</td></tr>
<tr><td>
Total Active Votes
</td><td>
<%=
m
+
f
+
o
%>
</td></tr>
<tr><td>
Total Active and Inactive Casted Votes
</td><td>
<%=
@candidate
.
votes
.
count
%>
</td>
</tr>
</table>
</div>
<hr>
<hr>
<%=
link_to
"Back to Candidates"
,
admin_candidates_path
%>
<%=
link_to
"Back to Candidates"
,
admin_candidates_path
%>
app/views/devise/confirmations/new.html.erb
0 → 100644
View file @
5a8f703c
<h2>
Resend confirmation instructions
</h2>
<%=
simple_form_for
(
resource
,
as:
resource_name
,
url:
confirmation_path
(
resource_name
),
html:
{
method: :post
})
do
|
f
|
%>
<%=
f
.
error_notification
%>
<%=
f
.
full_error
:confirmation_token
%>
<div
class=
"form-inputs"
>
<%=
f
.
input
:email
,
required:
true
,
autofocus:
true
%>
</div>
<div
class=
"form-actions"
>
<%=
f
.
button
:submit
,
"Resend confirmation instructions"
%>
</div>
<%
end
%>
<%=
render
"devise/shared/links"
%>
app/views/devise/mailer/confirmation_instructions.html.erb
0 → 100644
View file @
5a8f703c
<p>
Welcome
<%=
@email
%>
!
</p>
<p>
You can confirm your account email through the link below:
</p>
<p>
<%=
link_to
'Confirm my account'
,
confirmation_url
(
@resource
,
confirmation_token:
@token
)
%>
</p>
app/views/devise/mailer/password_change.html.erb
0 → 100644
View file @
5a8f703c
<p>
Hello
<%=
@resource
.
email
%>
!
</p>
<p>
We're contacting you to notify you that your password has been changed.
</p>
app/views/devise/mailer/reset_password_instructions.html.erb
0 → 100644
View file @
5a8f703c
<p>
Hello
<%=
@resource
.
email
%>
!
</p>
<p>
Someone has requested a link to change your password. You can do this through the link below.
</p>
<p>
<%=
link_to
'Change my password'
,
edit_password_url
(
@resource
,
reset_password_token:
@token
)
%>
</p>
<p>
If you didn't request this, please ignore this email.
</p>
<p>
Your password won't change until you access the link above and create a new one.
</p>
app/views/devise/mailer/unlock_instructions.html.erb
0 → 100644
View file @
5a8f703c
<p>
Hello
<%=
@resource
.
email
%>
!
</p>
<p>
Your account has been locked due to an excessive number of unsuccessful sign in attempts.
</p>
<p>
Click the link below to unlock your account:
</p>
<p>
<%=
link_to
'Unlock my account'
,
unlock_url
(
@resource
,
unlock_token:
@token
)
%>
</p>
app/views/devise/passwords/edit.html.erb
0 → 100644
View file @
5a8f703c
<h2>
Change your password
</h2>
<%=
simple_form_for
(
resource
,
as:
resource_name
,
url:
password_path
(
resource_name
),
html:
{
method: :put
})
do
|
f
|
%>
<%=
f
.
error_notification
%>
<%=
f
.
input
:reset_password_token
,
as: :hidden
%>
<%=
f
.
full_error
:reset_password_token
%>
<div
class=
"form-inputs"
>
<%=
f
.
input
:password
,
label:
"New password"
,
required:
true
,
autofocus:
true
,
hint:
(
"
#{
@minimum_password_length
}
characters minimum"
if
@minimum_password_length
)
%>
<%=
f
.
input
:password_confirmation
,
label:
"Confirm your new password"
,
required:
true
%>
</div>
<div
class=
"form-actions"
>
<%=
f
.
button
:submit
,
"Change my password"
%>
</div>
<%
end
%>
<%=
render
"devise/shared/links"
%>
app/views/devise/passwords/new.html.erb
0 → 100644
View file @
5a8f703c
<h2>
Forgot your password?
</h2>
<%=
simple_form_for
(
resource
,
as:
resource_name
,
url:
password_path
(
resource_name
),
html:
{
method: :post
})
do
|
f
|
%>
<%=
f
.
error_notification
%>
<div
class=
"form-inputs"
>
<%=
f
.
input
:email
,
required:
true
,
autofocus:
true
%>
</div>
<div
class=
"form-actions"
>
<%=
f
.
button
:submit
,
"Send me reset password instructions"
%>
</div>
<%
end
%>
<%=
render
"devise/shared/links"
%>
app/views/devise/registrations/edit.html.erb
0 → 100644
View file @
5a8f703c
<h2>
Edit
<%=
resource_name
.
to_s
.
humanize
%>
</h2>
<%=
simple_form_for
(
resource
,
as:
resource_name
,
url:
registration_path
(
resource_name
),
html:
{
method: :put
})
do
|
f
|
%>
<%=
f
.
error_notification
%>
<div
class=
"form-inputs"
>
<%=
f
.
input
:email
,
required:
true
,
autofocus:
true
%>
<%=
f
.
input
:first_name
,
required:
true
%>
<%=
f
.
input
:last_name
,
required:
true
%>
<%=
f
.
input
:birthday
,
required:
true
%>
<%=
f
.
input
:gender
,
required
:true
,
collection
:[
"Male"
,
"Female"
,
"Other"
]
%>
<%
if
devise_mapping
.
confirmable?
&&
resource
.
pending_reconfirmation?
%>
<p>
Currently waiting confirmation for:
<%=
resource
.
unconfirmed_email
%>
</p>
<%
end
%>
<%=
f
.
input
:password
,
autocomplete:
"off"
,
hint:
"leave it blank if you don't want to change it"
,
required:
false
%>
<%=
f
.
input
:password_confirmation
,
required:
false
%>
<%=
f
.
input
:current_password
,
hint:
"we need your current password to confirm your changes"
,
required:
true
%>
</div>
<div
class=
"form-actions"
>
<%=
f
.
button
:submit
,
"Update"
%>
</div>
<%
end
%>
<h3>
Cancel my account
</h3>
<p>
Unhappy?
<%=
link_to
"Cancel my account"
,
registration_path
(
resource_name
),
data:
{
confirm:
"Are you sure?"
},
method: :delete
%>
</p>
<%=
link_to
"Back"
,
:back
%>
app/views/devise/registrations/new.html.erb
0 → 100644
View file @
5a8f703c
<h2>
Registration
</h2>
<%=
simple_form_for
(
resource
,
as:
resource_name
,
url:
registration_path
(
resource_name
))
do
|
f
|
%>
<%=
f
.
error_notification
%>
<div
class=
"form-inputs"
>
<%=
f
.
input
:email
,
required:
true
,
autofocus:
true
%>
<%=
f
.
input
:first_name
,
required:
true
%>
<%=
f
.
input
:last_name
,
required:
true
%>
<%=
f
.
input
:birthday
,
required:
true
,
start_year:
Date
.
today
.
year
-
90
,
end_year:
Date
.
today
.
year
-
12
%>
<%=
f
.
input
:gender
,
required
:true
,
collection
:[
"Male"
,
"Female"
,
"Other"
]
%>
<%=
f
.
input
:password
,
required:
true
,
hint:
(
"
#{
@minimum_password_length
}
characters minimum"
if
@minimum_password_length
)
%>
<%=
f
.
input
:password_confirmation
,
required:
true
%>
</div>
<div
class=
"form-actions"
>
<%=
f
.
button
:submit
,
"Sign up"
%>
</div>
<%
end
%>
<%=
render
"devise/shared/links"
%>
app/views/devise/sessions/new.html.erb
0 → 100644
View file @
5a8f703c
<h2>
Log in
</h2>
<%=
simple_form_for
(
resource
,
as:
resource_name
,
url:
session_path
(
resource_name
))
do
|
f
|
%>
<div
class=
"form-inputs"
>
<%=
f
.
input
:email
,
required:
false
,
autofocus:
true
%>
<%=
f
.
input
:password
,
required:
false
%>
<%=
f
.
input
:remember_me
,
as: :boolean
if
devise_mapping
.
rememberable?
%>
</div>
<div
class=
"form-actions"
>
<%=
f
.
button
:submit
,
"Log in"
%>
</div>
<%
end
%>
<%=
render
"devise/shared/links"
%>
app/views/devise/shared/_links.html.erb
0 → 100644
View file @
5a8f703c
<%-
if
controller_name
!=
'sessions'
%>
<%=
link_to
"Log in"
,
new_session_path
(
resource_name
)
%>
<br
/>
<%
end
-%>
<%-
if
devise_mapping
.
registerable?
&&
controller_name
!=
'registrations'
%>
<%=
link_to
"Sign up"
,
new_registration_path
(
resource_name
)
%>
<br
/>
<%
end
-%>
<%-
if
devise_mapping
.
recoverable?
&&
controller_name
!=
'passwords'
&&
controller_name
!=
'registrations'
%>
<%=
link_to
"Forgot your password?"
,
new_password_path
(
resource_name
)
%>
<br
/>
<%
end
-%>
<%-
if
devise_mapping
.
confirmable?
&&
controller_name
!=
'confirmations'
%>
<%=
link_to
"Didn't receive confirmation instructions?"
,
new_confirmation_path
(
resource_name
)
%>
<br
/>
<%
end
-%>
<%-
if
devise_mapping
.
lockable?
&&
resource_class
.
unlock_strategy_enabled?
(
:email
)
&&
controller_name
!=
'unlocks'
%>
<%=
link_to
"Didn't receive unlock instructions?"
,
new_unlock_path
(
resource_name
)
%>
<br
/>
<%
end
-%>
<%-
if
devise_mapping
.
omniauthable?
%>
<%-
resource_class
.
omniauth_providers
.
each
do
|
provider
|
%>
<%=
link_to
"Sign in with
#{
OmniAuth
::
Utils
.
camelize
(
provider
)
}
"
,
omniauth_authorize_path
(
resource_name
,
provider
)
%>
<br
/>
<%
end
-%>
<%
end
-%>
app/views/devise/unlocks/new.html.erb
0 → 100644
View file @
5a8f703c
<h2>
Resend unlock instructions
</h2>
<%=
simple_form_for
(
resource
,
as:
resource_name
,
url:
unlock_path
(
resource_name
),
html:
{
method: :post
})
do
|
f
|
%>
<%=
f
.
error_notification
%>
<%=
f
.
full_error
:unlock_token
%>
<div
class=
"form-inputs"
>
<%=
f
.
input
:email
,
required:
true
,
autofocus:
true
%>
</div>
<div
class=
"form-actions"
>
<%=
f
.
button
:submit
,
"Resend unlock instructions"
%>
</div>
<%
end
%>
<%=
render
"devise/shared/links"
%>
app/views/layouts/application.html.erb
View file @
5a8f703c
...
@@ -29,7 +29,9 @@
...
@@ -29,7 +29,9 @@
</nav>
</nav>
<%=
yield
%>
<div
class=
"container"
style=
"margin-top:40px;"
>
<%=
yield
%>
</div>
</body>
</body>
</html>
</html>
db/migrate/20160718145025_add_columns_to_user.rb
0 → 100644
View file @
5a8f703c
class
AddColumnsToUser
<
ActiveRecord
::
Migration
[
5.0
]
def
change
add_column
:users
,
:first_name
,
:string
add_column
:users
,
:last_name
,
:string
add_column
:users
,
:gender
,
:string
add_column
:users
,
:birthday
,
:date
end
end
db/schema.rb
View file @
5a8f703c
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
#
#
# It's strongly recommended that you check this file into your version control system.
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
201607181
35621
)
do
ActiveRecord
::
Schema
.
define
(
version:
201607181
45025
)
do
create_table
"candidates"
,
force: :cascade
do
|
t
|
create_table
"candidates"
,
force: :cascade
do
|
t
|
t
.
string
"first_name"
t
.
string
"first_name"
...
@@ -41,6 +41,10 @@ ActiveRecord::Schema.define(version: 20160718135621) do
...
@@ -41,6 +41,10 @@ ActiveRecord::Schema.define(version: 20160718135621) do
t
.
string
"last_sign_in_ip"
t
.
string
"last_sign_in_ip"
t
.
datetime
"created_at"
,
null:
false
t
.
datetime
"created_at"
,
null:
false
t
.
datetime
"updated_at"
,
null:
false
t
.
datetime
"updated_at"
,
null:
false
t
.
string
"first_name"
t
.
string
"last_name"
t
.
string
"gender"
t
.
date
"birthday"
t
.
index
[
"email"
],
name:
"index_users_on_email"
,
unique:
true
t
.
index
[
"email"
],
name:
"index_users_on_email"
,
unique:
true
t
.
index
[
"reset_password_token"
],
name:
"index_users_on_reset_password_token"
,
unique:
true
t
.
index
[
"reset_password_token"
],
name:
"index_users_on_reset_password_token"
,
unique:
true
end
end
...
...
public/q.svg
0 → 100644
View file @
5a8f703c
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
version=
"1.1"
id=
"Capa_1"
x=
"0px"
y=
"0px"
width=
"512px"
height=
"512px"
viewBox=
"0 0 349.078 349.078"
style=
"enable-background:new 0 0 349.078 349.078;"
xml:space=
"preserve"
>
<g>
<path
d=
"M150.299,26.634v58.25c0,7.9-6.404,14.301-14.304,14.301c-28.186,0-43.518,28.909-45.643,85.966h45.643 c7.9,0,14.304,6.407,14.304,14.304v122.992c0,7.896-6.404,14.298-14.304,14.298H14.301C6.398,336.745,0,330.338,0,322.447V199.455 c0-27.352,2.754-52.452,8.183-74.611c5.568-22.721,14.115-42.587,25.396-59.048c11.608-16.917,26.128-30.192,43.16-39.44 C93.886,17.052,113.826,12.333,136,12.333C143.895,12.333,150.299,18.734,150.299,26.634z M334.773,99.186 c7.896,0,14.305-6.407,14.305-14.301v-58.25c0-7.9-6.408-14.301-14.305-14.301c-22.165,0-42.108,4.72-59.249,14.023 c-17.035,9.248-31.563,22.523-43.173,39.44c-11.277,16.461-19.824,36.328-25.393,59.054c-5.426,22.166-8.18,47.266-8.18,74.605 v122.992c0,7.896,6.406,14.298,14.304,14.298h121.69c7.896,0,14.299-6.407,14.299-14.298V199.455 c0-7.896-6.402-14.304-14.299-14.304h-44.992C291.873,128.095,306.981,99.186,334.773,99.186z"
fill=
"#254b63"
/>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>
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