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
d8833270
Commit
d8833270
authored
Oct 04, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed group issues/mr. Also speedup project list of admin area
parent
c626ec37
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
6 deletions
+16
-6
app/controllers/groups_controller.rb
app/controllers/groups_controller.rb
+4
-2
app/roles/issue_commonality.rb
app/roles/issue_commonality.rb
+1
-0
app/views/admin/projects/index.html.haml
app/views/admin/projects/index.html.haml
+0
-2
app/views/admin/projects/show.html.haml
app/views/admin/projects/show.html.haml
+9
-0
app/views/layouts/group.html.haml
app/views/layouts/group.html.haml
+2
-2
No files found.
app/controllers/groups_controller.rb
View file @
d8833270
...
...
@@ -21,13 +21,15 @@ class GroupsController < ApplicationController
# Get authored or assigned open merge requests
def
merge_requests
@merge_requests
=
current_user
.
cared_merge_requests
.
order
(
"created_at DESC"
).
page
(
params
[
:page
]).
per
(
20
)
@merge_requests
=
current_user
.
cared_merge_requests
@merge_requests
=
@merge_requests
.
of_group
(
@group
).
order
(
"created_at DESC"
).
page
(
params
[
:page
]).
per
(
20
)
end
# Get only assigned issues
def
issues
@user
=
current_user
@issues
=
current_user
.
assigned_issues
.
opened
.
order
(
"created_at DESC"
).
page
(
params
[
:page
]).
per
(
20
)
@issues
=
current_user
.
assigned_issues
.
opened
@issues
=
@issues
.
of_group
(
@group
).
order
(
"created_at DESC"
).
page
(
params
[
:page
]).
per
(
20
)
@issues
=
@issues
.
includes
(
:author
,
:project
)
respond_to
do
|
format
|
...
...
app/roles/issue_commonality.rb
View file @
d8833270
...
...
@@ -18,6 +18,7 @@ module IssueCommonality
scope
:opened
,
where
(
closed:
false
)
scope
:closed
,
where
(
closed:
true
)
scope
:of_group
,
->
(
group
)
{
where
(
project_id:
group
.
project_ids
)
}
scope
:assigned
,
lambda
{
|
u
|
where
(
assignee_id:
u
.
id
)}
delegate
:name
,
...
...
app/views/admin/projects/index.html.haml
View file @
d8833270
...
...
@@ -12,7 +12,6 @@
%th
Name
%th
Path
%th
Team Members
%th
Post Receive
%th
Last Commit
%th
Edit
%th
.cred
Danger Zone!
...
...
@@ -22,7 +21,6 @@
%td
=
link_to
project
.
name
,
[
:admin
,
project
]
%td
=
project
.
path
%td
=
project
.
users_projects
.
count
%td
=
check_box_tag
:post_receive_file
,
1
,
project
.
has_post_receive_file?
,
disabled:
true
%td
=
last_commit
(
project
)
%td
=
link_to
'Edit'
,
edit_admin_project_path
(
project
),
id:
"edit_
#{
dom_id
(
project
)
}
"
,
class:
"btn small"
%td
.bgred
=
link_to
'Destroy'
,
[
:admin
,
project
],
confirm:
"REMOVE
#{
project
.
name
}
? Are you sure?"
,
method: :delete
,
class:
"btn small danger"
...
...
app/views/admin/projects/show.html.haml
View file @
d8833270
...
...
@@ -5,6 +5,15 @@
%i
.icon-edit
Edit
-
if
!
@admin_project
.
has_post_receive_file?
&&
@admin_project
.
commit
%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
%br
%table
.zebra-striped
%thead
...
...
app/views/layouts/group.html.haml
View file @
d8833270
...
...
@@ -11,11 +11,11 @@
=
nav_link
(
path:
'groups#issues'
)
do
=
link_to
issues_group_path
(
@group
)
do
Issues
%span
.count
=
current_user
.
assigned_issues
.
opened
.
count
%span
.count
=
current_user
.
assigned_issues
.
opened
.
of_group
(
@group
).
count
=
nav_link
(
path:
'groups#merge_requests'
)
do
=
link_to
merge_requests_group_path
(
@group
)
do
Merge Requests
%span
.count
=
current_user
.
cared_merge_requests
.
count
%span
.count
=
current_user
.
cared_merge_requests
.
of_group
(
@group
).
count
=
nav_link
(
path:
'groups#search'
)
do
=
link_to
"Search"
,
search_group_path
(
@group
)
=
nav_link
(
path:
'groups#people'
)
do
...
...
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