decidim-admin 0.0.1.alpha5 → 0.0.1.alpha6
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of decidim-admin might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/config/decidim_admin_manifest.js +3 -2
- data/app/assets/javascripts/decidim/{admin.js → admin/application.js} +0 -0
- data/app/assets/stylesheets/decidim/admin/application.scss +8 -0
- data/app/commands/decidim/admin/create_participatory_process.rb +2 -0
- data/app/commands/decidim/admin/update_participatory_process.rb +2 -0
- data/app/controllers/decidim/admin/participatory_processes_controller.rb +3 -1
- data/app/forms/decidim/admin/participatory_process_form.rb +2 -0
- data/app/helpers/decidim/admin/attributes_display_helper.rb +7 -7
- data/app/views/decidim/admin/participatory_processes/_form.html.erb +8 -0
- data/app/views/decidim/admin/participatory_processes/show.html.erb +5 -0
- data/app/views/layouts/decidim/admin/_header.html.erb +2 -2
- data/lib/decidim/admin/engine.rb +2 -5
- metadata +21 -7
- data/app/assets/stylesheets/decidim/admin.scss +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9a07856bf0f1fe7fafa20f693fd0d7c877270dc
|
4
|
+
data.tar.gz: ca7b7bb0bf52a3612ad0da6380c8897365878674
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0ee71032aeef185653aa314089fed92e66ab7bfd293204c8d08743abe96e3086f6e895e4332863649b0685902f02141bd14f328a94ce2693edaac34d40fbb60
|
7
|
+
data.tar.gz: ce218ae587b569a0217349f67cb9b520213d36a1c7897bdf8ea4ddc572064189ab372c8207b1c96c185e8d9981080d9727aa03e4bbf52af2f2fda12912090210
|
@@ -1,2 +1,3 @@
|
|
1
|
-
//=
|
2
|
-
//=
|
1
|
+
//= link decidim/admin/application.js
|
2
|
+
//= link decidim/admin/application.css
|
3
|
+
//= link_directory ../images/decidim/admin/
|
File without changes
|
@@ -63,9 +63,11 @@ module Decidim
|
|
63
63
|
end
|
64
64
|
|
65
65
|
def destroy
|
66
|
-
@participatory_process = collection.find(params[:id])
|
66
|
+
@participatory_process = collection.find(params[:id])
|
67
67
|
authorize @participatory_process
|
68
68
|
|
69
|
+
@participatory_process.destroy!
|
70
|
+
|
69
71
|
flash[:notice] = I18n.t("participatory_processes.destroy.success", scope: "decidim.admin")
|
70
72
|
|
71
73
|
redirect_to participatory_processes_path
|
@@ -33,8 +33,7 @@ module Decidim
|
|
33
33
|
attrs.map do |attr|
|
34
34
|
if record.column_for_attribute(attr).type == :hstore
|
35
35
|
I18n.available_locales.map do |locale|
|
36
|
-
|
37
|
-
display_value(record, attr, locale)
|
36
|
+
display_label(record, attr, locale) + display_value(record, attr, locale)
|
38
37
|
end.reduce(:+)
|
39
38
|
else
|
40
39
|
display_label(record, attr) + display_value(record, attr)
|
@@ -42,13 +41,14 @@ module Decidim
|
|
42
41
|
end.reduce(:+)
|
43
42
|
end
|
44
43
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
content_tag(:dt, record.class.human_attribute_name(attr))
|
44
|
+
# Holds the logic to render a label for a given attribute.
|
45
|
+
def display_label(record, attr, locale = nil)
|
46
|
+
return content_tag(:dt, record.class.human_attribute_name(attr)) unless locale
|
47
|
+
content_tag(:dt, record.class.human_attribute_name(attr) + " (#{locale})")
|
50
48
|
end
|
51
49
|
|
50
|
+
private
|
51
|
+
|
52
52
|
# Private: Holds the logic to render the attribute value.
|
53
53
|
def display_value(record, attr, locale = nil)
|
54
54
|
return I18n.with_locale(locale) do
|
@@ -14,7 +14,12 @@
|
|
14
14
|
:title,
|
15
15
|
:subtitle,
|
16
16
|
:hashtag,
|
17
|
+
:slug,
|
17
18
|
:short_description,
|
18
19
|
:description
|
19
20
|
%>
|
21
|
+
<dt><%= display_label(@participatory_process, :hero_image) %></dt>
|
22
|
+
<dd><%= image_tag @participatory_process.hero_image.url.to_s %></dd>
|
23
|
+
<dt><%= display_label(@participatory_process, :banner_image) %></dt>
|
24
|
+
<dd><%= image_tag @participatory_process.banner_image.url.to_s %></dd>
|
20
25
|
</dl>
|
@@ -1,4 +1,4 @@
|
|
1
1
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
2
2
|
<%= csrf_meta_tags %>
|
3
|
-
<%= stylesheet_link_tag 'decidim/admin', media: 'all', 'data-turbolinks-track': 'reload' %>
|
4
|
-
<%= javascript_include_tag 'decidim/admin', 'data-turbolinks-track': 'reload' %>
|
3
|
+
<%= stylesheet_link_tag 'decidim/admin/application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
4
|
+
<%= javascript_include_tag 'decidim/admin/application', 'data-turbolinks-track': 'reload' %>
|
data/lib/decidim/admin/engine.rb
CHANGED
@@ -20,11 +20,8 @@ module Decidim
|
|
20
20
|
class Engine < ::Rails::Engine
|
21
21
|
isolate_namespace Decidim::Admin
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
decidim/admin.js
|
26
|
-
decidim/admin.css
|
27
|
-
)
|
23
|
+
initializer "decidim_admin.assets" do |app|
|
24
|
+
app.config.assets.precompile += %w(decidim_admin_manifest.js)
|
28
25
|
end
|
29
26
|
end
|
30
27
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.1.
|
4
|
+
version: 0.0.1.alpha6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
@@ -18,14 +18,14 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.0.1.
|
21
|
+
version: 0.0.1.alpha6
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 0.0.1.
|
28
|
+
version: 0.0.1.alpha6
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: rails
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
@@ -208,20 +208,34 @@ dependencies:
|
|
208
208
|
- - "~>"
|
209
209
|
- !ruby/object:Gem::Version
|
210
210
|
version: 1.1.0
|
211
|
+
- !ruby/object:Gem::Dependency
|
212
|
+
name: carrierwave
|
213
|
+
requirement: !ruby/object:Gem::Requirement
|
214
|
+
requirements:
|
215
|
+
- - "~>"
|
216
|
+
- !ruby/object:Gem::Version
|
217
|
+
version: 1.0.0.beta
|
218
|
+
type: :runtime
|
219
|
+
prerelease: false
|
220
|
+
version_requirements: !ruby/object:Gem::Requirement
|
221
|
+
requirements:
|
222
|
+
- - "~>"
|
223
|
+
- !ruby/object:Gem::Version
|
224
|
+
version: 1.0.0.beta
|
211
225
|
- !ruby/object:Gem::Dependency
|
212
226
|
name: decidim-dev
|
213
227
|
requirement: !ruby/object:Gem::Requirement
|
214
228
|
requirements:
|
215
229
|
- - '='
|
216
230
|
- !ruby/object:Gem::Version
|
217
|
-
version: 0.0.1.
|
231
|
+
version: 0.0.1.alpha6
|
218
232
|
type: :development
|
219
233
|
prerelease: false
|
220
234
|
version_requirements: !ruby/object:Gem::Requirement
|
221
235
|
requirements:
|
222
236
|
- - '='
|
223
237
|
- !ruby/object:Gem::Version
|
224
|
-
version: 0.0.1.
|
238
|
+
version: 0.0.1.alpha6
|
225
239
|
- !ruby/object:Gem::Dependency
|
226
240
|
name: pundit-matchers
|
227
241
|
requirement: !ruby/object:Gem::Requirement
|
@@ -248,8 +262,7 @@ files:
|
|
248
262
|
- README.md
|
249
263
|
- Rakefile
|
250
264
|
- app/assets/config/decidim_admin_manifest.js
|
251
|
-
- app/assets/javascripts/decidim/admin.js
|
252
|
-
- app/assets/stylesheets/decidim/admin.scss
|
265
|
+
- app/assets/javascripts/decidim/admin/application.js
|
253
266
|
- app/assets/stylesheets/decidim/admin/_actions.scss
|
254
267
|
- app/assets/stylesheets/decidim/admin/_foundation_and_overrides.scss
|
255
268
|
- app/assets/stylesheets/decidim/admin/_layout.scss
|
@@ -257,6 +270,7 @@ files:
|
|
257
270
|
- app/assets/stylesheets/decidim/admin/_settings.scss
|
258
271
|
- app/assets/stylesheets/decidim/admin/_sidebar.scss
|
259
272
|
- app/assets/stylesheets/decidim/admin/_tables.scss
|
273
|
+
- app/assets/stylesheets/decidim/admin/application.scss
|
260
274
|
- app/commands/decidim/admin/create_participatory_process.rb
|
261
275
|
- app/commands/decidim/admin/update_participatory_process.rb
|
262
276
|
- app/constraints/decidim/admin/organization_dashboard_constraint.rb
|