Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
95d61a09
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 搜索 >>
未验证
提交
95d61a09
编写于
6月 03, 2014
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Improve admin/projects page
Signed-off-by:
N
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
上级
4e55dd5f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
39 addition
and
29 deletion
+39
-29
app/assets/stylesheets/sections/admin.scss
app/assets/stylesheets/sections/admin.scss
+16
-6
app/controllers/admin/projects_controller.rb
app/controllers/admin/projects_controller.rb
+2
-4
app/views/admin/projects/index.html.haml
app/views/admin/projects/index.html.haml
+21
-19
未找到文件。
app/assets/stylesheets/sections/admin.scss
浏览文件 @
95d61a09
...
...
@@ -21,12 +21,22 @@
}
.admin-filter
form
{
label
{
width
:
110px
;
}
.controls
{
margin-left
:
130px
;
}
.form-actions
{
padding-left
:
130px
;
background
:
#fff
}
.visibility-levels
{
.controls
{
margin-bottom
:
9px
;
.select2-container
{
width
:
100%
}
.controls
{
margin-left
:
130px
;
}
.form-actions
{
padding-left
:
130px
;
background
:
#fff
}
.visibility-levels
{
.controls
{
margin-bottom
:
9px
;
}
i
{
...
...
app/controllers/admin/projects_controller.rb
浏览文件 @
95d61a09
...
...
@@ -4,10 +4,8 @@ class Admin::ProjectsController < Admin::ApplicationController
before_filter
:repository
,
only:
[
:show
,
:transfer
]
def
index
owner_id
=
params
[
:owner_id
]
user
=
User
.
find_by
(
id:
owner_id
)
@projects
=
user
?
user
.
owned_projects
:
Project
.
all
@projects
=
Project
.
all
@projects
=
@projects
.
where
(
namespace_id:
params
[
:namespace_id
])
if
params
[
:namespace_id
].
present?
@projects
=
@projects
.
where
(
"visibility_level IN (?)"
,
params
[
:visibility_levels
])
if
params
[
:visibility_levels
].
present?
@projects
=
@projects
.
with_push
if
params
[
:with_push
].
present?
@projects
=
@projects
.
abandoned
if
params
[
:abandoned
].
present?
...
...
app/views/admin/projects/index.html.haml
浏览文件 @
95d61a09
.row
.col-md-
4
.col-md-
3
.admin-filter
=
form_tag
admin_projects_path
,
method: :get
,
class:
''
do
.form-group
...
...
@@ -7,19 +7,21 @@
=
text_field_tag
:name
,
params
[
:name
],
class:
"form-control"
.form-group
=
label_tag
:owner_id
,
'Owner:'
%div
=
users_select_tag
:owner_id
,
selected:
params
[
:owner_id
],
class:
'input-large input-clamp'
.checkbox
=
label_tag
:with_push
,
'Not empty'
=
check_box_tag
:with_push
,
1
,
params
[
:with_push
]
%span
.light
Projects with push events
.checkbox
=
label_tag
:abandoned
,
'Abandoned'
=
check_box_tag
:abandoned
,
1
,
params
[
:abandoned
]
%span
.light
No activity over 6 month
=
label_tag
:namespace_id
,
"Namespace"
=
namespace_select_tag
:namespace_id
,
selected:
params
[
:namespace_id
],
class:
'input-large'
.form-group
%strong
Activity
.checkbox
=
label_tag
:with_push
,
'Not empty'
=
check_box_tag
:with_push
,
1
,
params
[
:with_push
]
%span
.light
Projects with push events
.checkbox
=
label_tag
:abandoned
,
'Abandoned'
=
check_box_tag
:abandoned
,
1
,
params
[
:abandoned
]
%span
.light
No activity over 6 month
%fieldset
%strong
Visibility level:
...
...
@@ -31,12 +33,12 @@
%span
.descr
=
visibility_level_icon
(
level
)
=
label
.form-actions
=
hidden_field_tag
:sort
,
params
[
:sort
]
=
submit_tag
"Search"
,
class:
"btn submit btn-primary"
=
link_to
"Reset"
,
admin_projects_path
,
class:
"btn
"
%hr
=
hidden_field_tag
:sort
,
params
[
:sort
]
=
submit_tag
"Search"
,
class:
"btn submit btn-primary"
=
link_to
"Reset"
,
admin_projects_path
,
class:
"btn btn-cancel
"
.col-md-
8
.col-md-
9
.panel.panel-default
.panel-heading
Projects (
#{
@projects
.
total_count
}
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录