summaryrefslogtreecommitdiff
path: root/app/views/projects/_home_panel.html.haml
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2017-11-03 11:08:36 +0100
committerBob Van Landuyt <bob@vanlanduyt.co>2017-11-03 11:08:36 +0100
commit39d00bddc494c7f13527887e005b53431642d24c (patch)
tree0eddca2a370d8d93897a99d46960ee33ad9ba58f /app/views/projects/_home_panel.html.haml
parent5c147b6b8ef3f543f98c15ce2a54d4e3f2821303 (diff)
downloadgitlab-ce-39d00bddc494c7f13527887e005b53431642d24c.tar.gz
Make sure the settings page renders when root of a fork is deleted
Diffstat (limited to 'app/views/projects/_home_panel.html.haml')
-rw-r--r--app/views/projects/_home_panel.html.haml9
1 files changed, 4 insertions, 5 deletions
diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml
index 619b632918e..1d644dda177 100644
--- a/app/views/projects/_home_panel.html.haml
+++ b/app/views/projects/_home_panel.html.haml
@@ -1,6 +1,5 @@
- empty_repo = @project.empty_repo?
- fork_network = @project.fork_network
-- forked_from_project = @project.forked_from_project || fork_network&.root_project
.project-home-panel.text-center{ class: ("empty-project" if empty_repo) }
.limit-container-width{ class: container_class }
.avatar-container.s70.project-avatar
@@ -16,13 +15,13 @@
- if @project.forked?
%p
- - if forked_from_project
+ - if @project.fork_source
#{ s_('ForkedFromProjectPath|Forked from') }
- = link_to project_path(forked_from_project) do
- = forked_from_project.full_name
+ = link_to project_path(@project.fork_source) do
+ = fork_source_name(@project)
- else
- deleted_message = s_('ForkedFromProjectPath|Forked from %{project_name} (deleted)')
- = deleted_message % { project_name: fork_network.deleted_root_project_name }
+ = deleted_message % { project_name: fork_source_name(@project) }
.project-repo-buttons
.count-buttons