Skip to content

Commit

Permalink
Merge pull request #5140 from consul/legislation-proposals
Browse files Browse the repository at this point in the history
Remove unused code from Legislation proposals
  • Loading branch information
taitus committed Jun 27, 2023
2 parents ab698a7 + d2b1817 commit f001f07
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions app/views/legislation/proposals/_proposal.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@
</div>

<div id="<%= dom_id(proposal) %>_votes" class="small-12 medium-3 column">
<%= render "legislation/proposals/votes",
{ proposal: proposal, vote_url: vote_legislation_process_proposal_path(proposal.legislation_process_id, proposal, value: "yes") } %>
<%= render Legislation::Proposals::VotesComponent.new(proposal) %>
</div>
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion app/views/legislation/proposals/_votes.html.erb

This file was deleted.

3 changes: 1 addition & 2 deletions app/views/legislation/proposals/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@
<div class="sidebar-divider"></div>
<h2><%= t("votes.supports") %></h2>
<div id="<%= dom_id(@proposal) %>_votes">
<%= render "votes",
{ proposal: @proposal, vote_url: vote_legislation_process_proposal_path(@proposal.legislation_process_id, @proposal, value: "yes") } %>
<%= render Legislation::Proposals::VotesComponent.new(@proposal) %>
</div>
<%= render "shared/social_share",
share_title: t("proposals.show.share"),
Expand Down
3 changes: 2 additions & 1 deletion app/views/legislation/proposals/vote.js.erb
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
$("#<%= dom_id(@proposal) %>_votes").html("<%= j render("legislation/proposals/votes", proposal: @proposal) %>");
$("#<%= dom_id(@proposal) %>_votes")
.html("<%= j render Legislation::Proposals::VotesComponent.new(@proposal) %>");

0 comments on commit f001f07

Please sign in to comment.