-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1dae807
commit b6226f7
Showing
2 changed files
with
15 additions
and
6 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
app/overrides/decidim/proposals/admin/proposals/show/add_photo_management.html.erb.deface
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,3 +1,3 @@ | ||
<!-- insert_after "erb[silent]:contains('if proposal.valuators.any?')" --> | ||
<!-- insert_before "erb[silent]:contains('if proposal.photos.any?')" --> | ||
|
||
<%= render partial: "decidim/reporting_proposals/admin/proposals/photos" %> |
19 changes: 14 additions & 5 deletions
19
app/views/decidim/reporting_proposals/admin/proposals/_photos.html.erb
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,8 +1,17 @@ | ||
<% if proposal.photos.any? || component_settings.attachments_allowed? %> | ||
<div class="row column gallery__container mt-4"> | ||
<h2 class="card-title"><%= t(".title") %></h2> | ||
<% if admin_allowed_to? :edit_photos, :proposals, extra_context = { proposal: proposal }, chain = [::Decidim::ReportingProposals::Admin::Permissions] %> | ||
<%= render partial: "decidim/reporting_proposals/admin/proposals/photo_form" %> | ||
<% end %> | ||
<div class="card-section"> | ||
<div class="component__show_photos" data-component="accordion" id="accordion-photos"> | ||
<button class="card-divider-button" data-controls="panel-photos" type="button"> | ||
<%= icon "arrow-right-s-line" %> | ||
<h2 class="card-title"> | ||
<%= t(".title") %> | ||
</h2> | ||
</button> | ||
<% if admin_allowed_to? :edit_photos, :proposals, extra_context = { proposal: proposal }, chain = [::Decidim::ReportingProposals::Admin::Permissions] %> | ||
<div id="panel-photos"> | ||
<%= render partial: "decidim/reporting_proposals/admin/proposals/photo_form" %> | ||
</div> | ||
<% end %> | ||
</div> | ||
</div> | ||
<% end %> |