Button that redirects to proposal in the proposals dashboard now:

* opens the proposal in a different tab.
* Text shown will be 'preview proposal' for proposals in draft state.
This commit is contained in:
Juan Salvador Pérez García
2018-06-29 06:44:13 +02:00
parent a2e185c221
commit 6baabf2a7e
3 changed files with 7 additions and 1 deletions

View File

@@ -40,7 +40,11 @@
</div>
<div class="proposal-link">
<%= link_to t('.show_proposal'), proposal_path(proposal), class: 'button success expanded' %>
<% if proposal.draft? %>
<%= link_to t('.preview_proposal'), proposal_path(proposal), class: 'button success expanded', target: '_blank' %>
<% else %>
<%= link_to t('.show_proposal'), proposal_path(proposal), class: 'button success expanded', target: '_blank' %>
<% end %>
</div>
</div>
</div>

View File

@@ -212,6 +212,7 @@ en:
active_resources: Active resources
community: Community
show_proposal: Show proposal
preview_proposal: Preview proposal
current_goal: Current goal
support_count:
one: "%{count} support"

View File

@@ -212,6 +212,7 @@ es:
active_resources: Recursos activos
community: Comunidad
show_proposal: Ver propuesta
preview_proposal: Previsualizar propuesta
current_goal: Meta actual
support_count:
one: "%{count} apoyo"