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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
f8163c81
Commit
f8163c81
authored
Mar 11, 2016
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show shared projects on group page
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
746ac56b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
0 deletions
+27
-0
app/controllers/groups_controller.rb
app/controllers/groups_controller.rb
+2
-0
app/views/groups/_shared_projects.html.haml
app/views/groups/_shared_projects.html.haml
+18
-0
app/views/groups/show.html.haml
app/views/groups/show.html.haml
+7
-0
No files found.
app/controllers/groups_controller.rb
View file @
f8163c81
...
...
@@ -46,6 +46,8 @@ class GroupsController < Groups::ApplicationController
@projects
=
@projects
.
sort
(
@sort
=
params
[
:sort
])
@projects
=
@projects
.
page
(
params
[
:page
]).
per
(
PER_PAGE
)
if
params
[
:filter_projects
].
blank?
@shared_projects
=
@group
.
shared_projects
respond_to
do
|
format
|
format
.
html
...
...
app/views/groups/_shared_projects.html.haml
0 → 100644
View file @
f8163c81
-
if
projects
.
present?
.panel.panel-default
.panel-heading
Projects shared with
%strong
#{
@group
.
name
}
(
#{
projects
.
count
}
)
%ul
.well-list
-
projects
.
each
do
|
project
|
%li
.project-row
=
link_to
namespace_project_path
(
project
.
namespace
,
project
),
class:
dom_class
(
project
)
do
%span
.namespace-name
-
if
project
.
namespace
=
project
.
namespace
.
human_name
\/
%span
.project-name
=
truncate
(
project
.
name
,
length:
25
)
%span
.arrow
%i
.icon-angle-right
app/views/groups/show.html.haml
View file @
f8163c81
...
...
@@ -35,6 +35,10 @@
%li
=
link_to
"#projects"
,
'data-toggle'
=>
'tab'
do
Projects
-
if
@shared_projects
.
present?
%li
=
link_to
"#shared"
,
'data-toggle'
=>
'tab'
do
Shared Projects
-
if
can?
(
current_user
,
:read_group
,
@group
)
%div
{
class:
container_class
}
...
...
@@ -52,6 +56,9 @@
.tab-pane
#projects
=
render
"projects"
,
projects:
@projects
.tab-pane
#shared
=
render
"shared_projects"
,
projects:
@shared_projects
-
else
%p
.nav-links.no-top
No projects to show
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