decidim-posts 1.0.0 → 2.0.1
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 +4 -4
- data/README.md +60 -5
- data/app/cells/decidim/posts/content_blocks/posts/show.erb +41 -3
- data/app/cells/decidim/posts/content_blocks/posts_cell.rb +6 -7
- data/app/cells/decidim/posts/meeting/show.erb +2 -2
- data/app/cells/decidim/posts/meeting_cell.rb +5 -1
- data/app/cells/decidim/posts/post/show.erb +2 -2
- data/app/cells/decidim/posts/post/survey.erb +6 -6
- data/app/cells/decidim/posts/post_attachments/show.erb +1 -1
- data/app/cells/decidim/posts/post_cell.rb +0 -1
- data/app/cells/decidim/posts/post_comment/show.erb +1 -1
- data/app/cells/decidim/posts/post_header/show.erb +4 -4
- data/app/cells/decidim/posts/post_host/show.erb +2 -2
- data/app/cells/decidim/posts/post_metadata_cell.rb +2 -0
- data/app/cells/decidim/posts/reaction_menu/show.erb +1 -1
- data/app/controllers/decidim/posts/meetings_controller.rb +28 -12
- data/app/helpers/decidim/posts/application_helper.rb +20 -0
- data/app/packs/src/decidim/posts/host_status.js +13 -9
- data/app/packs/src/decidim/posts/posts.js +38 -1
- data/app/packs/stylesheets/decidim/posts/_variables.scss +19 -8
- data/app/packs/stylesheets/decidim/posts/posts.scss +219 -164
- data/app/views/decidim/posts/meetings/edit.html.erb +15 -14
- data/app/views/decidim/posts/meetings/new.html.erb +27 -0
- data/app/views/decidim/posts/posts/_attachment.html.erb +1 -1
- data/app/views/decidim/posts/posts/_form.html.erb +22 -22
- data/app/views/decidim/posts/posts/_index.html.erb +9 -9
- data/app/views/decidim/posts/posts/_meeting_form.erb +1 -1
- data/app/views/decidim/posts/posts/_new_survey.html.erb +1 -1
- data/app/views/decidim/posts/posts/_new_survey_question.html.erb +1 -1
- data/app/views/decidim/posts/posts/_post.html.erb +1 -1
- data/app/views/decidim/posts/posts/_sidebar.html.erb +19 -19
- data/app/views/decidim/posts/posts/edit.html.erb +7 -6
- data/app/views/decidim/posts/posts/index.html.erb +1 -1
- data/config/assets.rb +1 -1
- data/config/locales/bs.yml +11 -3
- data/config/locales/de.yml +11 -3
- data/config/locales/en.yml +11 -3
- data/config/locales/hr.yml +11 -3
- data/config/locales/it.yml +11 -3
- data/config/locales/sr.yml +11 -4
- data/config/locales/tr.yml +11 -3
- data/lib/decidim/posts/component.rb +4 -0
- data/lib/decidim/posts/content_blocks/content_blocks_homepage.rb +16 -12
- data/lib/decidim/posts/version.rb +2 -2
- metadata +5 -5
- data/app/views/decidim/posts/posts/_new.html.erb +0 -33
@@ -4,26 +4,26 @@
|
|
4
4
|
else
|
5
5
|
params[:filter_post_category]
|
6
6
|
end %>
|
7
|
-
<div id="posts__post_newElement" class="posts__post_newElement_modal" role="dialog" aria-modal="true" aria-label="<%= t("decidim.components.posts.newFeed.title") %>" data-active-feed="" data-active-filter="<%= activefilter %>">
|
8
|
-
<div class="posts__post_newElement_modal_frame">
|
9
|
-
<div class="posts__post_newElement_modal_content">
|
7
|
+
<div id="posts__post_newElement" class="posts__post_newElement_modal fixed left-0 top-0 right-0 bottom-0 w-full h-full bg-white bg-opacity-60 z-50 justify-center items-start pt-[72px] hidden" role="dialog" aria-modal="true" aria-label="<%= t("decidim.components.posts.newFeed.title") %>" data-active-feed="" data-active-filter="<%= activefilter %>">
|
8
|
+
<div class="posts__post_newElement_modal_frame p-4 gap-2 shadow shadow-feedBox rounded lg:max-w-screen-md bg-white w-[calc(100%-2rem)] max-h-[80vh] overflow-auto motion-safe:transition-all">
|
9
|
+
<div class="posts__post_newElement_modal_content flex flex-col gap-2">
|
10
10
|
<div class="close-button flex justify-end pb-2">
|
11
|
-
<button class="btn circle posts__post_newElement-closer" type="button">
|
12
|
-
<%= icon "close-circle-line" %>
|
11
|
+
<button class="btn circle posts__post_newElement-closer w-[52px] h-[52px] p-2 bg-white rounded-[52px] shadow shadow-feedMenu justify-center items-center inline-flex text-black rotate-45" type="button">
|
12
|
+
<%= icon "close-circle-line", class:'w-[36px] h-[36px] fill-feeds-sidebar rotate-45' %>
|
13
13
|
<span class="sr-only"><%= t("decidim.components.posts.newFeed.close") %></span>
|
14
14
|
</button>
|
15
15
|
</div>
|
16
16
|
<% if current_user %>
|
17
|
-
<div class="category-selection">
|
18
|
-
<% filters =
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
<% filters.each do |
|
26
|
-
<button type="button" class="button button__sm button__transparent-primary" data-category="<%=
|
17
|
+
<div class="category-selection flex gap-2 flex-wrap justify-center">
|
18
|
+
<% filters = {
|
19
|
+
post: 'home-5-line',
|
20
|
+
sharecare: 'shake-hands-line',
|
21
|
+
host: 'home-gear-line',
|
22
|
+
survey: 'draft-line',
|
23
|
+
calendar: 'calendar-line'
|
24
|
+
} %>
|
25
|
+
<% filters.each do |category, icon| %>
|
26
|
+
<button type="button" class="button button__sm button__transparent-primary border-2 hover:bg-white hover:text-black" data-category="<%= category %>" aria-pressed="false"><%= ActionController::Base.helpers.extend(Decidim::Posts::ApplicationHelper).category_label_singular(category, posts_component.settings) %></button>
|
27
27
|
<% end %>
|
28
28
|
</div>
|
29
29
|
|
@@ -38,7 +38,7 @@
|
|
38
38
|
%>
|
39
39
|
<div id="posts__post_newElement_Form-LiveRegion" class="sr-only" aria-live="polite"></div>
|
40
40
|
<div id="posts__post_newElement_Meeting" aria-live="polite">
|
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" }) do |form| %>
|
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
43
|
<%= render partial: "decidim/posts/posts/meeting_form", locals: { form: form } %>
|
44
44
|
</div>
|
@@ -49,17 +49,17 @@
|
|
49
49
|
</div>
|
50
50
|
|
51
51
|
<div id="posts__post_newElement_Post" aria-live="polite">
|
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" }) do |form| %>
|
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
54
|
<%= render partial: "decidim/posts/posts/post_form", locals: { form: form } %>
|
55
55
|
</div>
|
56
|
-
<div id="extraFieldsForSurvey" class="posts__post_newElement_Xtra posts__post_newSurvey" aria-live="polite">
|
57
|
-
<%= render partial: 'decidim/posts/posts/new_survey
|
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: 'decidim/posts/posts/new_survey', locals: { form: form } %>
|
58
58
|
</div>
|
59
|
-
<%= render partial: "decidim/posts/posts/attachment
|
60
|
-
<%= render partial: "decidim/posts/posts/admin_options
|
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
|
-
<%= 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" %>
|
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>
|
64
64
|
<% end %>
|
65
65
|
</div>
|
@@ -1,13 +1,13 @@
|
|
1
|
-
<main class="feeds__main home">
|
1
|
+
<main class="feeds__main home flex w-full xl:max-w-screen-xl 2xl:max-w-screen-2xl mx-auto p-4 lg:p-16 lg:flex-row lg:gap-4 lg:justify-between">
|
2
2
|
<!-- This is the sidebar that appears on the right side of the page -->
|
3
3
|
<%= render partial: "decidim/posts/posts/sidebar" %>
|
4
|
-
<div class="feeds__container">
|
5
|
-
<div class="feeds__body">
|
4
|
+
<div class="feeds__container order-1 grow min-h-[calc(100vh-72px)]">
|
5
|
+
<div class="feeds__body flex-grow flex flex-wrap gap-4 items-start">
|
6
6
|
<div class="card__grid-home w-full lg:grid-cols-8 xl:grid-cols-12 gap-6">
|
7
7
|
<% if current_user %>
|
8
|
-
<div class="card__grid posts__post posts__post_newElement flex-row justify-between">
|
9
|
-
<button class="btn circle posts__post_newElement-opener" aria-expanded="false" aria-controls="posts__post_newElement" aria-haspopup="
|
10
|
-
<%= icon "close-circle-line" %>
|
8
|
+
<div class="card__grid posts__post posts__post_newElement flex-row justify-between gap-4 ring-1 hover:cursor-default md:col-start-1 md:col-end-4 lg:col-start-2 lg:col-end-8 xl:col-start-2 xl:col-end-10">
|
9
|
+
<button class="btn circle posts__post_newElement-opener w-[52px] h-[52px] p-2 bg-white rounded-[52px] shadow shadow-feedMenu justify-center items-center inline-flex text-black" aria-expanded="false" aria-controls="posts__post_newElement" aria-haspopup="dialog" type="button">
|
10
|
+
<%= icon "close-circle-line", class: "w-[36px] h-[36px] fill-feeds-sidebar rotate-45 motion-safe:transition-transform" %>
|
11
11
|
<span class="sr-only"><%= t("decidim.components.posts.newFeed.openButton") %></span>
|
12
12
|
</button>
|
13
13
|
</div>
|
@@ -18,7 +18,6 @@
|
|
18
18
|
|
19
19
|
</div>
|
20
20
|
</div>
|
21
|
-
|
22
21
|
|
23
22
|
<dialog id="confirmationModal" class="p-4 shadow-md rounded-md ring-1 ring-feeds-host" aria-labelledby="confirmationModal__Label">
|
24
23
|
<div class="flex flex-col gap-4">
|
@@ -42,8 +41,9 @@
|
|
42
41
|
</dialog>
|
43
42
|
<!-- In case the Module Decidim FeedsUi is present, the form will be installed in the footer of the application -->
|
44
43
|
<% unless defined?(Decidim::FeedsUi) %>
|
45
|
-
|
46
|
-
<%=
|
44
|
+
<%#= render partial: "decidim/posts/posts/form.html" %>
|
45
|
+
<%= render partial: "form" %>
|
46
|
+
<%= append_javascript_pack_tag "decidim_posts" %>
|
47
47
|
<% end %>
|
48
48
|
</div>
|
49
49
|
</main>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<%= form.hidden_field :registration_terms, value: 'none' %>
|
6
6
|
<%= form.text_field :title, autofocus: true, class: "js-hashtags", hashtaggable: true %>
|
7
7
|
<%= text_editor_for(form, :description, hashtaggable: true) %>
|
8
|
-
<%= form.text_area :location %>
|
8
|
+
<%= form.text_area :location, required: true %>
|
9
9
|
<%= form.datetime_field :start_time %>
|
10
10
|
<%= form.datetime_field :end_time %>
|
11
11
|
<%= form.select(
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<button class="posts__post_newSurvey-btn" type="button" aria-
|
1
|
+
<button class="posts__post_newSurvey-btn flex justify-center items-center gap-2 text-black font-medium p-4 bg-feeds-bg w-full rounded" type="button" aria-controls="posts__post_newSurvey_questionsContainer">
|
2
2
|
<%= t("decidim.components.posts.newFeed.newSurvey.newQuestion") %>
|
3
3
|
<%= icon "add-line" %>
|
4
4
|
</button>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<% end %>
|
6
6
|
<div class="flex gap-2 justify-betwee py-2">
|
7
7
|
<%= form.select :question_type, options_for_select(Decidim::Posts::Question.question_types.keys.map { |key| [t("decidim.components.posts.newFeed.newSurvey.questionTypes.#{key}"), key] }), {}, class: 'form-control' %>
|
8
|
-
<button class="posts__post_newAnswer-btn button button__sm button__transparent-primary ml-auto" type="button" aria-
|
8
|
+
<button class="posts__post_newAnswer-btn button button__sm button__transparent-primary ml-auto" type="button" aria-controls="posts__post_newSurvey_answersContainer" data-question-id="NEW_RECORD">
|
9
9
|
<%= t("decidim.components.posts.newFeed.newSurvey.newAnswer") %>
|
10
10
|
<%= icon "add-line" %>
|
11
11
|
</button>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% if post.is_a?(Decidim::Posts::Post) %>
|
2
|
-
<article id="feeds_post-<%= post.id %>" class="card__grid posts__post <%= 'host-highlight' if post.highlighted %>" data-content="<%= post.category %>" <%= 'aria-live="polite"' if post.category == 'host' %>>
|
2
|
+
<article id="feeds_post-<%= post.id %>" class="card__grid posts__post gap-4 ring-1 hover:cursor-default md:col-start-1 md:col-end-4 lg:col-start-2 lg:col-end-8 xl:col-start-2 xl:col-end-10 <%= 'host-highlight' if post.highlighted %>" data-content="<%= post.category %>" <%= 'aria-live="polite"' if post.category == 'host' %>>
|
3
3
|
<% if post.category == 'host' %>
|
4
4
|
<%= cell("decidim/posts/post_host", post) %>
|
5
5
|
<% else %>
|
@@ -1,26 +1,26 @@
|
|
1
|
-
<aside class="posts__aside">
|
1
|
+
<aside class="posts__aside shrink-0 max-w-[72px] order-2 flex flex-col justify-between lg:justify-start">
|
2
2
|
<nav aria-label="<%= t("decidim.components.posts.filter.menuAriaLabel") %>">
|
3
|
-
<ul>
|
4
|
-
<% filters =
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
3
|
+
<ul class="flex flex-col space-y-4">
|
4
|
+
<% filters = {
|
5
|
+
all: 'function-line',
|
6
|
+
post: 'home-5-line',
|
7
|
+
sharecare: 'shake-hands-line',
|
8
|
+
calendar: 'calendar-line',
|
9
|
+
survey: 'draft-line',
|
10
|
+
host: 'home-gear-line'
|
11
|
+
} %>
|
12
12
|
<% posts_component = current_component.manifest_name == "posts" ? current_component : current_component.participatory_space.components.find_by(manifest_name: "posts") %>
|
13
13
|
<% current_posts_path = Decidim::EngineRouter.main_proxy(posts_component).posts_path %>
|
14
|
-
<%
|
15
|
-
'host'
|
16
|
-
else
|
17
|
-
params[:filter_post_category]
|
18
|
-
end %>
|
19
|
-
<% filters.each do |
|
14
|
+
<% if current_user.admin? %>
|
15
|
+
<% activeFilter = params[:filter_post_category].blank? ? 'host' : params[:filter_post_category] %>
|
16
|
+
<% else %>
|
17
|
+
<% activeFilter = params[:filter_post_category].blank? ? 'all' : params[:filter_post_category] %>
|
18
|
+
<% end %>
|
19
|
+
<% filters.each do |category, icon| %>
|
20
20
|
<li>
|
21
|
-
<%= link_to "#{current_posts_path}?filter_post_category=#{
|
22
|
-
<%= icon "#{
|
23
|
-
<span><%=
|
21
|
+
<%= link_to "#{current_posts_path}?filter_post_category=#{category}", class: "flex flex-col items-center font-medium text-sm md:text-md text-feeds-sidebar text-center #{activeFilter.to_s.strip == category.to_s.strip ? 'active' : ''}", data: { filter: category }, aria: { current: (activeFilter.to_s.strip == category.to_s.strip ? 'page' : nil) } do %>
|
22
|
+
<%= icon "#{icon}", class:'w-[24px] h-auto fill-feeds-sidebar' %>
|
23
|
+
<span><%= category_label(category, component_settings) %></span>
|
24
24
|
<% end %>
|
25
25
|
</li>
|
26
26
|
<% end %>
|
@@ -1,11 +1,12 @@
|
|
1
|
-
<main class="feeds__main home">
|
1
|
+
<main class="feeds__main home flex w-full xl:max-w-screen-xl 2xl:max-w-screen-2xl mx-auto p-4 lg:p-16 lg:flex-row lg:gap-4 lg:justify-between">
|
2
2
|
<!-- This is the sidebar that appears on the right side of the page -->
|
3
3
|
<%= render partial: "decidim/posts/posts/sidebar" %>
|
4
|
-
<div class="feeds__container">
|
5
|
-
<div class="feeds__body">
|
4
|
+
<div class="feeds__container order-1 grow min-h-[calc(100vh-72px)]">
|
5
|
+
<div class="feeds__body flex-grow flex flex-wrap gap-4 items-start">
|
6
6
|
<div class="card__grid-home w-full lg:grid-cols-8 xl:grid-cols-12 gap-6">
|
7
|
-
|
8
|
-
|
7
|
+
<div class="card__grid posts__post p-2 gap-4 ring-1 hover:cursor-default md:col-start-1 md:col-end-4 lg:col-start-2 lg:col-end-8 xl:col-start-2 xl:col-end-10" data-content="<%= @post.category %>">
|
8
|
+
<%= render "edit_form" %>
|
9
|
+
</div>
|
9
10
|
</div>
|
10
11
|
</div>
|
11
12
|
|
@@ -28,7 +29,7 @@
|
|
28
29
|
</dialog>
|
29
30
|
<!-- In case the Module Decidim FeedsUi is present, the form will be installed in the footer of the application -->
|
30
31
|
<% unless defined?(Decidim::FeedsUi) %>
|
31
|
-
<%= append_javascript_pack_tag "
|
32
|
+
<%= append_javascript_pack_tag "decidim_posts" %>
|
32
33
|
<% end %>
|
33
34
|
</div>
|
34
35
|
</main>
|
@@ -1 +1 @@
|
|
1
|
-
<%= render "index" %>
|
1
|
+
<%= render partial: "decidim/posts/posts/index" %>
|
data/config/assets.rb
CHANGED
@@ -4,6 +4,6 @@ base_path = File.expand_path("..", __dir__)
|
|
4
4
|
|
5
5
|
Decidim::Webpacker.register_path("#{base_path}/app/packs")
|
6
6
|
Decidim::Webpacker.register_entrypoints(
|
7
|
-
|
7
|
+
decidim_posts: "#{base_path}/app/packs/entrypoints/decidim_posts.js"
|
8
8
|
)
|
9
9
|
Decidim::Webpacker.register_stylesheet_import("stylesheets/decidim/posts/posts")
|
data/config/locales/bs.yml
CHANGED
@@ -13,8 +13,12 @@ bs:
|
|
13
13
|
actions:
|
14
14
|
preview: Pregled
|
15
15
|
content_blocks:
|
16
|
-
|
16
|
+
posts_settings:
|
17
|
+
component: Prikazani feed
|
18
|
+
posts:
|
17
19
|
name: Feed
|
20
|
+
title: Posljednji postovi
|
21
|
+
seeall: Pogledaj sve postove
|
18
22
|
actions:
|
19
23
|
title: Akcije
|
20
24
|
edit_post: Uredi post
|
@@ -95,6 +99,10 @@ bs:
|
|
95
99
|
settings:
|
96
100
|
global:
|
97
101
|
attachments_allowed?: Prilozi dopušteni
|
102
|
+
host_category_label_plural: Alternativni naslov za kategoriju Admin (Množina)
|
103
|
+
sharecare_category_label_plural: Alternativni naslov za kategoriju Podijeli & Brini (Množina)
|
104
|
+
host_category_label_singular: Alternativni naslov za kategoriju Admin (Jednina)
|
105
|
+
sharecare_category_label_singular: Alternativni naslov za kategoriju Podijeli & Brini (Jednina)
|
98
106
|
step:
|
99
107
|
endorsements_enabled: Omogući sviđanja
|
100
108
|
endorsements_blocked: Sviđanja blokirana
|
@@ -168,8 +176,8 @@ bs:
|
|
168
176
|
post_singular: Post
|
169
177
|
sharecare: Podijeli & Brini
|
170
178
|
sharecare_singular: Podijeli & Brini
|
171
|
-
host:
|
172
|
-
host_singular:
|
179
|
+
host: Admin
|
180
|
+
host_singular: Admin
|
173
181
|
calendar: Sastanci
|
174
182
|
calendar_singular: Sastanak
|
175
183
|
survey: Ankete
|
data/config/locales/de.yml
CHANGED
@@ -13,8 +13,12 @@ de:
|
|
13
13
|
actions:
|
14
14
|
preview: Vorschau
|
15
15
|
content_blocks:
|
16
|
-
|
16
|
+
posts_settings_form:
|
17
|
+
component: Anzuzeigender Feed
|
18
|
+
posts:
|
17
19
|
name: Feed
|
20
|
+
title: Letzte Beiträge
|
21
|
+
seeall: Alle Beiträge anzeigen
|
18
22
|
actions:
|
19
23
|
title: Aktionen
|
20
24
|
edit_post: Beitrag bearbeiten
|
@@ -95,6 +99,10 @@ de:
|
|
95
99
|
settings:
|
96
100
|
global:
|
97
101
|
attachments_allowed?: Anhänge erlaubt
|
102
|
+
host_category_label_plural: Alternativ-Titel für die Admin-Kategorie (Plural)
|
103
|
+
sharecare_category_label_plural: Alternativ-Titel für die Share & Care-Kategorie (Plural)
|
104
|
+
host_category_label_singular: Alternativ-Titel für die Admin-Kategorie (Singular)
|
105
|
+
sharecare_category_label_singular: Alternativ-Titel für die Share & Care-Kategorie (Singular)
|
98
106
|
step:
|
99
107
|
endorsements_enabled: Unterstützungen aktivieren
|
100
108
|
endorsements_blocked: Unterstützungen blockiert
|
@@ -168,8 +176,8 @@ de:
|
|
168
176
|
post_singular: Beitrag
|
169
177
|
sharecare: Share & Care
|
170
178
|
sharecare_singular: Share & Care
|
171
|
-
host:
|
172
|
-
host_singular:
|
179
|
+
host: Admin
|
180
|
+
host_singular: Admin
|
173
181
|
calendar: Meetings
|
174
182
|
calendar_singular: Meeting
|
175
183
|
survey: Umfragen
|
data/config/locales/en.yml
CHANGED
@@ -13,8 +13,12 @@ en:
|
|
13
13
|
actions:
|
14
14
|
preview: Preview
|
15
15
|
content_blocks:
|
16
|
-
|
16
|
+
posts_settings_form:
|
17
|
+
component: Feed to display
|
18
|
+
posts:
|
17
19
|
name: Feed
|
20
|
+
title: Latest posts
|
21
|
+
seeall: See all posts
|
18
22
|
actions:
|
19
23
|
title: Actions
|
20
24
|
edit_post: Edit post
|
@@ -95,6 +99,10 @@ en:
|
|
95
99
|
settings:
|
96
100
|
global:
|
97
101
|
attachments_allowed?: Attachments allowed
|
102
|
+
host_category_label_plural: Alternative title for the Admin category (Plural)
|
103
|
+
sharecare_category_label_plural: Alternative title for the Share & Care category (Plural)
|
104
|
+
host_category_label_singular: Alternative title for the Admin category (Singular)
|
105
|
+
sharecare_category_label_singular: Alternative title for the Share & Care category (Singular)
|
98
106
|
step:
|
99
107
|
endorsements_enabled: Enable endorsements
|
100
108
|
endorsements_blocked: Endorsements blocked
|
@@ -169,8 +177,8 @@ en:
|
|
169
177
|
post_singular: Post
|
170
178
|
sharecare: Share & Care
|
171
179
|
sharecare_singular: Share & Care
|
172
|
-
host:
|
173
|
-
host_singular:
|
180
|
+
host: Admin
|
181
|
+
host_singular: Admin
|
174
182
|
calendar: Meetings
|
175
183
|
calendar_singular: Meeting
|
176
184
|
survey: Surveys
|
data/config/locales/hr.yml
CHANGED
@@ -13,8 +13,12 @@ hr:
|
|
13
13
|
actions:
|
14
14
|
preview: Pregled
|
15
15
|
content_blocks:
|
16
|
-
|
16
|
+
posts_settings_form:
|
17
|
+
component: Prikazani feed
|
18
|
+
posts:
|
17
19
|
name: Feed
|
20
|
+
title: Posljednji postovi
|
21
|
+
seeall: Pogledaj sve postove
|
18
22
|
actions:
|
19
23
|
title: Akcije
|
20
24
|
edit_post: Uredi post
|
@@ -95,6 +99,10 @@ hr:
|
|
95
99
|
settings:
|
96
100
|
global:
|
97
101
|
attachments_allowed?: Prilozi dopušteni
|
102
|
+
host_category_label_plural: Alternativni naslov za kategoriju Admin (Množina)
|
103
|
+
sharecare_category_label_plural: Alternativni naslov za kategoriju Podijeli & Brini (Množina)
|
104
|
+
host_category_label_singular: Alternativni naslov za kategoriju Admin (Jednina)
|
105
|
+
sharecare_category_label_singular: Alternativni naslov za kategoriju Podijeli & Brini (Jednina)
|
98
106
|
step:
|
99
107
|
endorsements_enabled: Omogući sviđanja
|
100
108
|
endorsements_blocked: Sviđanja blokirana
|
@@ -168,8 +176,8 @@ hr:
|
|
168
176
|
post_singular: Post
|
169
177
|
sharecare: Podijeli & Brini
|
170
178
|
sharecare_singular: Podijeli & Brini
|
171
|
-
host:
|
172
|
-
host_singular:
|
179
|
+
host: Admin
|
180
|
+
host_singular: Admin
|
173
181
|
calendar: Sastanci
|
174
182
|
calendar_singular: Sastanak
|
175
183
|
survey: Ankete
|
data/config/locales/it.yml
CHANGED
@@ -13,8 +13,12 @@ it:
|
|
13
13
|
actions:
|
14
14
|
preview: Anteprima
|
15
15
|
content_blocks:
|
16
|
-
|
16
|
+
posts_settings_form:
|
17
|
+
component: Feed da visualizzare
|
18
|
+
posts:
|
17
19
|
name: Feed
|
20
|
+
title: Ultimi post
|
21
|
+
seeall: Vedi tutti i post
|
18
22
|
actions:
|
19
23
|
title: Azioni
|
20
24
|
edit_post: Modifica post
|
@@ -95,6 +99,10 @@ it:
|
|
95
99
|
settings:
|
96
100
|
global:
|
97
101
|
attachments_allowed?: Allegati consentiti
|
102
|
+
host_category_label_plural: Titolo alternativo per la categoria Admin (Plurale)
|
103
|
+
sharecare_category_label_plural: Titolo alternativo per la categoria Share & Care (Plurale)
|
104
|
+
host_category_label_singular: Titolo alternativo per la categoria Admin (Singolare)
|
105
|
+
sharecare_category_label_singular: Titolo alternativo per la categoria Share & Care (Singolare)
|
98
106
|
step:
|
99
107
|
endorsements_enabled: Abilita le approvazioni
|
100
108
|
endorsements_blocked: Approvazioni bloccate
|
@@ -168,8 +176,8 @@ it:
|
|
168
176
|
post_singular: Post
|
169
177
|
sharecare: Share & Care
|
170
178
|
sharecare_singular: Share & Care
|
171
|
-
host:
|
172
|
-
host_singular:
|
179
|
+
host: Admin
|
180
|
+
host_singular: Admin
|
173
181
|
calendar: Incontri
|
174
182
|
calendar_singular: Incontro
|
175
183
|
survey: Questionario
|
data/config/locales/sr.yml
CHANGED
@@ -13,12 +13,15 @@ sr:
|
|
13
13
|
actions:
|
14
14
|
preview: Pregled
|
15
15
|
content_blocks:
|
16
|
-
|
16
|
+
posts_settings_form:
|
17
|
+
component: Feed za prikaz
|
18
|
+
posts:
|
17
19
|
name: Feed
|
20
|
+
title: Poslednji postovi
|
21
|
+
seeall: Pogledaj sve postove
|
18
22
|
actions:
|
19
23
|
title: Akcije
|
20
24
|
edit_post: Uredi post
|
21
|
-
|
22
25
|
time:
|
23
26
|
minutes:
|
24
27
|
one: Minut
|
@@ -96,6 +99,10 @@ sr:
|
|
96
99
|
settings:
|
97
100
|
global:
|
98
101
|
attachments_allowed?: Dozvoljeni prilozi
|
102
|
+
host_category_label_plural: Alternativni naslov za kategoriju Admin (Množina)
|
103
|
+
sharecare_category_label_plural: Alternativni naslov za kategoriju Podeli & Brini (Množina)
|
104
|
+
host_category_label_singular: Alternativni naslov za kategoriju Admin (Jednina)
|
105
|
+
sharecare_category_label_singular: Alternativni naslov za kategoriju Podeli & Brini (Jednina)
|
99
106
|
step:
|
100
107
|
endorsements_enabled: Omogući sviđanja
|
101
108
|
endorsements_blocked: Blokirana sviđanja
|
@@ -169,8 +176,8 @@ sr:
|
|
169
176
|
post_singular: Post
|
170
177
|
sharecare: Podeli & Brini
|
171
178
|
sharecare_singular: Podeli & Brini
|
172
|
-
host:
|
173
|
-
host_singular:
|
179
|
+
host: Admin
|
180
|
+
host_singular: Admin
|
174
181
|
calendar: Sastanci
|
175
182
|
calendar_singular: Sastanak
|
176
183
|
survey: Ankete
|
data/config/locales/tr.yml
CHANGED
@@ -13,8 +13,12 @@ tr:
|
|
13
13
|
actions:
|
14
14
|
preview: Önizleme
|
15
15
|
content_blocks:
|
16
|
-
|
16
|
+
posts_settings_form:
|
17
|
+
component: Gösterilecek feed
|
18
|
+
posts:
|
17
19
|
name: Feed
|
20
|
+
title: Son gönderiler
|
21
|
+
seeall: Tüm gönderileri gör
|
18
22
|
actions:
|
19
23
|
title: Eylemler
|
20
24
|
edit_post: Gönderiyi düzenle
|
@@ -95,6 +99,10 @@ tr:
|
|
95
99
|
settings:
|
96
100
|
global:
|
97
101
|
attachments_allowed?: Ekler izin verildi
|
102
|
+
host_category_label_plural: Admin kategorisi için alternatif başlık (çoğul)
|
103
|
+
sharecare_category_label_plural: Paylaş ve Bakım kategorisi için alternatif başlık (çoğul)
|
104
|
+
host_category_label_singular: Admin kategorisi için alternatif başlık (tekil)
|
105
|
+
sharecare_category_label_singular: Paylaş ve Bakım kategorisi için alternatif başlık (tekil)
|
98
106
|
step:
|
99
107
|
endorsements_enabled: Beğenileri etkinleştir
|
100
108
|
endorsements_blocked: Beğenileri engelle
|
@@ -168,8 +176,8 @@ tr:
|
|
168
176
|
post_singular: Gönderi
|
169
177
|
sharecare: Share & Care
|
170
178
|
sharecare_singular: Share & Care
|
171
|
-
host:
|
172
|
-
host_singular:
|
179
|
+
host: Admin
|
180
|
+
host_singular: Admin
|
173
181
|
calendar: Toplantılar
|
174
182
|
calendar_singular: Toplantı
|
175
183
|
survey: Anketler
|
@@ -27,6 +27,10 @@ Decidim.register_component(:posts) do |component|
|
|
27
27
|
# end
|
28
28
|
component.settings(:global) do |settings|
|
29
29
|
settings.attribute :attachments_allowed?, type: :boolean, default: true
|
30
|
+
settings.attribute :host_category_label_plural, type: :string, translated: true, required: false, editor: false
|
31
|
+
settings.attribute :host_category_label_singular, type: :string, translated: true, required: false, editor: false
|
32
|
+
settings.attribute :sharecare_category_label_plural, type: :string, translated: true, required: false, editor: false
|
33
|
+
settings.attribute :sharecare_category_label_singular, type: :string, translated: true, required: false, editor: false
|
30
34
|
end
|
31
35
|
|
32
36
|
component.settings(:step) do |settings|
|
@@ -2,18 +2,22 @@
|
|
2
2
|
|
3
3
|
def initialize_homepage_content_blocks
|
4
4
|
initializer "Feeds.content_blocks" do
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
register_content_block(:homepage, :feeds_homepage)
|
6
|
+
register_content_block(:assembly_homepage, :feeds_assembly_homepage)
|
7
|
+
register_content_block(:participatory_process_homepage, :feeds_participatory_process_homepage)
|
8
|
+
register_content_block(:participatory_process_group_homepage, :feeds_participatory_process_group_homepage)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
9
12
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
def register_content_block(component, type)
|
14
|
+
Decidim.content_blocks.register(component, type) do |content_block|
|
15
|
+
content_block.cell = "decidim/posts/content_blocks/posts"
|
16
|
+
content_block.settings_form_cell = "decidim/posts/content_blocks/posts_settings_form"
|
17
|
+
content_block.public_name_key = "decidim.posts.content_blocks.posts.name"
|
18
|
+
|
19
|
+
content_block.settings do |settings|
|
20
|
+
settings.attribute :component_id, type: :integer
|
17
21
|
end
|
18
22
|
end
|
19
|
-
end
|
23
|
+
end
|
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:
|
4
|
+
version: 2.0.1
|
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:
|
12
|
+
date: 2025-05-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: decidim-core
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
version: 0.28.0
|
21
21
|
- - "<"
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: '0.
|
23
|
+
version: '0.31'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
version: 0.28.0
|
31
31
|
- - "<"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0.
|
33
|
+
version: '0.31'
|
34
34
|
description: Social posts component for Decidim that should be used in combination
|
35
35
|
with decidim-feeds.
|
36
36
|
email:
|
@@ -120,6 +120,7 @@ files:
|
|
120
120
|
- app/views/decidim/posts/admin/posts/_post-tr.html.erb
|
121
121
|
- app/views/decidim/posts/admin/posts/index.html.erb
|
122
122
|
- app/views/decidim/posts/meetings/edit.html.erb
|
123
|
+
- app/views/decidim/posts/meetings/new.html.erb
|
123
124
|
- app/views/decidim/posts/posts/_admin_options.html.erb
|
124
125
|
- app/views/decidim/posts/posts/_attachment.html.erb
|
125
126
|
- app/views/decidim/posts/posts/_edit_form.html.erb
|
@@ -127,7 +128,6 @@ files:
|
|
127
128
|
- app/views/decidim/posts/posts/_form.html.erb
|
128
129
|
- app/views/decidim/posts/posts/_index.html.erb
|
129
130
|
- app/views/decidim/posts/posts/_meeting_form.erb
|
130
|
-
- app/views/decidim/posts/posts/_new.html.erb
|
131
131
|
- app/views/decidim/posts/posts/_new_survey.html.erb
|
132
132
|
- app/views/decidim/posts/posts/_new_survey_answer.html.erb
|
133
133
|
- app/views/decidim/posts/posts/_new_survey_question.html.erb
|