Commit f9338e37 authored by Angelo Gulina's avatar Angelo Gulina Committed by Andrew Fontaine

Add empty state to Deploy Keys admin section

- add empty state partial inspired by GitLab UI empty state regions
- harmonize action button appereance
parent a2a272b0
- page_title _('Deploy Keys') - page_title _('Deploy Keys')
%h3.page-title.deploy-keys-title
= _('Public deploy keys (%{deploy_keys_count})') % { deploy_keys_count: @deploy_keys.load.size }
.float-right
= link_to _('New deploy key'), new_admin_deploy_key_path, class: 'btn btn-success btn-sm btn-inverted'
- if @deploy_keys.any? - if @deploy_keys.any?
%h3.page-title.deploy-keys-title
= _('Public deploy keys (%{deploy_keys_count})') % { deploy_keys_count: @deploy_keys.load.size }
= link_to _('New deploy key'), new_admin_deploy_key_path, class: 'float-right btn btn-success btn-md gl-button'
.table-holder.deploy-keys-list .table-holder.deploy-keys-list
%table.table %table.table
%thead %thead
...@@ -32,3 +29,5 @@ ...@@ -32,3 +29,5 @@
.float-right .float-right
= link_to _('Edit'), edit_admin_deploy_key_path(deploy_key), class: 'btn btn-sm' = link_to _('Edit'), edit_admin_deploy_key_path(deploy_key), class: 'btn btn-sm'
= link_to _('Remove'), admin_deploy_key_path(deploy_key), data: { confirm: _('Are you sure?') }, method: :delete, class: 'btn btn-sm btn-remove delete-key' = link_to _('Remove'), admin_deploy_key_path(deploy_key), data: { confirm: _('Are you sure?') }, method: :delete, class: 'btn btn-sm btn-remove delete-key'
- else
= render 'shared/empty_states/deploy_keys'
.empty-state.gl-display-flex.gl-flex-direction-column.gl-flex-wrap.gl-text-center
.gl-flex-grow-0.gl-flex-shrink-0
.svg-250.svg-content
= image_tag 'illustrations/empty-state/empty-deploy-keys-lg.svg'
.gl-flex-grow-0.gl-flex-shrink-0
.text-content.gl-mx-auto.gl-my-0.gl-p-5
%h4.h4= _('Deploy keys allow read-only or read-write (if enabled) access to your repository')
%p= _('Deploy keys can be used for CI, staging or production servers. You can create a deploy key or add an existing one.')
= link_to _('New deploy key'), new_admin_deploy_key_path, class: 'btn btn-success btn-md gl-button'
---
title: Add empty state for Deploy Keys section
merge_request: 38329
author:
type: changed
...@@ -7910,9 +7910,15 @@ msgstr "" ...@@ -7910,9 +7910,15 @@ msgstr ""
msgid "Deploy key was successfully updated." msgid "Deploy key was successfully updated."
msgstr "" msgstr ""
msgid "Deploy keys allow read-only or read-write (if enabled) access to your repository"
msgstr ""
msgid "Deploy keys allow read-only or read-write (if enabled) access to your repository. Deploy keys can be used for CI, staging or production servers. You can create a deploy key or add an existing one." msgid "Deploy keys allow read-only or read-write (if enabled) access to your repository. Deploy keys can be used for CI, staging or production servers. You can create a deploy key or add an existing one."
msgstr "" msgstr ""
msgid "Deploy keys can be used for CI, staging or production servers. You can create a deploy key or add an existing one."
msgstr ""
msgid "Deploy progress not found. To see pods, ensure your environment matches %{linkStart}deploy board criteria%{linkEnd}." msgid "Deploy progress not found. To see pods, ensure your environment matches %{linkStart}deploy board criteria%{linkEnd}."
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment