generated from OpenSourcePolitics/decidim-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Hotfix remove endorsement list from proposals (#39)
* fix: Override proposals show view * doc: Add entry to OVERLOADS.md * fix: Remove endorsers list in proposal show view * fix: Ignore false positive missing keys for proposal
- Loading branch information
1 parent
9645fd2
commit 6fd5fef
Showing
3 changed files
with
145 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
# Overrides | ||
|
||
## Remove endorsers list from proposals | ||
* `app/views/decidim/proposals/proposals/show.html.erb` | ||
|
||
## 28c8d74 - Add basic tests to reference package (#1), 2021-07-26 | ||
* `lib/extends/commands/decidim/admin/create_participatory_space_private_user_extends.rb` | ||
* `lib/extends/commands/decidim/admin/impersonate_user_extends.rb` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
<% add_decidim_meta_tags({ | ||
description: present(@proposal).body, | ||
title: present(@proposal).title, | ||
url: proposal_url(@proposal.id) | ||
}) %> | ||
|
||
<% | ||
edit_link( | ||
resource_locator(@proposal).edit, | ||
:edit, | ||
:proposal, | ||
proposal: @proposal | ||
) | ||
%> | ||
|
||
<% | ||
extra_admin_link( | ||
resource_locator(@proposal).show(anchor: "proposal-answer"), | ||
:create, | ||
:proposal_answer, | ||
{ proposal: @proposal }, | ||
{ name: t(".answer"), icon: "comment-square" } | ||
) | ||
%> | ||
|
||
<%= render partial: "voting_rules" %> | ||
<% if component_settings.participatory_texts_enabled? %> | ||
<div class="row column"> | ||
<div class="section text-medium"> | ||
<%= t(".back_to") %> <u><%= link_to translated_attribute(@participatory_text.title), main_component_path(current_component) %></u> | ||
</div> | ||
</div> | ||
<% end %> | ||
<%= emendation_announcement_for @proposal %> | ||
<div class="row column view-header"> | ||
|
||
<div class="m-bottom"> | ||
<%= link_to proposals_path, class: "small hollow js-back-to-list" do %> | ||
<%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %> | ||
<%= t(".back_to_list") %> | ||
<% end %> | ||
</div> | ||
|
||
<% if @proposal.emendation? %> | ||
<h2 class="heading3"><%= t(".changes_at_title", title: present(@proposal.amendable).title(links: true, html_escape: true)) %></h2> | ||
<% else %> | ||
<h2 class="heading3"><%= present(@proposal).title(links: true, html_escape: true) %></h2> | ||
<% end %> | ||
<% unless component_settings.participatory_texts_enabled? %> | ||
<%= cell("decidim/coauthorships", @proposal, has_actions: true, size: 3, context: { current_user: current_user }) %> | ||
<% end %> | ||
</div> | ||
<div class="row"> | ||
<div class="columns mediumlarge-8 large-9"> | ||
<div class="section"> | ||
<% if @proposal.emendation? %> | ||
<%= cell("decidim/diff", proposal_presenter.versions.last) %> | ||
<% elsif not ["section","subsection"].include? @proposal.participatory_text_level %> | ||
<%== cell("decidim/proposals/proposal_m", @proposal, full_badge: true).badge %> | ||
<%= render_proposal_body(@proposal) %> | ||
<% end %> | ||
<% if component_settings.geocoding_enabled? %> | ||
<%= render partial: "decidim/shared/static_map", locals: { icon_name: "proposals", geolocalizable: @proposal } %> | ||
<% end %> | ||
<% if proposal_has_costs? && current_settings.answers_with_costs? %> | ||
<%= cell("decidim/proposals/cost_report", @proposal) %> | ||
<% end %> | ||
<%= cell "decidim/proposals/proposal_tags", @proposal %> | ||
</div> | ||
|
||
<%= cell("decidim/announcement", proposal_reason_callout_announcement, callout_class: proposal_reason_callout_class) if @proposal.answered? && @proposal.published_state? %> | ||
|
||
<%= linked_resources_for @proposal, :results, "included_proposals" %> | ||
<%= linked_resources_for @proposal, :projects, "included_proposals" %> | ||
<%= linked_resources_for @proposal, :meetings, "proposals_from_meeting" %> | ||
<%= linked_resources_for @proposal, :proposals, "copied_from_component" %> | ||
|
||
<%#= cell "decidim/endorsers_list", @proposal %> | ||
<%= amendments_for @proposal %> | ||
</div> | ||
<div class="columns section view-side mediumlarge-4 large-3"> | ||
<% if @proposal.amendable? && allowed_to?(:edit, :proposal, proposal: @proposal) %> | ||
<%= link_to t(".edit_proposal"), edit_proposal_path(@proposal), class: "button hollow expanded button--sc" %> | ||
<% else %> | ||
<%= amend_button_for @proposal %> | ||
<% end %> | ||
|
||
<%= emendation_actions_for @proposal %> | ||
|
||
<% if current_settings.votes_enabled? || show_endorsements_card? || current_user %> | ||
<% if @proposal.withdrawn? %> | ||
<div class="card"> | ||
<div class="card__content"> | ||
<% if current_settings.votes_enabled? %> | ||
<%= render partial: "votes_count", locals: { proposal: @proposal, from_proposals_list: false } %> | ||
<% end %> | ||
</div> | ||
</div> | ||
<% else %> | ||
<div class="card"> | ||
<div class="card__content"> | ||
<% if current_settings.votes_enabled? %> | ||
<%= render partial: "votes_count", locals: { proposal: @proposal, from_proposals_list: false } %> | ||
<%= render partial: "vote_button", locals: { proposal: @proposal, from_proposals_list: false } %> | ||
<% end %> | ||
<div class="row collapse buttons__row"> | ||
<% if endorsements_enabled? %> | ||
<div class="column small-9 collapse"> | ||
<%= endorsement_buttons_cell(@proposal) %> | ||
</div> | ||
<% end %> | ||
<div class="column collapse <%= endorsements_enabled? ? "small-3" : "" %>"> | ||
<%= link_to "#comments", class: "button small compact hollow secondary button--nomargin expanded" do %> | ||
<span class="show-for-sr"><%= present(@proposal).title(html_escape: true) %></span> | ||
<%= icon "comment-square", class: "icon--small", aria_label: t(".comments"), role: "img" %> <%= @proposal.comments_count %> | ||
<% end %> | ||
</div> | ||
</div> | ||
<br> | ||
<%= follow_button_for(@proposal) %> | ||
</div> | ||
</div> | ||
<% end %> | ||
<% end %> | ||
|
||
<%= amenders_list_for(@proposal) %> | ||
|
||
<%= resource_reference(@proposal) %> | ||
<%= resource_version(proposal_presenter, versions_path: proposal_versions_path(@proposal)) %> | ||
<%= cell("decidim/fingerprint", @proposal) %> | ||
<%= render partial: "decidim/shared/share_modal", locals: { resource: @proposal } %> | ||
<%= embed_modal_for proposal_widget_url(@proposal, format: :js) %> | ||
<%= cell "decidim/proposals/proposal_link_to_collaborative_draft", @proposal %> | ||
<%= cell "decidim/proposals/proposal_link_to_rejected_emendation", @proposal %> | ||
</div> | ||
</div> | ||
<%= attachments_for @proposal %> | ||
|
||
<%= comments_for @proposal %> | ||
|
||
<%= cell("decidim/flag_modal", @proposal) %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters