decidim-admin 0.4.2 → 0.4.3

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.

Files changed (25) hide show
  1. checksums.yaml +4 -4
  2. data/app/commands/decidim/admin/update_participatory_process.rb +2 -1
  3. data/app/controllers/decidim/admin/categories_controller.rb +1 -3
  4. data/app/controllers/decidim/admin/dashboard_controller.rb +1 -3
  5. data/app/controllers/decidim/admin/feature_permissions_controller.rb +1 -3
  6. data/app/controllers/decidim/admin/features_controller.rb +1 -3
  7. data/app/controllers/decidim/admin/moderations_controller.rb +1 -1
  8. data/app/controllers/decidim/admin/organization_controller.rb +1 -3
  9. data/app/controllers/decidim/admin/participatory_process_attachments_controller.rb +1 -3
  10. data/app/controllers/decidim/admin/participatory_process_copies_controller.rb +1 -9
  11. data/app/controllers/decidim/admin/participatory_process_groups_controller.rb +1 -3
  12. data/app/controllers/decidim/admin/participatory_process_publications_controller.rb +1 -3
  13. data/app/controllers/decidim/admin/participatory_process_step_activations_controller.rb +1 -3
  14. data/app/controllers/decidim/admin/participatory_process_step_ordering_controller.rb +1 -3
  15. data/app/controllers/decidim/admin/participatory_process_steps_controller.rb +1 -3
  16. data/app/controllers/decidim/admin/participatory_process_user_roles_controller.rb +2 -4
  17. data/app/controllers/decidim/admin/participatory_processes_controller.rb +1 -3
  18. data/app/controllers/decidim/admin/scopes_controller.rb +1 -3
  19. data/app/controllers/decidim/admin/static_pages_controller.rb +1 -3
  20. data/app/controllers/decidim/admin/users_controller.rb +1 -3
  21. data/app/forms/decidim/admin/participatory_process_form.rb +1 -0
  22. data/app/views/decidim/admin/participatory_processes/_form.html.erb +4 -0
  23. metadata +5 -7
  24. data/lib/decidim/admin/test/factories.rb +0 -9
  25. data/lib/tasks/decidim/admin_tasks.rake +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e90b5d15bcb5fd386c47b0bd2d913af4fff3f48
4
- data.tar.gz: ca259eb0eee87887b88e686bf159ebc6695eafd2
3
+ metadata.gz: d2545910a88cea0b28b704cb1477f237be726d98
4
+ data.tar.gz: a2028b69735ac289d74a1ad19d4ff048138b4965
5
5
  SHA512:
6
- metadata.gz: 93f695823e6c3432bbd90fb89ef1bd7b200f4fb8d72b4d17e0afce18272a2034205241ab39afe06c640e25ef92db7c248df2ba710d51e2859d91c34f086270b2
7
- data.tar.gz: beb6249c471b16e47d86cf659781af180e2df43901573ec7d2d6dad7f911198aff46c0f68fdbe2234b6a1cabf1e7121c1ca080a66377380c4711d98a7710e00a
6
+ metadata.gz: 352c16ff07566b2d5fb01852db9e0dbfa326b755e3c46f32eaecae965ec6e11a8b97326b1ae3a31139e6ab049cb150750768c728c27a8732bb42c11c5c5a2a3c
7
+ data.tar.gz: 19e573d508116d36c0bd164490b1170029920c5cfb52006e6d4002140a07a28e264ae463d0e04e383a29e0890c841b27379909d376672c7ee2f09155d0ac046c
@@ -63,7 +63,8 @@ module Decidim
63
63
  participatory_structure: form.participatory_structure,
64
64
  meta_scope: form.meta_scope,
65
65
  end_date: form.end_date,
66
- participatory_process_group: form.participatory_process_group
66
+ participatory_process_group: form.participatory_process_group,
67
+ show_statistics: form.show_statistics
67
68
  }
68
69
  end
69
70
  end
@@ -1,12 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_dependency "decidim/admin/application_controller"
4
-
5
3
  module Decidim
6
4
  module Admin
7
5
  # Controller that allows managing categories.
8
6
  #
9
- class CategoriesController < ApplicationController
7
+ class CategoriesController < Decidim::Admin::ApplicationController
10
8
  include Concerns::ParticipatoryProcessAdmin
11
9
 
12
10
  def index
@@ -1,12 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_dependency "decidim/admin/application_controller"
4
-
5
3
  module Decidim
6
4
  module Admin
7
5
  # Controller that shows a simple dashboard.
8
6
  #
9
- class DashboardController < ApplicationController
7
+ class DashboardController < Decidim::Admin::ApplicationController
10
8
  authorize_resource :admin_dashboard, class: false
11
9
  end
12
10
  end
@@ -1,12 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_dependency "decidim/admin/application_controller"
4
-
5
3
  module Decidim
6
4
  module Admin
7
5
  # Controller that allows managing feature permissions.
8
6
  #
9
- class FeaturePermissionsController < ApplicationController
7
+ class FeaturePermissionsController < Decidim::Admin::ApplicationController
10
8
  include Concerns::ParticipatoryProcessAdmin
11
9
  helper_method :authorizations, :feature
12
10
 
@@ -1,13 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_dependency "decidim/admin/application_controller"
4
-
5
3
  module Decidim
6
4
  module Admin
7
5
  # Controller that allows managing the Participatory Process' Features in the
8
6
  # admin panel.
9
7
  #
10
- class FeaturesController < ApplicationController
8
+ class FeaturesController < Decidim::Admin::ApplicationController
11
9
  include Concerns::ParticipatoryProcessAdmin
12
10
 
13
11
  helper_method :manifest
@@ -3,7 +3,7 @@
3
3
  module Decidim
4
4
  module Admin
5
5
  # This controller allows admins to manage moderations in a participatory process.
6
- class ModerationsController < Admin::ApplicationController
6
+ class ModerationsController < Decidim::Admin::ApplicationController
7
7
  include Concerns::ParticipatoryProcessAdmin
8
8
 
9
9
  helper_method :moderations
@@ -1,12 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_dependency "decidim/admin/application_controller"
4
-
5
3
  module Decidim
6
4
  module Admin
7
5
  # Controller that allows managing the user organization.
8
6
  #
9
- class OrganizationController < ApplicationController
7
+ class OrganizationController < Decidim::Admin::ApplicationController
10
8
  layout "decidim/admin/settings"
11
9
 
12
10
  def edit
@@ -1,13 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_dependency "decidim/admin/application_controller"
4
-
5
3
  module Decidim
6
4
  module Admin
7
5
  # Controller that allows managing all the attachments for a participatory
8
6
  # process.
9
7
  #
10
- class ParticipatoryProcessAttachmentsController < ApplicationController
8
+ class ParticipatoryProcessAttachmentsController < Decidim::Admin::ApplicationController
11
9
  include Concerns::ParticipatoryProcessAdmin
12
10
  include Concerns::HasAttachments
13
11
 
@@ -1,12 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_dependency "decidim/admin/application_controller"
4
-
5
3
  module Decidim
6
4
  module Admin
7
5
  # Controller that allows managing participatory processes.
8
6
  #
9
- class ParticipatoryProcessCopiesController < ApplicationController
7
+ class ParticipatoryProcessCopiesController < Decidim::Admin::ApplicationController
10
8
  include Concerns::ParticipatoryProcessAdmin
11
9
 
12
10
  def new
@@ -30,12 +28,6 @@ module Decidim
30
28
  end
31
29
  end
32
30
  end
33
-
34
- private
35
-
36
- def collection
37
- @collection ||= Decidim::ParticipatoryProcessesWithUserRole.for(current_user, :admin)
38
- end
39
31
  end
40
32
  end
41
33
  end
@@ -1,12 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_dependency "decidim/admin/application_controller"
4
-
5
3
  module Decidim
6
4
  module Admin
7
5
  # Controller that allows managing participatory process groups.
8
6
  #
9
- class ParticipatoryProcessGroupsController < ApplicationController
7
+ class ParticipatoryProcessGroupsController < Decidim::Admin::ApplicationController
10
8
  helper_method :collection, :participatory_process_group
11
9
 
12
10
  def index
@@ -1,12 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_dependency "decidim/admin/application_controller"
4
-
5
3
  module Decidim
6
4
  module Admin
7
5
  # Controller that allows managing participatory process publications.
8
6
  #
9
- class ParticipatoryProcessPublicationsController < ApplicationController
7
+ class ParticipatoryProcessPublicationsController < Decidim::Admin::ApplicationController
10
8
  include Concerns::ParticipatoryProcessAdmin
11
9
 
12
10
  def create
@@ -1,12 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_dependency "decidim/admin/application_controller"
4
-
5
3
  module Decidim
6
4
  module Admin
7
5
  # Controller that allows managing participatory process step activations.
8
6
  #
9
- class ParticipatoryProcessStepActivationsController < ApplicationController
7
+ class ParticipatoryProcessStepActivationsController < Decidim::Admin::ApplicationController
10
8
  include Concerns::ParticipatoryProcessAdmin
11
9
 
12
10
  def create
@@ -1,12 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_dependency "decidim/admin/application_controller"
4
-
5
3
  module Decidim
6
4
  module Admin
7
5
  # Controller that allows managing participatory process step ordering.
8
6
  #
9
- class ParticipatoryProcessStepOrderingController < ApplicationController
7
+ class ParticipatoryProcessStepOrderingController < Decidim::Admin::ApplicationController
10
8
  include Concerns::ParticipatoryProcessAdmin
11
9
 
12
10
  def create
@@ -1,12 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_dependency "decidim/admin/application_controller"
4
-
5
3
  module Decidim
6
4
  module Admin
7
5
  # Controller that allows managing participatory process steps.
8
6
  #
9
- class ParticipatoryProcessStepsController < ApplicationController
7
+ class ParticipatoryProcessStepsController < Decidim::Admin::ApplicationController
10
8
  include Concerns::ParticipatoryProcessAdmin
11
9
 
12
10
  def index
@@ -1,12 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_dependency "decidim/admin/application_controller"
4
-
5
3
  module Decidim
6
4
  module Admin
7
5
  # Controller that allows managing participatory process user roles.
8
6
  #
9
- class ParticipatoryProcessUserRolesController < ApplicationController
7
+ class ParticipatoryProcessUserRolesController < Decidim::Admin::ApplicationController
10
8
  include Concerns::ParticipatoryProcessAdmin
11
9
 
12
10
  def index
@@ -38,7 +36,7 @@ module Decidim
38
36
  def edit
39
37
  @user_role = collection.find(params[:id])
40
38
  authorize! :update, @user_role
41
- @form = form(ParticipatoryProcessUserRoleForm).from_model(@user_role.user, current_process: current_participatory_process)
39
+ @form = form(ParticipatoryProcessUserRoleForm).from_model(@user_role.user)
42
40
  end
43
41
 
44
42
  def update
@@ -1,12 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_dependency "decidim/admin/application_controller"
4
-
5
3
  module Decidim
6
4
  module Admin
7
5
  # Controller that allows managing participatory processes.
8
6
  #
9
- class ParticipatoryProcessesController < ApplicationController
7
+ class ParticipatoryProcessesController < Decidim::Admin::ApplicationController
10
8
  helper Decidim::OrganizationScopesHelper
11
9
  helper_method :current_participatory_process
12
10
 
@@ -1,12 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_dependency "decidim/admin/application_controller"
4
-
5
3
  module Decidim
6
4
  module Admin
7
5
  # Controller that allows managing all scopes at the admin panel.
8
6
  #
9
- class ScopesController < ApplicationController
7
+ class ScopesController < Decidim::Admin::ApplicationController
10
8
  layout "decidim/admin/settings"
11
9
 
12
10
  def index
@@ -1,12 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_dependency "decidim/admin/application_controller"
4
-
5
3
  module Decidim
6
4
  module Admin
7
5
  # Controller that allows managing all pages at the admin panel.
8
6
  #
9
- class StaticPagesController < ApplicationController
7
+ class StaticPagesController < Decidim::Admin::ApplicationController
10
8
  layout "decidim/admin/pages"
11
9
 
12
10
  def index
@@ -1,12 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_dependency "decidim/admin/application_controller"
4
-
5
3
  module Decidim
6
4
  module Admin
7
5
  # Controller that allows managing all admins at the admin panel.
8
6
  #
9
- class UsersController < Admin::ApplicationController
7
+ class UsersController < Decidim::Admin::ApplicationController
10
8
  def index
11
9
  authorize! :index, :admin_users
12
10
  @users = collection.page(params[:page]).per(15)
@@ -31,6 +31,7 @@ module Decidim
31
31
  attribute :banner_image
32
32
  attribute :remove_banner_image
33
33
  attribute :participatory_process_group_id, Integer
34
+ attribute :show_statistics, Boolean
34
35
 
35
36
  validates :slug, presence: true
36
37
  validates :title, :subtitle, :description, :short_description, translatable_presence: true
@@ -88,5 +88,9 @@
88
88
  <%= form.select :participatory_process_group_id, process_groups_for_select, prompt: I18n.t("decidim.participatory_processes.participatory_process_groups.none") %>
89
89
  <% end %>
90
90
  </div>
91
+
92
+ <div class="row column">
93
+ <%= form.check_box :show_statistics %>
94
+ </div>
91
95
  </div>
92
96
  </div>
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.4.2
4
+ version: 0.4.3
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.4.2
21
+ version: 0.4.3
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.4.2
28
+ version: 0.4.3
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: rails
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -158,14 +158,14 @@ dependencies:
158
158
  requirements:
159
159
  - - '='
160
160
  - !ruby/object:Gem::Version
161
- version: 0.4.2
161
+ version: 0.4.3
162
162
  type: :development
163
163
  prerelease: false
164
164
  version_requirements: !ruby/object:Gem::Requirement
165
165
  requirements:
166
166
  - - '='
167
167
  - !ruby/object:Gem::Version
168
- version: 0.4.2
168
+ version: 0.4.3
169
169
  description: Organization administration to manage a single organization.
170
170
  email:
171
171
  - josepjaume@gmail.com
@@ -436,9 +436,7 @@ files:
436
436
  - lib/decidim/admin.rb
437
437
  - lib/decidim/admin/engine.rb
438
438
  - lib/decidim/admin/features.rb
439
- - lib/decidim/admin/test/factories.rb
440
439
  - lib/decidim/admin/test/manage_attachments_examples.rb
441
- - lib/tasks/decidim/admin_tasks.rake
442
440
  - vendor/assets/javascripts/html.sortable.js
443
441
  - vendor/assets/javascripts/moment.min.js
444
442
  homepage: https://github.com/decidim/decidim
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- FactoryGirl.define do
4
- factory :participatory_process_user_role, class: Decidim::ParticipatoryProcessUserRole do
5
- user
6
- participatory_process
7
- role "admin"
8
- end
9
- end
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
- # desc "Explaining what the task does"
3
- # task :decidim_admin do
4
- # # Task goes here
5
- # end