@@ -395,8 +395,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.tags,
|
.tags,
|
||||||
&.geozone {
|
.geozone {
|
||||||
|
|
||||||
li {
|
li {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
@@ -478,6 +478,7 @@
|
|||||||
|
|
||||||
.tags {
|
.tags {
|
||||||
display: block;
|
display: block;
|
||||||
|
margin-bottom: 0;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
margin-right: rem-calc(6);
|
margin-right: rem-calc(6);
|
||||||
@@ -610,6 +611,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.show-actions-menu {
|
||||||
|
|
||||||
|
[class^="icon-"] {
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 04. List participation
|
// 04. List participation
|
||||||
// ----------------------
|
// ----------------------
|
||||||
|
|
||||||
|
|||||||
@@ -32,4 +32,16 @@ module ProposalsHelper
|
|||||||
Proposal::RETIRE_OPTIONS.collect { |option| [ t("proposals.retire_options.#{option}"), option ] }
|
Proposal::RETIRE_OPTIONS.collect { |option| [ t("proposals.retire_options.#{option}"), option ] }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def can_create_document?(document, proposal)
|
||||||
|
can?(:create, document) && proposal.documents.size < Proposal.max_documents_allowed
|
||||||
|
end
|
||||||
|
|
||||||
|
def author_of_proposal?(proposal)
|
||||||
|
author_of?(proposal, current_user)
|
||||||
|
end
|
||||||
|
|
||||||
|
def current_editable?(proposal)
|
||||||
|
current_user && proposal.editable_by?(current_user)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -16,24 +16,6 @@
|
|||||||
<div class="small-12 medium-9 column">
|
<div class="small-12 medium-9 column">
|
||||||
<%= back_link_to %>
|
<%= back_link_to %>
|
||||||
|
|
||||||
<% if can?(:create, @document) && @proposal.documents.size < Proposal.max_documents_allowed %>
|
|
||||||
<%= link_to t("documents.upload_document"),
|
|
||||||
new_document_path(documentable_id: @proposal, documentable_type: @proposal.class.name, from: request.url),
|
|
||||||
class: 'button hollow float-right' %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% if author_of?(@proposal, current_user) %>
|
|
||||||
<%= link_to t("proposals.show.send_notification"),
|
|
||||||
new_proposal_notification_path(proposal_id: @proposal.id),
|
|
||||||
class: 'button hollow float-right' %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% if current_user && @proposal.editable_by?(current_user) %>
|
|
||||||
<%= link_to edit_proposal_path(@proposal), class: 'edit-proposal button hollow float-right' do %>
|
|
||||||
<%= t("proposals.show.edit_proposal_link") %>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<h1><%= @proposal.title %></h1>
|
<h1><%= @proposal.title %></h1>
|
||||||
<% if @proposal.retired? %>
|
<% if @proposal.retired? %>
|
||||||
<div data-alert class="callout alert margin-top proposal-retired">
|
<div data-alert class="callout alert margin-top proposal-retired">
|
||||||
@@ -122,6 +104,35 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<aside class="small-12 medium-3 column">
|
<aside class="small-12 medium-3 column">
|
||||||
|
<% if can_create_document?(@document, @proposal) || author_of_proposal?(@proposal) || current_editable?(@proposal) %>
|
||||||
|
<div class="sidebar-divider"></div>
|
||||||
|
<h2><%= t("proposals.show.author") %></h2>
|
||||||
|
<div class="show-actions-menu">
|
||||||
|
<% if can_create_document?(@document, @proposal) %>
|
||||||
|
<%= link_to new_document_path(documentable_id: @proposal, documentable_type: @proposal.class.name, from: request.url),
|
||||||
|
class: 'button hollow expanded' do %>
|
||||||
|
<span class="icon-document"></span>
|
||||||
|
<%= t("documents.upload_document") %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% if author_of_proposal?(@proposal) %>
|
||||||
|
<%= link_to new_proposal_notification_path(proposal_id: @proposal.id),
|
||||||
|
class: 'button hollow expanded' do %>
|
||||||
|
<span class="icon-no-notification"></span>
|
||||||
|
<%= t("proposals.show.send_notification") %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% if current_editable?(@proposal) %>
|
||||||
|
<%= link_to edit_proposal_path(@proposal), class: 'edit-proposal button hollow expanded' do %>
|
||||||
|
<span class="icon-edit"></span>
|
||||||
|
<%= t("proposals.show.edit_proposal_link") %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<div class="sidebar-divider"></div>
|
<div class="sidebar-divider"></div>
|
||||||
<h2><%= t("votes.supports") %></h2>
|
<h2><%= t("votes.supports") %></h2>
|
||||||
<div id="<%= dom_id(@proposal) %>_votes">
|
<div id="<%= dom_id(@proposal) %>_votes">
|
||||||
|
|||||||
@@ -433,6 +433,7 @@ en:
|
|||||||
embed_video_title: "Video on %{proposal}"
|
embed_video_title: "Video on %{proposal}"
|
||||||
title_external_url: "Additional documentation"
|
title_external_url: "Additional documentation"
|
||||||
title_video_url: "External video"
|
title_video_url: "External video"
|
||||||
|
author: Author
|
||||||
update:
|
update:
|
||||||
form:
|
form:
|
||||||
submit_button: Save changes
|
submit_button: Save changes
|
||||||
|
|||||||
@@ -433,6 +433,7 @@ es:
|
|||||||
embed_video_title: "Vídeo en %{proposal}"
|
embed_video_title: "Vídeo en %{proposal}"
|
||||||
title_external_url: "Documentación adicional"
|
title_external_url: "Documentación adicional"
|
||||||
title_video_url: "Vídeo externo"
|
title_video_url: "Vídeo externo"
|
||||||
|
author: Autor
|
||||||
update:
|
update:
|
||||||
form:
|
form:
|
||||||
submit_button: Guardar cambios
|
submit_button: Guardar cambios
|
||||||
|
|||||||
Reference in New Issue
Block a user