Skip to content

Commit

Permalink
added to delete button top targets
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegPhenomenon committed May 26, 2023
1 parent c396629 commit ab538ab
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion app/views/admin/auctions/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<%= link_to t(:delete), admin_auction_path(@auction),
method: :delete,
data: { confirm: t(:are_you_sure) } ,
remote: true, class: "ui button secondary" %>
class: "ui button secondary", target: '_top' %>

<%- if @auction.result %>
<%= link_to t(:result_name), admin_result_path(@auction.result),
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/bans/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
</td>
<td>
<%= link_to t(:delete), admin_ban_path(ban), method: :delete,
data: { confirm: t(:are_you_sure) }, remote: true,
data: { confirm: t(:are_you_sure) }, target: '_top',
class: "ui button secondary" %>
<%= link_to t(:versions_name),
admin_ban_versions_path(ban), class: "ui button primary" %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/users/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
<%= link_to t(:edit), edit_admin_user_path(@user), class: "ui button primary" %>
<%= link_to t(:delete), admin_user_path(@user),
method: :delete, data: { confirm: t(:are_you_sure) } ,
remote: true, class: "ui button secondary" %>
class: "ui button secondary", target: '_top' %>

<%= link_to t(:versions_name), admin_user_versions_path(@user), class: "ui button primary" %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/auctions/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<%= link_to t('auctions.edit_your_offer'),
edit_offer_path(@auction.offer_from_user(current_user).uuid), class: "ui button primary" %>
<%= link_to t('auctions.delete_your_offer'),
offer_path(@auction.offer_from_user(current_user).uuid),
offer_path(@auction.offer_from_user(current_user).uuid), target: '_top',
method: :delete, data: { confirm: t(:are_you_sure) }, class: "ui button red"%>
<% elsif @auction.in_progress? %>
<%= link_to t('auctions.submit_offer'),
Expand Down
4 changes: 2 additions & 2 deletions app/views/billing_profiles/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@
<% if billing_profile.deletable? %>
<%= link_to t(:delete), billing_profile_path(billing_profile.uuid),
method: :delete, data: { confirm: t(:are_you_sure) },
remote: true, class: "ui button red" %>
class: "ui button red", target: '_top' %>
<% else %>
<%= content_tag :div, link_to(t(:delete), '#', class: "ui button secondary disabled"),
data: {tooltip: t('billing_profiles.in_use_by_offer_short'), inverted: ''} %>
data: {tooltip: t('billing_profiles.in_use_by_offer_short'), inverted: ''}, target: '_top' %>
<% end %>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/billing_profiles/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<%= link_to t(:edit), edit_billing_profile_path(@billing_profile.uuid), class: "ui button primary" %>
<%= link_to t(:delete), billing_profile_path(@billing_profile.uuid),
method: :delete, data: { confirm: t(:are_you_sure) },
remote: true, class: "ui button red" %>
class: "ui button red", target: '_top' %>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/common/_header.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</nav>
<nav class="menu-user aligned">
<% if current_user %>
<%= link_to(destroy_user_session_path, method: :delete, data: { 'turbo-method': 'delete' }) do %>
<%= link_to(destroy_user_session_path, target: '_top', method: :delete, data: { 'turbo-method': 'delete' }) do %>
<i aria-hidden="true" class="user icon"></i><%= t(:sign_out) %>
<% end %>
<% else %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/devise/registrations/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@

<h3>Cancel my account</h3>

<p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %></p>
<p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, target: '_top', method: :delete %></p>

<%= link_to "Back", :back %>
2 changes: 1 addition & 1 deletion app/views/offers/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<%= link_to t(:back), :back, class: "ui button secondary" %>
<%- if offer.uuid.present? %>
<%= link_to t('auctions.delete_your_offer'),
offer_path(offer.uuid),
offer_path(offer.uuid), target: '_top',
method: :delete, data: { confirm: t(:are_you_sure) }, class: "ui button red"%>
<% end %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/offers/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<%- else %>
<% unless offer.auction.english? %>
<%= link_to t('auctions.delete_your_offer'),
offer_path(offer.uuid),
offer_path(offer.uuid), target: '_top',
method: :delete, data: { confirm: t(:are_you_sure) }, class: "ui button red"%>
<% end %>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/offers/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

<%= link_to t(:delete), offer_path(@offer.uuid),
method: :delete, data: { confirm: t(:are_you_sure) },
remote: true, class: "ui button red" %>
class: "ui button red", target: '_top' %>
<% else %>
<%#= @offer.auction.decorate.auction_offer_button(current_user) %>
<%= link_to t('auctions.bid'), edit_english_offer_path(@offer.uuid), class: "ui button primary", style: 'margin-bottom: 20px;' %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/users/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<%= link_to t(:billing), billing_profiles_path, class: "ui button primary" %>
<%= link_to t('.delete'), user_path(@user.uuid),
method: :delete, data: { confirm: t(:are_you_sure) },
remote: true, class: "ui button red" %>
remote: true, class: "ui button red", target: '_top'%>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/wishlist_items/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
<td>
<%= link_to t(:delete), wishlist_item_path(wishlist_item.uuid),
method: :delete, data: { confirm: t(:are_you_sure) },
remote: true, class: "ui button red" %>
class: "ui button red", target: '_top' %>
</td>
<td data-turbo="true">
<%= turbo_frame_tag dom_id(wishlist_item) do %>
Expand Down

0 comments on commit ab538ab

Please sign in to comment.