decidim-posts 2.0.1 → 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
|
@@ -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| %>
|
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
|