Open moderation links in the same window

Note that, unlike what we did in the admin section we're opening links
to budget investments on the same tab. There are two reasons for it; the
first one is that, in this case, there are no filters in the moderation
section that are lost after editing an investment, and the second one is
that, in this context, administrators usually don't go to the investment
in order to edit it, so they can just check something and use the
browser's back button to go back.
This commit is contained in:
Javi Martín
2023-10-08 22:12:23 +02:00
parent 5c7d87f763
commit 3753c42ab2
5 changed files with 5 additions and 5 deletions

View File

@@ -14,7 +14,7 @@
<%= link_to investment.title, admin_budget_budget_investment_path( <%= link_to investment.title, admin_budget_budget_investment_path(
budget_id: investment.budget_id, budget_id: investment.budget_id,
id: investment.id id: investment.id
), target: "_blank" %> ) %>
<br> <br>
<span class="date"><%= l investment.updated_at.to_date %></span> <span class="date"><%= l investment.updated_at.to_date %></span>
<span class="bullet">&nbsp;&bull;&nbsp;</span> <span class="bullet">&nbsp;&bull;&nbsp;</span>

View File

@@ -12,7 +12,7 @@
<tr id="comment_<%= comment.id %>"> <tr id="comment_<%= comment.id %>">
<td> <td>
<%= comment.commentable_type.constantize.model_name.human %> - <%= comment.commentable_type.constantize.model_name.human %> -
<%= link_to comment.commentable.title, commentable_path(comment), target: "_blank" %> <%= link_to comment.commentable.title, commentable_path(comment) %>
<br> <br>
<span class="date"><%= l comment.updated_at.to_date %></span> <span class="date"><%= l comment.updated_at.to_date %></span>
<span class="bullet">&nbsp;&bull;&nbsp;</span> <span class="bullet">&nbsp;&bull;&nbsp;</span>

View File

@@ -11,7 +11,7 @@
<% @debates.each do |debate| %> <% @debates.each do |debate| %>
<tr id="debate_<%= debate.id %>"> <tr id="debate_<%= debate.id %>">
<td> <td>
<%= link_to debate.title, debate, target: "_blank" %> <%= link_to debate.title, debate %>
<br> <br>
<span class="date"><%= l debate.updated_at.to_date %></span> <span class="date"><%= l debate.updated_at.to_date %></span>
<span class="bullet">&nbsp;&bull;&nbsp;</span> <span class="bullet">&nbsp;&bull;&nbsp;</span>

View File

@@ -11,7 +11,7 @@
<% @proposal_notifications.each do |proposal_notification| %> <% @proposal_notifications.each do |proposal_notification| %>
<tr id="proposal_notification_<%= proposal_notification.id %>"> <tr id="proposal_notification_<%= proposal_notification.id %>">
<td> <td>
<%= link_to proposal_notification.title, proposal_notification, target: "_blank" %> <%= link_to proposal_notification.title, proposal_notification %>
<br> <br>
<span class="date"><%= l proposal_notification.updated_at.to_date %></span> <span class="date"><%= l proposal_notification.updated_at.to_date %></span>
<br> <br>

View File

@@ -11,7 +11,7 @@
<% @proposals.each do |proposal| %> <% @proposals.each do |proposal| %>
<tr id="proposal_<%= proposal.id %>"> <tr id="proposal_<%= proposal.id %>">
<td> <td>
<%= link_to proposal.title, proposal, target: "_blank" %> <%= link_to proposal.title, proposal %>
<br> <br>
<span class="date"><%= l proposal.updated_at.to_date %></span> <span class="date"><%= l proposal.updated_at.to_date %></span>
<span class="bullet">&nbsp;&bull;&nbsp;</span> <span class="bullet">&nbsp;&bull;&nbsp;</span>