Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-09-02 15:10:32 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-09-02 15:10:32 +0300
commit2d337eacd93f459f702e032077b5ba123ed90c00 (patch)
tree50f9008ff752729cebf85e0cb3631577a013a02e /app/views
parent423309c4aeebaf0415ba6de79599f9b5fd6c57a7 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views')
-rw-r--r--app/views/layouts/devise.html.haml2
-rw-r--r--app/views/projects/mirrors/_mirror_repos.html.haml38
-rw-r--r--app/views/projects/mirrors/_mirror_repos_list.html.haml47
-rw-r--r--app/views/shared/_file_highlight.html.haml3
4 files changed, 51 insertions, 39 deletions
diff --git a/app/views/layouts/devise.html.haml b/app/views/layouts/devise.html.haml
index 87a8b6dd870..6650e07be2a 100644
--- a/app/views/layouts/devise.html.haml
+++ b/app/views/layouts/devise.html.haml
@@ -18,10 +18,10 @@
= current_appearance&.title.presence || _('GitLab')
- if current_appearance&.description?
= brand_text
+ = render_if_exists 'layouts/devise_help_text'
.mb-3
.gl-w-half.gl-xs-w-full.gl-ml-auto.gl-mr-auto.bar
= yield
- = render_if_exists 'layouts/devise_help_text'
= render 'devise/shared/footer', footer_message: footer_message
diff --git a/app/views/projects/mirrors/_mirror_repos.html.haml b/app/views/projects/mirrors/_mirror_repos.html.haml
index 339042eb703..2ae7d300979 100644
--- a/app/views/projects/mirrors/_mirror_repos.html.haml
+++ b/app/views/projects/mirrors/_mirror_repos.html.haml
@@ -41,40 +41,4 @@
= c.body do
= _('Mirror settings are only available to GitLab administrators.')
- .panel.panel-default
- .table-responsive
- %table.table.push-pull-table
- %thead
- %tr
- %th
- = _('Mirrored repositories')
- = render_if_exists 'projects/mirrors/mirrored_repositories_count'
- %th= _('Direction')
- %th= _('Last update attempt')
- %th= _('Last successful update')
- %th
- %th
- %tbody.js-mirrors-table-body
- = render_if_exists 'projects/mirrors/table_pull_row'
- - @project.remote_mirrors.each_with_index do |mirror, index|
- - next if mirror.new_record?
- %tr.rspec-mirrored-repository-row{ class: ('bg-secondary' if mirror.disabled?), data: { qa_selector: 'mirrored_repository_row' } }
- %td{ data: { qa_selector: 'mirror_repository_url_cell' } }= mirror.safe_url || _('Invalid URL')
- %td= _('Push')
- %td
- = mirror.last_update_started_at.present? ? time_ago_with_tooltip(mirror.last_update_started_at) : _('Never')
- %td{ data: { qa_selector: 'mirror_last_update_at_cell' } }= mirror.last_update_at.present? ? time_ago_with_tooltip(mirror.last_update_at) : _('Never')
- %td
- - if mirror.disabled?
- = render 'projects/mirrors/disabled_mirror_badge'
- - if mirror.last_error.present?
- = gl_badge_tag _('Error'), { variant: :danger }, { data: { toggle: 'tooltip', html: 'true', qa_selector: 'mirror_error_badge' }, title: html_escape(mirror.last_error.try(:strip)) }
- %td.gl-display-flex
- - if mirror_settings_enabled
- .btn-group.mirror-actions-group{ role: 'group' }
- - if mirror.ssh_key_auth?
- = clipboard_button(text: mirror.ssh_public_key, class: 'gl-button btn btn-default btn-icon', title: _('Copy SSH public key'), qa_selector: 'copy_public_key_button')
- = render 'shared/remote_mirror_update_button', remote_mirror: mirror
- = render Pajamas::ButtonComponent.new(variant: :danger,
- icon: 'remove',
- button_options: { class: 'js-delete-mirror qa-delete-mirror rspec-delete-mirror', title: _('Remove'), data: { mirror_id: mirror.id, toggle: 'tooltip', container: 'body' } })
+ = render 'projects/mirrors/mirror_repos_list'
diff --git a/app/views/projects/mirrors/_mirror_repos_list.html.haml b/app/views/projects/mirrors/_mirror_repos_list.html.haml
new file mode 100644
index 00000000000..2dbcbd659c8
--- /dev/null
+++ b/app/views/projects/mirrors/_mirror_repos_list.html.haml
@@ -0,0 +1,47 @@
+- mirror_settings_enabled = can?(current_user, :admin_remote_mirror, @project)
+
+.panel.panel-default
+ .table-responsive
+ - if !@project.mirror? && @project.remote_mirrors.count == 0
+ .gl-card.gl-mt-5
+ .gl-card-header
+ %strong
+ = _('Mirrored repositories') + ' (0)'
+ .gl-card-body
+ = _('There are currently no mirrored repositories.')
+ - else
+ %table.table.push-pull-table
+ %thead
+ %tr
+ %th
+ = _('Mirrored repositories')
+ = render_if_exists 'projects/mirrors/mirrored_repositories_count'
+ %th= _('Direction')
+ %th= _('Last update attempt')
+ %th= _('Last successful update')
+ %th
+ %th
+ %tbody.js-mirrors-table-body
+ = render_if_exists 'projects/mirrors/table_pull_row'
+ - @project.remote_mirrors.each_with_index do |mirror, index|
+ - next if mirror.new_record?
+ %tr.rspec-mirrored-repository-row{ class: ('bg-secondary' if mirror.disabled?), data: { qa_selector: 'mirrored_repository_row' } }
+ %td{ data: { qa_selector: 'mirror_repository_url_cell' } }= mirror.safe_url || _('Invalid URL')
+ %td= _('Push')
+ %td
+ = mirror.last_update_started_at.present? ? time_ago_with_tooltip(mirror.last_update_started_at) : _('Never')
+ %td{ data: { qa_selector: 'mirror_last_update_at_cell' } }= mirror.last_update_at.present? ? time_ago_with_tooltip(mirror.last_update_at) : _('Never')
+ %td
+ - if mirror.disabled?
+ = render 'projects/mirrors/disabled_mirror_badge'
+ - if mirror.last_error.present?
+ = gl_badge_tag _('Error'), { variant: :danger }, { data: { toggle: 'tooltip', html: 'true', qa_selector: 'mirror_error_badge' }, title: html_escape(mirror.last_error.try(:strip)) }
+ %td.gl-display-flex
+ - if mirror_settings_enabled
+ .btn-group.mirror-actions-group{ role: 'group' }
+ - if mirror.ssh_key_auth?
+ = clipboard_button(text: mirror.ssh_public_key, class: 'gl-button btn btn-default btn-icon', title: _('Copy SSH public key'), qa_selector: 'copy_public_key_button')
+ = render 'shared/remote_mirror_update_button', remote_mirror: mirror
+ = render Pajamas::ButtonComponent.new(variant: :danger,
+ icon: 'remove',
+ button_options: { class: 'js-delete-mirror qa-delete-mirror rspec-delete-mirror', title: _('Remove'), data: { mirror_id: mirror.id, toggle: 'tooltip', container: 'body' } })
diff --git a/app/views/shared/_file_highlight.html.haml b/app/views/shared/_file_highlight.html.haml
index 130e73a069f..89be816fc76 100644
--- a/app/views/shared/_file_highlight.html.haml
+++ b/app/views/shared/_file_highlight.html.haml
@@ -1,6 +1,7 @@
#blob-content.file-content.code.js-syntax-highlight
- offset = defined?(first_line_number) ? first_line_number : 1
- - blame_path = project_blame_path(@project, tree_join(@ref, blob.path))
+ - if Feature.enabled?(:file_line_blame)
+ - blame_path = project_blame_path(@project, tree_join(@ref, blob.path))
.line-numbers{ class: "gl-px-0!", data: { blame_path: blame_path } }
- if blob.data.present?
- link = blob_link if defined?(blob_link)