forked from fixin.me/fixin.me
Replace non-GET links with buttons
This commit is contained in:
@@ -14,17 +14,15 @@
|
||||
<div class="app-menu">
|
||||
<% if user_signed_in? %>
|
||||
<% if current_user_disguised? %>
|
||||
<%= image_link_to t(:revert), "incognito-off", revert_users_path,
|
||||
data: {turbo: true, turbo_method: :post} %>
|
||||
<%= image_button_to t(:revert), "incognito-off", revert_users_path %>
|
||||
<% else %>
|
||||
<%= image_link_to t(:sign_out), "logout", destroy_user_session_path,
|
||||
data: {turbo: true, turbo_method: :delete} %>
|
||||
<%= image_button_to t(:sign_out), "logout", destroy_user_session_path, method: :delete %>
|
||||
<% end %>
|
||||
<%= image_link_to current_user.email, "account-wrench-outline",
|
||||
edit_user_registration_path, current: :hide %>
|
||||
edit_user_registration_path, current: :hide %>
|
||||
<% else %>
|
||||
<%= image_link_to t(:register), "account-plus-outline", new_user_registration_path,
|
||||
current: :hide %>
|
||||
current: :hide %>
|
||||
<%= image_link_to t(:sign_in), "login", new_user_session_path, current: :hide %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -18,8 +18,9 @@
|
||||
</td>
|
||||
<td><%= user.created_at.to_fs(:db_without_sec) %></td>
|
||||
<td class="actions">
|
||||
<%= image_link_to t(".disguise"), "incognito", disguise_user_path(user),
|
||||
data: {turbo: true, turbo_method: :post} if allow_disguise?(user) %>
|
||||
<% if allow_disguise?(user) %>
|
||||
<%= image_button_to t(".disguise"), "incognito", disguise_user_path(user) %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
request.referer.present? ? :back : root_url %>
|
||||
</div>
|
||||
<div class="right">
|
||||
<%= image_link_to t(".delete"), "account-remove-outline", user_registration_path,
|
||||
class: "dangerous",
|
||||
data: { turbo: true, turbo_method: :delete, turbo_confirm: t(".confirm_delete") } %>
|
||||
<%# TODO: make confirm dialog work %>
|
||||
<%= image_button_to t(".delete"), "account-remove-outline", user_registration_path,
|
||||
class: "dangerous", method: :delete, data: {confirm: t(".confirm_delete")} %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user