decidim-templates 0.26.7 → 0.26.9

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of decidim-templates might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cf6ddfca0ccc8875617a42c4205799a0fbb1a2850279092267cb674efe47a2bc
4
- data.tar.gz: bc366a7e9d8e06b0e85ebe1fb8b713d67c4d69db2e538529d17881a93afcc098
3
+ metadata.gz: d6bfaef39c2fa6a2d1cff2269d8004dc4f463c73cb88eaee81e97ef8d5a9e973
4
+ data.tar.gz: 6a63b7701627db0416723d1efce6b36deba936cd791ffc87612a328ae581455d
5
5
  SHA512:
6
- metadata.gz: 2348a376269a7756da777f537d6c2d55048198b5ded24f9439329f8096fd1a482a4e7621b8956ad523b21304457dd215ed931ab0b15f66a91fd5aa7ed917e8d9
7
- data.tar.gz: e99a4763fad67b63566ad5c5e965245430fe58e1af4d8cbaf4b5a0d797da298b01d3cd67cd163001503a954f136213bf416b8669a2f112614c30db54bb46d1ef
6
+ metadata.gz: df44039db1e71531ed194034ee3d6fb1880dec8f2e080ab3c393ab911ee95e42af3afdd32ccf1eab55bfd95edb23c9f8df7164ec6fc4950e64d5e8b9e8ba17a3
7
+ data.tar.gz: 5947d7ca043f30edf9669921a71ef702f858dba86731e4d97a4109e7a20bb0f0afe8da8df48b22686e2ec0f07ca9b8aee405c3e90bf5608d34ae3fb16d4c4aeb
@@ -33,7 +33,7 @@ module Decidim
33
33
  private
34
34
 
35
35
  def template
36
- @template ||= Template.find(params[:id])
36
+ @template ||= current_organization.templates.where(templatable_type: "Decidim::Forms::Questionnaire").find(params[:id])
37
37
  end
38
38
  end
39
39
  end
@@ -8,8 +8,6 @@ module Decidim
8
8
  class QuestionnaireTemplatesController < Decidim::Templates::Admin::ApplicationController
9
9
  include Decidim::TranslatableAttributes
10
10
 
11
- skip_before_action :verify_authenticity_token, only: :preview
12
-
13
11
  helper_method :template
14
12
 
15
13
  def index
@@ -142,7 +140,7 @@ module Decidim
142
140
  end
143
141
 
144
142
  def template
145
- @template ||= Template.find_by(id: params[:id])
143
+ @template ||= collection.find(params[:id])
146
144
  end
147
145
 
148
146
  def search(term)
@@ -6,7 +6,7 @@ module Decidim
6
6
  class Permissions < Decidim::DefaultPermissions
7
7
  def permissions
8
8
  return permission_action unless user
9
-
9
+ return permission_action unless user.admin?
10
10
  return permission_action if permission_action.scope != :admin
11
11
 
12
12
  case permission_action.subject
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t(".questionnaire")) %>
1
2
  <%= decidim_form_for(@form, url: questionnaire_template_path, html: { class: "form edit_questionnaire_template" }) do |f| %>
2
3
  <%= render partial: "form", object: f %>
3
4
  <% end %>
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t(".title")) %>
1
2
  <div class="card">
2
3
  <div class="card-divider">
3
4
  <h2 class="card-title">
@@ -1,3 +1,4 @@
1
+ <% add_decidim_page_title(t("templates", scope: "decidim.admin.titles")) %>
1
2
  <% content_for :title do %>
2
3
  <%= t("templates", scope: "decidim.admin.titles") %>
3
4
  <% end %>
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Empty line for playing nice with tpope/vim-rails
@@ -24,6 +24,7 @@ de:
24
24
  success: Vorlage erfolgreich gelöscht
25
25
  empty: Es gibt noch keine Vorlagen.
26
26
  update:
27
+ error: Bei der Aktualisierung dieser Vorlage ist ein Problem aufgetreten.
27
28
  success: Vorlage erfolgreich aktualisiert
28
29
  titles:
29
30
  template_types:
@@ -24,7 +24,7 @@ eu:
24
24
  success: Txantiloia zuzen ezabatu da
25
25
  empty: Oraindik ez dago txantiloirik.
26
26
  update:
27
- error: Arazo bat izan da txantiloi hau eguneratzean.
27
+ error: Arazo bat egon da eztabaida hau eguneratzean.
28
28
  success: Txantiloia zuzen eguneratu da
29
29
  titles:
30
30
  template_types:
@@ -55,7 +55,7 @@ eu:
55
55
  form:
56
56
  save: Gorde
57
57
  template_title: Txantiloiaren informazioa
58
- title: '%{questionnaire_for} galdetegiaren txantiloia'
58
+ title: '%{questionnaire_for}% galdetegiaren txantiloia'
59
59
  index:
60
60
  confirm_delete: Ziur zaude txantiloi hau ezabatu nahi duzula?
61
61
  title: Galdetegi-txantiloiak
@@ -1 +1,7 @@
1
1
  kaa:
2
+ decidim:
3
+ templates:
4
+ admin:
5
+ questionnaire_templates:
6
+ form:
7
+ save: Saqlaw
@@ -24,6 +24,7 @@ lt:
24
24
  success: Šablonas ištrintas sėkmingai
25
25
  empty: Dar nėra šablonų.
26
26
  update:
27
+ error: Atnaujinant šį šabloną kilo problema.
27
28
  success: Šablonas atnaujintas sėkmingai
28
29
  titles:
29
30
  template_types:
@@ -0,0 +1 @@
1
+ sq:
@@ -0,0 +1 @@
1
+ th:
@@ -40,13 +40,7 @@ module Decidim
40
40
  end
41
41
  end
42
42
 
43
- initializer "decidim_templates.admin_mount_routes" do
44
- Decidim::Core::Engine.routes do
45
- mount Decidim::Templates::AdminEngine, at: "/admin/templates", as: "decidim_admin_templates"
46
- end
47
- end
48
-
49
- initializer "decidim_templates.admin_menu" do
43
+ initializer "decidim_templates_admin.menu" do
50
44
  Decidim.menu :admin_menu do |menu|
51
45
  menu.add_item :questionnaire_templates,
52
46
  I18n.t("menu.templates", scope: "decidim.admin", default: "Templates"),
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-templates version.
5
5
  module Templates
6
6
  def self.version
7
- "0.26.7"
7
+ "0.26.9"
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-templates
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.7
4
+ version: 0.26.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vera Rojman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-11 00:00:00.000000000 Z
11
+ date: 2023-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: decidim-core
@@ -16,56 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.26.7
19
+ version: 0.26.9
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.26.7
26
+ version: 0.26.9
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: decidim-forms
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 0.26.7
33
+ version: 0.26.9
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 0.26.7
40
+ version: 0.26.9
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: decidim-admin
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 0.26.7
47
+ version: 0.26.9
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 0.26.7
54
+ version: 0.26.9
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: decidim-dev
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 0.26.7
61
+ version: 0.26.9
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 0.26.7
68
+ version: 0.26.9
69
69
  description: This module provides a solution to create templates for different Decidim
70
70
  models, such as Proposals and Questionnaires..
71
71
  email:
@@ -108,6 +108,7 @@ files:
108
108
  - app/views/decidim/templates/admin/questionnaire_templates/preview.js.erb
109
109
  - app/views/layouts/decidim/admin/templates.html.erb
110
110
  - config/assets.rb
111
+ - config/environment.rb
111
112
  - config/locales/am-ET.yml
112
113
  - config/locales/ar.yml
113
114
  - config/locales/bg.yml
@@ -161,9 +162,11 @@ files:
161
162
  - config/locales/sk.yml
162
163
  - config/locales/sl.yml
163
164
  - config/locales/so-SO.yml
165
+ - config/locales/sq-AL.yml
164
166
  - config/locales/sr-CS.yml
165
167
  - config/locales/sv.yml
166
168
  - config/locales/sw-KE.yml
169
+ - config/locales/th-TH.yml
167
170
  - config/locales/ti-ER.yml
168
171
  - config/locales/tr-TR.yml
169
172
  - config/locales/uk.yml