From 5b62f8e3ee531f63ce3c49cae03e2a618ba51615 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 14 Apr 2023 18:08:53 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- app/views/shared/deploy_keys/_form.html.haml | 5 +++ .../deploy_keys/_project_group_form.html.haml | 4 ++ app/views/shared/projects/_topics.html.haml | 52 +++++++++++----------- 3 files changed, 34 insertions(+), 27 deletions(-) (limited to 'app/views/shared') diff --git a/app/views/shared/deploy_keys/_form.html.haml b/app/views/shared/deploy_keys/_form.html.haml index 93f31629ca7..584d0758c76 100644 --- a/app/views/shared/deploy_keys/_form.html.haml +++ b/app/views/shared/deploy_keys/_form.html.haml @@ -27,6 +27,11 @@ .col-sm-10 = form.text_field :fingerprint, class: 'form-control gl-form-input', readonly: 'readonly' +.form-group + .col-sm-10 + = form.label :expires_at, _('Expiration date (optional)'), class: 'label-bold' + = form.text_field :expires_at, class: 'form-control gl-form-input', readonly: 'readonly' + - if deploy_keys_project.present? = form.fields_for :deploy_keys_projects, deploy_keys_project do |deploy_keys_project_form| .form-group diff --git a/app/views/shared/deploy_keys/_project_group_form.html.haml b/app/views/shared/deploy_keys/_project_group_form.html.haml index 11fa44fe282..c9e17b18264 100644 --- a/app/views/shared/deploy_keys/_project_group_form.html.haml +++ b/app/views/shared/deploy_keys/_project_group_form.html.haml @@ -15,6 +15,10 @@ .form-group.row = deploy_keys_project_form.gitlab_ui_checkbox_component :can_push, _('Grant write permissions to this key'), help_text: _('Allow this key to push to this repository') + .form-group.row + = f.label :expires_at, _('Expiration date (optional)'), class: 'label-bold' + = f.gitlab_ui_datepicker :expires_at, data: { qa_selector: 'deploy_key_expires_at_field' }, value: f.object.expires_at + %p.form-text.text-muted= ssh_key_expires_field_description .form-group.row = f.submit _("Add key"), data: { qa_selector: "add_deploy_key_button"}, pajamas_button: true diff --git a/app/views/shared/projects/_topics.html.haml b/app/views/shared/projects/_topics.html.haml index be513af4e3f..12246d1dcfa 100644 --- a/app/views/shared/projects/_topics.html.haml +++ b/app/views/shared/projects/_topics.html.haml @@ -1,31 +1,29 @@ -- cache_enabled = false unless local_assigns[:cache_enabled] == true - max_project_topic_length = 15 - if project.topics.present? - = cache_if(cache_enabled, [project, :topic_list], expires_in: 1.day) do - .gl-w-full.gl-display-inline-flex.gl-flex-wrap.gl-font-base.gl-font-weight-normal.gl-align-items-center.gl-mx-n2.gl-my-n2{ 'data-testid': 'project_topic_list' } - %span.gl-p-2.gl-text-gray-500 - = _('Topics') + ':' - - project.topics_to_show.each do |topic| - - explore_project_topic_path = topic_explore_projects_path(topic_name: topic[:name]) - - if topic[:title].length > max_project_topic_length - %a.gl-p-2.has-tooltip{ data: { container: "body" }, title: topic[:title], href: explore_project_topic_path, itemprop: 'keywords' } - = gl_badge_tag truncate(topic[:title], length: max_project_topic_length) - - else - %a.gl-p-2{ href: explore_project_topic_path, itemprop: 'keywords' } - = gl_badge_tag topic[:title] + .gl-w-full.gl-display-inline-flex.gl-flex-wrap.gl-font-base.gl-font-weight-normal.gl-align-items-center.gl-mx-n2.gl-my-n2{ 'data-testid': 'project_topic_list' } + %span.gl-p-2.gl-text-gray-500 + = _('Topics') + ':' + - project.topics_to_show.each do |topic| + - explore_project_topic_path = topic_explore_projects_path(topic_name: topic[:name]) + - if topic[:title].length > max_project_topic_length + %a.gl-p-2.has-tooltip{ data: { container: "body" }, title: topic[:title], href: explore_project_topic_path, itemprop: 'keywords' } + = gl_badge_tag truncate(topic[:title], length: max_project_topic_length) + - else + %a.gl-p-2{ href: explore_project_topic_path, itemprop: 'keywords' } + = gl_badge_tag topic[:title] - - if project.has_extra_topics? - - title = _('More topics') - - content = capture do - %span.gl-display-inline-flex.gl-flex-wrap - - project.topics_not_shown.each do |topic| - - explore_project_topic_path = topic_explore_projects_path(topic_name: topic[:name]) - - if topic[:title].length > max_project_topic_length - %a.gl-mr-3.gl-mb-3.has-tooltip{ data: { container: "body" }, title: topic[:title], href: explore_project_topic_path, itemprop: 'keywords' } - = gl_badge_tag truncate(topic[:title], length: max_project_topic_length) - - else - %a.gl-mr-3.gl-mb-3{ href: explore_project_topic_path, itemprop: 'keywords' } - = gl_badge_tag topic[:title] - .text-nowrap.gl-p-2{ role: 'button', tabindex: 0, data: { toggle: 'popover', triggers: 'focus hover', html: 'true', placement: 'top', title: title, content: content } } - = _("+ %{count} more") % { count: project.count_of_extra_topics_not_shown } + - if project.has_extra_topics? + - title = _('More topics') + - content = capture do + %span.gl-display-inline-flex.gl-flex-wrap + - project.topics_not_shown.each do |topic| + - explore_project_topic_path = topic_explore_projects_path(topic_name: topic[:name]) + - if topic[:title].length > max_project_topic_length + %a.gl-mr-3.gl-mb-3.has-tooltip{ data: { container: "body" }, title: topic[:title], href: explore_project_topic_path, itemprop: 'keywords' } + = gl_badge_tag truncate(topic[:title], length: max_project_topic_length) + - else + %a.gl-mr-3.gl-mb-3{ href: explore_project_topic_path, itemprop: 'keywords' } + = gl_badge_tag topic[:title] + .text-nowrap.gl-p-2{ role: 'button', tabindex: 0, data: { toggle: 'popover', triggers: 'focus hover', html: 'true', placement: 'top', title: title, content: content } } + = _("+ %{count} more") % { count: project.count_of_extra_topics_not_shown } -- cgit v1.2.1