Merge pull request #86 from medialab-prado/fixes-1

A couple of small fixes
This commit is contained in:
Fernando Blat
2017-01-19 11:19:12 +01:00
committed by GitHub
4 changed files with 11 additions and 20 deletions

View File

@@ -41,8 +41,15 @@ module CommentsHelper
end end
def commentable_path(comment) def commentable_path(comment)
if comment.commentable_type == "Budget::Investment" commentable = comment.commentable
budget_investment_path(comment.commentable.budget_id, comment.commentable)
case comment.commentable_type
when "Budget::Investment"
budget_investment_path(commentable.budget_id, commentable)
when "Legislation::Question"
legislation_process_question_path(commentable.process, commentable)
when "Legislation::Annotation"
legislation_process_draft_version_annotation_path(commentable.draft_version.process, commentable.draft_version, commentable)
else else
comment.commentable comment.commentable
end end

View File

@@ -6,12 +6,4 @@ module LegislationHelper
def format_date_for_calendar_form(date) def format_date_for_calendar_form(date)
l(date, format: "%d/%m/%Y") if date l(date, format: "%d/%m/%Y") if date
end end
def legislation_question_path(question)
legislation_process_question_path(question.process, question)
end
def legislation_annotation_path(annotation)
legislation_process_draft_version_annotation_path(annotation.draft_version.process, annotation.draft_version, annotation)
end
end end

View File

@@ -5,13 +5,9 @@
<h3 class="headline-small"><%= process.title %></h3> <h3 class="headline-small"><%= process.title %></h3>
</div> </div>
<div class="small-12 medium-4 column right"> <div class="small-12 medium-4 column right">
<a class="button-subscribed expanded button strong" title="Suscríbete al proceso" data-remote="true" rel="nofollow" data-method="post" href="#">
<span class="icon-checkmark-circle" aria-hidden="true"></span>
<h3>Suscrito</h3>
</a>
</div> </div>
</div> </div>
<div id="debate-show" class="row description"> <div id="debate-show" class="row description">
<div class="small-12 medium-4 column"> <div class="small-12 medium-4 column">
<h4><%= t('legislation.processes.header_full.description') %></h4> <h4><%= t('legislation.processes.header_full.description') %></h4>
@@ -31,7 +27,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="center half-gradient"> <div class="center half-gradient">
<a class="button big center button-circle" title="<%= t('.view_process_information') %>" id="js-toggle-small-debate"> <a class="button big center button-circle" title="<%= t('.view_process_information') %>" id="js-toggle-small-debate">
<span class="icon-angle-down" aria-hidden="true"></span> <span class="icon-angle-down" aria-hidden="true"></span>

View File

@@ -7,10 +7,6 @@
</h2> </h2>
</div> </div>
<div class="small-12 medium-4 column right"> <div class="small-12 medium-4 column right">
<a class="button-subscribe expanded button strong" title="Suscríbete al proceso" data-remote="true" rel="nofollow" data-method="post" href="/proposals/6-soluta-sed-sapiente-dolores/vote?value=yes">
<h3>Suscríbete al proceso</h3>
<p>Recibe notificaciones clave sobre el proceso</p>
</a>
</div> </div>
</div> </div>