decidim-collaborative_texts 0.31.5 → 0.32.0.rc1

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: 59c3ca71f60c3cc6b8f575a80a2e10c32c699c2a4fc0ed6bf368333d57f92038
4
- data.tar.gz: 311f673ac3f56d0bbb45298b7d62957c25b94a01e12777eaacd82b091098c4d8
3
+ metadata.gz: 4cc45c042959ff3710d497630a15b9161df47c13b5745af69104ce8bf1183863
4
+ data.tar.gz: 313f7aecb98fa47cd32fe768db7850daa43a4be486f7f2c4015a9b3120f4fa47
5
5
  SHA512:
6
- metadata.gz: 7feffe03ec119ff2b23ea638bbc62897434162bc8373e6d799d21087f2aad35fe624b5cf3fd20235ad7a0d4816ec05efc2426a298c5c41dfef79c9f15574af52
7
- data.tar.gz: fb45718e1cadf89319fc482217b103465aecac7f3770ea48c60744c0a1e443050f8787810d5cfdfc7cbc9264e11de675e809a65ab9d7bf1c53f8bdb101c598cd
6
+ metadata.gz: 968f7a7a3f40c126891ebf0f46f04e904d5a0a58d419ab4f9a9f7085761485687720b9651fc1c8dd4febab8c28b1367ec22e3ef234bd65e519744860611c0398
7
+ data.tar.gz: 0e95fc825186de70e80e7a38ba7bea6433866307a9dfdeb1076de50af5127c3c583042d4b921231e6fd23207f75f590f477de36e010cc75c8ccc333053c92eee
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # Decidim::CollaborativeTexts
1
+ # decidim-collaborative_texts
2
2
 
3
- The Decidim::CollaborativeTexts is a component that allows users to collaboratively create and amend texts through the use of suggestions and comments.
3
+ The Collaborative Texts is a component that allows users to collaboratively create and amend texts through the use of suggestions and comments.
4
4
 
5
5
  > **WARNING**
6
6
  > This module is under development and is not ready for usage yet.
@@ -13,6 +13,8 @@ To install this module, run in your console:
13
13
 
14
14
  ```bash
15
15
  bundle add decidim-collaborative_texts
16
+ bundle exec rails decidim:upgrade
17
+ bundle exec rails db:migrate
16
18
  ```
17
19
 
18
20
  ## Contributing
@@ -30,7 +30,7 @@ module Decidim
30
30
 
31
31
  on(:invalid) do
32
32
  flash.now[:alert] = I18n.t("documents.create.invalid", scope: "decidim.collaborative_texts.admin")
33
- render action: "new", status: :unprocessable_entity
33
+ render action: "new", status: :unprocessable_content
34
34
  end
35
35
  end
36
36
  end
@@ -54,7 +54,7 @@ module Decidim
54
54
  flash.now[:alert] = I18n.t("documents.update.invalid", scope: "decidim.collaborative_texts.admin")
55
55
  # This is a safe-guard in case there is no body coming from the POST request (as this attribute is read-only in certain cases)
56
56
  @form.body = document.body if @form.body.blank?
57
- render action: "edit", status: :unprocessable_entity
57
+ render action: "edit", status: :unprocessable_content
58
58
  end
59
59
  end
60
60
  end
@@ -76,7 +76,7 @@ module Decidim
76
76
 
77
77
  on(:invalid) do
78
78
  flash.now[:alert] = I18n.t("documents.update_settings.invalid", scope: "decidim.collaborative_texts.admin")
79
- render action: "edit_settings", status: :unprocessable_entity
79
+ render action: "edit_settings", status: :unprocessable_content
80
80
  end
81
81
  end
82
82
  end
@@ -91,7 +91,7 @@ module Decidim
91
91
 
92
92
  on(:invalid) do
93
93
  flash.now[:alert] = I18n.t("documents.publish.invalid", scope: "decidim.collaborative_texts.admin")
94
- render action: "index", status: :unprocessable_entity
94
+ render action: "index", status: :unprocessable_content
95
95
  end
96
96
  end
97
97
  end
@@ -106,7 +106,7 @@ module Decidim
106
106
 
107
107
  on(:invalid) do
108
108
  flash.now[:alert] = I18n.t("documents.unpublish.invalid", scope: "decidim.collaborative_texts.admin")
109
- render action: "index", status: :unprocessable_entity
109
+ render action: "index", status: :unprocessable_content
110
110
  end
111
111
  end
112
112
  end
@@ -26,7 +26,7 @@ module Decidim
26
26
  end
27
27
 
28
28
  on(:invalid) do
29
- render json: { message: I18n.t("document.rollout.invalid", scope: "decidim.collaborative_texts", errors: @form.errors.full_messages) }, status: :unprocessable_entity
29
+ render json: { message: I18n.t("document.rollout.invalid", scope: "decidim.collaborative_texts", errors: @form.errors.full_messages) }, status: :unprocessable_content
30
30
  end
31
31
  end
32
32
  end
@@ -34,7 +34,7 @@ module Decidim
34
34
  private
35
35
 
36
36
  def document
37
- @document ||= documents.find(params[:id])
37
+ @document ||= documents.find_by(id: params[:id])
38
38
  end
39
39
 
40
40
  def presenter
@@ -52,6 +52,16 @@ module Decidim
52
52
  def paginate_documents
53
53
  @paginate_documents ||= paginate(documents.enabled_desc)
54
54
  end
55
+
56
+ def add_breadcrumb_item
57
+ return {} if document.blank?
58
+
59
+ {
60
+ label: translated_attribute(document.title),
61
+ url: Decidim::EngineRouter.main_proxy(current_component).document_path(document),
62
+ active: false
63
+ }
64
+ end
55
65
  end
56
66
  end
57
67
  end
@@ -24,7 +24,7 @@ module Decidim
24
24
  on(:invalid) do
25
25
  message = [I18n.t("suggestions.create.invalid", scope: "decidim.collaborative_texts")]
26
26
  message.push(@form.errors.full_messages.join(", ")) if @form.errors.any?
27
- render json: { message: message.join(" ") }, status: :unprocessable_entity
27
+ render json: { message: message.join(" ") }, status: :unprocessable_content
28
28
  end
29
29
  end
30
30
  end
@@ -7,7 +7,9 @@
7
7
  <% end %>
8
8
  </td>
9
9
  <td data-label="<%= t("models.collaborative_text.fields.suggestions", scope: "decidim.collaborative_texts") %>">
10
- <%= t("booleans.#{document.accepting_suggestions}") %>
10
+ <span class="label <%= document.accepting_suggestions ? "success" : "alert" %> !text-sm">
11
+ <%= humanize_boolean document.accepting_suggestions %>
12
+ </span>
11
13
  </td>
12
14
  <td data-label="<%= t("models.collaborative_text.fields.published", scope: "decidim.collaborative_texts") %>">
13
15
  <% if document.published? %>
@@ -13,9 +13,9 @@
13
13
  <div class="card">
14
14
  <div class="card-section">
15
15
  <% if document.draft? %>
16
- <%= render "draft_options", form: f %>
16
+ <%= render "decidim/collaborative_texts/admin/documents/draft_options", form: f %>
17
17
  <% else %>
18
- <%= render "non_draft_options", form: f %>
18
+ <%= render "decidim/collaborative_texts/admin/documents/non_draft_options", form: f %>
19
19
  <% end %>
20
20
  </div>
21
21
  </div>
@@ -34,15 +34,15 @@
34
34
  <%= cell("decidim/announcement", t("decidim.collaborative_texts.document.status.accepting_suggestions")) if document.suggestions_enabled? %>
35
35
  <%= cell("decidim/announcement", t("decidim.collaborative_texts.document.status.not_accepting_suggestions")) unless document.suggestions_enabled? || document.draft? %>
36
36
 
37
- <div class="collaborative-texts-manager hidden"><%= render "manager" %></div>
37
+ <div class="collaborative-texts-manager hidden"><%= render "decidim/collaborative_texts/documents/manager" %></div>
38
38
 
39
39
  <div class="collaborative-texts-alert hidden">
40
40
  <div></div>
41
41
  </div>
42
42
 
43
- <script type="text/template" class="decidim-template" id="collaborative-texts-editor-template"><%= render "editor_template" %></script>
44
- <script type="text/template" class="decidim-template" id="collaborative-texts-suggestions-box-template"><%= render "suggestions_box_template" %></script>
45
- <script type="text/template" class="decidim-template" id="collaborative-texts-suggestions-box-item-template"><%= render "suggestions_box_item_template" %></script>
43
+ <script type="text/template" class="decidim-template" id="collaborative-texts-editor-template"><%= render "decidim/collaborative_texts/documents/editor_template" %></script>
44
+ <script type="text/template" class="decidim-template" id="collaborative-texts-suggestions-box-template"><%= render "decidim/collaborative_texts/documents/suggestions_box_template" %></script>
45
+ <script type="text/template" class="decidim-template" id="collaborative-texts-suggestions-box-item-template"><%= render "decidim/collaborative_texts/documents/suggestions_box_item_template" %></script>
46
46
 
47
47
  <div id="collaborative-text-<%= document.id %>" data-collaborative-texts-document="<%= document.suggestions_enabled? %>"
48
48
  data-collaborative-texts-i18n="<%= document_i18n.to_json %>"
@@ -1,167 +1 @@
1
- ---
2
1
  sk:
3
- activemodel:
4
- attributes:
5
- collaborative_texts:
6
- document:
7
- body: Telo
8
- draft: Koncept
9
- title: Názov
10
- version_number: Číslo verzie
11
- suggestion:
12
- nodes: Uzly DOM
13
- original: Pôvodný text
14
- replace: Nahradenie
15
- version:
16
- body: Telo
17
- draft: Koncept
18
- version_number: Číslo verzie
19
- activerecord:
20
- models:
21
- decidim/collaborative_texts/document:
22
- one: Spoločný text
23
- few: Spoločné texty
24
- many: Spoločné texty
25
- other: Spoločné texty
26
- decidim:
27
- admin:
28
- tooltips:
29
- deleted_collaborative_texts_info: Tento dokument nie je možné vymazať
30
- collaborative_texts:
31
- actions:
32
- confirm_delete_document: Naozaj chcete vymazať tento dokument?
33
- deleted_document_info: Vymazaný dokument je možné obnoviť z koša.
34
- edit: Upraviť
35
- manage: Konfigurovať
36
- new: Nový text
37
- title: Akcie
38
- view_deleted_documents: Zobraziť vymazané dokumenty
39
- admin:
40
- documents:
41
- create:
42
- invalid: Vyskytol sa problém pri vytváraní dokumentu.
43
- success: Dokument bol úspešne vytvorený.
44
- draft_options:
45
- accepting_suggestions: Povoliť návrhy v ďalšej verzii
46
- accepting_suggestions_help: Povolením návrhov sa spustí nové kolo návrhov pre tento dokument. Aktuálne návrhy nebudú v novej verzii viditeľné.
47
- draft: Verzia konceptu
48
- draft_help_html: Verzia konceptu nie je verejná a môžu ju upravovať administrátori. Odstráňte stav konceptu, aby sa tento obsah stal verejnou verziou. <strong>Upozorňujeme, že kým je aktívna verzia konceptu, účastníci uvidia predchádzajúcu verziu a nebudú môcť podávať návrhy.</strong>
49
- edit:
50
- document_has_suggestions_html: <a href="%{url}">Tento dokument obsahuje návrhy</a> a nie je možné ho priamo upravovať. Prijmite alebo odmietnite návrhy, aby ste vytvorili novú verziu konceptu, ktorú bude možné upraviť.
51
- draft: Verzia konceptu
52
- previous_versions: Predchádzajúce verzie
53
- public_version: Verejná verzia
54
- title: Upraviť kolaboratívne texty
55
- update: Aktualizovať
56
- version: Verzia %{version_number}, vytvorená dňa %{created_at}, získala %{suggestions_count} návrhov.
57
- edit_settings:
58
- title: Konfigurovať kolaboratívne texty
59
- update: Aktualizovať
60
- index:
61
- title: Kolaboratívne texty
62
- manage_trash:
63
- title: Odstránené dokumenty
64
- new:
65
- create: Vytvoriť
66
- title: Vytvoriť kolaboratívne texty
67
- non_draft_options:
68
- create_draft: Zahodiť návrhy a vytvoriť novú verziu konceptu
69
- draft_help_html: Verzia konceptu nie je verejná a môžu ju upravovať administrátori. Odstráňte stav konceptu, aby sa tento obsah stal verejnou verziou. <strong>Upozorňujeme, že kým je verzia konceptu aktívna, účastníci uvidia predchádzajúcu verziu a nebudú môcť podávať návrhy.</strong>
70
- enable_suggestions: Povoliť návrhy
71
- enable_suggestions_help: Povolenie návrhov umožní účastníkom podávať návrhy k tejto verzii.
72
- publish:
73
- invalid: Pri publikovaní tohto dokumentu sa vyskytol problém.
74
- success: Dokument bol úspešne publikovaný.
75
- unpublish:
76
- invalid: Pri zrušení publikovania tohto dokumentu sa vyskytol problém.
77
- success: Publikovanie dokumentu bolo úspešne zrušené.
78
- update:
79
- invalid: Pri aktualizácii dokumentu sa vyskytol problém.
80
- success: Dokument bol úspešne aktualizovaný.
81
- update_settings:
82
- invalid: Pri aktualizácii dokumentu sa vyskytol problém.
83
- success: Dokument bol úspešne aktualizovaný.
84
- index:
85
- published: Publikované
86
- unpublished: Nepublikované
87
- admin_log:
88
- document:
89
- create: "%{user_name} vytvoril/a kolaboratívny text %{resource_name} v priestore %{space_name}"
90
- delete: "%{user_name} odstránil/a kolaboratívny text %{resource_name} z priestoru %{space_name}"
91
- publish: "%{user_name} publikoval/a kolaboratívny text %{resource_name} v priestore %{space_name}"
92
- restore: "%{user_name} obnovil/a kolaboratívny text %{resource_name} v priestore %{space_name}"
93
- soft_delete: "%{user_name} presunul/a kolaboratívny text %{resource_name} v priestore %{space_name} do koša"
94
- unpublish: "%{user_name} zrušil/a publikovanie kolaboratívneho textu %{resource_name} v priestore %{space_name}"
95
- update: "%{user_name} aktualizoval/a kolaboratívny text %{resource_name} v priestore %{space_name}"
96
- suggestion:
97
- create: "%{user_name} navrhol/a zmeny v kolaboratívnom texte %{resource_name} v priestore %{space_name}"
98
- version:
99
- delete: "%{user_name} odstránil/a verziu kolaboratívneho textu %{resource_name} z priestoru %{space_name}"
100
- update: "%{user_name} aktualizoval/a verziu kolaboratívneho textu %{resource_name} v priestore %{space_name}"
101
- document:
102
- apply: Použiť
103
- cancel: Zrušiť
104
- consolidate:
105
- confirm: Táto akcia zlúči všetky prijaté návrhy do novej verzie dokumentu. Neprijaté návrhy budú presunuté do novej verzie na ďalšie posúdenie. Táto akcia zachová stav povolených návrhov.
106
- new: Zlúčiť prijaté návrhy
107
- consolidate_counter: Zlúčenie spojí %{applied} použitých návrhov a presunie %{pending} čakajúcich návrhov do novej verzie.
108
- controls_label: Ovládacie prvky návrhov
109
- draft_counter: Koncept spojí %{applied} použitých návrhov a zahodí %{pending} čakajúcich návrhov.
110
- index: Index
111
- restore: Obnoviť
112
- rollout:
113
- confirm: Táto akcia vytvorí novú verziu konceptu dokumentu a budete presmerovaní na stránku úprav pre konečné úpravy. Aktuálna verzia zostane verejná a návrhy budú zakázané.
114
- invalid: Pri vytváraní novej verzie dokumentu sa vyskytol problém (%{errors}).
115
- new: Vytvoriť koncept novej verzie
116
- save: Navrhnúť zmeny
117
- status:
118
- accepting_suggestions: Ak chcete navrhnúť zmeny, vyberte alebo dvakrát kliknite na text, ktorý chcete upraviť, a potom kliknite na tlačidlo „Navrhnúť zmeny“.
119
- draft: Tento dokument momentálne posudzujú administrátori. Návrhy v súčasnosti nie sú povolené, ale môžete si zobraziť návrhy od iných účastníkov.
120
- not_accepting_suggestions: Návrhy v súčasnosti nie sú povolené.
121
- selection_active: Výber je aktívny. Zrušte aktuálny výber, aby ste mohli vytvoriť nový.
122
- suggestions_count: "%{count} návrhov"
123
- toggle: Zobraziť/skryť návrhy
124
- documents:
125
- index:
126
- count:
127
- one: "%{count} kolaboratívny text"
128
- few: "%{count} kolaboratívne texty"
129
- many: "%{count} kolaboratívnych textov"
130
- other: "%{count} kolaboratívnych textov"
131
- empty: Zatiaľ tu nie sú žiadne kolaboratívne texty.
132
- show:
133
- contributors: Prispievatelia
134
- models:
135
- collaborative_text:
136
- fields:
137
- published: Publikované
138
- suggestions: Prijať návrhy
139
- title: Názov
140
- suggestion:
141
- add_html: <span class="type">Pridať:</span> <span class="text">%{text}</span>
142
- remove_html: <span class="type">Odstrániť:</span> <span class="text">%{text}</span>
143
- replace_html: <span class="type">Nahradiť:</span> <span class="text">%{text}</span>
144
- suggestions:
145
- create:
146
- invalid: Pri vytváraní návrhu sa vyskytol problém.
147
- success: Návrh bol úspešne vytvorený.
148
- errors:
149
- blank_changeset: Súbor zmien nemôže byť prázdny.
150
- invalid_nodes: Neplatné vybrané uzly.
151
- components:
152
- collaborative_texts:
153
- actions:
154
- create: Vytvoriť
155
- destroy: Odstrániť
156
- update: Aktualizovať
157
- name: Kolaboratívne texty
158
- settings:
159
- global:
160
- announcement: Oznámenie
161
- comments_blocked: Komentáre sú zablokované
162
- step:
163
- announcement: Oznámenie
164
- statistics:
165
- all_collaborative_texts_count: Všetky kolaboratívne texty
166
- collaborative_texts_count: Kolaboratívne texty
167
- collaborative_texts_count_tooltip: Počet kolaboratívnych textov
@@ -2,10 +2,9 @@
2
2
 
3
3
  $LOAD_PATH.push File.expand_path("lib", __dir__)
4
4
 
5
- require "decidim/collaborative_texts/version"
6
-
7
5
  Gem::Specification.new do |s|
8
- s.version = Decidim::CollaborativeTexts.version
6
+ version = "0.32.0.rc1"
7
+ s.version = version
9
8
  s.authors = ["Ivan Vergés"]
10
9
  s.email = ["ivan@pokecode.net"]
11
10
  s.license = "AGPL-3.0-or-later"
@@ -17,7 +16,7 @@ Gem::Specification.new do |s|
17
16
  "homepage_uri" => "https://decidim.org",
18
17
  "source_code_uri" => "https://github.com/decidim/decidim"
19
18
  }
20
- s.required_ruby_version = "~> 3.3.0"
19
+ s.required_ruby_version = "~> 3.4.0"
21
20
 
22
21
  s.name = "decidim-collaborative_texts"
23
22
  s.summary = "A Decidim module for creating Collaborative Texts"
@@ -30,7 +29,7 @@ Gem::Specification.new do |s|
30
29
  end
31
30
  end
32
31
 
33
- s.add_dependency "decidim-core", Decidim::CollaborativeTexts.version
32
+ s.add_dependency "decidim-core", version
34
33
 
35
- s.add_development_dependency "decidim-dev", Decidim::CollaborativeTexts.version
34
+ s.add_development_dependency "decidim-dev", version
36
35
  end
@@ -29,7 +29,7 @@ module Decidim
29
29
  name: Decidim::Components::Namer.new(participatory_space.organization.available_locales, :collaborative_texts).i18n_name,
30
30
  manifest_name: :collaborative_texts,
31
31
  published_at: Time.current,
32
- participatory_space: participatory_space
32
+ participatory_space:
33
33
  }
34
34
 
35
35
  Decidim.traceability.perform_action!(
@@ -3,7 +3,7 @@
3
3
  module Decidim
4
4
  module CollaborativeTexts
5
5
  def self.version
6
- "0.31.5"
6
+ "0.32.0.rc1"
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-collaborative_texts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.31.5
4
+ version: 0.32.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Vergés
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2026-05-12 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: decidim-core
@@ -16,28 +15,28 @@ dependencies:
16
15
  requirements:
17
16
  - - '='
18
17
  - !ruby/object:Gem::Version
19
- version: 0.31.5
18
+ version: 0.32.0.rc1
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - '='
25
24
  - !ruby/object:Gem::Version
26
- version: 0.31.5
25
+ version: 0.32.0.rc1
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: decidim-dev
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
30
  - - '='
32
31
  - !ruby/object:Gem::Version
33
- version: 0.31.5
32
+ version: 0.32.0.rc1
34
33
  type: :development
35
34
  prerelease: false
36
35
  version_requirements: !ruby/object:Gem::Requirement
37
36
  requirements:
38
37
  - - '='
39
38
  - !ruby/object:Gem::Version
40
- version: 0.31.5
39
+ version: 0.32.0.rc1
41
40
  description: A module that aims to provide step by step collaborative texts in Decidim.
42
41
  email:
43
42
  - ivan@pokecode.net
@@ -211,7 +210,6 @@ metadata:
211
210
  funding_uri: https://opencollective.com/decidim
212
211
  homepage_uri: https://decidim.org
213
212
  source_code_uri: https://github.com/decidim/decidim
214
- post_install_message:
215
213
  rdoc_options: []
216
214
  require_paths:
217
215
  - lib
@@ -219,15 +217,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
219
217
  requirements:
220
218
  - - "~>"
221
219
  - !ruby/object:Gem::Version
222
- version: 3.3.0
220
+ version: 3.4.0
223
221
  required_rubygems_version: !ruby/object:Gem::Requirement
224
222
  requirements:
225
223
  - - ">="
226
224
  - !ruby/object:Gem::Version
227
225
  version: '0'
228
226
  requirements: []
229
- rubygems_version: 3.5.11
230
- signing_key:
227
+ rubygems_version: 3.6.9
231
228
  specification_version: 4
232
229
  summary: A Decidim module for creating Collaborative Texts
233
230
  test_files: []