Open proposals dashboard links in the same window

Out of the usability issues I've experienced when using Consul
Democracy, the biggest one has arguably been the fact that the link to
edit a proposal opens in a new tab. I guess the reasoning behind it is
that the page to edit a proposal is not part of the proposals dashboard,
but what the hell! Imagine if every link to edit something opened in a
new tab...

So we're reducing the impact of this nonsense by opening most dashboard
links in the same window; for now, we're still opening in a new window
links to download files and links that might point to external websites.
We'll address those ones in the future.
This commit is contained in:
Javi Martín
2023-10-05 21:21:48 +02:00
parent ef7486ddc6
commit 0c14feee19
10 changed files with 23 additions and 33 deletions

View File

@@ -4,8 +4,7 @@
<div class="small-12 medium-9 column">
<%= link_to t("dashboard.community.access_community"),
community_path(proposal.community),
class: "button hollow",
target: "_blank" %>
class: "button hollow" %>
<% if proposal.community.latest_activity.present? %>
<p class="help-text">
<%= t("dashboard.community.latest_activity",

View File

@@ -33,8 +33,7 @@
border-radius: 6px; color: #fff !important; font-weight: bold;
padding: 17px 20px; text-align: center; text-decoration: none;
font-size: 20px; min-width: 200px; display: inline-block;
box-shadow: -4px 18px 45px -19px rgba(0,0,0,0.75);",
target: "_blank" do %>
box-shadow: -4px 18px 45px -19px rgba(0,0,0,0.75);" do %>
<%= t("dashboard.mailer.forward.support_button") %>
<% end %>
</td>

View File

@@ -35,8 +35,7 @@
style: "font-family: 'Open Sans',arial,sans-serif; background: #3700fd;
border-radius: 6px; color: #fff !important; font-weight: bold;
padding: 17px 20px; text-align: center; text-decoration: none;
font-size: 20px; min-width: 200px; display: inline-block;",
target: "_blank" do %>
font-size: 20px; min-width: 200px; display: inline-block;" do %>
<%= t("mailers.new_actions_notification_on_create.dashboard_button") %>
<% end %>
</td>

View File

@@ -52,8 +52,7 @@
style: "font-family: 'Open Sans',arial,sans-serif; background: #3700fd;" \
"border-radius: 6px; color: #fff !important; font-weight: bold;" \
"padding: 17px 20px; text-align: center; text-decoration: none;" \
"font-size: 20px; min-width: 200px; display: inline-block;",
target: "_blank" do %>
"font-size: 20px; min-width: 200px; display: inline-block;" do %>
<%= t("mailers.new_actions_notification_on_published.dashboard_button") %>
<% end %>
</td>

View File

@@ -1,10 +1,6 @@
<div id="<%= dom_id(poll) %>" class="small-12 medium-6 large-4 column end">
<div class="poll-card" data-equalizer-watch="poll-cards">
<h4>
<%= link_to poll.title,
proposal_poll_path(proposal, poll),
target: "_blank" %>
</h4>
<h4><%= link_to poll.title, proposal_poll_path(proposal, poll) %></h4>
<span class="small">
<%= l(poll.starts_at.to_date) %> - <%= l(poll.ends_at.to_date) %>
</span>
@@ -20,7 +16,7 @@
<% else %>
<%= link_to t("dashboard.polls.poll.view_results"),
results_proposal_poll_path(proposal, poll),
class: "button", target: "_blank" %>
class: "button" %>
<% end %>
</div>

View File

@@ -3,15 +3,13 @@
<% if current_editable?(proposal) %>
<%= link_to t("dashboard.index.edit_proposal_link"),
edit_proposal_path(proposal),
target: "_blank",
class: "button hollow" %>
<% end %>
<% unless proposal.retired? %>
<%= link_to t("dashboard.index.retire"),
retire_form_proposal_path(proposal),
class: "button hollow alert",
target: "_blank" %>
class: "button hollow alert" %>
<% end %>
<% if can?(:publish, proposal) %>

View File

@@ -1,5 +1,5 @@
<h3 class="proposal-title">
<%= link_to proposal.title, proposal, target: "_blank" %>
<%= link_to proposal.title, proposal %>
</h3>
<% if proposal.retired? %>

View File

@@ -47,9 +47,9 @@
<div class="small-12 column">
<div class="proposal-link">
<% if proposal.draft? %>
<%= link_to t("layouts.dashboard.proposal_totals.preview_proposal"), proposal_path(proposal), class: "button success expanded", target: "_blank" %>
<%= link_to t("layouts.dashboard.proposal_totals.preview_proposal"), proposal_path(proposal), class: "button success expanded" %>
<% else %>
<%= link_to t("layouts.dashboard.proposal_totals.show_proposal"), proposal_path(proposal), class: "button success expanded", target: "_blank" %>
<%= link_to t("layouts.dashboard.proposal_totals.show_proposal"), proposal_path(proposal), class: "button success expanded" %>
<% end %>
</div>
</div>