diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-08 00:07:43 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-08 00:07:43 +0000 |
commit | 2b3bfe8fc59ed4cdc385955cdb38cbd481b45426 (patch) | |
tree | 6b570a8d134fb2beeacf11bbcc79ff22123156ec /app/views | |
parent | d203316c80aa27cf747aa29df9f7c2d374965b5f (diff) | |
download | gitlab-ce-2b3bfe8fc59ed4cdc385955cdb38cbd481b45426.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views')
6 files changed, 24 insertions, 11 deletions
diff --git a/app/views/projects/blob/_render_error.html.haml b/app/views/projects/blob/_render_error.html.haml index 9eef6cafd04..1ff68cd2d11 100644 --- a/app/views/projects/blob/_render_error.html.haml +++ b/app/views/projects/blob/_render_error.html.haml @@ -3,5 +3,5 @@ The #{viewer.switcher_title} could not be displayed because #{blob_render_error_reason(viewer)}. You can - = blob_render_error_options(viewer).to_sentence(two_words_connector: ' or ', last_word_connector: ', or ').html_safe + = Gitlab::Utils.to_exclusive_sentence(blob_render_error_options(viewer)).html_safe instead. diff --git a/app/views/projects/blob/viewers/_contributing.html.haml b/app/views/projects/blob/viewers/_contributing.html.haml index c78f04c9c7c..546c064c06f 100644 --- a/app/views/projects/blob/viewers/_contributing.html.haml +++ b/app/views/projects/blob/viewers/_contributing.html.haml @@ -4,6 +4,6 @@ After you've reviewed these contribution guidelines, you'll be all set to - options = contribution_options(viewer.project) - if options.any? = succeed '.' do - = options.to_sentence(two_words_connector: ' or ', last_word_connector: ', or ').html_safe + = Gitlab::Utils.to_exclusive_sentence(options).html_safe - else contribute to this project. diff --git a/app/views/projects/default_branch/_show.html.haml b/app/views/projects/default_branch/_show.html.haml index 59efcde5825..6a09004143e 100644 --- a/app/views/projects/default_branch/_show.html.haml +++ b/app/views/projects/default_branch/_show.html.haml @@ -9,13 +9,23 @@ = _('Select the branch you want to set as the default for this project. All merge requests and commits will automatically be made against this branch unless you specify a different one.') .settings-content - - if @project.empty_repo? - .text-secondary - = _('A default branch cannot be chosen for an empty project.') - - else - = form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, anchor: 'default-branch-settings' }, authenticity_token: true do |f| - %fieldset + = form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, anchor: 'default-branch-settings' }, authenticity_token: true do |f| + %fieldset + - if @project.empty_repo? + .text-secondary + = _('A default branch cannot be chosen for an empty project.') + - else .form-group = f.label :default_branch, "Default Branch", class: 'label-bold' = f.select(:default_branch, @project.repository.branch_names, {}, {class: 'select2 select-wide'}) - = f.submit 'Save changes', class: "btn btn-success" + + .form-group + .form-check + = f.check_box :autoclose_referenced_issues, class: 'form-check-input' + = f.label :autoclose_referenced_issues, class: 'form-check-label' do + %strong= _("Auto-close referenced issues on default branch") + .form-text.text-muted + = _("Issues referenced by merge requests and commits within the default branch will be closed automatically") + = link_to icon('question-circle'), help_page_path('user/project/issues/managing_issues.html', anchor: 'disabling-automatic-issue-closing'), target: '_blank' + + = f.submit 'Save changes', class: "btn btn-success" diff --git a/app/views/shared/form_elements/_description.html.haml b/app/views/shared/form_elements/_description.html.haml index 9db6184ebca..2f2e6d83f9f 100644 --- a/app/views/shared/form_elements/_description.html.haml +++ b/app/views/shared/form_elements/_description.html.haml @@ -1,6 +1,8 @@ - project = local_assigns.fetch(:project) - model = local_assigns.fetch(:model) + + - form = local_assigns.fetch(:form) - placeholder = model.is_a?(MergeRequest) ? _('Describe the goal of the changes and what reviewers should be aware of.') : _('Write a comment or drag your files hereā¦') - supports_quick_actions = model.new_record? @@ -14,6 +16,8 @@ = form.label :description, 'Description', class: 'col-form-label col-sm-2' .col-sm-10 + - if model.is_a?(Issuable) + = render 'shared/issuable/form/template_selector', issuable: model = render layout: 'projects/md_preview', locals: { url: preview_url, referenced_users: true } do = render 'projects/zen', f: form, attr: :description, classes: 'note-textarea qa-issuable-form-description rspec-issuable-form-description', diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml index 0fb23adc31f..a020a04e366 100644 --- a/app/views/shared/issuable/_form.html.haml +++ b/app/views/shared/issuable/_form.html.haml @@ -17,7 +17,6 @@ .form-group.row = form.label :title, class: 'col-form-label col-sm-2' - = render 'shared/issuable/form/template_selector', issuable: issuable = render 'shared/issuable/form/title', issuable: issuable, form: form, has_wip_commits: commits && commits.detect(&:work_in_progress?) #js-suggestions{ data: { project_path: @project.full_path } } diff --git a/app/views/shared/issuable/form/_template_selector.html.haml b/app/views/shared/issuable/form/_template_selector.html.haml index d613bd31d81..bf34ea4a1b2 100644 --- a/app/views/shared/issuable/form/_template_selector.html.haml +++ b/app/views/shared/issuable/form/_template_selector.html.haml @@ -2,7 +2,7 @@ - return unless issuable && issuable_templates(issuable).any? -.col-sm-3.col-lg-2 +.issuable-form-select-holder.selectbox.form-group .js-issuable-selector-wrap{ data: { issuable_type: issuable.to_ability_name } } = template_dropdown_tag(issuable) do %ul.dropdown-footer-list |