Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
6ff0652e
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
6ff0652e
编写于
8月 25, 2012
作者:
R
randx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Admin area -> user form
上级
f13bccc1
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
72 addition
and
62 deletion
+72
-62
app/views/admin/dashboard/index.html.haml
app/views/admin/dashboard/index.html.haml
+5
-3
app/views/admin/projects/index.html.haml
app/views/admin/projects/index.html.haml
+1
-1
app/views/admin/users/_form.html.haml
app/views/admin/users/_form.html.haml
+62
-54
app/views/admin/users/edit.html.haml
app/views/admin/users/edit.html.haml
+1
-1
app/views/admin/users/index.html.haml
app/views/admin/users/index.html.haml
+1
-1
app/views/admin/users/new.html.haml
app/views/admin/users/new.html.haml
+2
-2
未找到文件。
app/views/admin/dashboard/index.html.haml
浏览文件 @
6ff0652e
...
...
@@ -35,11 +35,13 @@
%h3
Latest projects
%hr
-
@projects
.
each
do
|
project
|
%
h5
%
p
=
link_to
project
.
name
,
[
:admin
,
project
]
.span6
%h3
Latest users
%hr
-
@users
.
each
do
|
user
|
%h5
=
link_to
user
.
name
,
[
:admin
,
user
]
%p
=
link_to
[
:admin
,
user
]
do
=
user
.
name
%small
=
user
.
email
app/views/admin/projects/index.html.haml
浏览文件 @
6ff0652e
%h3
%h3
.page_title
Projects
=
link_to
'New Project'
,
new_admin_project_path
,
class:
"btn small right"
%br
...
...
app/views/admin/users/_form.html.haml
浏览文件 @
6ff0652e
...
...
@@ -2,68 +2,76 @@
=
form_for
[
:admin
,
@admin_user
]
do
|
f
|
-
if
@admin_user
.
errors
.
any?
#error_explanation
%ul
%ul
.unstyled.alert.alert-error
-
@admin_user
.
errors
.
full_messages
.
each
do
|
msg
|
%li
=
msg
.row
.span6
.clearfix
=
f
.
label
:name
.input
=
f
.
text_field
:name
%span
.help-inline
* required
.clearfix
=
f
.
label
:email
.input
=
f
.
text_field
:email
%span
.help-inline
* required
%hr
-
if
f
.
object
.
new_record?
.clearfix
=
f
.
label
:admin
,
class:
"checkbox"
do
=
f
.
check_box
:force_random_password
,
{},
true
,
nil
%span
Generate random password
%div
.password-fields
.span7
.ui-box
%br
.clearfix
=
f
.
label
:password
.input
=
f
.
password_field
:password
,
disabled:
f
.
object
.
force_random_password
=
f
.
label
:name
.input
=
f
.
text_field
:name
%span
.help-inline
* required
.clearfix
=
f
.
label
:password_confirmation
.input
=
f
.
password_field
:password_confirmation
,
disabled:
f
.
object
.
force_random_password
%hr
.clearfix
=
f
.
label
:skype
.input
=
f
.
text_field
:skype
.clearfix
=
f
.
label
:linkedin
.input
=
f
.
text_field
:linkedin
.clearfix
=
f
.
label
:twitter
.input
=
f
.
text_field
:twitter
.span6
.clearfix
=
f
.
label
:projects_limit
.input
=
f
.
text_field
:projects_limit
,
class:
"small_input"
=
f
.
label
:email
.input
=
f
.
text_field
:email
%span
.help-inline
* required
%hr
-
if
f
.
object
.
new_record?
.clearfix
=
f
.
label
:force_random_password
do
%span
Generate random password
.input
=
f
.
check_box
:force_random_password
,
{},
true
,
nil
%div
.password-fields
.clearfix
=
f
.
label
:password
.input
=
f
.
password_field
:password
,
disabled:
f
.
object
.
force_random_password
.clearfix
=
f
.
label
:password_confirmation
.input
=
f
.
password_field
:password_confirmation
,
disabled:
f
.
object
.
force_random_password
%hr
.clearfix
=
f
.
label
:skype
.input
=
f
.
text_field
:skype
.clearfix
=
f
.
label
:linkedin
.input
=
f
.
text_field
:linkedin
.clearfix
=
f
.
label
:twitter
.input
=
f
.
text_field
:twitter
.span5
.ui-box
%br
.clearfix
=
f
.
label
:projects_limit
.input
=
f
.
number_field
:projects_limit
.alert
.clearfix
%p
Make the user a GitLab administrator.
=
f
.
label
:admin
,
class:
"checkbox"
do
=
f
.
check_box
:admin
%span
Administrator
-
unless
@admin_user
.
new_record?
.alert.alert-error
-
if
@admin_user
.
blocked
%span
=
link_to
'Unblock'
,
unblock_admin_user_path
(
@admin_user
),
method: :put
,
class:
"btn small"
This user is blocked and is not able to login to GitLab
-
else
%span
=
link_to
'Block'
,
block_admin_user_path
(
@admin_user
),
confirm:
'USER WILL BE BLOCKED! Are you sure?'
,
method: :put
,
class:
"btn small danger"
Blocked users will be removed from all projects
&
will not be able to login to GitLab.
=
f
.
label
:admin
do
%strong
.cred
Administrator
.input
=
f
.
check_box
:admin
-
unless
@admin_user
.
new_record?
%hr
.padded.cred
-
if
@admin_user
.
blocked
%span
This user is blocked and is not able to login to GitLab
.clearfix
=
link_to
'Unblock User'
,
unblock_admin_user_path
(
@admin_user
),
method: :put
,
class:
"btn small right"
-
else
%span
Blocked users will be removed from all projects
&
will not be able to login to GitLab.
.clearfix
=
link_to
'Block User'
,
block_admin_user_path
(
@admin_user
),
confirm:
'USER WILL BE BLOCKED! Are you sure?'
,
method: :put
,
class:
"btn small right danger"
.row
.span6
.span6
.actions
=
f
.
submit
'Save'
,
class:
"btn primary"
-
if
@admin_user
.
new_record?
...
...
app/views/admin/users/edit.html.haml
浏览文件 @
6ff0652e
%h3
=
@admin_user
.
name
%h3
.page_title
#{
@admin_user
.
name
}
→
Edit user
%hr
=
render
'form'
app/views/admin/users/index.html.haml
浏览文件 @
6ff0652e
%h3
%h3
.page_title
Users
=
link_to
'New User'
,
new_admin_user_path
,
class:
"btn small right"
%br
...
...
app/views/admin/users/new.html.haml
浏览文件 @
6ff0652e
%h
2
New user
%
h
r
%h
3
.page_title
New user
%
b
r
=
render
'form'
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录