Skip to content

Commit

Permalink
Merge branch 'import-form-scb' into 'master'
Browse files Browse the repository at this point in the history
Resolve CE/EE diffs in import form

Closes gitlabhq#10492

See merge request gitlab-org/gitlab-ee!13119
  • Loading branch information
iamphill committed May 22, 2019
2 parents 5200f29 + d6b6769 commit 30a247e
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 19 deletions.
9 changes: 2 additions & 7 deletions app/views/shared/_import_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
= import_will_timeout_message(ci_cd_only)
%li
= import_svn_message(ci_cd_only)
- unless ci_cd_only
%li
- ssh_link = link_to _('here'), help_page_path('/workflow/repository_mirroring.md', anchor: 'ssh-authentication')
= _('Once imported, repositories can be mirrored over SSH. Read more %{ssh_link}').html_safe % { ssh_link: ssh_link }
= render_if_exists 'shared/ci_cd_only_link', ci_cd_only: ci_cd_only

-# EE-specific start
= render 'shared/ee/import_form', f: f unless ci_cd_only
-# EE-specific end
= render_if_exists 'shared/ee/import_form', f: f, ci_cd_only: ci_cd_only
7 changes: 7 additions & 0 deletions ee/app/views/shared/_ci_cd_only_link.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- return if ci_cd_only

- docs_link = help_page_path('/workflow/repository_mirroring.md', anchor: 'ssh-authentication')
- link_start = "<a href='#{docs_link}' rel='noopener noreferrer' target='_blank'>".html_safe

%li
= _('Once imported, repositories can be mirrored over SSH. Read more %{link_start}here%{link_end}.').html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
22 changes: 11 additions & 11 deletions ee/app/views/shared/ee/_import_form.html.haml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
- if License.feature_available?(:repository_mirrors)
.form-group
= f.label :mirror, class: 'label-bold' do
= f.check_box :mirror, disabled: true
%strong
Mirror repository
- return if ci_cd_only
- return unless License.feature_available?(:repository_mirrors)

.form-group
= f.label :mirror, class: 'label-bold' do
= f.check_box :mirror, disabled: true
%strong= _('Mirror repository')
.form-text.text-muted
= _("Automatically update this project's branches and tags from the upstream repository every hour.")
- if Gitlab::CurrentSettings.should_check_namespace_plan?
.form-text.text-muted
Automatically update this project's branches and tags from the upstream
repository every hour.
- if Gitlab::CurrentSettings.should_check_namespace_plan?
.form-text.text-muted
Mirroring will only be available if the feature is included in the plan of the selected group or user.
= _('Mirroring will only be available if the feature is included in the plan of the selected group or user.')
8 changes: 7 additions & 1 deletion locale/gitlab.pot
Original file line number Diff line number Diff line change
Expand Up @@ -1653,6 +1653,9 @@ msgstr ""
msgid "Automatically resolved"
msgstr ""

msgid "Automatically update this project's branches and tags from the upstream repository every hour."
msgstr ""

msgid "Autosave|Note"
msgstr ""

Expand Down Expand Up @@ -8090,6 +8093,9 @@ msgstr ""
msgid "Mirroring was successfully disabled."
msgstr ""

msgid "Mirroring will only be available if the feature is included in the plan of the selected group or user."
msgstr ""

msgid "Missing commit signatures endpoint!"
msgstr ""

Expand Down Expand Up @@ -8650,7 +8656,7 @@ msgstr ""
msgid "Onboarding"
msgstr ""

msgid "Once imported, repositories can be mirrored over SSH. Read more %{ssh_link}"
msgid "Once imported, repositories can be mirrored over SSH. Read more %{link_start}here%{link_end}."
msgstr ""

msgid "Once removed, the fork relationship cannot be restored and you will no longer be able to send merge requests to the source."
Expand Down

0 comments on commit 30a247e

Please sign in to comment.