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
Jérome Perrin
gitlab-ce
Commits
95d61a09
Commit
95d61a09
authored
Jun 03, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve admin/projects page
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
4e55dd5f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
29 deletions
+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
No files found.
app/assets/stylesheets/sections/admin.scss
View file @
95d61a09
...
@@ -21,12 +21,22 @@
...
@@ -21,12 +21,22 @@
}
}
.admin-filter
form
{
.admin-filter
form
{
label
{
width
:
110px
;
}
.select2-container
{
.controls
{
margin-left
:
130px
;
}
width
:
100%
.form-actions
{
padding-left
:
130px
;
background
:
#fff
}
}
.visibility-levels
{
.controls
{
.controls
{
margin-bottom
:
9px
;
margin-left
:
130px
;
}
.form-actions
{
padding-left
:
130px
;
background
:
#fff
}
.visibility-levels
{
.controls
{
margin-bottom
:
9px
;
}
}
i
{
i
{
...
...
app/controllers/admin/projects_controller.rb
View file @
95d61a09
...
@@ -4,10 +4,8 @@ class Admin::ProjectsController < Admin::ApplicationController
...
@@ -4,10 +4,8 @@ class Admin::ProjectsController < Admin::ApplicationController
before_filter
:repository
,
only:
[
:show
,
:transfer
]
before_filter
:repository
,
only:
[
:show
,
:transfer
]
def
index
def
index
owner_id
=
params
[
:owner_id
]
@projects
=
Project
.
all
user
=
User
.
find_by
(
id:
owner_id
)
@projects
=
@projects
.
where
(
namespace_id:
params
[
:namespace_id
])
if
params
[
:namespace_id
].
present?
@projects
=
user
?
user
.
owned_projects
:
Project
.
all
@projects
=
@projects
.
where
(
"visibility_level IN (?)"
,
params
[
:visibility_levels
])
if
params
[
:visibility_levels
].
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
.
with_push
if
params
[
:with_push
].
present?
@projects
=
@projects
.
abandoned
if
params
[
:abandoned
].
present?
@projects
=
@projects
.
abandoned
if
params
[
:abandoned
].
present?
...
...
app/views/admin/projects/index.html.haml
View file @
95d61a09
.row
.row
.col-md-
4
.col-md-
3
.admin-filter
.admin-filter
=
form_tag
admin_projects_path
,
method: :get
,
class:
''
do
=
form_tag
admin_projects_path
,
method: :get
,
class:
''
do
.form-group
.form-group
...
@@ -7,19 +7,21 @@
...
@@ -7,19 +7,21 @@
=
text_field_tag
:name
,
params
[
:name
],
class:
"form-control"
=
text_field_tag
:name
,
params
[
:name
],
class:
"form-control"
.form-group
.form-group
=
label_tag
:owner_id
,
'Owner:'
=
label_tag
:namespace_id
,
"Namespace"
%div
=
namespace_select_tag
:namespace_id
,
selected:
params
[
:namespace_id
],
class:
'input-large'
=
users_select_tag
:owner_id
,
selected:
params
[
:owner_id
],
class:
'input-large input-clamp'
.checkbox
.form-group
=
label_tag
:with_push
,
'Not empty'
%strong
Activity
=
check_box_tag
:with_push
,
1
,
params
[
:with_push
]
.checkbox
=
label_tag
:with_push
,
'Not empty'
%span
.light
Projects with push events
=
check_box_tag
:with_push
,
1
,
params
[
:with_push
]
.checkbox
=
label_tag
:abandoned
,
'Abandoned'
%span
.light
Projects with push events
=
check_box_tag
:abandoned
,
1
,
params
[
:abandoned
]
.checkbox
=
label_tag
:abandoned
,
'Abandoned'
%span
.light
No activity over 6 month
=
check_box_tag
:abandoned
,
1
,
params
[
:abandoned
]
%span
.light
No activity over 6 month
%fieldset
%fieldset
%strong
Visibility level:
%strong
Visibility level:
...
@@ -31,12 +33,12 @@
...
@@ -31,12 +33,12 @@
%span
.descr
%span
.descr
=
visibility_level_icon
(
level
)
=
visibility_level_icon
(
level
)
=
label
=
label
.form-actions
%hr
=
hidden_field_tag
:sort
,
params
[
:sort
]
=
hidden_field_tag
:sort
,
params
[
:sort
]
=
submit_tag
"Search"
,
class:
"btn submit btn-primary"
=
submit_tag
"Search"
,
class:
"btn submit btn-primary"
=
link_to
"Reset"
,
admin_projects_path
,
class:
"btn
"
=
link_to
"Reset"
,
admin_projects_path
,
class:
"btn btn-cancel
"
.col-md-
8
.col-md-
9
.panel.panel-default
.panel.panel-default
.panel-heading
.panel-heading
Projects (
#{
@projects
.
total_count
}
)
Projects (
#{
@projects
.
total_count
}
)
...
...
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