Password & token split up, icon to button for top panel
This commit is contained in:
parent
eb25bfe2b2
commit
1e4d15b406
|
@ -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 {
|
.project_name {
|
||||||
float:left;
|
float:left;
|
||||||
width:360px;
|
width:360px;
|
||||||
|
@ -107,6 +93,14 @@
|
||||||
text-shadow: 0 1px 1px #FFF;
|
text-shadow: 0 1px 1px #FFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fbtn {
|
||||||
|
float: right;
|
||||||
|
margin-right:10px;
|
||||||
|
.btn {
|
||||||
|
margin-left:8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.search {
|
.search {
|
||||||
float: right;
|
float: right;
|
||||||
margin-right: 55px;
|
margin-right: 55px;
|
||||||
|
@ -117,6 +111,8 @@
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: 10px;
|
background-position: 10px;
|
||||||
padding-left:25px;
|
padding-left:25px;
|
||||||
|
@include border-radius(5px);
|
||||||
|
border:1px solid #ccc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,29 @@
|
||||||
z-index:10;
|
z-index:10;
|
||||||
height:60px;
|
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 {
|
.search {
|
||||||
float: right;
|
float: right;
|
||||||
margin-right: 55px;
|
margin-right: 55px;
|
||||||
|
@ -61,16 +84,14 @@
|
||||||
float:left;
|
float:left;
|
||||||
|
|
||||||
h1 {
|
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;
|
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;
|
padding:15px 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.top_panel_ico {
|
|
||||||
width: 16px;
|
|
||||||
height: 16px;
|
|
||||||
padding: 5px;
|
|
||||||
margin-right:10px;
|
|
||||||
float:right;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* End of Application Header
|
* End of Application Header
|
||||||
|
|
|
@ -14,6 +14,10 @@ class ProfileController < ApplicationController
|
||||||
redirect_to :back
|
redirect_to :back
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def token
|
||||||
|
@user = current_user
|
||||||
|
end
|
||||||
|
|
||||||
def password
|
def password
|
||||||
@user = current_user
|
@user = current_user
|
||||||
end
|
end
|
||||||
|
@ -32,6 +36,6 @@ class ProfileController < ApplicationController
|
||||||
|
|
||||||
def reset_private_token
|
def reset_private_token
|
||||||
current_user.reset_authentication_token!
|
current_user.reset_authentication_token!
|
||||||
redirect_to profile_password_path
|
redirect_to profile_token_path
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
%p
|
%p
|
||||||
%strong= key.title
|
%strong= key.title
|
||||||
%td
|
%td
|
||||||
%span.right.cgray
|
%span.cgray
|
||||||
Added
|
Added
|
||||||
= time_ago_in_words(key.created_at)
|
= time_ago_in_words(key.created_at)
|
||||||
ago
|
ago
|
||||||
|
|
|
@ -4,6 +4,11 @@
|
||||||
|
|
||||||
%br
|
%br
|
||||||
|
|
||||||
%table#keys-table.table
|
%table#keys-table.admin-table
|
||||||
|
%thead
|
||||||
|
%tr
|
||||||
|
%th Name
|
||||||
|
%th Added
|
||||||
|
%th
|
||||||
- @keys.each do |key|
|
- @keys.each do |key|
|
||||||
= render(:partial => 'show', :locals => {:key => key})
|
= render(:partial => 'show', :locals => {:key => key})
|
||||||
|
|
|
@ -11,12 +11,15 @@
|
||||||
.search
|
.search
|
||||||
= form_tag search_path, :method => :get do |f|
|
= form_tag search_path, :method => :get do |f|
|
||||||
= text_field_tag "search", nil, :placeholder => "Search", :class => "search-input"
|
= text_field_tag "search", nil, :placeholder => "Search", :class => "search-input"
|
||||||
- if current_user.can_create_project?
|
.fbtn
|
||||||
= 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?
|
- if current_user.is_admin?
|
||||||
= link_to admin_root_path, :class => "top_panel_ico", :title => "Admin area" do
|
= link_to admin_root_path, :class => "btn small", :title => "Admin area" do
|
||||||
= image_tag "admin.PNG", :width => 16
|
%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
|
.account-box
|
||||||
= link_to profile_path, :class => "pic" do
|
= link_to profile_path, :class => "pic" do
|
||||||
= image_tag gravatar_icon(current_user.email)
|
= image_tag gravatar_icon(current_user.email)
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
.container
|
.container
|
||||||
%nav.main_menu
|
%nav.main_menu
|
||||||
= link_to "Profile", profile_path, :class => "home #{current_page?(:controller => "profile", :action => :show) ? "current" : nil}"
|
= 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 "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
|
= link_to keys_path, :class => controller.controller_name == "keys" ? "current" : nil do
|
||||||
SSH Keys
|
SSH Keys
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
= f.text_area :note, :size => 255
|
= f.text_area :note, :size => 255
|
||||||
%p.hint Markdown is enabled.
|
%p.hint Markdown is enabled.
|
||||||
|
|
||||||
.row
|
.row.note_advanced_opts
|
||||||
.span4
|
.span4
|
||||||
%h5 Notify via email:
|
%h5 Notify via email:
|
||||||
.clearfix
|
.clearfix
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
.row
|
%h3 Password
|
||||||
.span6
|
%hr
|
||||||
.thumbnail
|
= form_for @user, :url => profile_password_path, :method => :put do |f|
|
||||||
.caption
|
|
||||||
%h3 Password
|
|
||||||
%hr
|
|
||||||
= form_for @user, :url => profile_password_path, :method => :put do |f|
|
|
||||||
.data
|
.data
|
||||||
.alert.alert-info
|
.alert.alert-info
|
||||||
%p After successful password update you will be redirected to login page where you should login with new password
|
%span After successful password update you will be redirected to login page where you should login with new password
|
||||||
-if @user.errors.any?
|
-if @user.errors.any?
|
||||||
.alert-message.block-message.error
|
.alert-message.block-message.error
|
||||||
%ul
|
%ul
|
||||||
|
@ -20,31 +16,5 @@
|
||||||
.clearfix
|
.clearfix
|
||||||
= f.label :password_confirmation
|
= f.label :password_confirmation
|
||||||
.input= f.password_field :password_confirmation
|
.input= f.password_field :password_confirmation
|
||||||
%hr
|
.actions
|
||||||
= f.submit 'Save', :class => "btn"
|
= f.submit 'Save', :class => "btn primary"
|
||||||
|
|
||||||
.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"
|
|
||||||
|
|
||||||
|
|
22
app/views/profile/token.html.haml
Normal file
22
app/views/profile/token.html.haml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
%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"
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
- if current_user.can_create_project?
|
- if current_user.can_create_project?
|
||||||
%span.right
|
%span.right
|
||||||
= link_to new_project_path, :class => "btn very_small info" do
|
= link_to new_project_path, :class => "btn very_small info" do
|
||||||
|
%i.icon-plus
|
||||||
New Project
|
New Project
|
||||||
- @projects.each do |project|
|
- @projects.each do |project|
|
||||||
= link_to project_path(project), :class => dom_class(project) do
|
= link_to project_path(project), :class => dom_class(project) do
|
||||||
|
|
|
@ -35,6 +35,7 @@ Gitlab::Application.routes.draw do
|
||||||
get "errors/githost"
|
get "errors/githost"
|
||||||
get "profile/password", :to => "profile#password"
|
get "profile/password", :to => "profile#password"
|
||||||
put "profile/password", :to => "profile#password_update"
|
put "profile/password", :to => "profile#password_update"
|
||||||
|
get "profile/token", :to => "profile#token"
|
||||||
put "profile/reset_private_token", :to => "profile#reset_private_token"
|
put "profile/reset_private_token", :to => "profile#reset_private_token"
|
||||||
get "profile", :to => "profile#show"
|
get "profile", :to => "profile#show"
|
||||||
get "profile/design", :to => "profile#design"
|
get "profile/design", :to => "profile#design"
|
||||||
|
|
|
@ -30,7 +30,7 @@ describe "Profile" do
|
||||||
|
|
||||||
describe "Reset private token" do
|
describe "Reset private token" do
|
||||||
before do
|
before do
|
||||||
visit profile_password_path
|
visit profile_token_path
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should reset private token" do
|
it "should reset private token" do
|
||||||
|
|
Loading…
Reference in a new issue