decidim-core 0.4.4 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/decidim_core_manifest.js +1 -0
  3. data/app/assets/images/decidim/icons.svg +1 -1
  4. data/app/assets/javascripts/decidim.js.es6 +3 -0
  5. data/app/assets/javascripts/decidim/form_filter.component.js.es6 +39 -6
  6. data/app/assets/javascripts/decidim/form_filter.component.test.js +13 -10
  7. data/app/assets/javascripts/decidim/impersonation.js.es6 +16 -0
  8. data/app/assets/javascripts/decidim/select2.field.js.es6 +47 -0
  9. data/app/assets/javascripts/decidim/select2.js.es6 +8 -0
  10. data/app/assets/stylesheets/decidim/_decidim.scss +3 -0
  11. data/app/assets/stylesheets/decidim/extras/_announcement.scss +3 -0
  12. data/app/assets/stylesheets/decidim/extras/_callout.scss +1 -1
  13. data/app/assets/stylesheets/decidim/extras/_impersonation-bar.scss +22 -0
  14. data/app/assets/stylesheets/decidim/extras/_process_stats.scss +1 -1
  15. data/app/assets/stylesheets/decidim/extras/_proposal_form.scss +7 -0
  16. data/app/assets/stylesheets/decidim/extras/_reference.scss +1 -1
  17. data/app/assets/stylesheets/decidim/extras/_register_form.scss +1 -1
  18. data/app/assets/stylesheets/decidim/extras/_social_icons_mini.scss +1 -1
  19. data/app/assets/stylesheets/decidim/layouts/_home.scss +1 -1
  20. data/app/assets/stylesheets/decidim/layouts/_view.scss +1 -1
  21. data/app/assets/stylesheets/decidim/map.css +1 -1
  22. data/app/assets/stylesheets/decidim/modules/_author-avatar.scss +1 -1
  23. data/app/assets/stylesheets/decidim/modules/_callout.scss +1 -1
  24. data/app/assets/stylesheets/decidim/modules/_datepicker.scss +1 -1
  25. data/app/assets/stylesheets/decidim/modules/_definition-data.scss +1 -1
  26. data/app/assets/stylesheets/decidim/modules/_extra.scss +1 -1
  27. data/app/assets/stylesheets/decidim/modules/_flag.scss +1 -1
  28. data/app/assets/stylesheets/decidim/modules/_footer.scss +1 -1
  29. data/app/assets/stylesheets/decidim/modules/_forms.scss +1 -1
  30. data/app/assets/stylesheets/decidim/modules/_help.scss +1 -1
  31. data/app/assets/stylesheets/decidim/modules/_pagination.scss +1 -1
  32. data/app/assets/stylesheets/decidim/modules/_process-info.scss +1 -1
  33. data/app/assets/stylesheets/decidim/modules/_reference.scss +1 -1
  34. data/app/assets/stylesheets/decidim/modules/_reveal.scss +1 -1
  35. data/app/assets/stylesheets/decidim/modules/_signup.scss +1 -1
  36. data/app/assets/stylesheets/decidim/modules/_static-pages.scss +1 -1
  37. data/app/assets/stylesheets/decidim/modules/_tags.scss +1 -1
  38. data/app/assets/stylesheets/decidim/modules/_title-action.scss +1 -1
  39. data/app/assets/stylesheets/decidim/modules/_user-form.scss +1 -1
  40. data/app/assets/stylesheets/decidim/modules/_video.scss +1 -1
  41. data/app/assets/stylesheets/decidim/plugins/_select2.scss +63 -0
  42. data/app/assets/stylesheets/decidim/utils/_toggle-expand.scss +1 -1
  43. data/app/commands/decidim/invite_user.rb +5 -2
  44. data/app/controllers/concerns/decidim/devise_controllers.rb +6 -0
  45. data/app/controllers/concerns/decidim/impersonate_users.rb +67 -0
  46. data/app/controllers/concerns/decidim/needs_authorization.rb +0 -4
  47. data/app/controllers/decidim/application_controller.rb +7 -0
  48. data/app/controllers/decidim/devise/invitations_controller.rb +7 -0
  49. data/app/controllers/decidim/errors_controller.rb +1 -1
  50. data/app/controllers/decidim/features/base_controller.rb +1 -1
  51. data/app/controllers/decidim/participatory_process_widgets_controller.rb +0 -2
  52. data/app/controllers/decidim/scopes_controller.rb +29 -0
  53. data/app/forms/decidim/attachment_form.rb +14 -0
  54. data/app/forms/decidim/invite_user_form.rb +12 -1
  55. data/app/helpers/decidim/application_helper.rb +1 -0
  56. data/app/helpers/decidim/attachments_helper.rb +11 -0
  57. data/app/helpers/decidim/decidim_form_helper.rb +9 -8
  58. data/app/helpers/decidim/icon_helper.rb +12 -2
  59. data/app/helpers/decidim/participatory_process_helper.rb +0 -24
  60. data/app/helpers/decidim/scopes_helper.rb +15 -0
  61. data/app/helpers/decidim/translations_helper.rb +1 -1
  62. data/app/mailers/decidim/reported_mailer.rb +1 -1
  63. data/app/models/decidim/abilities/admin_ability.rb +1 -0
  64. data/app/models/decidim/abilities/everyone_ability.rb +2 -0
  65. data/app/models/decidim/abilities/user_manager_ability.rb +35 -0
  66. data/app/models/decidim/impersonation_log.rb +35 -0
  67. data/app/models/decidim/organization.rb +9 -0
  68. data/app/models/decidim/participatory_process.rb +1 -4
  69. data/app/models/decidim/scope.rb +65 -1
  70. data/app/models/decidim/scope_type.rb +16 -0
  71. data/app/models/decidim/user.rb +35 -4
  72. data/app/presenters/decidim/participatory_process_stats_presenter.rb +1 -1
  73. data/app/queries/decidim/freetext_scopes.rb +39 -0
  74. data/app/services/decidim/resource_search.rb +7 -6
  75. data/app/uploaders/decidim/attachment_uploader.rb +1 -1
  76. data/app/views/decidim/account/delete.html.erb +1 -1
  77. data/app/views/decidim/application/_documents.html.erb +4 -2
  78. data/app/views/decidim/participatory_processes/_statistics.html.erb +1 -1
  79. data/app/views/decidim/participatory_processes/show.html.erb +4 -0
  80. data/app/views/decidim/reported_mailer/hide.html.erb +1 -1
  81. data/app/views/decidim/reported_mailer/report.html.erb +1 -1
  82. data/app/views/decidim/shared/_announcement.html.erb +5 -0
  83. data/app/views/decidim/shared/_feature_announcement.html.erb +5 -0
  84. data/app/views/decidim/shared/_flag_modal.html.erb +1 -1
  85. data/app/views/decidim/shared/_tags.html.erb +10 -0
  86. data/app/views/devise/mailer/invitation_instructions.html.erb +13 -0
  87. data/app/views/devise/mailer/invitation_instructions.text.erb +11 -0
  88. data/app/views/layouts/decidim/_application.html.erb +1 -0
  89. data/app/views/layouts/decidim/_impersonation_warning.html.erb +10 -0
  90. data/app/views/layouts/decidim/_wrapper.html.erb +1 -1
  91. data/app/views/pages/home/_statistics.html.erb +1 -1
  92. data/app/views/pages/home/_sub_hero.html.erb +1 -1
  93. data/config/locales/ca.yml +10 -1
  94. data/config/locales/en.yml +9 -0
  95. data/config/locales/es.yml +10 -1
  96. data/config/locales/eu.yml +22 -1
  97. data/config/locales/fi.yml +1 -1
  98. data/config/locales/fr.yml +60 -0
  99. data/config/locales/it.yml +1 -1
  100. data/config/locales/nl.yml +1 -1
  101. data/config/locales/pl.yml +91 -0
  102. data/config/routes.rb +2 -0
  103. data/db/migrate/20170605162500_add_hierarchy_to_scopes.rb +70 -0
  104. data/db/migrate/20170713131206_add_admin_to_users.rb +6 -1
  105. data/db/migrate/20170713131308_migrate_user_roles_to_participatory_process_roles.rb +5 -1
  106. data/db/migrate/20170720135441_add_managed_to_users.rb +7 -0
  107. data/db/migrate/20170720140610_set_email_unique_in_organization_condition_for_managed_users.rb +12 -0
  108. data/db/migrate/20170724130558_create_impersonation_logs.rb +15 -0
  109. data/db/migrate/20170727125445_add_roles_to_users.rb +7 -0
  110. data/db/migrate/20170804125402_attachment_description_nullable.rb +7 -0
  111. data/db/migrate/20170808080905_add_announcement_to_participatory_processes.rb +7 -0
  112. data/db/migrate/20170809084005_add_scopes_enabled_to_participatory_processes.rb +7 -0
  113. data/db/seeds.rb +34 -10
  114. data/lib/decidim/core.rb +11 -5
  115. data/lib/decidim/core/engine.rb +1 -0
  116. data/lib/decidim/core/test.rb +2 -0
  117. data/lib/decidim/core/test/factories.rb +59 -22
  118. data/lib/decidim/core/test/shared_examples/announcements_examples.rb +58 -0
  119. data/lib/decidim/core/test/shared_examples/comments_examples.rb +15 -29
  120. data/lib/decidim/core/test/shared_examples/errors.rb +1 -1
  121. data/lib/decidim/core/test/shared_examples/has_attachments.rb +4 -9
  122. data/lib/decidim/core/test/shared_examples/manage_moderations_examples.rb +1 -8
  123. data/lib/decidim/core/test/shared_examples/paginated_resource_examples.rb +2 -2
  124. data/lib/decidim/core/test/shared_examples/process_announcements_examples.rb +33 -0
  125. data/lib/decidim/core/test/shared_examples/reports_examples.rb +1 -2
  126. data/lib/decidim/core/version.rb +6 -2
  127. data/lib/decidim/faker/localized.rb +4 -4
  128. data/lib/decidim/filter_form_builder.rb +7 -0
  129. data/lib/decidim/form_builder.rb +34 -5
  130. data/lib/decidim/scopable.rb +33 -0
  131. data/lib/decidim/settings_manifest.rb +10 -2
  132. data/lib/decidim/translatable_attributes.rb +0 -1
  133. metadata +61 -17
  134. data/app/helpers/decidim/organization_scopes_helper.rb +0 -42
  135. data/db/seeds/city3.jpeg +0 -0
  136. data/lib/tasks/factory_girl.rake +0 -17
@@ -3,11 +3,15 @@
3
3
  # This holds Decidim's version and the Rails version on which it depends.
4
4
  module Decidim
5
5
  def self.version
6
- "0.4.4"
6
+ "0.5.0"
7
7
  end
8
8
 
9
9
  def self.rails_version
10
- ["~> 5.1.1"]
10
+ ["~> 5.1.3"]
11
+ end
12
+
13
+ def self.faker_version
14
+ "~> 1.8.4"
11
15
  end
12
16
 
13
17
  def self.add_default_gemspec_properties(spec)
@@ -121,9 +121,9 @@ module Decidim
121
121
  #
122
122
  # Returns a Hash with a value for each locale.
123
123
  def self.literal(text)
124
- I18n.available_locales.inject({}) do |result, locale|
124
+ Decidim.available_locales.inject({}) do |result, locale|
125
125
  result.update(locale => text)
126
- end
126
+ end.with_indifferent_access
127
127
  end
128
128
 
129
129
  # Wrapps a text build by the block with some other text.o
@@ -148,13 +148,13 @@ module Decidim
148
148
 
149
149
  # nodoc
150
150
  def self.localized
151
- I18n.available_locales.inject({}) do |result, locale|
151
+ Decidim.available_locales.inject({}) do |result, locale|
152
152
  text = ::Faker::Base.with_locale(locale) do
153
153
  yield
154
154
  end
155
155
 
156
156
  result.update(locale => text)
157
- end
157
+ end.with_indifferent_access
158
158
  end
159
159
 
160
160
  private_class_method :localized
@@ -41,6 +41,13 @@ module Decidim
41
41
  end
42
42
  end
43
43
 
44
+ # Wrap the scopes select in a custom fieldset.
45
+ def scopes_select(method, options = {})
46
+ fieldset_wrapper options[:legend_title] do
47
+ super(method, options)
48
+ end
49
+ end
50
+
44
51
  private
45
52
 
46
53
  # Private: Renders a custom fieldset and execute the given block.
@@ -42,18 +42,21 @@ module Decidim
42
42
  )
43
43
  end
44
44
 
45
+ tabs_id = options[:tabs_id] || "#{object_name}-#{name}-tabs"
46
+
45
47
  label_tabs = content_tag(:div, class: "label--tabs") do
46
48
  field_label = label_i18n(name, options[:label] || label_for(name))
47
49
 
48
50
  tabs_panels = "".html_safe
49
51
  if options[:label] != false
50
- tabs_panels = content_tag(:ul, class: "tabs tabs--lang", id: "#{@object_name}-#{name}-tabs", data: { tabs: true }) do
52
+ tabs_panels = content_tag(:ul, class: "tabs tabs--lang", id: tabs_id, data: { tabs: true }) do
51
53
  locales.each_with_index.inject("".html_safe) do |string, (locale, index)|
52
54
  string + content_tag(:li, class: tab_element_class_for("title", index)) do
53
55
  title = I18n.with_locale(locale) { I18n.t("name", scope: "locale") }
54
56
  element_class = nil
55
57
  element_class = "is-tab-error" if error?(name_with_locale(name, locale))
56
- content_tag(:a, title, href: "##{name}-panel-#{index}", class: element_class)
58
+ tab_content_id = "#{tabs_id}-#{name}-panel-#{index}"
59
+ content_tag(:a, title, href: "##{tab_content_id}", class: element_class)
57
60
  end
58
61
  end
59
62
  end
@@ -62,9 +65,10 @@ module Decidim
62
65
  safe_join [field_label, tabs_panels]
63
66
  end
64
67
 
65
- tabs_content = content_tag(:div, class: "tabs-content", data: { tabs_content: "#{@object_name}-#{name}-tabs" }) do
68
+ tabs_content = content_tag(:div, class: "tabs-content", data: { tabs_content: tabs_id }) do
66
69
  locales.each_with_index.inject("".html_safe) do |string, (locale, index)|
67
- string + content_tag(:div, class: tab_element_class_for("panel", index), id: "#{name}-panel-#{index}") do
70
+ tab_content_id = "#{tabs_id}-#{name}-panel-#{index}"
71
+ string + content_tag(:div, class: tab_element_class_for("panel", index), id: tab_content_id) do
68
72
  send(type, name_with_locale(name, locale), options.merge(label: false))
69
73
  end
70
74
  end
@@ -122,8 +126,33 @@ module Decidim
122
126
  else
123
127
  []
124
128
  end
129
+ html_options = {}
130
+
131
+ select(name, @template.options_for_select(categories, selected: selected, disabled: disabled), options, html_options)
132
+ end
133
+
134
+ # Public: Generates a select field with the scopes.
135
+ #
136
+ # name - The name of the field (usually scope_id)
137
+ # collection - A collection of scopes.
138
+ # options - An optional Hash with options:
139
+ # - prompt - An optional String with the text to display as prompt.
140
+ #
141
+ # Returns a String.
142
+ def scopes_select(name, options = {})
143
+ selected = object.send(name)
144
+ if selected.present?
145
+ selected = [selected] unless selected.is_a?(Array)
146
+ scopes = Decidim::Scope.where(id: selected.map(&:to_i)).map { |scope| [scope.name[I18n.locale.to_s], scope.id] }
147
+ else
148
+ scopes = []
149
+ end
150
+ prompt = options.delete(:prompt)
151
+ remote_path = options.delete(:remote_path) || false
152
+ multiple = options.delete(:multiple) || false
153
+ html_options = { multiple: multiple, class: "select2", "data-remote-path" => remote_path, "data-placeholder" => prompt }
125
154
 
126
- select(name, @template.options_for_select(categories, selected: selected, disabled: disabled), options)
155
+ select(name, @template.options_for_select(scopes, selected: selected), options, html_options)
127
156
  end
128
157
 
129
158
  # Public: Override so checkboxes are rendered before the label.
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "active_support/concern"
4
+
5
+ module Decidim
6
+ # This concern contains the logic related to scopes.
7
+ module Scopable
8
+ extend ActiveSupport::Concern
9
+
10
+ included do
11
+ belongs_to :scope,
12
+ foreign_key: "decidim_scope_id",
13
+ class_name: "Decidim::Scope",
14
+ optional: true
15
+ end
16
+
17
+ # Gets the children scopes of the object's scope.
18
+ #
19
+ # If it's global, returns the organization's top scopes.
20
+ #
21
+ # Returns an ActiveRecord::Relation.
22
+ def subscopes
23
+ scope ? scope.children : organization.top_scopes
24
+ end
25
+
26
+ # Whether the resource has subscopes or not.
27
+ #
28
+ # Returns a boolean.
29
+ def has_subscopes?
30
+ scopes_enabled && subscopes.any?
31
+ end
32
+ end
33
+ end
@@ -40,6 +40,7 @@ module Decidim
40
40
  @schema = Class.new do
41
41
  include Virtus.model
42
42
  include ActiveModel::Validations
43
+ include TranslatableAttributes
43
44
 
44
45
  cattr_accessor :manifest
45
46
 
@@ -56,8 +57,13 @@ module Decidim
56
57
  end
57
58
 
58
59
  manifest.attributes.each do |name, attribute|
59
- attribute name, attribute.type_class, default: attribute.default_value
60
- validates name, presence: true
60
+ if attribute.translated?
61
+ translatable_attribute name, attribute.type_class, default: attribute.default_value
62
+ validates name, translatable_presence: true
63
+ else
64
+ attribute name, attribute.type_class, default: attribute.default_value
65
+ validates name, presence: true
66
+ end
61
67
  end
62
68
  end
63
69
 
@@ -81,6 +87,8 @@ module Decidim
81
87
 
82
88
  attribute :type, Symbol, default: :boolean
83
89
  attribute :default
90
+ attribute :translated, Boolean, default: false
91
+ attribute :editor, Boolean, default: false
84
92
 
85
93
  validates :type, inclusion: { in: TYPES.keys }
86
94
 
@@ -29,7 +29,6 @@ module Decidim
29
29
 
30
30
  locales.each do |locale|
31
31
  attribute_name = "#{name}_#{locale}".gsub("-", "__")
32
-
33
32
  attribute attribute_name, type, *options
34
33
 
35
34
  define_method attribute_name do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-08-02 00:00:00.000000000 Z
13
+ date: 2017-08-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: 5.1.1
21
+ version: 5.1.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: 5.1.1
28
+ version: 5.1.3
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: rails-i18n
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -446,76 +446,90 @@ dependencies:
446
446
  - - '='
447
447
  - !ruby/object:Gem::Version
448
448
  version: 1.2.1
449
+ - !ruby/object:Gem::Dependency
450
+ name: select2-rails
451
+ requirement: !ruby/object:Gem::Requirement
452
+ requirements:
453
+ - - "~>"
454
+ - !ruby/object:Gem::Version
455
+ version: 4.0.3
456
+ type: :runtime
457
+ prerelease: false
458
+ version_requirements: !ruby/object:Gem::Requirement
459
+ requirements:
460
+ - - "~>"
461
+ - !ruby/object:Gem::Version
462
+ version: 4.0.3
449
463
  - !ruby/object:Gem::Dependency
450
464
  name: decidim-api
451
465
  requirement: !ruby/object:Gem::Requirement
452
466
  requirements:
453
467
  - - '='
454
468
  - !ruby/object:Gem::Version
455
- version: 0.4.4
469
+ version: 0.5.0
456
470
  type: :runtime
457
471
  prerelease: false
458
472
  version_requirements: !ruby/object:Gem::Requirement
459
473
  requirements:
460
474
  - - '='
461
475
  - !ruby/object:Gem::Version
462
- version: 0.4.4
476
+ version: 0.5.0
463
477
  - !ruby/object:Gem::Dependency
464
478
  name: decidim-dev
465
479
  requirement: !ruby/object:Gem::Requirement
466
480
  requirements:
467
481
  - - '='
468
482
  - !ruby/object:Gem::Version
469
- version: 0.4.4
483
+ version: 0.5.0
470
484
  type: :development
471
485
  prerelease: false
472
486
  version_requirements: !ruby/object:Gem::Requirement
473
487
  requirements:
474
488
  - - '='
475
489
  - !ruby/object:Gem::Version
476
- version: 0.4.4
490
+ version: 0.5.0
477
491
  - !ruby/object:Gem::Dependency
478
492
  name: decidim-proposals
479
493
  requirement: !ruby/object:Gem::Requirement
480
494
  requirements:
481
495
  - - '='
482
496
  - !ruby/object:Gem::Version
483
- version: 0.4.4
497
+ version: 0.5.0
484
498
  type: :development
485
499
  prerelease: false
486
500
  version_requirements: !ruby/object:Gem::Requirement
487
501
  requirements:
488
502
  - - '='
489
503
  - !ruby/object:Gem::Version
490
- version: 0.4.4
504
+ version: 0.5.0
491
505
  - !ruby/object:Gem::Dependency
492
506
  name: decidim-meetings
493
507
  requirement: !ruby/object:Gem::Requirement
494
508
  requirements:
495
509
  - - '='
496
510
  - !ruby/object:Gem::Version
497
- version: 0.4.4
511
+ version: 0.5.0
498
512
  type: :development
499
513
  prerelease: false
500
514
  version_requirements: !ruby/object:Gem::Requirement
501
515
  requirements:
502
516
  - - '='
503
517
  - !ruby/object:Gem::Version
504
- version: 0.4.4
518
+ version: 0.5.0
505
519
  - !ruby/object:Gem::Dependency
506
520
  name: decidim-results
507
521
  requirement: !ruby/object:Gem::Requirement
508
522
  requirements:
509
523
  - - '='
510
524
  - !ruby/object:Gem::Version
511
- version: 0.4.4
525
+ version: 0.5.0
512
526
  type: :development
513
527
  prerelease: false
514
528
  version_requirements: !ruby/object:Gem::Requirement
515
529
  requirements:
516
530
  - - '='
517
531
  - !ruby/object:Gem::Version
518
- version: 0.4.4
532
+ version: 0.5.0
519
533
  description: Adds core features so other engines can hook into the framework.
520
534
  email:
521
535
  - josepjaume@gmail.com
@@ -556,8 +570,11 @@ files:
556
570
  - app/assets/javascripts/decidim/form_filter.component.test.js
557
571
  - app/assets/javascripts/decidim/foundation.js.es6
558
572
  - app/assets/javascripts/decidim/history.js.es6
573
+ - app/assets/javascripts/decidim/impersonation.js.es6
559
574
  - app/assets/javascripts/decidim/map.js.es6.erb
560
575
  - app/assets/javascripts/decidim/orders.js.es6
576
+ - app/assets/javascripts/decidim/select2.field.js.es6
577
+ - app/assets/javascripts/decidim/select2.js.es6
561
578
  - app/assets/javascripts/decidim/user_registrations.js.es6
562
579
  - app/assets/javascripts/decidim/widget.js.es6
563
580
  - app/assets/stylesheets/decidim/_decidim.scss
@@ -566,12 +583,15 @@ files:
566
583
  - app/assets/stylesheets/decidim/editor.sass
567
584
  - app/assets/stylesheets/decidim/email.css
568
585
  - app/assets/stylesheets/decidim/extras/_add_comments.scss
586
+ - app/assets/stylesheets/decidim/extras/_announcement.scss
569
587
  - app/assets/stylesheets/decidim/extras/_callout.scss
570
588
  - app/assets/stylesheets/decidim/extras/_collection-sort-controls.scss
571
589
  - app/assets/stylesheets/decidim/extras/_embed.scss
590
+ - app/assets/stylesheets/decidim/extras/_impersonation-bar.scss
572
591
  - app/assets/stylesheets/decidim/extras/_label-required.scss
573
592
  - app/assets/stylesheets/decidim/extras/_leaflet.scss
574
593
  - app/assets/stylesheets/decidim/extras/_process_stats.scss
594
+ - app/assets/stylesheets/decidim/extras/_proposal_form.scss
575
595
  - app/assets/stylesheets/decidim/extras/_quill.scss
576
596
  - app/assets/stylesheets/decidim/extras/_reference.scss
577
597
  - app/assets/stylesheets/decidim/extras/_register_form.scss
@@ -626,6 +646,7 @@ files:
626
646
  - app/assets/stylesheets/decidim/modules/_typography.scss
627
647
  - app/assets/stylesheets/decidim/modules/_user-form.scss
628
648
  - app/assets/stylesheets/decidim/modules/_video.scss
649
+ - app/assets/stylesheets/decidim/plugins/_select2.scss
629
650
  - app/assets/stylesheets/decidim/utils/_fontface.scss
630
651
  - app/assets/stylesheets/decidim/utils/_helpers.scss
631
652
  - app/assets/stylesheets/decidim/utils/_keyframes.scss
@@ -648,6 +669,7 @@ files:
648
669
  - app/controllers/concerns/decidim/devise_controllers.rb
649
670
  - app/controllers/concerns/decidim/filter_resource.rb
650
671
  - app/controllers/concerns/decidim/form_factory.rb
672
+ - app/controllers/concerns/decidim/impersonate_users.rb
651
673
  - app/controllers/concerns/decidim/locale_switcher.rb
652
674
  - app/controllers/concerns/decidim/needs_authorization.rb
653
675
  - app/controllers/concerns/decidim/needs_organization.rb
@@ -677,9 +699,11 @@ files:
677
699
  - app/controllers/decidim/participatory_process_widgets_controller.rb
678
700
  - app/controllers/decidim/participatory_processes_controller.rb
679
701
  - app/controllers/decidim/reports_controller.rb
702
+ - app/controllers/decidim/scopes_controller.rb
680
703
  - app/controllers/decidim/static_map_controller.rb
681
704
  - app/controllers/decidim/widgets_controller.rb
682
705
  - app/forms/decidim/account_form.rb
706
+ - app/forms/decidim/attachment_form.rb
683
707
  - app/forms/decidim/delete_account_form.rb
684
708
  - app/forms/decidim/form.rb
685
709
  - app/forms/decidim/invite_user_form.rb
@@ -708,12 +732,12 @@ files:
708
732
  - app/helpers/decidim/meta_tags_helper.rb
709
733
  - app/helpers/decidim/omniauth_helper.rb
710
734
  - app/helpers/decidim/orders_helper.rb
711
- - app/helpers/decidim/organization_scopes_helper.rb
712
735
  - app/helpers/decidim/paginate_helper.rb
713
736
  - app/helpers/decidim/participatory_process_helper.rb
714
737
  - app/helpers/decidim/participatory_process_steps_helper.rb
715
738
  - app/helpers/decidim/replace_buttons_helper.rb
716
739
  - app/helpers/decidim/resource_helper.rb
740
+ - app/helpers/decidim/scopes_helper.rb
717
741
  - app/helpers/decidim/translations_helper.rb
718
742
  - app/helpers/decidim/user_profile_helper.rb
719
743
  - app/helpers/decidim/widget_urls_helper.rb
@@ -732,6 +756,7 @@ files:
732
756
  - app/models/decidim/abilities/participatory_process_admin_ability.rb
733
757
  - app/models/decidim/abilities/participatory_process_collaborator_ability.rb
734
758
  - app/models/decidim/abilities/participatory_process_moderator_ability.rb
759
+ - app/models/decidim/abilities/user_manager_ability.rb
735
760
  - app/models/decidim/application_record.rb
736
761
  - app/models/decidim/attachment.rb
737
762
  - app/models/decidim/authorization.rb
@@ -739,6 +764,7 @@ files:
739
764
  - app/models/decidim/category.rb
740
765
  - app/models/decidim/feature.rb
741
766
  - app/models/decidim/identity.rb
767
+ - app/models/decidim/impersonation_log.rb
742
768
  - app/models/decidim/moderation.rb
743
769
  - app/models/decidim/newsletter.rb
744
770
  - app/models/decidim/organization.rb
@@ -749,6 +775,7 @@ files:
749
775
  - app/models/decidim/report.rb
750
776
  - app/models/decidim/resource_link.rb
751
777
  - app/models/decidim/scope.rb
778
+ - app/models/decidim/scope_type.rb
752
779
  - app/models/decidim/static_page.rb
753
780
  - app/models/decidim/user.rb
754
781
  - app/models/decidim/user_group.rb
@@ -758,6 +785,7 @@ files:
758
785
  - app/presenters/decidim/menu_presenter.rb
759
786
  - app/presenters/decidim/participatory_process_stats_presenter.rb
760
787
  - app/presenters/decidim/resource_locator_presenter.rb
788
+ - app/queries/decidim/freetext_scopes.rb
761
789
  - app/queries/decidim/highlighted_participatory_processes.rb
762
790
  - app/queries/decidim/organization_participatory_process_groups.rb
763
791
  - app/queries/decidim/organization_participatory_processes.rb
@@ -831,16 +859,21 @@ files:
831
859
  - app/views/decidim/reported_mailer/report.html.erb
832
860
  - app/views/decidim/shared/_action_authorization_modal.html.erb
833
861
  - app/views/decidim/shared/_address_details.html.erb
862
+ - app/views/decidim/shared/_announcement.html.erb
834
863
  - app/views/decidim/shared/_comments.html.erb
835
864
  - app/views/decidim/shared/_embed_modal.html.erb
865
+ - app/views/decidim/shared/_feature_announcement.html.erb
836
866
  - app/views/decidim/shared/_flag_modal.html.erb
837
867
  - app/views/decidim/shared/_login_modal.html.erb
838
868
  - app/views/decidim/shared/_orders.html.erb
839
869
  - app/views/decidim/shared/_results_per_page.html.erb
840
870
  - app/views/decidim/shared/_share_modal.html.erb
841
871
  - app/views/decidim/shared/_static_map.html.erb
872
+ - app/views/decidim/shared/_tags.html.erb
842
873
  - app/views/decidim/widgets/show.js.erb
843
874
  - app/views/devise/mailer/confirmation_instructions.html.erb
875
+ - app/views/devise/mailer/invitation_instructions.html.erb
876
+ - app/views/devise/mailer/invitation_instructions.text.erb
844
877
  - app/views/devise/mailer/invite_admin.html.erb
845
878
  - app/views/devise/mailer/invite_admin.text.erb
846
879
  - app/views/devise/mailer/invite_collaborator.html.erb
@@ -860,6 +893,7 @@ files:
860
893
  - app/views/layouts/decidim/_cookie_warning.html.erb
861
894
  - app/views/layouts/decidim/_head.html.erb
862
895
  - app/views/layouts/decidim/_head_extra.html.erb
896
+ - app/views/layouts/decidim/_impersonation_warning.html.erb
863
897
  - app/views/layouts/decidim/_language_chooser.html.erb
864
898
  - app/views/layouts/decidim/_logo.html.erb
865
899
  - app/views/layouts/decidim/_mailer_logo.html.erb
@@ -894,6 +928,7 @@ files:
894
928
  - config/locales/fr.yml
895
929
  - config/locales/it.yml
896
930
  - config/locales/nl.yml
931
+ - config/locales/pl.yml
897
932
  - config/routes.rb
898
933
  - config/secrets.yml
899
934
  - db/migrate/20160817115213_devise_create_decidim_users.rb
@@ -964,18 +999,25 @@ files:
964
999
  - db/migrate/20170405094258_change_decidim_identities_provider_uid_index_uniqueness.rb
965
1000
  - db/migrate/20170529150743_add_rejected_at_to_user_groups.rb
966
1001
  - db/migrate/20170605140421_add_deleted_fields_to_users.rb
1002
+ - db/migrate/20170605162500_add_hierarchy_to_scopes.rb
967
1003
  - db/migrate/20170606102659_set_email_unique_in_organization_conditional.rb
968
1004
  - db/migrate/20170608142521_add_organization_to_user_groups.rb
969
1005
  - db/migrate/20170612070905_add_uniqueness_to_name_and_document_number_to_user_groups.rb
970
1006
  - db/migrate/20170612100253_create_decidim_categorizations.rb
971
1007
  - db/migrate/20170713131206_add_admin_to_users.rb
972
1008
  - db/migrate/20170713131308_migrate_user_roles_to_participatory_process_roles.rb
1009
+ - db/migrate/20170720135441_add_managed_to_users.rb
1010
+ - db/migrate/20170720140610_set_email_unique_in_organization_condition_for_managed_users.rb
1011
+ - db/migrate/20170724130558_create_impersonation_logs.rb
973
1012
  - db/migrate/20170725085104_add_show_statistics_to_participatory_processes.rb
1013
+ - db/migrate/20170727125445_add_roles_to_users.rb
1014
+ - db/migrate/20170804125402_attachment_description_nullable.rb
1015
+ - db/migrate/20170808080905_add_announcement_to_participatory_processes.rb
1016
+ - db/migrate/20170809084005_add_scopes_enabled_to_participatory_processes.rb
974
1017
  - db/seeds.rb
975
1018
  - db/seeds/Exampledocument.pdf
976
1019
  - db/seeds/city.jpeg
977
1020
  - db/seeds/city2.jpeg
978
- - db/seeds/city3.jpeg
979
1021
  - db/seeds/homepage_image.jpg
980
1022
  - lib/decidim/abilities.rb
981
1023
  - lib/decidim/abilities/participatory_process_role_ability.rb
@@ -997,6 +1039,7 @@ files:
997
1039
  - lib/decidim/core/engine.rb
998
1040
  - lib/decidim/core/test.rb
999
1041
  - lib/decidim/core/test/factories.rb
1042
+ - lib/decidim/core/test/shared_examples/announcements_examples.rb
1000
1043
  - lib/decidim/core/test/shared_examples/authorable.rb
1001
1044
  - lib/decidim/core/test/shared_examples/comments_examples.rb
1002
1045
  - lib/decidim/core/test/shared_examples/errors.rb
@@ -1008,6 +1051,7 @@ files:
1008
1051
  - lib/decidim/core/test/shared_examples/localised_email.rb
1009
1052
  - lib/decidim/core/test/shared_examples/manage_moderations_examples.rb
1010
1053
  - lib/decidim/core/test/shared_examples/paginated_resource_examples.rb
1054
+ - lib/decidim/core/test/shared_examples/process_announcements_examples.rb
1011
1055
  - lib/decidim/core/test/shared_examples/publicable.rb
1012
1056
  - lib/decidim/core/test/shared_examples/reportable.rb
1013
1057
  - lib/decidim/core/test/shared_examples/reports_examples.rb
@@ -1046,12 +1090,12 @@ files:
1046
1090
  - lib/decidim/reportable.rb
1047
1091
  - lib/decidim/resource_manifest.rb
1048
1092
  - lib/decidim/resourceable.rb
1093
+ - lib/decidim/scopable.rb
1049
1094
  - lib/decidim/settings_manifest.rb
1050
1095
  - lib/decidim/stats_registry.rb
1051
1096
  - lib/decidim/translatable_attributes.rb
1052
1097
  - lib/devise/models/decidim_validatable.rb
1053
1098
  - lib/tasks/decidim_tasks.rake
1054
- - lib/tasks/factory_girl.rake
1055
1099
  - vendor/assets/javascripts/appendAround.js
1056
1100
  - vendor/assets/javascripts/datepicker-locales/foundation-datepicker.ca.js
1057
1101
  - vendor/assets/javascripts/datepicker-locales/foundation-datepicker.es.js