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
iv
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
Show 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
before_action
:authorize_download_code!
def
index
@forked_projects
=
project
.
forks
.
includes
(
:creator
)
end
def
new
...
...
app/views/projects/buttons/_fork.html.haml
View file @
2b05bf4b
...
...
@@ -9,7 +9,7 @@
%span
.count
=
@project
.
forks_count
-
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'
)
Fork
%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
]
-
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
-
ci
=
false
unless
local_assigns
[
:ci
]
==
true
-
skip_namespace
=
false
unless
local_assigns
[
:skip_namespace
]
==
true
...
...
@@ -8,7 +9,7 @@
-
projects
.
each_with_index
do
|
project
,
i
|
-
css_class
=
(
i
>=
projects_limit
)
?
'hide'
:
nil
=
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
%li
.bottom.center
...
...
app/views/shared/projects/_project.html.haml
View file @
2b05bf4b
...
...
@@ -13,6 +13,9 @@
=
link_to
project_path
(
project
),
class:
dom_class
(
project
)
do
-
if
avatar
.dash-project-avatar
-
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
.namespace-name
...
...
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