Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
31c963ed
Commit
31c963ed
authored
Jun 03, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve admin/user form
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
fc43c4e7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
13 deletions
+14
-13
app/assets/stylesheets/generic/forms.scss
app/assets/stylesheets/generic/forms.scss
+4
-0
app/views/admin/users/_form.html.haml
app/views/admin/users/_form.html.haml
+6
-9
app/views/admin/users/edit.html.haml
app/views/admin/users/edit.html.haml
+4
-3
app/views/admin/users/new.html.haml
app/views/admin/users/new.html.haml
+0
-1
No files found.
app/assets/stylesheets/generic/forms.scss
View file @
31c963ed
...
@@ -98,3 +98,7 @@ label {
...
@@ -98,3 +98,7 @@ label {
z-index
:
2
;
z-index
:
2
;
}
}
}
}
.fieldset-form
fieldset
{
margin-bottom
:
20px
;
}
app/views/admin/users/_form.html.haml
View file @
31c963ed
.user_new
.user_new
=
form_for
[
:admin
,
@user
],
html:
{
class:
'form-horizontal'
}
do
|
f
|
=
form_for
[
:admin
,
@user
],
html:
{
class:
'form-horizontal
fieldset-form
'
}
do
|
f
|
-
if
@user
.
errors
.
any?
-
if
@user
.
errors
.
any?
#error_explanation
#error_explanation
.alert.alert-danger
.alert.alert-danger
...
@@ -61,16 +61,13 @@
...
@@ -61,16 +61,13 @@
.col-sm-10
You cannot remove your own admin rights
.col-sm-10
You cannot remove your own admin rights
-
else
-
else
.col-sm-10
=
f
.
check_box
:admin
.col-sm-10
=
f
.
check_box
:admin
-
unless
@user
.
new_record?
||
current_user
==
@user
.alert.alert-danger
-
if
@user
.
blocked?
%p
This user is blocked and is not able to login to GitLab
=
link_to
'Unblock User'
,
unblock_admin_user_path
(
@user
),
method: :put
,
class:
"btn btn-small"
-
else
%p
Blocked users will be removed from all projects
&
will not be able to login to GitLab.
=
link_to
'Block User'
,
block_admin_user_path
(
@user
),
data:
{
confirm:
'USER WILL BE BLOCKED! Are you sure?'
},
method: :put
,
class:
"btn btn-small btn-remove"
%fieldset
%fieldset
%legend
Profile
%legend
Profile
.form-group
=
f
.
label
:avatar
,
class:
'control-label'
.col-sm-10
=
f
.
file_field
:avatar
.form-group
.form-group
=
f
.
label
:skype
,
class:
'control-label'
=
f
.
label
:skype
,
class:
'control-label'
.col-sm-10
=
f
.
text_field
:skype
,
class:
'form-control'
.col-sm-10
=
f
.
text_field
:skype
,
class:
'form-control'
...
...
app/views/admin/users/edit.html.haml
View file @
31c963ed
%h3
.page-title
%h3
.page-title
#{
@user
.
name
}
→
Edit user:
#{
@user
.
name
}
%i
.icon-edit
.back-link
Edit user
=
link_to
admin_user_path
(
@user
)
do
←
Back to user page
%hr
%hr
=
render
'form'
=
render
'form'
app/views/admin/users/new.html.haml
View file @
31c963ed
%h3
.page-title
%h3
.page-title
%i
.icon-plus
New user
New user
%hr
%hr
=
render
'form'
=
render
'form'
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