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
2b05bf4b
Commit
2b05bf4b
authored
Jan 11, 2016
by
Rubén Dávila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Project creator's avatar in fork listing. #2406
parent
7765ce18
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
4 deletions
+12
-4
app/controllers/projects/forks_controller.rb
app/controllers/projects/forks_controller.rb
+2
-1
app/views/projects/buttons/_fork.html.haml
app/views/projects/buttons/_fork.html.haml
+1
-1
app/views/projects/forks/index.html.haml
app/views/projects/forks/index.html.haml
+3
-0
app/views/shared/projects/_list.html.haml
app/views/shared/projects/_list.html.haml
+2
-1
app/views/shared/projects/_project.html.haml
app/views/shared/projects/_project.html.haml
+4
-1
No files found.
app/controllers/projects/forks_controller.rb
View file @
2b05bf4b
...
@@ -4,6 +4,7 @@ class Projects::ForksController < Projects::ApplicationController
...
@@ -4,6 +4,7 @@ class Projects::ForksController < Projects::ApplicationController
before_action
:authorize_download_code!
before_action
:authorize_download_code!
def
index
def
index
@forked_projects
=
project
.
forks
.
includes
(
:creator
)
end
end
def
new
def
new
...
@@ -13,7 +14,7 @@ class Projects::ForksController < Projects::ApplicationController
...
@@ -13,7 +14,7 @@ class Projects::ForksController < Projects::ApplicationController
def
create
def
create
namespace
=
Namespace
.
find
(
params
[
:namespace_key
])
namespace
=
Namespace
.
find
(
params
[
:namespace_key
])
@forked_project
=
namespace
.
projects
.
find_by
(
path:
project
.
path
)
@forked_project
=
namespace
.
projects
.
find_by
(
path:
project
.
path
)
@forked_project
=
nil
unless
@forked_project
&&
@forked_project
.
forked_from_project
==
project
@forked_project
=
nil
unless
@forked_project
&&
@forked_project
.
forked_from_project
==
project
...
...
app/views/projects/buttons/_fork.html.haml
View file @
2b05bf4b
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
%span
.count
%span
.count
=
@project
.
forks_count
=
@project
.
forks_count
-
else
-
else
=
link_to
new_namespace_project_fork
s
_path
(
@project
.
namespace
,
@project
),
title:
"Fork project"
,
class:
'btn has_tooltip'
do
=
link_to
new_namespace_project_fork_path
(
@project
.
namespace
,
@project
),
title:
"Fork project"
,
class:
'btn has_tooltip'
do
=
icon
(
'code-fork fw'
)
=
icon
(
'code-fork fw'
)
Fork
Fork
%div
.count-with-arrow
%div
.count-with-arrow
...
...
app/views/projects/forks/index.html.haml
0 → 100644
View file @
2b05bf4b
.projects-list-holder
=
render
'shared/projects/list'
,
projects:
@forked_projects
,
use_creator_avatar:
true
app/views/shared/projects/_list.html.haml
View file @
2b05bf4b
-
projects_limit
=
20
unless
local_assigns
[
:projects_limit
]
-
projects_limit
=
20
unless
local_assigns
[
:projects_limit
]
-
avatar
=
true
unless
local_assigns
[
:avatar
]
==
false
-
avatar
=
true
unless
local_assigns
[
:avatar
]
==
false
-
use_creator_avatar
=
false
unless
local_assigns
[
:use_creator_avatar
]
==
true
-
stars
=
true
unless
local_assigns
[
:stars
]
==
false
-
stars
=
true
unless
local_assigns
[
:stars
]
==
false
-
ci
=
false
unless
local_assigns
[
:ci
]
==
true
-
ci
=
false
unless
local_assigns
[
:ci
]
==
true
-
skip_namespace
=
false
unless
local_assigns
[
:skip_namespace
]
==
true
-
skip_namespace
=
false
unless
local_assigns
[
:skip_namespace
]
==
true
...
@@ -8,7 +9,7 @@
...
@@ -8,7 +9,7 @@
-
projects
.
each_with_index
do
|
project
,
i
|
-
projects
.
each_with_index
do
|
project
,
i
|
-
css_class
=
(
i
>=
projects_limit
)
?
'hide'
:
nil
-
css_class
=
(
i
>=
projects_limit
)
?
'hide'
:
nil
=
render
"shared/projects/project"
,
project:
project
,
skip_namespace:
skip_namespace
,
=
render
"shared/projects/project"
,
project:
project
,
skip_namespace:
skip_namespace
,
avatar:
avatar
,
stars:
stars
,
css_class:
css_class
,
ci:
ci
avatar:
avatar
,
stars:
stars
,
css_class:
css_class
,
ci:
ci
,
use_creator_avatar:
use_creator_avatar
-
if
projects
.
size
>
projects_limit
-
if
projects
.
size
>
projects_limit
%li
.bottom.center
%li
.bottom.center
...
...
app/views/shared/projects/_project.html.haml
View file @
2b05bf4b
...
@@ -13,7 +13,10 @@
...
@@ -13,7 +13,10 @@
=
link_to
project_path
(
project
),
class:
dom_class
(
project
)
do
=
link_to
project_path
(
project
),
class:
dom_class
(
project
)
do
-
if
avatar
-
if
avatar
.dash-project-avatar
.dash-project-avatar
=
project_icon
(
project
,
alt:
''
,
class:
'avatar project-avatar s46'
)
-
if
use_creator_avatar
=
image_tag
avatar_icon
(
project
.
creator
.
email
,
46
),
class:
"avatar s46"
,
alt
:''
-
else
=
project_icon
(
project
,
alt:
''
,
class:
'avatar project-avatar s46'
)
%span
.project-full-name
%span
.project-full-name
%span
.namespace-name
%span
.namespace-name
-
if
project
.
namespace
&&
!
skip_namespace
-
if
project
.
namespace
&&
!
skip_namespace
...
...
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