Files
nairobi/app/views/dashboard/polls/index.html.erb
Javi Martín f21eca4ccc Open custom dashboard links in the same window
We were opening these links in a new tab/window because we assume they
were external links.

But, on the one hand, we don't even know whether these links are
external, since they could also point to URLs from our site. And, on the
other hand, opening external links in new windows results in usability
issues as well [1, 2].

On top of that, old browsers have security issues when opening links in
new tabs unless we add `rel="noopener"` [3], and we aren't doing so.

[1] https://www.nngroup.com/articles/new-browser-windows-and-tabs
[2] https://css-tricks.com/use-target_blank
[3] https://mathiasbynens.github.io/rel-noopener/
2023-10-24 16:31:39 +02:00

26 lines
919 B
Plaintext

<% content_for :action_title, t("dashboard.polls.index.title") %>
<div class="row expanded">
<div class="small-12 medium-9 column">
<%= Setting["proposals.poll_description"] %>
<% if @polls.any? %>
<div class="row expanded margin-top" data-equalizer="poll-cards" data-equalize-on="medium">
<%= render @polls %>
</div>
<% end %>
</div>
<div class="small-12 medium-3 column">
<% if Setting["proposals.poll_link"].present? %>
<h4><%= t("dashboard.polls.index.links") %></h4>
<%= link_to t("dashboard.polls.index.additiontal_information"),
Setting["proposals.poll_link"] %>
<% end %>
<p><strong><%= t("dashboard.polls.index.count", count: @polls.count) %></strong></p>
<%= link_to t("dashboard.polls.index.create"),
new_proposal_dashboard_poll_path(proposal),
class: "button expanded" %>
</div>
</div>