summaryrefslogtreecommitdiff
path: root/app/views/projects
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2017-11-05 19:36:12 +0900
committerShinya Maeda <shinya@gitlab.com>2017-11-05 19:36:12 +0900
commitb737282ac7fc127f6132815437bcc5a464101fd2 (patch)
tree04497e11d18fd910609fdc1af180d3e5dccca0ed /app/views/projects
parent8fb7e87806e8ae94ee40e56400625886cbcf411e (diff)
parent1d5f2f9c333534b7004501bcfa52ca873d6a3403 (diff)
downloadgitlab-ce-b737282ac7fc127f6132815437bcc5a464101fd2.tar.gz
Merge branch 'master' into refactor-clusters
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/_home_panel.html.haml9
-rw-r--r--app/views/projects/clusters/show.html.haml12
-rw-r--r--app/views/projects/edit.html.haml5
3 files changed, 14 insertions, 12 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
diff --git a/app/views/projects/clusters/show.html.haml b/app/views/projects/clusters/show.html.haml
index bd55136562a..ebb9383ca12 100644
--- a/app/views/projects/clusters/show.html.haml
+++ b/app/views/projects/clusters/show.html.haml
@@ -10,9 +10,9 @@
cluster_status: @cluster.status_name,
cluster_status_reason: @cluster.status_reason } }
- %section.settings
+ %section.settings.no-animate.expanded
%h4= s_('ClusterIntegration|Enable cluster integration')
- .settings-content.expanded
+ .settings-content
.hidden.js-cluster-error.alert.alert-danger.alert-block.append-bottom-10{ role: 'alert' }
= s_('ClusterIntegration|Something went wrong while creating your cluster on Google Container Engine')
@@ -49,14 +49,14 @@
.form-group
= field.submit _('Save'), class: 'btn btn-success'
- %section.settings#js-cluster-details
+ %section.settings.no-animate#js-cluster-details{ class: ('expanded' if expanded) }
.settings-header
%h4= s_('ClusterIntegration|Cluster details')
%button.btn.js-settings-toggle
= expanded ? 'Collapse' : 'Expand'
%p= s_('ClusterIntegration|See and edit the details for your cluster')
- .settings-content.no-animate{ class: ('expanded' if expanded) }
+ .settings-content
.form_group.append-bottom-20
%label.append-bottom-10{ for: 'cluter-name' }
@@ -66,11 +66,11 @@
%span.input-group-addon.clipboard-addon
= clipboard_button(text: @cluster.name, title: s_('ClusterIntegration|Copy cluster name'))
- %section.settings#js-cluster-advanced-settings
+ %section.settings.no-animate#js-cluster-advanced-settings{ class: ('expanded' if expanded) }
.settings-header
%h4= _('Advanced settings')
%button.btn.js-settings-toggle
= expanded ? 'Collapse' : 'Expand'
%p= s_('ClusterIntegration|Manage Cluster integration on your GitLab project')
- .settings-content.no-animate{ class: ('expanded' if expanded) }
+ .settings-content
= render 'advanced_settings'
diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml
index 5703ef1d4bb..5ebeae5c35f 100644
--- a/app/views/projects/edit.html.haml
+++ b/app/views/projects/edit.html.haml
@@ -173,7 +173,10 @@
%p
This will remove the fork relationship to source project
= succeed "." do
- = link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project)
+ - if @project.fork_source
+ = link_to(fork_source_name(@project), project_path(@project.fork_source))
+ - else
+ = fork_source_name(@project)
= form_for([@project.namespace.becomes(Namespace), @project], url: remove_fork_project_path(@project), method: :delete, remote: true, html: { class: 'transfer-project' }) do |f|
%p
%strong Once removed, the fork relationship cannot be restored and you will no longer be able to send merge requests to the source.