diff options
Diffstat (limited to 'app/views/admin/groups')
-rw-r--r-- | app/views/admin/groups/_form.html.haml | 6 | ||||
-rw-r--r-- | app/views/admin/groups/_group.html.haml | 6 | ||||
-rw-r--r-- | app/views/admin/groups/index.html.haml | 3 |
3 files changed, 10 insertions, 5 deletions
diff --git a/app/views/admin/groups/_form.html.haml b/app/views/admin/groups/_form.html.haml index 7adba0d023b..20ee8c9f310 100644 --- a/app/views/admin/groups/_form.html.haml +++ b/app/views/admin/groups/_form.html.haml @@ -36,9 +36,11 @@ = render 'shared/group_tips' .gl-mt-5 = f.submit _('Create group'), pajamas_button: true - = link_to _('Cancel'), admin_groups_path, class: "gl-button btn btn-default btn-cancel" + = render Pajamas::ButtonComponent.new(href: admin_groups_path) do + = _('Cancel') - else .gl-mt-5 = f.submit _('Save changes'), data: { qa_selector: 'save_changes_button' }, pajamas_button: true - = link_to _('Cancel'), admin_group_path(@group), class: "gl-button btn btn-cancel" + = render Pajamas::ButtonComponent.new(href: admin_group_path(@group)) do + = _('Cancel') diff --git a/app/views/admin/groups/_group.html.haml b/app/views/admin/groups/_group.html.haml index a1afb1ddbfa..f9ebda2bc21 100644 --- a/app/views/admin/groups/_group.html.haml +++ b/app/views/admin/groups/_group.html.haml @@ -31,5 +31,7 @@ = visibility_level_icon(group.visibility_level) .controls.gl-flex-shrink-0.gl-ml-5 - = link_to _('Edit'), admin_group_edit_path(group), id: "edit_#{dom_id(group)}", class: 'btn gl-button btn-default' - = link_to _('Delete'), [:admin, group], aria: { label: _('Remove') }, data: { confirm: _("Are you sure you want to remove %{group_name}?") % { group_name: group.name }, confirm_btn_variant: 'danger' }, method: :delete, class: 'gl-button btn btn-danger' + = render Pajamas::ButtonComponent.new(href: admin_group_edit_path(group), button_options: { id: "edit_#{dom_id(group)}" }) do + = _('Edit') + = render Pajamas::ButtonComponent.new(href: [:admin, group], variant: :danger, button_options: { data: { confirm: _("Are you sure you want to remove %{group_name}?") % { group_name: group.name }, confirm_btn_variant: 'danger', method: :delete } }) do + = _('Delete') diff --git a/app/views/admin/groups/index.html.haml b/app/views/admin/groups/index.html.haml index 2ea5890be2c..2a49b9c5ad8 100644 --- a/app/views/admin/groups/index.html.haml +++ b/app/views/admin/groups/index.html.haml @@ -1,4 +1,5 @@ - page_title _("Groups") +- add_page_specific_style 'page_bundles/search' .top-area .gl-mt-3.gl-mb-3 @@ -9,7 +10,7 @@ = search_field_tag :name, params[:name].presence, class: "form-control search-text-input js-search-input", autofocus: true, spellcheck: false, placeholder: 'Search by name', data: { qa_selector: 'group_search_field' } = sprite_icon('search', css_class: 'search-icon') = render "shared/groups/dropdown", options_hash: admin_groups_sort_options_hash - = link_to new_admin_group_path, class: "gl-button btn btn-confirm" do + = render Pajamas::ButtonComponent.new(variant: :confirm, href: new_admin_group_path) do = _('New group') %ul.content-list = render @groups |