diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/admin/integrations/_form.html.haml | 12 | ||||
-rw-r--r-- | app/views/admin/integrations/edit.html.haml | 5 | ||||
-rw-r--r-- | app/views/admin/services/_form.html.haml | 2 | ||||
-rw-r--r-- | app/views/profiles/keys/_form.html.haml | 13 | ||||
-rw-r--r-- | app/views/profiles/keys/_key.html.haml | 41 | ||||
-rw-r--r-- | app/views/profiles/keys/_key_details.html.haml | 5 | ||||
-rw-r--r-- | app/views/profiles/keys/_key_table.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/find_file/show.html.haml | 3 | ||||
-rw-r--r-- | app/views/projects/services/_form.html.haml | 2 | ||||
-rw-r--r-- | app/views/shared/_service_settings.html.haml | 2 |
10 files changed, 60 insertions, 27 deletions
diff --git a/app/views/admin/integrations/_form.html.haml b/app/views/admin/integrations/_form.html.haml new file mode 100644 index 00000000000..aa865c3b052 --- /dev/null +++ b/app/views/admin/integrations/_form.html.haml @@ -0,0 +1,12 @@ +%h3.page-title + = @service.title + +%p= @service.description + += form_for @service, as: :service, url: admin_application_settings_integration_path, method: :put, html: { class: 'gl-show-field-errors fieldset-form integration-settings-form js-integration-settings-form', data: { 'can-test' => @service.can_test?, 'test-url' => test_admin_application_settings_integration_path(@service) } } do |form| + = render 'shared/service_settings', form: form, service: @service + + - if @service.editable? + .footer-block.row-content-block + = service_save_button(@service) + = link_to _('Cancel'), admin_application_settings_integration_path, class: 'btn btn-cancel' diff --git a/app/views/admin/integrations/edit.html.haml b/app/views/admin/integrations/edit.html.haml new file mode 100644 index 00000000000..dea0f524f03 --- /dev/null +++ b/app/views/admin/integrations/edit.html.haml @@ -0,0 +1,5 @@ +- add_to_breadcrumbs _('Integrations'), admin_application_settings_integration_path +- breadcrumb_title @service.title +- page_title @service.title, _('Integrations') + += render 'form' diff --git a/app/views/admin/services/_form.html.haml b/app/views/admin/services/_form.html.haml index 495ee6a04ea..d18e91c0b14 100644 --- a/app/views/admin/services/_form.html.haml +++ b/app/views/admin/services/_form.html.haml @@ -4,7 +4,7 @@ %p #{@service.description} template. = form_for :service, url: admin_application_settings_service_path, method: :put, html: { class: 'fieldset-form' } do |form| - = render 'shared/service_settings', form: form, subject: @service + = render 'shared/service_settings', form: form, service: @service .footer-block.row-content-block = form.submit 'Save', class: 'btn btn-success' diff --git a/app/views/profiles/keys/_form.html.haml b/app/views/profiles/keys/_form.html.haml index 63ef5eaa172..34e81285328 100644 --- a/app/views/profiles/keys/_form.html.haml +++ b/app/views/profiles/keys/_form.html.haml @@ -6,10 +6,15 @@ = f.label :key, s_('Profiles|Key'), class: 'label-bold' %p= _("Paste your public SSH key, which is usually contained in the file '~/.ssh/id_ed25519.pub' or '~/.ssh/id_rsa.pub' and begins with 'ssh-ed25519' or 'ssh-rsa'. Don't use your private SSH key.") = f.text_area :key, class: "form-control js-add-ssh-key-validation-input qa-key-public-key-field", rows: 8, required: true, placeholder: s_('Profiles|Typically starts with "ssh-ed25519 …" or "ssh-rsa …"') - .form-group - = f.label :title, _('Title'), class: 'label-bold' - = f.text_field :title, class: "form-control input-lg qa-key-title-field", required: true, placeholder: s_('Profiles|e.g. My MacBook key') - %p.form-text.text-muted= _('Name your individual key via a title') + .form-row + .col.form-group + = f.label :title, _('Title'), class: 'label-bold' + = f.text_field :title, class: "form-control input-lg qa-key-title-field", required: true, placeholder: s_('Profiles|e.g. My MacBook key') + %p.form-text.text-muted= s_('Profiles|Give your individual key a title') + + .col.form-group + = f.label :expires_at, s_('Profiles|Expires at'), class: 'label-bold' + = f.date_field :expires_at, class: "form-control input-lg qa-key-expiry-field", min: Date.tomorrow .js-add-ssh-key-validation-warning.hide .bs-callout.bs-callout-warning{ role: 'alert', aria_live: 'assertive' } diff --git a/app/views/profiles/keys/_key.html.haml b/app/views/profiles/keys/_key.html.haml index 0e94e6563fd..b227041c9de 100644 --- a/app/views/profiles/keys/_key.html.haml +++ b/app/views/profiles/keys/_key.html.haml @@ -1,24 +1,31 @@ -%li.key-list-item - .float-left.append-right-10 +%li.d-flex.align-items-center.key-list-item + .append-right-10 - if key.valid? - = icon 'key', class: 'settings-list-icon d-none d-sm-block' + - if key.expired? + %span.d-inline-block.has-tooltip{ title: s_('Profiles|Your key has expired') } + = sprite_icon('warning-solid', size: 16, css_class: 'settings-list-icon d-none d-sm-block') + - else + = sprite_icon('key', size: 16, css_class: 'settings-list-icon d-none d-sm-block ') - else - = icon 'exclamation-triangle', class: 'settings-list-icon d-none d-sm-block has-tooltip', - title: key.errors.full_messages.join(', ') + %span.d-inline-block.has-tooltip{ title: key.errors.full_messages.join(', ') } + = sprite_icon('warning-solid', size: 16, css_class: 'settings-list-icon d-none d-sm-block') - - .key-list-item-info + .key-list-item-info.w-100.float-none = link_to path_to_key(key, is_admin), class: "title" do = key.title %span.text-truncate = key.fingerprint - .last-used-at - last used: - = key.last_used_at ? time_ago_with_tooltip(key.last_used_at) : 'n/a' - .float-right - %span.key-created-at - = s_('Profiles|Created %{time_ago}'.html_safe) % { time_ago:time_ago_with_tooltip(key.created_at)} - - if key.can_delete? - = link_to path_to_key(key, is_admin), data: { confirm: _('Are you sure?')}, method: :delete, class: "btn btn-transparent prepend-left-10" do - %span.sr-only= _('Remove') - = icon('trash') + + .key-list-item-dates.d-flex.align-items-start.justify-content-between + %span.last-used-at.append-right-10 + = s_('Profiles|Last used:') + = key.last_used_at ? time_ago_with_tooltip(key.last_used_at) : _('Never') + %span.expires.append-right-10 + = s_('Profiles|Expires:') + = key.expires_at ? key.expires_at.to_date : _('Never') + %span.key-created-at + = s_('Profiles|Created %{time_ago}'.html_safe) % { time_ago:time_ago_with_tooltip(key.created_at)} + - if key.can_delete? + = link_to path_to_key(key, is_admin), data: { confirm: _('Are you sure?')}, method: :delete, class: "btn btn-transparent prepend-left-10 align-baseline" do + %span.sr-only= _('Remove') + = sprite_icon('remove', size: 16) diff --git a/app/views/profiles/keys/_key_details.html.haml b/app/views/profiles/keys/_key_details.html.haml index 02f1a267044..88deb0f11cb 100644 --- a/app/views/profiles/keys/_key_details.html.haml +++ b/app/views/profiles/keys/_key_details.html.haml @@ -12,8 +12,11 @@ %span.light= _('Created on:') %strong= @key.created_at.to_s(:medium) %li + %span.light= _('Expires:') + %strong= @key.expires_at.try(:to_s, :medium) || _('Never') + %li %span.light= _('Last used on:') - %strong= @key.last_used_at.try(:to_s, :medium) || 'N/A' + %strong= @key.last_used_at.try(:to_s, :medium) || _('Never') .col-md-8 = form_errors(@key, type: 'key') unless @key.valid? diff --git a/app/views/profiles/keys/_key_table.html.haml b/app/views/profiles/keys/_key_table.html.haml index 8b862522645..176d7a42002 100644 --- a/app/views/profiles/keys/_key_table.html.haml +++ b/app/views/profiles/keys/_key_table.html.haml @@ -1,7 +1,7 @@ - is_admin = local_assigns.fetch(:admin, false) - if @keys.any? - %ul.content-list{ data: { qa_selector: 'ssh_keys_list' } } + %ul.content-list.ssh-keys-list{ data: { qa_selector: 'ssh_keys_list' } } = render partial: 'profiles/keys/key', collection: @keys, locals: { is_admin: is_admin } - else %p.settings-message.text-center diff --git a/app/views/projects/find_file/show.html.haml b/app/views/projects/find_file/show.html.haml index caaf164a763..971107675ab 100644 --- a/app/views/projects/find_file/show.html.haml +++ b/app/views/projects/find_file/show.html.haml @@ -23,4 +23,5 @@ = _('There are no matching files') %p.text-secondary = _('Try using a different search term to find the file you are looking for.') - = spinner nil, true + .text-center.prepend-top-default.loading + .spinner.spinner-md diff --git a/app/views/projects/services/_form.html.haml b/app/views/projects/services/_form.html.haml index 582f3d6fce4..a0d9d29a7ae 100644 --- a/app/views/projects/services/_form.html.haml +++ b/app/views/projects/services/_form.html.haml @@ -11,7 +11,7 @@ %p= @service.detailed_description .col-lg-9 = form_for(@service, as: :service, url: project_service_path(@project, @service.to_param), method: :put, html: { class: 'gl-show-field-errors integration-settings-form js-integration-settings-form', data: { 'can-test' => @service.can_test?, 'test-url' => test_project_service_path(@project, @service) } }) do |form| - = render 'shared/service_settings', form: form, subject: @service + = render 'shared/service_settings', form: form, service: @service - if @service.editable? .footer-block.row-content-block = service_save_button(@service) diff --git a/app/views/shared/_service_settings.html.haml b/app/views/shared/_service_settings.html.haml index 4415c654ab9..aeda7ea9909 100644 --- a/app/views/shared/_service_settings.html.haml +++ b/app/views/shared/_service_settings.html.haml @@ -1,7 +1,7 @@ = form_errors(@service) - if lookup_context.template_exists?('help', "projects/services/#{@service.to_param}", true) - = render "projects/services/#{@service.to_param}/help", subject: subject + = render "projects/services/#{@service.to_param}/help", subject: @service - elsif @service.help.present? .info-well .well-segment |