Merge pull request #86 from medialab-prado/fixes-1
A couple of small fixes
This commit is contained in:
@@ -41,8 +41,15 @@ module CommentsHelper
|
||||
end
|
||||
|
||||
def commentable_path(comment)
|
||||
if comment.commentable_type == "Budget::Investment"
|
||||
budget_investment_path(comment.commentable.budget_id, comment.commentable)
|
||||
commentable = 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
|
||||
comment.commentable
|
||||
end
|
||||
|
||||
@@ -6,12 +6,4 @@ module LegislationHelper
|
||||
def format_date_for_calendar_form(date)
|
||||
l(date, format: "%d/%m/%Y") if date
|
||||
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
|
||||
|
||||
@@ -5,10 +5,6 @@
|
||||
<h3 class="headline-small"><%= process.title %></h3>
|
||||
</div>
|
||||
<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>
|
||||
|
||||
|
||||
@@ -7,10 +7,6 @@
|
||||
</h2>
|
||||
</div>
|
||||
<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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user