Commit aefd75c0 authored by Clement Ho's avatar Clement Ho

[skip ci] .input-group-btn into .input-group-prepend, .input-group-append

parent c2cbc155
...@@ -182,11 +182,11 @@ ...@@ -182,11 +182,11 @@
:value="ingressExternalIp" :value="ingressExternalIp"
readonly readonly
/> />
<span class="input-group-btn"> <span class="input-group-append">
<clipboard-button <clipboard-button
:text="ingressExternalIp" :text="ingressExternalIp"
:title="s__('ClusterIntegration|Copy Ingress IP Address to clipboard')" :title="s__('ClusterIntegration|Copy Ingress IP Address to clipboard')"
class="js-clipboard-btn" class="input-group-text js-clipboard-btn"
/> />
</span> </span>
</div> </div>
......
...@@ -312,7 +312,8 @@ ...@@ -312,7 +312,8 @@
padding: 0 5px; padding: 0 5px;
} }
.input-group-btn { .input-group-prepend,
.input-group-append {
.btn { .btn {
@include btn-middle; @include btn-middle;
......
...@@ -83,7 +83,8 @@ label { ...@@ -83,7 +83,8 @@ label {
font-family: $monospace_font; font-family: $monospace_font;
} }
.input-group-btn .btn { .input-group-prepend .btn,
.input-group-append .btn {
padding: 3px $gl-btn-padding; padding: 3px $gl-btn-padding;
background-color: $gray-light; background-color: $gray-light;
border: 1px solid $border-color; border: 1px solid $border-color;
......
...@@ -912,7 +912,8 @@ pre.light-well { ...@@ -912,7 +912,8 @@ pre.light-well {
} }
.project-tip-command { .project-tip-command {
> .input-group-btn:first-child { > .input-group-prepend:first-child,
> .input-group-append:first-child {
width: auto; width: auto;
} }
} }
......
...@@ -46,13 +46,14 @@ ...@@ -46,13 +46,14 @@
%td.import-target %td.import-target
%fieldset.row %fieldset.row
.input-group .input-group
.project-path.input-group-btn .project-path.input-group-prepend
- if current_user.can_select_namespace? .input-group-text
- selected = params[:namespace_id] || :current_user - if current_user.can_select_namespace?
- opts = current_user.can_create_group? ? { extra_group: Group.new(name: repo.owner.login, path: repo.owner.login) } : {} - selected = params[:namespace_id] || :current_user
= select_tag :namespace_id, namespaces_options(selected, opts.merge({ display_path: true })), { class: 'select2 js-select-namespace', tabindex: 1 } - opts = current_user.can_create_group? ? { extra_group: Group.new(name: repo.owner.login, path: repo.owner.login) } : {}
- else = select_tag :namespace_id, namespaces_options(selected, opts.merge({ display_path: true })), { class: 'select2 js-select-namespace', tabindex: 1 }
= text_field_tag :path, current_user.namespace_path, class: "input-large form-control", tabindex: 1, disabled: true - else
= text_field_tag :path, current_user.namespace_path, class: "input-large form-control", tabindex: 1, disabled: true
%span.input-group-prepend %span.input-group-prepend
.input-group-text / .input-group-text /
= text_field_tag :path, repo.name, class: "input-mini form-control", tabindex: 2, autofocus: true, required: true = text_field_tag :path, repo.name, class: "input-mini form-control", tabindex: 2, autofocus: true, required: true
......
...@@ -54,13 +54,14 @@ ...@@ -54,13 +54,14 @@
%td.import-target %td.import-target
%fieldset.row %fieldset.row
.input-group .input-group
.project-path.input-group-btn .project-path.input-group-prepend
- if current_user.can_select_namespace? .input-group-text
- selected = params[:namespace_id] || :current_user - if current_user.can_select_namespace?
- opts = current_user.can_create_group? ? { extra_group: Group.new(name: repo.owner, path: repo.owner) } : {} - selected = params[:namespace_id] || :current_user
= select_tag :namespace_id, namespaces_options(selected, opts.merge({ display_path: true })), { class: 'select2 js-select-namespace', tabindex: 1 } - opts = current_user.can_create_group? ? { extra_group: Group.new(name: repo.owner, path: repo.owner) } : {}
- else = select_tag :namespace_id, namespaces_options(selected, opts.merge({ display_path: true })), { class: 'select2 js-select-namespace', tabindex: 1 }
= text_field_tag :path, current_user.namespace_path, class: "input-large form-control", tabindex: 1, disabled: true - else
= text_field_tag :path, current_user.namespace_path, class: "input-large form-control", tabindex: 1, disabled: true
%span.input-group-prepend %span.input-group-prepend
.input-group-text / .input-group-text /
= text_field_tag :path, repo.name, class: "input-mini form-control", tabindex: 2, autofocus: true, required: true = text_field_tag :path, repo.name, class: "input-mini form-control", tabindex: 2, autofocus: true, required: true
......
...@@ -20,8 +20,9 @@ ...@@ -20,8 +20,9 @@
.form-group .form-group
.input-group .input-group
= text_field_tag 'created-personal-access-token', @new_personal_access_token, readonly: true, class: "form-control js-select-on-focus", 'aria-describedby' => "created-personal-access-token-help-block" = text_field_tag 'created-personal-access-token', @new_personal_access_token, readonly: true, class: "form-control js-select-on-focus", 'aria-describedby' => "created-personal-access-token-help-block"
%span.input-group-btn %span.input-group-append
= clipboard_button(text: @new_personal_access_token, title: "Copy personal access token to clipboard", placement: "left", class: "btn-default btn-clipboard") .input-group-text
= clipboard_button(text: @new_personal_access_token, title: "Copy personal access token to clipboard", placement: "left", class: "btn-default btn-clipboard")
%span#created-personal-access-token-help-block.form-text.text-muted.text-danger Make sure you save it - you won't be able to access it again. %span#created-personal-access-token-help-block.form-text.text-muted.text-danger Make sure you save it - you won't be able to access it again.
%hr %hr
......
...@@ -17,14 +17,15 @@ ...@@ -17,14 +17,15 @@
You can create a new #{name} inside this project by sending an email to the following email address: You can create a new #{name} inside this project by sending an email to the following email address:
.email-modal-input-group.input-group .email-modal-input-group.input-group
= text_field_tag :issuable_email, email, class: "monospace js-select-on-focus form-control", readonly: true = text_field_tag :issuable_email, email, class: "monospace js-select-on-focus form-control", readonly: true
.input-group-btn .input-group-append
= clipboard_button(target: '#issuable_email', class: 'btn btn-clipboard btn-transparent d-none d-sm-block') .input-group-text
= mail_to email, class: 'btn btn-clipboard btn-transparent', = clipboard_button(target: '#issuable_email', class: 'btn btn-clipboard btn-transparent d-none d-sm-block')
subject: _("Enter the #{name} title"), = mail_to email, class: 'btn btn-clipboard btn-transparent',
body: _("Enter the #{name} description"), subject: _("Enter the #{name} title"),
title: _('Send email'), body: _("Enter the #{name} description"),
data: { toggle: 'tooltip', placement: 'bottom' } do title: _('Send email'),
= sprite_icon('mail') data: { toggle: 'tooltip', placement: 'bottom' } do
= sprite_icon('mail')
%p %p
= render 'by_email_description' = render 'by_email_description'
......
...@@ -3,9 +3,10 @@ ...@@ -3,9 +3,10 @@
= label_tag(:push_to_create_tip, _("Private projects can be created in your personal namespace with:"), class: "weight-normal") = label_tag(:push_to_create_tip, _("Private projects can be created in your personal namespace with:"), class: "weight-normal")
%p.input-group.project-tip-command %p.input-group.project-tip-command
%span.input-group-btn %span
= text_field_tag :push_to_create_tip, push_to_create_project_command, class: "js-select-on-focus form-control monospace", readonly: true, aria: { label: _("Push project from command line") } = text_field_tag :push_to_create_tip, push_to_create_project_command, class: "js-select-on-focus form-control monospace", readonly: true, aria: { label: _("Push project from command line") }
%span.input-group-btn %span.input-group-append
= clipboard_button(text: push_to_create_project_command, title: _("Copy command to clipboard"), placement: "right") .input-group-text
= clipboard_button(text: push_to_create_project_command, title: _("Copy command to clipboard"), placement: "right")
%p %p
= link_to("What does this command do?", help_page_path("gitlab-basics/create-project", anchor: "push-to-create-a-new-project"), target: "_blank") = link_to("What does this command do?", help_page_path("gitlab-basics/create-project", anchor: "push-to-create-a-new-project"), target: "_blank")
...@@ -3,8 +3,9 @@ ...@@ -3,8 +3,9 @@
= s_('ClusterIntegration|Kubernetes cluster name') = s_('ClusterIntegration|Kubernetes cluster name')
.input-group .input-group
%input.form-control.cluster-name.js-select-on-focus{ value: @cluster.name, readonly: true } %input.form-control.cluster-name.js-select-on-focus{ value: @cluster.name, readonly: true }
%span.input-group-btn %span.input-group-append
= clipboard_button(text: @cluster.name, title: s_('ClusterIntegration|Copy Kubernetes cluster name'), class: 'btn-secondary') .input-group-text
= clipboard_button(text: @cluster.name, title: s_('ClusterIntegration|Copy Kubernetes cluster name'), class: 'btn-secondary')
= form_for @cluster, url: namespace_project_cluster_path(@project.namespace, @project, @cluster), as: :cluster do |field| = form_for @cluster, url: namespace_project_cluster_path(@project.namespace, @project, @cluster), as: :cluster do |field|
= form_errors(@cluster) = form_errors(@cluster)
...@@ -14,8 +15,9 @@ ...@@ -14,8 +15,9 @@
= platform_kubernetes_field.label :api_url, s_('ClusterIntegration|API URL') = platform_kubernetes_field.label :api_url, s_('ClusterIntegration|API URL')
.input-group .input-group
= platform_kubernetes_field.text_field :api_url, class: 'form-control js-select-on-focus', placeholder: s_('ClusterIntegration|API URL'), readonly: true = platform_kubernetes_field.text_field :api_url, class: 'form-control js-select-on-focus', placeholder: s_('ClusterIntegration|API URL'), readonly: true
%span.input-group-btn %span.input-group-append
= clipboard_button(text: @cluster.platform_kubernetes.api_url, title: s_('ClusterIntegration|Copy API URL'), class: 'btn-secondary') .input-group-text
= clipboard_button(text: @cluster.platform_kubernetes.api_url, title: s_('ClusterIntegration|Copy API URL'), class: 'btn-secondary')
.form-group .form-group
= platform_kubernetes_field.label :ca_cert, s_('ClusterIntegration|CA Certificate') = platform_kubernetes_field.label :ca_cert, s_('ClusterIntegration|CA Certificate')
...@@ -29,8 +31,8 @@ ...@@ -29,8 +31,8 @@
= platform_kubernetes_field.label :token, s_('ClusterIntegration|Token') = platform_kubernetes_field.label :token, s_('ClusterIntegration|Token')
.input-group .input-group
= platform_kubernetes_field.text_field :token, class: 'form-control js-cluster-token js-select-on-focus', type: 'password', placeholder: s_('ClusterIntegration|Token'), readonly: true = platform_kubernetes_field.text_field :token, class: 'form-control js-cluster-token js-select-on-focus', type: 'password', placeholder: s_('ClusterIntegration|Token'), readonly: true
%span.input-group-btn %span.input-group-append
%button.btn.btn-secondary.js-show-cluster-token{ type: 'button' } %button.btn.btn-secondary.input-group-text.js-show-cluster-token{ type: 'button' }
= s_('ClusterIntegration|Show') = s_('ClusterIntegration|Show')
= clipboard_button(text: @cluster.platform_kubernetes.token, title: s_('ClusterIntegration|Copy Token'), class: 'btn-secondary') = clipboard_button(text: @cluster.platform_kubernetes.token, title: s_('ClusterIntegration|Copy Token'), class: 'btn-secondary')
......
...@@ -30,8 +30,9 @@ ...@@ -30,8 +30,9 @@
%td %td
.input-group .input-group
= text_field_tag :domain_dns, dns_record , class: "monospace js-select-on-focus form-control", readonly: true = text_field_tag :domain_dns, dns_record , class: "monospace js-select-on-focus form-control", readonly: true
.input-group-btn .input-group-append
= clipboard_button(target: '#domain_dns', class: 'btn-default d-none d-sm-block') .input-group-text
= clipboard_button(target: '#domain_dns', class: 'btn-default d-none d-sm-block')
%p.form-text.text-muted %p.form-text.text-muted
To access this domain create a new DNS record To access this domain create a new DNS record
......
...@@ -21,15 +21,17 @@ ...@@ -21,15 +21,17 @@
= label_tag :display_name, 'Display name', class: 'col-sm-2 col-12 col-form-label' = label_tag :display_name, 'Display name', class: 'col-sm-2 col-12 col-form-label'
.col-sm-10.col-12.input-group .col-sm-10.col-12.input-group
= text_field_tag :display_name, "GitLab / #{@project.full_name}", class: 'form-control form-control-sm', readonly: 'readonly' = text_field_tag :display_name, "GitLab / #{@project.full_name}", class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-btn .input-group-append
= clipboard_button(target: '#display_name') .input-group-text
= clipboard_button(target: '#display_name')
.form-group .form-group
= label_tag :description, 'Description', class: 'col-sm-2 col-12 col-form-label' = label_tag :description, 'Description', class: 'col-sm-2 col-12 col-form-label'
.col-sm-10.col-12.input-group .col-sm-10.col-12.input-group
= text_field_tag :description, run_actions_text, class: 'form-control form-control-sm', readonly: 'readonly' = text_field_tag :description, run_actions_text, class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-btn .input-group-append
= clipboard_button(target: '#description') .input-group-text
= clipboard_button(target: '#description')
.form-group .form-group
= label_tag nil, 'Command trigger word', class: 'col-sm-2 col-12 col-form-label' = label_tag nil, 'Command trigger word', class: 'col-sm-2 col-12 col-form-label'
...@@ -45,8 +47,9 @@ ...@@ -45,8 +47,9 @@
= label_tag :request_url, 'Request URL', class: 'col-sm-2 col-12 col-form-label' = label_tag :request_url, 'Request URL', class: 'col-sm-2 col-12 col-form-label'
.col-sm-10.col-12.input-group .col-sm-10.col-12.input-group
= text_field_tag :request_url, service_trigger_url(subject), class: 'form-control form-control-sm', readonly: 'readonly' = text_field_tag :request_url, service_trigger_url(subject), class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-btn .input-group-append
= clipboard_button(target: '#request_url') .input-group-text
= clipboard_button(target: '#request_url')
.form-group .form-group
= label_tag nil, 'Request method', class: 'col-sm-2 col-12 col-form-label' = label_tag nil, 'Request method', class: 'col-sm-2 col-12 col-form-label'
...@@ -56,15 +59,17 @@ ...@@ -56,15 +59,17 @@
= label_tag :response_username, 'Response username', class: 'col-sm-2 col-12 col-form-label' = label_tag :response_username, 'Response username', class: 'col-sm-2 col-12 col-form-label'
.col-sm-10.col-12.input-group .col-sm-10.col-12.input-group
= text_field_tag :response_username, 'GitLab', class: 'form-control form-control-sm', readonly: 'readonly' = text_field_tag :response_username, 'GitLab', class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-btn .input-group-append
= clipboard_button(target: '#response_username') .input-group-text
= clipboard_button(target: '#response_username')
.form-group .form-group
= label_tag :response_icon, 'Response icon', class: 'col-sm-2 col-12 col-form-label' = label_tag :response_icon, 'Response icon', class: 'col-sm-2 col-12 col-form-label'
.col-sm-10.col-12.input-group .col-sm-10.col-12.input-group
= text_field_tag :response_icon, asset_url('gitlab_logo.png'), class: 'form-control form-control-sm', readonly: 'readonly' = text_field_tag :response_icon, asset_url('gitlab_logo.png'), class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-btn .input-group-append
= clipboard_button(target: '#response_icon') .input-group-text
= clipboard_button(target: '#response_icon')
.form-group .form-group
= label_tag nil, 'Autocomplete', class: 'col-sm-2 col-12 col-form-label' = label_tag nil, 'Autocomplete', class: 'col-sm-2 col-12 col-form-label'
...@@ -74,15 +79,17 @@ ...@@ -74,15 +79,17 @@
= label_tag :autocomplete_hint, 'Autocomplete hint', class: 'col-sm-2 col-12 col-form-label' = label_tag :autocomplete_hint, 'Autocomplete hint', class: 'col-sm-2 col-12 col-form-label'
.col-sm-10.col-12.input-group .col-sm-10.col-12.input-group
= text_field_tag :autocomplete_hint, '[help]', class: 'form-control form-control-sm', readonly: 'readonly' = text_field_tag :autocomplete_hint, '[help]', class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-btn .input-group-append
= clipboard_button(target: '#autocomplete_hint') .input-group-text
= clipboard_button(target: '#autocomplete_hint')
.form-group .form-group
= label_tag :autocomplete_description, 'Autocomplete description', class: 'col-sm-2 col-12 col-form-label' = label_tag :autocomplete_description, 'Autocomplete description', class: 'col-sm-2 col-12 col-form-label'
.col-sm-10.col-12.input-group .col-sm-10.col-12.input-group
= text_field_tag :autocomplete_description, run_actions_text, class: 'form-control form-control-sm', readonly: 'readonly' = text_field_tag :autocomplete_description, run_actions_text, class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-btn .input-group-append
= clipboard_button(target: '#autocomplete_description') .input-group-text
= clipboard_button(target: '#autocomplete_description')
%hr %hr
......
...@@ -39,8 +39,9 @@ ...@@ -39,8 +39,9 @@
= label_tag :url, 'URL', class: 'col-sm-2 col-12 col-form-label' = label_tag :url, 'URL', class: 'col-sm-2 col-12 col-form-label'
.col-sm-10.col-12.input-group .col-sm-10.col-12.input-group
= text_field_tag :url, service_trigger_url(subject), class: 'form-control form-control-sm', readonly: 'readonly' = text_field_tag :url, service_trigger_url(subject), class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-btn .input-group-append
= clipboard_button(target: '#url') .input-group-text
= clipboard_button(target: '#url')
.form-group .form-group
= label_tag nil, 'Method', class: 'col-sm-2 col-12 col-form-label' = label_tag nil, 'Method', class: 'col-sm-2 col-12 col-form-label'
...@@ -50,8 +51,9 @@ ...@@ -50,8 +51,9 @@
= label_tag :customize_name, 'Customize name', class: 'col-sm-2 col-12 col-form-label' = label_tag :customize_name, 'Customize name', class: 'col-sm-2 col-12 col-form-label'
.col-sm-10.col-12.input-group .col-sm-10.col-12.input-group
= text_field_tag :customize_name, 'GitLab', class: 'form-control form-control-sm', readonly: 'readonly' = text_field_tag :customize_name, 'GitLab', class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-btn .input-group-append
= clipboard_button(target: '#customize_name') .input-group-text
= clipboard_button(target: '#customize_name')
.form-group .form-group
= label_tag nil, 'Customize icon', class: 'col-sm-2 col-12 col-form-label' = label_tag nil, 'Customize icon', class: 'col-sm-2 col-12 col-form-label'
...@@ -67,22 +69,25 @@ ...@@ -67,22 +69,25 @@
= label_tag :autocomplete_description, 'Autocomplete description', class: 'col-sm-2 col-12 col-form-label' = label_tag :autocomplete_description, 'Autocomplete description', class: 'col-sm-2 col-12 col-form-label'
.col-sm-10.col-12.input-group .col-sm-10.col-12.input-group
= text_field_tag :autocomplete_description, run_actions_text, class: 'form-control form-control-sm', readonly: 'readonly' = text_field_tag :autocomplete_description, run_actions_text, class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-btn .input-group-append
= clipboard_button(target: '#autocomplete_description') .input-group-text
= clipboard_button(target: '#autocomplete_description')
.form-group .form-group
= label_tag :autocomplete_usage_hint, 'Autocomplete usage hint', class: 'col-sm-2 col-12 col-form-label' = label_tag :autocomplete_usage_hint, 'Autocomplete usage hint', class: 'col-sm-2 col-12 col-form-label'
.col-sm-10.col-12.input-group .col-sm-10.col-12.input-group
= text_field_tag :autocomplete_usage_hint, '[help]', class: 'form-control form-control-sm', readonly: 'readonly' = text_field_tag :autocomplete_usage_hint, '[help]', class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-btn .input-group-append
= clipboard_button(target: '#autocomplete_usage_hint') .input-group-text
= clipboard_button(target: '#autocomplete_usage_hint')
.form-group .form-group
= label_tag :descriptive_label, 'Descriptive label', class: 'col-sm-2 col-12 col-form-label' = label_tag :descriptive_label, 'Descriptive label', class: 'col-sm-2 col-12 col-form-label'
.col-sm-10.col-12.input-group .col-sm-10.col-12.input-group
= text_field_tag :descriptive_label, 'Perform common operations on GitLab project', class: 'form-control form-control-sm', readonly: 'readonly' = text_field_tag :descriptive_label, 'Perform common operations on GitLab project', class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-btn .input-group-append
= clipboard_button(target: '#descriptive_label') .input-group-text
= clipboard_button(target: '#descriptive_label')
%hr %hr
......
- project = project || @project - project = project || @project
.git-clone-holder.input-group .git-clone-holder.input-group
.input-group-btn .input-group-prepend
- if allowed_protocols_present? .input-group-text
.clone-dropdown-btn.btn - if allowed_protocols_present?
%span .clone-dropdown-btn.btn
= enabled_project_button(project, enabled_protocol) %span
- else = enabled_project_button(project, enabled_protocol)
%a#clone-dropdown.btn.clone-dropdown-btn.qa-clone-dropdown{ href: '#', data: { toggle: 'dropdown' } } - else
%span %a#clone-dropdown.btn.clone-dropdown-btn.qa-clone-dropdown{ href: '#', data: { toggle: 'dropdown' } }
= default_clone_protocol.upcase %span
= icon('caret-down') = default_clone_protocol.upcase
%ul.dropdown-menu.dropdown-menu-selectable.dropdown-menu-right.clone-options-dropdown = icon('caret-down')
%li %ul.dropdown-menu.dropdown-menu-selectable.dropdown-menu-right.clone-options-dropdown
= ssh_clone_button(project) %li
%li = ssh_clone_button(project)
= http_clone_button(project) %li
= http_clone_button(project)
= text_field_tag :project_clone, default_url_to_repo(project), class: "js-select-on-focus form-control", readonly: true, aria: { label: 'Project clone URL' } = text_field_tag :project_clone, default_url_to_repo(project), class: "js-select-on-focus form-control", readonly: true, aria: { label: 'Project clone URL' }
.input-group-btn .input-group-append
= clipboard_button(target: '#project_clone', title: _("Copy URL to clipboard"), class: "btn-secondary btn-clipboard") .input-group-text
= clipboard_button(target: '#project_clone', title: _("Copy URL to clipboard"), class: "btn-secondary btn-clipboard")
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