BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
1e4d15b4
Commit
1e4d15b4
authored
May 19, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Password & token split up, icon to button for top panel
parent
eb25bfe2
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
108 additions
and
92 deletions
+108
-92
ui_basic.scss
app/assets/stylesheets/ui_basic.scss
+10
-14
ui_mars.scss
app/assets/stylesheets/ui_mars.scss
+30
-17
profile_controller.rb
app/controllers/profile_controller.rb
+5
-1
_show.html.haml
app/views/keys/_show.html.haml
+1
-1
index.html.haml
app/views/keys/index.html.haml
+6
-1
_head_panel.html.haml
app/views/layouts/_head_panel.html.haml
+9
-6
profile.html.haml
app/views/layouts/profile.html.haml
+2
-1
_form.html.haml
app/views/notes/_form.html.haml
+1
-1
password.html.haml
app/views/profile/password.html.haml
+19
-49
token.html.haml
app/views/profile/token.html.haml
+22
-0
index.html.haml
app/views/projects/index.html.haml
+1
-0
routes.rb
config/routes.rb
+1
-0
profile_spec.rb
spec/requests/profile_spec.rb
+1
-1
No files found.
app/assets/stylesheets/ui_basic.scss
View file @
1e4d15b4
...
...
@@ -81,20 +81,6 @@
}
}
.top_panel_ico
{
width
:
16px
;
height
:
16px
;
padding
:
5px
;
margin-right
:
10px
;
float
:right
;
background
:
#EEE
;
@include
border-radius
(
5px
);
border
:
1px
solid
#DDD
;
img
{
vertical-align
:top
;
}
}
.project_name
{
float
:left
;
width
:
360px
;
...
...
@@ -107,6 +93,14 @@
text-shadow
:
0
1px
1px
#FFF
;
}
.fbtn
{
float
:
right
;
margin-right
:
10px
;
.btn
{
margin-left
:
8px
;
}
}
.search
{
float
:
right
;
margin-right
:
55px
;
...
...
@@ -117,6 +111,8 @@
background-repeat
:
no-repeat
;
background-position
:
10px
;
padding-left
:
25px
;
@include
border-radius
(
5px
);
border
:
1px
solid
#ccc
;
}
}
}
...
...
app/assets/stylesheets/ui_mars.scss
View file @
1e4d15b4
...
...
@@ -24,6 +24,29 @@
z-index
:
10
;
height
:
60px
;
.fbtn
{
float
:
right
;
margin-right
:
10px
;
.btn
{
margin-left
:
8px
;
background-image
:
-webkit-gradient
(
linear
,
0
0
,
0
30
,
color-stop
(
0
.066
,
#595D63
)
,
to
(
#31363E
));
background-image
:
-webkit-linear-gradient
(
#595D63
6
.6%
,
#31363E
);
background-image
:
-moz-linear-gradient
(
#595D63
6
.6%
,
#31363E
);
background-image
:
-o-linear-gradient
(
#595D63
6
.6%
,
#31363E
);
font-size
:
12px
;
&
:hover
{
background-image
:
-webkit-gradient
(
linear
,
0
0
,
0
30
,
color-stop
(
0
.066
,
#595D63
)
,
to
(
#2C2F35
));
background-image
:
-webkit-linear-gradient
(
#595D63
6
.6%
,
#2C2F35
);
background-image
:
-moz-linear-gradient
(
#595D63
6
.6%
,
#202227
);
background-image
:
-o-linear-gradient
(
#595D63
6
.6%
,
#202227
);
background-position
:
0
0
;
}
border
:
1px
solid
#31363E
;
color
:
#D6DADF
;
text-shadow
:
0
-1px
0
#000000
;
}
}
.search
{
float
:
right
;
margin-right
:
55px
;
...
...
@@ -61,16 +84,14 @@
float
:left
;
h1
{
background
:
url('logo_mars.png')
no-repeat
-3px
-4px
;
background
:
url('images.png')
no-repeat
-3px
-6px
;
width
:
65px
;
height
:
26px
;
margin
:
6px
0
;
padding
:
0
;
float
:
left
;
text-indent
:
-1000em
;
float
:left
;
margin-left
:
5px
;
font-size
:
20px
;
line-height
:
36px
;
font-weight
:normal
;
color
:
#a1a8ae
;
text-shadow
:
0
1px
1px
#111
;
padding-left
:
50px
;
padding-top
:
5px
;
}
}
}
...
...
@@ -93,14 +114,6 @@
padding
:
15px
0
;
}
}
.top_panel_ico
{
width
:
16px
;
height
:
16px
;
padding
:
5px
;
margin-right
:
10px
;
float
:right
;
}
}
/*
* End of Application Header
...
...
app/controllers/profile_controller.rb
View file @
1e4d15b4
...
...
@@ -14,6 +14,10 @@ class ProfileController < ApplicationController
redirect_to
:back
end
def
token
@user
=
current_user
end
def
password
@user
=
current_user
end
...
...
@@ -32,6 +36,6 @@ class ProfileController < ApplicationController
def
reset_private_token
current_user
.
reset_authentication_token!
redirect_to
profile_
password
_path
redirect_to
profile_
token
_path
end
end
app/views/keys/_show.html.haml
View file @
1e4d15b4
...
...
@@ -4,7 +4,7 @@
%p
%strong
=
key
.
title
%td
%span
.
right.
cgray
%span
.cgray
Added
=
time_ago_in_words
(
key
.
created_at
)
ago
...
...
app/views/keys/index.html.haml
View file @
1e4d15b4
...
...
@@ -4,6 +4,11 @@
%br
%table
#keys-table
.table
%table
#keys-table
.admin-table
%thead
%tr
%th
Name
%th
Added
%th
-
@keys
.
each
do
|
key
|
=
render
(
:partial
=>
'show'
,
:locals
=>
{
:key
=>
key
})
app/views/layouts/_head_panel.html.haml
View file @
1e4d15b4
...
...
@@ -11,12 +11,15 @@
.search
=
form_tag
search_path
,
:method
=>
:get
do
|
f
|
=
text_field_tag
"search"
,
nil
,
:placeholder
=>
"Search"
,
:class
=>
"search-input"
-
if
current_user
.
can_create_project?
=
link_to
new_project_path
,
:class
=>
"top_panel_ico"
,
:title
=>
"Create New Project"
do
=
image_tag
"new_project.png"
,
:width
=>
16
-
if
current_user
.
is_admin?
=
link_to
admin_root_path
,
:class
=>
"top_panel_ico"
,
:title
=>
"Admin area"
do
=
image_tag
"admin.PNG"
,
:width
=>
16
.fbtn
-
if
current_user
.
is_admin?
=
link_to
admin_root_path
,
:class
=>
"btn small"
,
:title
=>
"Admin area"
do
%i
.icon-cog
Admin
-
if
current_user
.
can_create_project?
=
link_to
new_project_path
,
:class
=>
"btn small"
,
:title
=>
"Create New Project"
do
%i
.icon-plus
Project
.account-box
=
link_to
profile_path
,
:class
=>
"pic"
do
=
image_tag
gravatar_icon
(
current_user
.
email
)
...
...
app/views/layouts/profile.html.haml
View file @
1e4d15b4
...
...
@@ -7,7 +7,8 @@
.container
%nav
.main_menu
=
link_to
"Profile"
,
profile_path
,
:class
=>
"home
#{
current_page?
(
:controller
=>
"profile"
,
:action
=>
:show
)
?
"current"
:
nil
}
"
=
link_to
"Password & token"
,
profile_password_path
,
:class
=>
current_page?
(
:controller
=>
"profile"
,
:action
=>
:password
)
?
"current"
:
nil
=
link_to
"Password"
,
profile_password_path
,
:class
=>
current_page?
(
:controller
=>
"profile"
,
:action
=>
:password
)
?
"current"
:
nil
=
link_to
"Token"
,
profile_token_path
,
:class
=>
current_page?
(
:controller
=>
"profile"
,
:action
=>
:token
)
?
"current"
:
nil
=
link_to
"Design"
,
profile_design_path
,
:class
=>
current_page?
(
:controller
=>
"profile"
,
:action
=>
:design
)
?
"current"
:
nil
=
link_to
keys_path
,
:class
=>
controller
.
controller_name
==
"keys"
?
"current"
:
nil
do
SSH Keys
...
...
app/views/notes/_form.html.haml
View file @
1e4d15b4
...
...
@@ -10,7 +10,7 @@
=
f
.
text_area
:note
,
:size
=>
255
%p
.hint
Markdown is enabled.
.row
.row
.note_advanced_opts
.span4
%h5
Notify via email:
.clearfix
...
...
app/views/profile/password.html.haml
View file @
1e4d15b4
.row
.span6
.thumbnail
.caption
%h3
Password
%hr
=
form_for
@user
,
:url
=>
profile_password_path
,
:method
=>
:put
do
|
f
|
.data
.alert.alert-info
%p
After successful password update you will be redirected to login page where you should login with new password
-
if
@user
.
errors
.
any?
.alert-message.block-message.error
%ul
-
@user
.
errors
.
full_messages
.
each
do
|
msg
|
%li
=
msg
.clearfix
=
f
.
label
:password
.input
=
f
.
password_field
:password
.clearfix
=
f
.
label
:password_confirmation
.input
=
f
.
password_field
:password_confirmation
%hr
=
f
.
submit
'Save'
,
:class
=>
"btn"
.span6.right
.thumbnail
.caption
%h3
Private token
%span
.cred.right
keep it in secret!
%hr
=
form_for
@user
,
:url
=>
profile_reset_private_token_path
,
:method
=>
:put
do
|
f
|
.data
.alert.alert-info
%p
Private token used to access application resources without authentication.
%hr
%p
* required for rss feed
%p
.cgray
-
if
current_user
.
private_token
=
text_field_tag
"token"
,
current_user
.
private_token
-
else
You don`t have one yet. Click generate to fix it.
%hr
-
if
current_user
.
private_token
=
f
.
submit
'Reset'
,
:confirm
=>
"Are you sure?"
,
:class
=>
"btn"
-
else
=
f
.
submit
'Generate'
,
:class
=>
"btn"
%h3
Password
%hr
=
form_for
@user
,
:url
=>
profile_password_path
,
:method
=>
:put
do
|
f
|
.data
.alert.alert-info
%span
After successful password update you will be redirected to login page where you should login with new password
-
if
@user
.
errors
.
any?
.alert-message.block-message.error
%ul
-
@user
.
errors
.
full_messages
.
each
do
|
msg
|
%li
=
msg
.clearfix
=
f
.
label
:password
.input
=
f
.
password_field
:password
.clearfix
=
f
.
label
:password_confirmation
.input
=
f
.
password_field
:password_confirmation
.actions
=
f
.
submit
'Save'
,
:class
=>
"btn primary"
app/views/profile/token.html.haml
0 → 100644
View file @
1e4d15b4
%h3
Private token
%span
.cred.right
keep it in secret!
%hr
=
form_for
@user
,
:url
=>
profile_reset_private_token_path
,
:method
=>
:put
do
|
f
|
.data
.alert.alert-info
%p
Private token used to access application resources without authentication.
%p
* required for rss feed
%p
.cgray
-
if
current_user
.
private_token
=
text_field_tag
"token"
,
current_user
.
private_token
-
else
You don`t have one yet. Click generate to fix it.
.actions
-
if
current_user
.
private_token
=
f
.
submit
'Reset'
,
:confirm
=>
"Are you sure?"
,
:class
=>
"btn"
-
else
=
f
.
submit
'Generate'
,
:class
=>
"btn primary"
app/views/projects/index.html.haml
View file @
1e4d15b4
...
...
@@ -23,6 +23,7 @@
-
if
current_user
.
can_create_project?
%span
.right
=
link_to
new_project_path
,
:class
=>
"btn very_small info"
do
%i
.icon-plus
New Project
-
@projects
.
each
do
|
project
|
=
link_to
project_path
(
project
),
:class
=>
dom_class
(
project
)
do
...
...
config/routes.rb
View file @
1e4d15b4
...
...
@@ -35,6 +35,7 @@ Gitlab::Application.routes.draw do
get
"errors/githost"
get
"profile/password"
,
:to
=>
"profile#password"
put
"profile/password"
,
:to
=>
"profile#password_update"
get
"profile/token"
,
:to
=>
"profile#token"
put
"profile/reset_private_token"
,
:to
=>
"profile#reset_private_token"
get
"profile"
,
:to
=>
"profile#show"
get
"profile/design"
,
:to
=>
"profile#design"
...
...
spec/requests/profile_spec.rb
View file @
1e4d15b4
...
...
@@ -30,7 +30,7 @@ describe "Profile" do
describe
"Reset private token"
do
before
do
visit
profile_
password
_path
visit
profile_
token
_path
end
it
"should reset private token"
do
...
...
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