decidim-posts 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE-AGPLv3.txt +661 -0
  3. data/README.md +40 -0
  4. data/Rakefile +9 -0
  5. data/app/cells/decidim/posts/comments/add_comment.erb +15 -0
  6. data/app/cells/decidim/posts/comments/comments_loading.erb +1 -0
  7. data/app/cells/decidim/posts/comments/order_control.erb +13 -0
  8. data/app/cells/decidim/posts/comments/show.erb +31 -0
  9. data/app/cells/decidim/posts/comments_cell.rb +158 -0
  10. data/app/cells/decidim/posts/content_blocks/posts/show.erb +3 -0
  11. data/app/cells/decidim/posts/content_blocks/posts_cell.rb +50 -0
  12. data/app/cells/decidim/posts/content_blocks/posts_settings_form/show.erb +3 -0
  13. data/app/cells/decidim/posts/content_blocks/posts_settings_form_cell.rb +23 -0
  14. data/app/cells/decidim/posts/feed_dropdown_metadata_cell.rb +19 -0
  15. data/app/cells/decidim/posts/meeting/show.erb +65 -0
  16. data/app/cells/decidim/posts/meeting_cell.rb +44 -0
  17. data/app/cells/decidim/posts/post/show.erb +30 -0
  18. data/app/cells/decidim/posts/post/survey.erb +68 -0
  19. data/app/cells/decidim/posts/post_attachments/show.erb +40 -0
  20. data/app/cells/decidim/posts/post_attachments_cell.rb +17 -0
  21. data/app/cells/decidim/posts/post_cell.rb +44 -0
  22. data/app/cells/decidim/posts/post_comment/show.erb +17 -0
  23. data/app/cells/decidim/posts/post_comment_cell.rb +49 -0
  24. data/app/cells/decidim/posts/post_header/show.erb +53 -0
  25. data/app/cells/decidim/posts/post_header_cell.rb +79 -0
  26. data/app/cells/decidim/posts/post_host/show.erb +74 -0
  27. data/app/cells/decidim/posts/post_host_cell.rb +73 -0
  28. data/app/cells/decidim/posts/post_metadata/show.erb +9 -0
  29. data/app/cells/decidim/posts/post_metadata_cell.rb +67 -0
  30. data/app/cells/decidim/posts/reaction_menu/show.erb +18 -0
  31. data/app/cells/decidim/posts/reaction_menu/styles.erb +7 -0
  32. data/app/cells/decidim/posts/reaction_menu_cell.rb +26 -0
  33. data/app/cells/decidim/posts/reactions/show.erb +8 -0
  34. data/app/cells/decidim/posts/reactions_cell.rb +22 -0
  35. data/app/commands/decidim/posts/add_reaction_to_resource.rb +90 -0
  36. data/app/commands/decidim/posts/create_post.rb +112 -0
  37. data/app/commands/decidim/posts/destroy_post.rb +20 -0
  38. data/app/commands/decidim/posts/remove_reaction_from_resource.rb +41 -0
  39. data/app/commands/decidim/posts/update_post.rb +72 -0
  40. data/app/controllers/concerns/decidim/posts/admin/filterable.rb +46 -0
  41. data/app/controllers/concerns/decidim/posts/reactionable.rb +31 -0
  42. data/app/controllers/decidim/posts/admin/application_controller.rb +26 -0
  43. data/app/controllers/decidim/posts/admin/posts_controller.rb +93 -0
  44. data/app/controllers/decidim/posts/application_controller.rb +18 -0
  45. data/app/controllers/decidim/posts/meetings_controller.rb +176 -0
  46. data/app/controllers/decidim/posts/posts_controller.rb +202 -0
  47. data/app/controllers/decidim/posts/reactions_controller.rb +54 -0
  48. data/app/controllers/decidim/posts/user_answers_controller.rb +36 -0
  49. data/app/events/decidim/posts/resource_reacted_event.rb +38 -0
  50. data/app/forms/decidim/posts/answer_form.rb +13 -0
  51. data/app/forms/decidim/posts/post_form.rb +121 -0
  52. data/app/forms/decidim/posts/question_form.rb +20 -0
  53. data/app/helpers/decidim/posts/admin/posts_helper.rb +8 -0
  54. data/app/helpers/decidim/posts/application_helper.rb +20 -0
  55. data/app/helpers/decidim/posts/post_cells_helper.rb +35 -0
  56. data/app/helpers/decidim/posts/posts_helper.rb +34 -0
  57. data/app/helpers/decidim/posts/reaction_helper.rb +22 -0
  58. data/app/models/decidim/posts/answer.rb +13 -0
  59. data/app/models/decidim/posts/application_record.rb +10 -0
  60. data/app/models/decidim/posts/post.rb +116 -0
  61. data/app/models/decidim/posts/question.rb +17 -0
  62. data/app/models/decidim/posts/reaction.rb +22 -0
  63. data/app/models/decidim/posts/reaction_type.rb +13 -0
  64. data/app/models/decidim/posts/user_answer.rb +11 -0
  65. data/app/packs/entrypoints/decidim_posts.js +5 -0
  66. data/app/packs/entrypoints/decidim_posts.scss +1 -0
  67. data/app/packs/images/decidim/posts/icon.svg +1 -0
  68. data/app/packs/src/decidim/posts/carousel.js +112 -0
  69. data/app/packs/src/decidim/posts/host_status.js +75 -0
  70. data/app/packs/src/decidim/posts/newFeeds.js +98 -0
  71. data/app/packs/src/decidim/posts/posts.js +272 -0
  72. data/app/packs/src/decidim/posts/submenu.js +46 -0
  73. data/app/packs/src/decidim/posts/survey.js +94 -0
  74. data/app/packs/stylesheets/decidim/posts/_variables.scss +10 -0
  75. data/app/packs/stylesheets/decidim/posts/posts.scss +415 -0
  76. data/app/permissions/decidim/posts/admin/permissions.rb +23 -0
  77. data/app/permissions/decidim/posts/permissions.rb +101 -0
  78. data/app/presenters/decidim/posts/post_presenter.rb +45 -0
  79. data/app/views/decidim/posts/admin/posts/_post-tr.html.erb +45 -0
  80. data/app/views/decidim/posts/admin/posts/index.html.erb +54 -0
  81. data/app/views/decidim/posts/meetings/edit.html.erb +24 -0
  82. data/app/views/decidim/posts/posts/_admin_options.html.erb +30 -0
  83. data/app/views/decidim/posts/posts/_attachment.html.erb +24 -0
  84. data/app/views/decidim/posts/posts/_edit_form.html.erb +16 -0
  85. data/app/views/decidim/posts/posts/_feed.html.erb +8 -0
  86. data/app/views/decidim/posts/posts/_form.html.erb +104 -0
  87. data/app/views/decidim/posts/posts/_index.html.erb +49 -0
  88. data/app/views/decidim/posts/posts/_meeting_form.erb +18 -0
  89. data/app/views/decidim/posts/posts/_new.html.erb +33 -0
  90. data/app/views/decidim/posts/posts/_new_survey.html.erb +20 -0
  91. data/app/views/decidim/posts/posts/_new_survey_answer.html.erb +11 -0
  92. data/app/views/decidim/posts/posts/_new_survey_question.html.erb +17 -0
  93. data/app/views/decidim/posts/posts/_post.html.erb +11 -0
  94. data/app/views/decidim/posts/posts/_post_form.html.erb +5 -0
  95. data/app/views/decidim/posts/posts/_sidebar.html.erb +36 -0
  96. data/app/views/decidim/posts/posts/edit.html.erb +34 -0
  97. data/app/views/decidim/posts/posts/index.html.erb +1 -0
  98. data/app/views/decidim/posts/posts/show.html.erb +12 -0
  99. data/app/views/decidim/posts/reactions/_update_buttons_and_counters.html.erb +1 -0
  100. data/config/assets.rb +9 -0
  101. data/config/i18n-tasks.yml +10 -0
  102. data/config/locales/bs.yml +215 -0
  103. data/config/locales/de.yml +217 -0
  104. data/config/locales/en.yml +216 -0
  105. data/config/locales/hr.yml +219 -0
  106. data/config/locales/it.yml +215 -0
  107. data/config/locales/sr.yml +220 -0
  108. data/config/locales/tr.yml +219 -0
  109. data/lib/decidim/posts/admin.rb +10 -0
  110. data/lib/decidim/posts/admin_engine.rb +25 -0
  111. data/lib/decidim/posts/component.rb +59 -0
  112. data/lib/decidim/posts/content_blocks/content_blocks_homepage.rb +19 -0
  113. data/lib/decidim/posts/engine.rb +84 -0
  114. data/lib/decidim/posts/test/factories.rb +14 -0
  115. data/lib/decidim/posts/version.rb +9 -0
  116. data/lib/decidim/posts.rb +13 -0
  117. metadata +183 -0
@@ -0,0 +1,219 @@
1
+ ---
2
+ tr:
3
+ decidim:
4
+ posts:
5
+ admin:
6
+ posts:
7
+ index:
8
+ title: Posts
9
+ selected: seçilmiş
10
+ form:
11
+ title: Başlık
12
+ slug_help_html: "URL slugları, bu feedi işaret eden URL'leri oluşturmak için kullanılır. Sadece harfleri, rakamları ve tireleri kabul eder ve bir harfle başlamalıdır. Örnek: %{url}"
13
+ actions:
14
+ preview: Önizleme
15
+ content_blocks:
16
+ feeds:
17
+ name: Feed
18
+ actions:
19
+ title: Eylemler
20
+ edit_post: Gönderiyi düzenle
21
+ time:
22
+ minutes:
23
+ one: Dak.
24
+ other: Dak.
25
+ hours:
26
+ one: Saat
27
+ other: Saat
28
+ days:
29
+ one: Gün
30
+ other: Günler
31
+ weeks:
32
+ one: Hafta
33
+ other: Haftalar
34
+ months:
35
+ one: Ay
36
+ other: Aylar
37
+ years:
38
+ one: Yıl
39
+ other: Yıllar
40
+ post_comment:
41
+ comment: Yorum
42
+ posts:
43
+ host:
44
+ status:
45
+ confirm: Evet
46
+ cancel: İptal
47
+ processing: İşleniyor
48
+ done: Tamamlandı
49
+ undone: Okunmamış
50
+ dialogTitle: Mesaj durumunu değiştir
51
+ dialogBodyMsg: Mesajın durumu değiştirilecek
52
+ dialogBodyMsgComments: Yorum işlevi kapatılacak
53
+ dialogBodyResponse: Lütfen bekleyin, mesajın durumu değiştiriliyor
54
+ create:
55
+ success: Gönderi başarıyla oluşturuldu
56
+ invalid: Gönderi oluşturma başarısız oldu
57
+ update:
58
+ success: Gönderi başarıyla güncellendi
59
+ invalid: Gönderi güncelleme başarısız oldu
60
+ destroy:
61
+ success: Gönderi başarıyla silindi
62
+ invalid: Gönderi silme başarısız oldu
63
+ back_to_feed: Feed'e geri dön
64
+ form:
65
+ question_too_short: Soru çok kısa
66
+ meeting_form:
67
+ address_help: 'Adres: Geocoder tarafından konumu bulmak için kullanılır'
68
+ available_slots_help: Sınırsız alanınız varsa bunu 0 olarak bırakın
69
+ create_as: Toplantı oluştur
70
+ location_help: 'Konum: kullanıcılara buluşulacak yeri ima eden mesaj'
71
+ location_hints_help: 'Konum ipuçları: ek bilgi. Örnek: Yüz yüze bir toplantıysa binanın katı veya kısıtlı erişime sahip çevrimiçi bir toplantıysa toplantı parolası.'
72
+ online_meeting_url_help: 'Bağlantı: katılımcıların toplantınıza doğrudan bağlanmasına izin verin'
73
+ registration_url_help: 'Bağlantı: katılımcıların kayıtlar için kullandığınız harici hizmete girmesine izin verin'
74
+ select_a_category: Lütfen bir kategori seçin
75
+ select_a_meeting_type: Lütfen bir toplantı türü seçin
76
+ select_a_registration_type: Lütfen bir kayıt türü seçin
77
+ disclaimer: 'Dikkat: Harici bir kayıt sistemi kullanarak, %{organization} organizatörlerinin kullanıcılardan harici hizmete sağlanan verilerden sorumlu olmadığını biliyorsunuz.'
78
+ iframe_embed_type_html: 'Yalnızca birkaç hizmet, aşağıdaki alanlardan toplantıya veya canlı etkinliğe gömülmesine izin verir: %{domains}'
79
+ select_an_iframe_access_level: Lütfen bir iframe erişim seviyesi seçin
80
+ load_more: Daha fazla yükle
81
+ survey:
82
+ participated: '%{count} yanıt'
83
+ models:
84
+ post:
85
+ fields:
86
+ title: Başlık
87
+ created_at: Oluşturulma tarihi
88
+ actions: Eylemler
89
+ endorsements: Beğeniler
90
+ comments: Yorumlar
91
+ status: Durum
92
+ components:
93
+ posts:
94
+ name: Gönderiler
95
+ settings:
96
+ global:
97
+ attachments_allowed?: Ekler izin verildi
98
+ step:
99
+ endorsements_enabled: Beğenileri etkinleştir
100
+ endorsements_blocked: Beğenileri engelle
101
+ content_blocks:
102
+ feeds:
103
+ title: Feed
104
+ name: Feed
105
+ description: Gönderiler, etkinlikler ve diğer içeriklerin bir beslemesi.
106
+ feeds_settings_form:
107
+ component: Gösterilecek feed
108
+ actions:
109
+ openMenu: Menüyü aç
110
+ edit: Düzenle
111
+ translate: Çevir
112
+ delete: Sil
113
+ deleteConfirmation: Bu gönderiyi silmek istediğinizden emin misiniz?
114
+ reactions:
115
+ title: Tepkinizi seçin
116
+ like: Beğen
117
+ unlike: Beğenmekten vazgeç
118
+ love: Bayıldım
119
+ unlike_love: Bayılmaktan vazgeç
120
+ laugh: Gül
121
+ unlike_laugh: Gülmekten vazgeç
122
+ wow: Vay
123
+ unlike_wow: Vay demekten vazgeç
124
+ sad: Üzgün
125
+ unlike_sad: Üzgün olmaktan vazgeç
126
+ angry: Kızgın
127
+ unlike_angry: Kızgın olmaktan vazgeç
128
+ newFeed:
129
+ title: Yeni bir gönderi oluştur
130
+ text: Gönderi
131
+ category: Kategori
132
+ highlighted: Vurgulanan
133
+ fixed: Üstte sabit
134
+ action: Gönder
135
+ cancel: İptal
136
+ login: Yeni bir gönderi oluşturmak için lütfen giriş yapın
137
+ loginLink: Giriş yap
138
+ openButton: Yeni bir gönderi oluşturmak için formu aç
139
+ close: Formu kapat
140
+ aria-live:
141
+ post: 'Gönderileri seçtiniz. Lütfen ilgili giriş alanlarına dikkat edin'
142
+ sharecare: 'Paylaş ve Bakımı seçtiniz. Lütfen ilgili giriş alanlarına dikkat edin'
143
+ host: 'Ev sahibini seçtiniz. Lütfen ilgili giriş alanlarına dikkat edin'
144
+ calendar: 'Toplantıları seçtiniz. Lütfen ilgili giriş alanlarına dikkat edin'
145
+ survey: 'Anketleri seçtiniz. Lütfen ilgili giriş alanlarına dikkat edin'
146
+ newSurvey:
147
+ newQuestion: Yeni Soru
148
+ newQuestionResponse: Yeni bir soru eklendi
149
+ questionTitle: Soru girin
150
+ questionType: Soru tipi
151
+ questionTypes:
152
+ multiple_choice: Çoktan seçmeli
153
+ single_choice: Tek seçim
154
+ answerType: Cevap türü
155
+ multipleChoice: Çoktan seçmeli
156
+ singleChoice: Tek seçim
157
+ newAnswer: Yeni cevap
158
+ newAnswerResponse: Yeni bir cevap eklendi
159
+ answerTitle: Cevap girin
160
+ deleteQuestion: Soruyu sil
161
+ deleteAnswer: Cevabı sil
162
+ filter:
163
+ all: Hepsi
164
+ title: Filtre
165
+ menuAriaLabel: Feedleri filtrele
166
+ post: Gönderi
167
+ posts: Gönderiler
168
+ post_singular: Gönderi
169
+ sharecare: Share & Care
170
+ sharecare_singular: Share & Care
171
+ host: Ev sahibi
172
+ host_singular: Ev sahibi
173
+ calendar: Toplantılar
174
+ calendar_singular: Toplantı
175
+ survey: Anketler
176
+ survey_singular: Anket
177
+ help: Yardım
178
+ calendar:
179
+ date_separator: 'arası'
180
+ start_time: Saat
181
+ end_time: Bitiş
182
+ gallery:
183
+ navigation: '%{total} resminin %{number} resmine git'
184
+ add_comment_form:
185
+ form:
186
+ submit_root_comment: Yorumu gönder
187
+ submit_reply: Yanıtı gönder
188
+ shared:
189
+ flag_modal:
190
+ report: Rapor
191
+ admin:
192
+ feeds:
193
+ new:
194
+ title: Yeni Feed
195
+ create: Feed Oluştur
196
+ create:
197
+ success: Feed başarıyla oluşturuldu
198
+ invalid: Feed oluşturma başarısız oldu
199
+ edit:
200
+ title: Feed Düzenle
201
+ update: Feed Güncelle
202
+ update:
203
+ success: Feed başarıyla güncellendi
204
+ invalid: Feed güncelleme başarısız oldu
205
+ menu:
206
+ feeds: Feedler
207
+ feeds_submenu:
208
+ components: Bileşenler
209
+ info: Bu feed hakkında
210
+ moderations: Moderasyonlar
211
+ see_feed: Feed'i gör
212
+ titles:
213
+ feeds: Feedler
214
+ actions:
215
+ new_feed: Yeni Feed
216
+ layouts:
217
+ decidim:
218
+ announcements:
219
+ view_more: Daha fazla gör
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Posts
5
+ # This module contains all the domain logic associated to Decidim's Feeds
6
+ # component admin panel.
7
+ module Admin
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "decidim/core"
4
+ # require "decidim/posts/menu"
5
+
6
+ module Decidim
7
+ module Posts
8
+ # This is the engine that runs on the public interface of `Posts`.
9
+ class AdminEngine < ::Rails::Engine
10
+ isolate_namespace Decidim::Posts::Admin
11
+
12
+ paths["db/migrate"] = nil
13
+ paths["lib/tasks"] = nil
14
+
15
+ routes do
16
+ resources :posts
17
+ root to: "posts#index"
18
+ end
19
+
20
+ def load_seed
21
+ nil
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "decidim/components/namer"
4
+
5
+ Decidim.register_component(:posts) do |component|
6
+ component.engine = Decidim::Posts::Engine
7
+ component.admin_engine = Decidim::Posts::AdminEngine
8
+ component.icon = "decidim/posts/icon.svg"
9
+ component.permissions_class_name = "Decidim::Posts::Permissions"
10
+
11
+ # component.exports :feeds do |exports|
12
+ # exports.include_in_open_data = false
13
+ # end
14
+
15
+ # component.on(:before_destroy) do |instance|
16
+ # # Code executed before removing the component
17
+ # end
18
+
19
+ # These actions permissions can be configured in the admin panel
20
+ # component.actions = %w()
21
+ # component.actions = %w(comment)
22
+
23
+ # component.settings(:global) do |settings|
24
+ # # Add your global settings
25
+ # # Available types: :integer, :boolean
26
+ # # settings.attribute :vote_limit, type: :integer, default: 0
27
+ # end
28
+ component.settings(:global) do |settings|
29
+ settings.attribute :attachments_allowed?, type: :boolean, default: true
30
+ end
31
+
32
+ component.settings(:step) do |settings|
33
+ # Add your settings per step
34
+ settings.attribute :endorsements_enabled, type: :boolean, default: true
35
+ settings.attribute :endorsements_blocked, type: :boolean
36
+ end
37
+
38
+ # component.register_resource(:some_resource) do |resource|
39
+ # # Register a optional resource that can be references from other resources.
40
+ # resource.model_class_name = "Decidim::Posts::SomeResource"
41
+ # resource.template = "decidim/posts/some_resources/linked_some_resources"
42
+ # end
43
+ component.register_resource(:post) do |resource|
44
+ resource.model_class_name = "Decidim::Posts::Post"
45
+ # resource.template = "decidim/posts/posts/linked_posts"
46
+ # resource.card = "decidim/posts/posts"
47
+ # resource.reported_content_cell = "decidim/posts/reported_content"
48
+ # resource.actions = %w(endorse vote amend comment vote_comment)
49
+ resource.searchable = true
50
+ end
51
+
52
+ # component.register_stat :some_stat do |context, start_at, end_at|
53
+ # # Register some stat number to the application
54
+ # end
55
+
56
+ # component.seeds do |participatory_space|
57
+ # # Add some seeds for this component
58
+ # end
59
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ def initialize_homepage_content_blocks
4
+ initializer "Feeds.content_blocks" do
5
+ Decidim.content_blocks.register(:homepage, :feeds) do |content_block|
6
+ content_block.cell = "decidim/posts/content_blocks/feeds"
7
+ content_block.settings_form_cell = "decidim/posts/content_blocks/feeds_settings_form"
8
+ content_block.public_name_key = "decidim.posts.content_blocks.feeds.name"
9
+
10
+ content_block.settings do |settings|
11
+ # settings.attribute :title, type: :text, translated: true
12
+ # settings.attribute :link_text, type: :text, translated: true
13
+ # settings.attribute :link_url, type: :text, translated: true
14
+ # settings.attribute :count, type: :integer, default: 3
15
+ settings.attribute :component_id, type: :integer
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,84 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rails"
4
+ require "decidim/core"
5
+
6
+ # require "decidim/posts/menu"
7
+
8
+ require_relative "content_blocks/content_blocks_homepage"
9
+
10
+ module Decidim
11
+ module Posts
12
+ # This is the engine that runs on the public interface of feeds.
13
+ class Engine < ::Rails::Engine
14
+ routes do
15
+ # Add admin engine routes here
16
+ # resources :feeds do
17
+ # collection do
18
+ # resources :exports, only: [:create]
19
+ # end
20
+ # end
21
+ #
22
+ # survey user answer
23
+ #
24
+
25
+ root to: "posts#index"
26
+ resources :posts do
27
+ get :load_more, on: :collection
28
+ end
29
+ resources :meetings do
30
+ member do
31
+ put :withdraw
32
+ end
33
+ end
34
+ resources :reactions, only: [:create, :destroy]
35
+
36
+ # get "/test" => "posts#test"
37
+ get 'change_status', to: 'posts#change_status', as: 'change_post_status'
38
+ get 'delete_post', to: 'posts#delete', as: 'delete_post'
39
+ get 'user_answers', to: 'user_answers#create', as: 'user_answers'
40
+ end
41
+
42
+ isolate_namespace Decidim::Posts
43
+
44
+ # initializer "decidim_feeds.overrides", after: "decidim.action_controller" do
45
+ # config.to_prepare do
46
+ # Decidim::HomepageController.include(Decidim::Posts::NeedsContentBlocksSnippets)
47
+ # end
48
+ # end
49
+
50
+ initializer "decidim_posts.snippets" do |app|
51
+ app.config.enable_html_header_snippets = true
52
+ end
53
+
54
+ initializer "decidim_posts.add_cells_view_paths" do
55
+ Cell::ViewModel.view_paths << File.expand_path("#{Decidim::Posts::Engine.root}/app/cells")
56
+ Cell::ViewModel.view_paths << File.expand_path("#{Decidim::Posts::Engine.root}/app/views")
57
+ end
58
+
59
+ initializer "decidim_posts.webpacker.assets_path" do
60
+ Decidim.register_assets_path File.expand_path("app/packs", root)
61
+ end
62
+
63
+ initialize_homepage_content_blocks
64
+
65
+ initializer "decidim_posts.register_icons" do
66
+ Decidim.icons.register(name: "function-line", icon: "function-line", category: "system", description: "", engine: :posts)
67
+ Decidim.icons.register(name: "home-5-line", icon: "home-5-line", category: "system", description: "", engine: :posts)
68
+ Decidim.icons.register(name: "recycle-line", icon: "recycle-line", category: "system", description: "", engine: :posts)
69
+ Decidim.icons.register(name: "shake-hands-line", icon: "shake-hands-line", category: "system", description: "", engine: :posts)
70
+ Decidim.icons.register(name: "gallery-fill", icon: "gallery-fill", category: "system", description: "", engine: :posts)
71
+ Decidim.icons.register(name: "send-plane-line", icon: "send-plane-line", category: "system", description: "", engine: :posts)
72
+ Decidim.icons.register(name: "image-add-line", icon: "image-add-line", category: "system", description: "", engine: :posts)
73
+ Decidim.icons.register(name: "film-line", icon: "film-line", category: "system", description: "", engine: :posts)
74
+ Decidim.icons.register(name: "file-add-line", icon: "file-add-line", category: "system", description: "", engine: :posts)
75
+ Decidim.icons.register(name: "chat-4-line", icon: "chat-4-line", category: "communication", description: "", engine: :posts)
76
+ Decidim.icons.register(name: "translate", icon: "translate", category: "editor", description: "", engine: :posts)
77
+ Decidim.icons.register(name: "file-2-line", icon: "file-2-line", category: "editor", description: "", engine: :posts)
78
+ Decidim.icons.register(name: "dislike", icon: "heart-fill", description: "Dislike", category: "action", engine: :posts)
79
+ Decidim.icons.register(name: "heart-add-line", icon: "heart-add-line", description: "Like", category: "action", engine: :posts)
80
+ end
81
+
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "decidim/components/namer"
4
+ require "decidim/core/test/factories"
5
+
6
+ FactoryBot.define do
7
+ factory :posts_component, parent: :component do
8
+ name { Decidim::Components::Namer.new(participatory_space.organization.available_locales, :posts).i18n_name }
9
+ manifest_name :posts
10
+ participatory_space { create(:participatory_process, :with_steps) }
11
+ end
12
+
13
+ # Add engine factories here
14
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ # This holds the decidim-meetings version.
5
+ module Posts
6
+ VERSION = "1.0.0"
7
+ COMPAT_DECIDIM_VERSION = [">= 0.28.0", "< 0.29"].freeze
8
+ end
9
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "decidim/posts/admin"
4
+ require "decidim/posts/engine"
5
+ require "decidim/posts/admin_engine"
6
+ require "decidim/posts/component"
7
+
8
+ module Decidim
9
+ # This namespace holds the logic of the `Feeds` component. This component
10
+ # allows users to create feeds in a participatory space.
11
+ module Posts
12
+ end
13
+ end
metadata ADDED
@@ -0,0 +1,183 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: decidim-posts
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Alexander Rusa
8
+ - Piero Chiussi
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2024-10-26 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: decidim-core
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: 0.28.0
21
+ - - "<"
22
+ - !ruby/object:Gem::Version
23
+ version: '0.29'
24
+ type: :runtime
25
+ prerelease: false
26
+ version_requirements: !ruby/object:Gem::Requirement
27
+ requirements:
28
+ - - ">="
29
+ - !ruby/object:Gem::Version
30
+ version: 0.28.0
31
+ - - "<"
32
+ - !ruby/object:Gem::Version
33
+ version: '0.29'
34
+ description: Social posts component for Decidim that should be used in combination
35
+ with decidim-feeds.
36
+ email:
37
+ - alex@rusa.at
38
+ - info@webchroma.de
39
+ executables: []
40
+ extensions: []
41
+ extra_rdoc_files: []
42
+ files:
43
+ - LICENSE-AGPLv3.txt
44
+ - README.md
45
+ - Rakefile
46
+ - app/cells/decidim/posts/comments/add_comment.erb
47
+ - app/cells/decidim/posts/comments/comments_loading.erb
48
+ - app/cells/decidim/posts/comments/order_control.erb
49
+ - app/cells/decidim/posts/comments/show.erb
50
+ - app/cells/decidim/posts/comments_cell.rb
51
+ - app/cells/decidim/posts/content_blocks/posts/show.erb
52
+ - app/cells/decidim/posts/content_blocks/posts_cell.rb
53
+ - app/cells/decidim/posts/content_blocks/posts_settings_form/show.erb
54
+ - app/cells/decidim/posts/content_blocks/posts_settings_form_cell.rb
55
+ - app/cells/decidim/posts/feed_dropdown_metadata_cell.rb
56
+ - app/cells/decidim/posts/meeting/show.erb
57
+ - app/cells/decidim/posts/meeting_cell.rb
58
+ - app/cells/decidim/posts/post/show.erb
59
+ - app/cells/decidim/posts/post/survey.erb
60
+ - app/cells/decidim/posts/post_attachments/show.erb
61
+ - app/cells/decidim/posts/post_attachments_cell.rb
62
+ - app/cells/decidim/posts/post_cell.rb
63
+ - app/cells/decidim/posts/post_comment/show.erb
64
+ - app/cells/decidim/posts/post_comment_cell.rb
65
+ - app/cells/decidim/posts/post_header/show.erb
66
+ - app/cells/decidim/posts/post_header_cell.rb
67
+ - app/cells/decidim/posts/post_host/show.erb
68
+ - app/cells/decidim/posts/post_host_cell.rb
69
+ - app/cells/decidim/posts/post_metadata/show.erb
70
+ - app/cells/decidim/posts/post_metadata_cell.rb
71
+ - app/cells/decidim/posts/reaction_menu/show.erb
72
+ - app/cells/decidim/posts/reaction_menu/styles.erb
73
+ - app/cells/decidim/posts/reaction_menu_cell.rb
74
+ - app/cells/decidim/posts/reactions/show.erb
75
+ - app/cells/decidim/posts/reactions_cell.rb
76
+ - app/commands/decidim/posts/add_reaction_to_resource.rb
77
+ - app/commands/decidim/posts/create_post.rb
78
+ - app/commands/decidim/posts/destroy_post.rb
79
+ - app/commands/decidim/posts/remove_reaction_from_resource.rb
80
+ - app/commands/decidim/posts/update_post.rb
81
+ - app/controllers/concerns/decidim/posts/admin/filterable.rb
82
+ - app/controllers/concerns/decidim/posts/reactionable.rb
83
+ - app/controllers/decidim/posts/admin/application_controller.rb
84
+ - app/controllers/decidim/posts/admin/posts_controller.rb
85
+ - app/controllers/decidim/posts/application_controller.rb
86
+ - app/controllers/decidim/posts/meetings_controller.rb
87
+ - app/controllers/decidim/posts/posts_controller.rb
88
+ - app/controllers/decidim/posts/reactions_controller.rb
89
+ - app/controllers/decidim/posts/user_answers_controller.rb
90
+ - app/events/decidim/posts/resource_reacted_event.rb
91
+ - app/forms/decidim/posts/answer_form.rb
92
+ - app/forms/decidim/posts/post_form.rb
93
+ - app/forms/decidim/posts/question_form.rb
94
+ - app/helpers/decidim/posts/admin/posts_helper.rb
95
+ - app/helpers/decidim/posts/application_helper.rb
96
+ - app/helpers/decidim/posts/post_cells_helper.rb
97
+ - app/helpers/decidim/posts/posts_helper.rb
98
+ - app/helpers/decidim/posts/reaction_helper.rb
99
+ - app/models/decidim/posts/answer.rb
100
+ - app/models/decidim/posts/application_record.rb
101
+ - app/models/decidim/posts/post.rb
102
+ - app/models/decidim/posts/question.rb
103
+ - app/models/decidim/posts/reaction.rb
104
+ - app/models/decidim/posts/reaction_type.rb
105
+ - app/models/decidim/posts/user_answer.rb
106
+ - app/packs/entrypoints/decidim_posts.js
107
+ - app/packs/entrypoints/decidim_posts.scss
108
+ - app/packs/images/decidim/posts/icon.svg
109
+ - app/packs/src/decidim/posts/carousel.js
110
+ - app/packs/src/decidim/posts/host_status.js
111
+ - app/packs/src/decidim/posts/newFeeds.js
112
+ - app/packs/src/decidim/posts/posts.js
113
+ - app/packs/src/decidim/posts/submenu.js
114
+ - app/packs/src/decidim/posts/survey.js
115
+ - app/packs/stylesheets/decidim/posts/_variables.scss
116
+ - app/packs/stylesheets/decidim/posts/posts.scss
117
+ - app/permissions/decidim/posts/admin/permissions.rb
118
+ - app/permissions/decidim/posts/permissions.rb
119
+ - app/presenters/decidim/posts/post_presenter.rb
120
+ - app/views/decidim/posts/admin/posts/_post-tr.html.erb
121
+ - app/views/decidim/posts/admin/posts/index.html.erb
122
+ - app/views/decidim/posts/meetings/edit.html.erb
123
+ - app/views/decidim/posts/posts/_admin_options.html.erb
124
+ - app/views/decidim/posts/posts/_attachment.html.erb
125
+ - app/views/decidim/posts/posts/_edit_form.html.erb
126
+ - app/views/decidim/posts/posts/_feed.html.erb
127
+ - app/views/decidim/posts/posts/_form.html.erb
128
+ - app/views/decidim/posts/posts/_index.html.erb
129
+ - app/views/decidim/posts/posts/_meeting_form.erb
130
+ - app/views/decidim/posts/posts/_new.html.erb
131
+ - app/views/decidim/posts/posts/_new_survey.html.erb
132
+ - app/views/decidim/posts/posts/_new_survey_answer.html.erb
133
+ - app/views/decidim/posts/posts/_new_survey_question.html.erb
134
+ - app/views/decidim/posts/posts/_post.html.erb
135
+ - app/views/decidim/posts/posts/_post_form.html.erb
136
+ - app/views/decidim/posts/posts/_sidebar.html.erb
137
+ - app/views/decidim/posts/posts/edit.html.erb
138
+ - app/views/decidim/posts/posts/index.html.erb
139
+ - app/views/decidim/posts/posts/show.html.erb
140
+ - app/views/decidim/posts/reactions/_update_buttons_and_counters.html.erb
141
+ - config/assets.rb
142
+ - config/i18n-tasks.yml
143
+ - config/locales/bs.yml
144
+ - config/locales/de.yml
145
+ - config/locales/en.yml
146
+ - config/locales/hr.yml
147
+ - config/locales/it.yml
148
+ - config/locales/sr.yml
149
+ - config/locales/tr.yml
150
+ - lib/decidim/posts.rb
151
+ - lib/decidim/posts/admin.rb
152
+ - lib/decidim/posts/admin_engine.rb
153
+ - lib/decidim/posts/component.rb
154
+ - lib/decidim/posts/content_blocks/content_blocks_homepage.rb
155
+ - lib/decidim/posts/engine.rb
156
+ - lib/decidim/posts/test/factories.rb
157
+ - lib/decidim/posts/version.rb
158
+ homepage: https://github.com/DecidimAustria/decidim-module-posts/
159
+ licenses:
160
+ - AGPL-3.0
161
+ metadata:
162
+ bug_tracker_uri: https://github.com/DecidimAustria/decidim-module-posts/issues
163
+ source_code_uri: https://github.com/DecidimAustria/decidim-module-posts/
164
+ post_install_message:
165
+ rdoc_options: []
166
+ require_paths:
167
+ - lib
168
+ required_ruby_version: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ version: '3.1'
173
+ required_rubygems_version: !ruby/object:Gem::Requirement
174
+ requirements:
175
+ - - ">="
176
+ - !ruby/object:Gem::Version
177
+ version: '0'
178
+ requirements: []
179
+ rubygems_version: 3.3.27
180
+ signing_key:
181
+ specification_version: 4
182
+ summary: A social posts decidim component
183
+ test_files: []