|
16 | 16 | .table-list |
17 | 17 | => admin.email |
18 | 18 | - if policy(@group).demote_admin? && @group.admins.length > 1 |
19 | | - = button_to demote_admin_group_path(group: @group, user: admin), method: :post, form_class: 'd-inline-block', class: 'btn btn-light btn-sm', data: {confirm: admin == current_user ? t('.demote_yourself.confirm') : t('.demote_admin.confirm')} do |
| 19 | + = button_to(demote_admin_group_path(group: @group, user: admin), method: :post, form_class: 'd-inline-block', class: 'btn btn-light btn-sm', data: {confirm: admin == current_user ? t('.demote_yourself.confirm') : t('.demote_admin.confirm')}) do |
20 | 20 | i.fa-solid.fa-arrow-down |
21 | 21 | =< (admin == current_user ? t('.button.demote_yourself') : t('.button.demote_admin')) |
22 | 22 |
|
|
30 | 30 | => member.email |
31 | 31 | - if policy(@group).edit? |
32 | 32 | - if @group.group_membership_for(member).role_confirmed_member? |
33 | | - = button_to make_admin_group_path(group: @group, user: member), method: :post, form_class: 'd-inline-block', class: 'btn btn-light btn-sm' do |
| 33 | + = button_to(make_admin_group_path(group: @group, user: member), method: :post, form_class: 'd-inline-block', class: 'btn btn-light btn-sm') do |
34 | 34 | i.fa-solid.fa-plus |
35 | 35 | =< t('.button.make_admin') |
36 | | - = button_to delete_from_group_group_path(group: @group, user: member), method: :patch, form_class: 'd-inline-block', class: 'btn btn-light btn-sm' do |
| 36 | + = button_to(delete_from_group_group_path(group: @group, user: member), method: :patch, form_class: 'd-inline-block', class: 'btn btn-light btn-sm') do |
37 | 37 | i.fa-solid.fa-xmark |
38 | 38 | =< t('common.button.remove') |
39 | 39 | - else |
|
50 | 50 | .table-list |
51 | 51 | => user.email |
52 | 52 | .btn-group.float-end |
53 | | - = button_to grant_access_group_path(group: @group, user:), method: :post, form_class: 'd-inline-block', class: 'btn btn-light btn-sm' do |
| 53 | + = button_to(grant_access_group_path(group: @group, user:), method: :post, form_class: 'd-inline-block', class: 'btn btn-light btn-sm') do |
54 | 54 | i.fa-solid.fa-plus |
55 | 55 | =< t('.button.grant_access') |
56 | | - = button_to deny_access_group_path(group: @group, user:), method: :post, form_class: 'd-inline-block', class: 'btn btn-light btn-sm' do |
| 56 | + = button_to(deny_access_group_path(group: @group, user:), method: :post, form_class: 'd-inline-block', class: 'btn btn-light btn-sm') do |
57 | 57 | i.fa-solid.fa-xmark |
58 | 58 | =< t('.button.deny_access') |
59 | 59 | - else |
|
67 | 67 | .btn-group |
68 | 68 | = link_to task.title, task_path(task), class: 'btn btn-light' |
69 | 69 | - if policy(@group).remove_task? |
70 | | - = button_to remove_task_group_path(task:), method: :patch, form_class: 'd-inline-block', class: 'btn btn-light' do |
| 70 | + = button_to(remove_task_group_path(task:), method: :patch, form_class: 'd-inline-block', class: 'btn btn-light') do |
71 | 71 | i.fa-solid.fa-xmark.text-secondary |
72 | 72 | - else |
73 | 73 | = t('.has_no_tasks') |
|
76 | 76 | .col-md-12.mb-4 |
77 | 77 | .actions.btn-group role='group' |
78 | 78 | - if policy(@group).request_access? |
79 | | - = button_to t('groups.shared.button.request_membership'), request_access_group_path(@group), method: :post, class: 'btn btn-important h-100' |
| 79 | + = button_to(t('groups.shared.button.request_membership'), request_access_group_path(@group), method: :post, class: 'btn btn-important h-100') |
80 | 80 | - if policy(@group).edit? |
81 | 81 | = link_to edit_group_path(@group), class: 'btn btn-important' do |
82 | 82 | i.fa-solid.fa-pen-to-square |
83 | 83 | =< t('common.button.edit') |
84 | | - = button_to group_path(@group), class: 'btn btn-important h-100', method: :delete, data: {confirm: t('common.sure')} do |
| 84 | + = button_to(group_path(@group), class: 'btn btn-important h-100', method: :delete, data: {confirm: t('common.sure')}) do |
85 | 85 | i.fa-solid.fa-trash-can.text-danger |
86 | 86 | =< t('.button.delete_group') |
87 | 87 | - if policy(@group).leave? |
88 | | - = button_to t('.button.leave'), leave_group_path(@group), method: :post, class: "leave-btn btn btn-important h-100 #{'disabled' if @group.last_admin?(current_user)}", data: {confirm: t('common.sure')} |
| 88 | + = button_to(t('.button.leave'), leave_group_path(@group), method: :post, class: "leave-btn btn btn-important h-100 #{'disabled' if @group.last_admin?(current_user)}", data: {confirm: t('common.sure')}) |
89 | 89 | = link_to t('common.button.back'), :back, class: 'btn btn-important' |
0 commit comments