03f136fcd9
Stop using `Rails.env.test?` in views.
29 lines
1.4 KiB
Text
29 lines
1.4 KiB
Text
- expanded = expanded_by_default?
|
|
|
|
%section.settings.no-animate#cleanup{ class: ('expanded' if expanded) }
|
|
.settings-header
|
|
%h4= _('Repository cleanup')
|
|
%button.btn.js-settings-toggle
|
|
= expanded ? _('Collapse') : _('Expand')
|
|
%p
|
|
= _("Clean up after running %{bfg} on the repository" % { bfg: link_to_bfg }).html_safe
|
|
= link_to icon('question-circle'),
|
|
help_page_path('user/project/repository/reducing_the_repo_size_using_git.md'),
|
|
target: '_blank', rel: 'noopener noreferrer'
|
|
|
|
.settings-content
|
|
- url = cleanup_namespace_project_settings_repository_path(@project.namespace, @project)
|
|
= form_for @project, url: url, method: :post, authenticity_token: true, html: { class: 'js-requires-input' } do |f|
|
|
%fieldset.prepend-top-0.append-bottom-10
|
|
.append-bottom-10
|
|
%h5.prepend-top-0
|
|
= _("Upload object map")
|
|
%button.btn.btn-default.js-choose-file{ type: "button" }
|
|
= _("Choose a file")
|
|
%span.prepend-left-default.js-filename
|
|
= _("No file selected")
|
|
= f.file_field :bfg_object_map, accept: 'text/plain', class: "hidden js-object-map-input", required: true
|
|
.form-text.text-muted
|
|
= _("The maximum file size allowed is %{size}.") % { size: number_to_human_size(Gitlab::CurrentSettings.max_attachment_size.megabytes) }
|
|
= f.submit _('Start cleanup'), class: 'btn btn-success'
|
|
|