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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
bf13579b
Commit
bf13579b
authored
12 years ago
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make admin sorting more obvious
parent
2b79706d
No related merge requests found
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
68 additions
and
20 deletions
+68
-20
app/controllers/admin/groups_controller.rb
app/controllers/admin/groups_controller.rb
+1
-1
app/controllers/admin/users_controller.rb
app/controllers/admin/users_controller.rb
+1
-1
app/roles/repository.rb
app/roles/repository.rb
+16
-2
app/views/admin/groups/index.html.haml
app/views/admin/groups/index.html.haml
+8
-2
app/views/admin/projects/index.html.haml
app/views/admin/projects/index.html.haml
+3
-1
app/views/admin/projects/show.html.haml
app/views/admin/projects/show.html.haml
+20
-10
app/views/admin/users/index.html.haml
app/views/admin/users/index.html.haml
+3
-1
app/views/admin/users/show.html.haml
app/views/admin/users/show.html.haml
+16
-2
No files found.
app/controllers/admin/groups_controller.rb
View file @
bf13579b
...
...
@@ -2,7 +2,7 @@ class Admin::GroupsController < AdminController
before_filter
:group
,
only:
[
:edit
,
:show
,
:update
,
:destroy
,
:project_update
]
def
index
@groups
=
Group
.
scoped
@groups
=
Group
.
order
(
'name ASC'
)
@groups
=
@groups
.
search
(
params
[
:name
])
if
params
[
:name
].
present?
@groups
=
@groups
.
page
(
params
[
:page
]).
per
(
20
)
end
...
...
This diff is collapsed.
Click to expand it.
app/controllers/admin/users_controller.rb
View file @
bf13579b
...
...
@@ -3,7 +3,7 @@ class Admin::UsersController < AdminController
@admin_users
=
User
.
scoped
@admin_users
=
@admin_users
.
filter
(
params
[
:filter
])
@admin_users
=
@admin_users
.
search
(
params
[
:name
])
if
params
[
:name
].
present?
@admin_users
=
@admin_users
.
order
(
"
updated_at DE
SC"
).
page
(
params
[
:page
])
@admin_users
=
@admin_users
.
order
(
"
name A
SC"
).
page
(
params
[
:page
])
end
def
show
...
...
This diff is collapsed.
Click to expand it.
app/roles/repository.rb
View file @
bf13579b
...
...
@@ -45,8 +45,22 @@ module Repository
end
def
has_post_receive_file?
hook_file
=
File
.
join
(
path_to_repo
,
'hooks'
,
'post-receive'
)
File
.
exists?
(
hook_file
)
!!
hook_file
end
def
valid_post_receive_file?
valid_hook_file
==
hook_file
end
def
valid_hook_file
@valid_hook_file
||=
File
.
read
(
Rails
.
root
.
join
(
'lib'
,
'hooks'
,
'post-receive'
))
end
def
hook_file
@hook_file
||=
begin
hook_path
=
File
.
join
(
path_to_repo
,
'hooks'
,
'post-receive'
)
File
.
read
(
hook_path
)
if
File
.
exists?
(
hook_path
)
end
end
# Returns an Array of branch names
...
...
This diff is collapsed.
Click to expand it.
app/views/admin/groups/index.html.haml
View file @
bf13579b
...
...
@@ -12,16 +12,22 @@
%table
%thead
%th
Name
%th
Name
%i
.icon-sort-down
%th
Path
%th
Projects
%th
Owner
%th
.cred
Danger Zone!
-
@groups
.
each
do
|
group
|
%tr
%td
=
link_to
group
.
name
,
[
:admin
,
group
]
%td
%strong
=
link_to
group
.
name
,
[
:admin
,
group
]
%td
=
group
.
path
%td
=
group
.
projects
.
count
%td
=
link_to
group
.
owner_name
,
admin_user_path
(
group
.
owner_id
)
%td
.bgred
=
link_to
'Rename'
,
edit_admin_group_path
(
group
),
id:
"edit_
#{
dom_id
(
group
)
}
"
,
class:
"btn small"
=
link_to
'Destroy'
,
[
:admin
,
group
],
confirm:
"REMOVE
#{
group
.
name
}
? Are you sure?"
,
method: :delete
,
class:
"btn small danger"
...
...
This diff is collapsed.
Click to expand it.
app/views/admin/projects/index.html.haml
View file @
bf13579b
...
...
@@ -9,7 +9,9 @@
%table
%thead
%th
Name
%th
Name
%i
.icon-sort-down
%th
Path
%th
Team Members
%th
Last Commit
...
...
This diff is collapsed.
Click to expand it.
app/views/admin/projects/show.html.haml
View file @
bf13579b
...
...
@@ -4,14 +4,24 @@
%i
.icon-edit
Edit
-
if
!
@project
.
has_post_receive_file?
&&
@project
.
has_commits?
%br
.alert.alert-error
%span
%strong
Important!
Project has commits but missing post-receive file.
%br
If you exported project manually - copy post-receive hook to bare repository
-
if
@project
.
has_commits?
-
if
!
@project
.
has_post_receive_file?
%br
.alert.alert-error
%span
%strong
Project has commits but missing post-receive file.
%br
If you exported project manually - make a link of post-receive hook file from gitolite to project repository
-
elsif
!
@project
.
valid_post_receive_file?
%br
.alert.alert-error
%span
%strong
Project has invalid post-receive file.
%br
1. Make sure your gitolite instace has latest post-receive file.
%br
2. Make a link of post-receive hook file from gitolite to project repository
%br
%table
.zebra-striped
...
...
@@ -53,7 +63,7 @@
%td
=
check_box_tag
:post_receive_file
,
1
,
@project
.
has_post_receive_file?
,
disabled:
true
%br
%h
3
%h
5
Team
%small
(
#{
@project
.
users_projects
.
count
}
)
...
...
@@ -75,7 +85,7 @@
%td
=
link_to
'Remove from team'
,
admin_team_member_path
(
tm
),
confirm:
'Are you sure?'
,
method: :delete
,
class:
"btn danger small"
%br
%h
3
Add new team member
%h
5
Add new team member
%br
=
form_tag
team_update_admin_project_path
(
@project
),
class:
"bulk_import"
,
method: :put
do
%table
.zebra-striped
...
...
This diff is collapsed.
Click to expand it.
app/views/admin/users/index.html.haml
View file @
bf13579b
...
...
@@ -22,7 +22,9 @@
%table
%thead
%th
Admin
%th
Name
%th
Name
%i
.icon-sort-down
%th
Username
%th
Email
%th
Projects
...
...
This diff is collapsed.
Click to expand it.
app/views/admin/users/show.html.haml
View file @
bf13579b
...
...
@@ -66,7 +66,7 @@
=
@admin_user
.
twitter
%br
%h
3
Add User to Projects
%h
5
Add User to Projects
%br
=
form_tag
team_update_admin_user_path
(
@admin_user
),
class:
"bulk_import"
,
method: :put
do
%table
...
...
@@ -86,8 +86,22 @@
%strong
=
link_to
"here"
,
help_permissions_path
,
class:
"vlink"
%br
-
if
@admin_user
.
groups
.
present?
%h5
Owner of groups:
%br
%table
.zebra-striped
%thead
%tr
%th
Name
-
@admin_user
.
groups
.
each
do
|
group
|
%tr
%td
=
link_to
group
.
name
,
admin_group_path
(
group
)
-
if
@admin_user
.
projects
.
present?
%h
3
Projects
%h
5
Projects:
%br
%table
.zebra-striped
...
...
This diff is collapsed.
Click to expand it.
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