Commit 2b05bf4b authored by Rubén Dávila's avatar Rubén Dávila

Use Project creator's avatar in fork listing. #2406

parent 7765ce18
......@@ -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
......
......@@ -9,7 +9,7 @@
%span.count
= @project.forks_count
- else
= link_to new_namespace_project_forks_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
......
.projects-list-holder
= render 'shared/projects/list', projects: @forked_projects, use_creator_avatar: true
- 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
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment