decidim-posts 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a32dbea8c50c20a8fdc8e1cd013afa1ea1eaa111f1e33c5b613c0712d597ee61
|
4
|
+
data.tar.gz: ebcbb460f42f4f47de30343e3e21b970eca7a1345e2c22c4bfb98e68866250f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '080a5ffb87de74507a545c5b589534c08aabd2fd3f34199bce29076affc7b520bebe7a651e7e06c60397a9cfd5e094d7e846f2e851809b6580d61d7aa7542dcf'
|
7
|
+
data.tar.gz: 4a464c768007672992bc7879f3d6ff1927a128e6764722f8dbca5b2b22854eebbe4c7f6481bbd75edfd79c22ea2329d96bc3197011296d066c3994d72a5052ab
|
data/README.md
CHANGED
@@ -15,7 +15,10 @@ module Decidim
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def available_feeds
|
18
|
-
@available_feeds ||= Decidim::Component
|
18
|
+
@available_feeds ||= Decidim::Component
|
19
|
+
.where(manifest_name: "posts")
|
20
|
+
.where(participatory_space: current_organization.participatory_spaces)
|
21
|
+
|
19
22
|
end
|
20
23
|
end
|
21
24
|
end
|
@@ -3,9 +3,9 @@
|
|
3
3
|
|
4
4
|
<div class="flex flex-col items-center">
|
5
5
|
<ul id="galleryItems_<%= post.id %>" class="posts__post_gallery flex overflow-hidden">
|
6
|
-
<% post.attachments.select { |a| a.
|
7
|
-
<li class="<%= attachment.
|
8
|
-
<% if attachment.
|
6
|
+
<% post.attachments.select { |a| a.file_type.match(/(jpg|jpeg|png|svg|webp|mp4|webm)$/i) }.each_with_index do |attachment, index| %>
|
7
|
+
<li class="<%= attachment.file_type.match(/(mp4|webm)$/i) ? 'video' : 'image' %> <%= index.zero? ? 'active' : '' %> aspect-[4/3] overflow-hidden flex justify-center items-center" data-src="<%= attachment.url %>">
|
8
|
+
<% if attachment.file_type.match(/(mp4|webm)$/i) %>
|
9
9
|
<%= video_tag(attachment.url, class: "object-cover w-full h-full", controls: true, preload: "auto") %>
|
10
10
|
<% else %>
|
11
11
|
<div class="w-full h-full flex justify-center items-center">
|
@@ -15,10 +15,10 @@
|
|
15
15
|
</li>
|
16
16
|
<% end %>
|
17
17
|
</ul>
|
18
|
-
<% if post.attachments.select { |a| a.
|
18
|
+
<% if post.attachments.select { |a| a.file_type.match(/(jpg|jpeg|png|svg|webp|mp4|webm)$/i) }.count > 1 %>
|
19
19
|
<div id="navDots_<%= post.id %>" class="nav-dots p-1 flex flex-wrap justify-center">
|
20
|
-
<% total = post.attachments.select { |a| a.
|
21
|
-
<% post.attachments.select { |a| a.
|
20
|
+
<% total = post.attachments.select { |a| a.file_type.match(/(jpg|jpeg|png|svg|webp|mp4|webm)$/i) }.count %>
|
21
|
+
<% post.attachments.select { |a| a.file_type.match(/(jpg|jpeg|png|svg|webp|mp4|webm)$/i) }.each_with_index do |_, index| %>
|
22
22
|
<div class="posts__post_gallery_nav_dot flex justify-center items-center cursor-pointer h-6 w-6" role="button" aria-label="<%= t('decidim.components.posts.gallery.navigation', number: index + 1, total: total) %>" data-target="galleryItems_<%= post.id %>" data-index="<%= index %>">
|
23
23
|
<span class="h-2 w-2 rounded-full ring-1 ring-offset-1 ring-feeds-notification <%= index.zero? ? 'bg-feeds-notification' : '' %>"></span>
|
24
24
|
</div>
|
@@ -26,7 +26,7 @@
|
|
26
26
|
</div>
|
27
27
|
<% end %>
|
28
28
|
</div>
|
29
|
-
<% non_media_attachments = post.attachments.reject { |a| a.
|
29
|
+
<% non_media_attachments = post.attachments.reject { |a| a.file_type.match(/(jpg|jpeg|png|svg|webp|mp4|webm)$/i) } %>
|
30
30
|
<% if non_media_attachments.any? %>
|
31
31
|
<ul class="document-list space-y-2 mt-4">
|
32
32
|
<% non_media_attachments.each_with_index do |attachment, index| %>
|
@@ -40,7 +40,7 @@
|
|
40
40
|
<div id="posts__post_newElement_Meeting" aria-live="polite">
|
41
41
|
<%= decidim_form_for(Decidim::Meetings::MeetingForm.from_params(params).with_context(context), url: Decidim::EngineRouter.main_proxy(posts_component).meetings_path, html: { class: "meetings_form new_meeting hidden opacity-0 scale-0 motion-safe:transition-transform motion-safe:transition-opacity" }) do |form| %>
|
42
42
|
<div class="form__wrapper p-0 gap-4">
|
43
|
-
<%= render partial: "meeting_form", locals: { form: form } %>
|
43
|
+
<%= render partial: "decidim/posts/posts/meeting_form", locals: { form: form } %>
|
44
44
|
</div>
|
45
45
|
<div class="form__wrapper-block flex-col-reverse md:flex-row justify-between">
|
46
46
|
<%= form.submit "#{t("decidim.components.posts.newFeed.action")} #{icon('send-plane-line')}".html_safe, class: "sndBtn button button__sm button__transparent-primary", data: { disable: true } %>
|
@@ -51,13 +51,13 @@
|
|
51
51
|
<div id="posts__post_newElement_Post" aria-live="polite">
|
52
52
|
<%= decidim_form_for(Decidim::Posts::PostForm.from_params(params).with_context(context), url: Decidim::EngineRouter.main_proxy(posts_component).posts_path, html: { class: "posts_form new_post hidden opacity-0 scale-0 motion-safe:transition-transform motion-safe:transition-opacity" }) do |form| %>
|
53
53
|
<div class="form__wrapper p-0">
|
54
|
-
<%= render partial: "post_form", locals: { form: form } %>
|
54
|
+
<%= render partial: "decidim/posts/posts/post_form", locals: { form: form } %>
|
55
55
|
</div>
|
56
56
|
<div id="extraFieldsForSurvey" class="posts__post_newElement_Xtra relative hidden opacity-0 scale-0 motion-safe:transition-transform motion-safe:transition-opacity posts__post_newSurvey" aria-live="polite">
|
57
|
-
<%= render partial: 'new_survey', locals: { form: form } %>
|
57
|
+
<%= render partial: 'decidim/posts/posts/new_survey', locals: { form: form } %>
|
58
58
|
</div>
|
59
|
-
<%= render partial: "attachment", locals: { form: form } %>
|
60
|
-
<%= render partial: "admin_options", locals: { form: form, participatory_space: target_participatory_space } %>
|
59
|
+
<%= render partial: "decidim/posts/posts/attachment", locals: { form: form } %>
|
60
|
+
<%= render partial: "decidim/posts/posts/admin_options", locals: { form: form, participatory_space: target_participatory_space } %>
|
61
61
|
<div class="form__wrapper-block flex-col-reverse md:flex-row justify-between">
|
62
62
|
<%= form.submit "#{t("decidim.components.posts.newFeed.action")} #{icon('send-plane-line')}".html_safe, data: { disable: true }, class: "sndBtn button button__sm button__transparent-primary self-end" %>
|
63
63
|
</div>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-posts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Rusa
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-
|
12
|
+
date: 2025-06-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: decidim-core
|