decidim-core 0.4.2 → 0.4.3
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 +4 -4
- data/app/assets/stylesheets/decidim/extras/_process_stats.scss +38 -0
- data/app/assets/stylesheets/decidim/layouts/_home.scss +2 -2
- data/app/controllers/concerns/decidim/feature_settings.rb +0 -2
- data/app/controllers/concerns/decidim/needs_organization.rb +18 -6
- data/app/controllers/decidim/account_controller.rb +1 -3
- data/app/controllers/decidim/authorizations_controller.rb +1 -3
- data/app/controllers/decidim/cookie_policy_controller.rb +1 -3
- data/app/controllers/decidim/locales_controller.rb +1 -3
- data/app/controllers/decidim/notifications_settings_controller.rb +1 -3
- data/app/controllers/decidim/own_user_groups_controller.rb +1 -3
- data/app/controllers/decidim/pages_controller.rb +1 -2
- data/app/controllers/decidim/participatory_process_groups_controller.rb +1 -3
- data/app/controllers/decidim/participatory_process_steps_controller.rb +1 -3
- data/app/controllers/decidim/participatory_processes_controller.rb +7 -5
- data/app/controllers/decidim/static_map_controller.rb +1 -3
- data/app/helpers/decidim/participatory_process_helper.rb +24 -0
- data/app/helpers/decidim/resource_helper.rb +1 -1
- data/app/presenters/decidim/home_stats_presenter.rb +12 -6
- data/app/presenters/decidim/participatory_process_stats_presenter.rb +50 -0
- data/app/views/decidim/application/_attachments.html.erb +1 -1
- data/app/views/decidim/participatory_processes/_statistics.html.erb +10 -0
- data/app/views/decidim/participatory_processes/show.html.erb +4 -7
- data/config/i18n-tasks.yml +1 -1
- data/config/locales/en.yml +19 -0
- data/config/locales/it.yml +41 -45
- data/db/migrate/20170725085104_add_show_statistics_to_participatory_processes.rb +7 -0
- data/db/seeds.rb +12 -22
- data/lib/decidim/core.rb +3 -9
- data/lib/decidim/core/engine.rb +1 -1
- data/lib/decidim/core/test/factories.rb +22 -46
- data/lib/decidim/core/version.rb +1 -1
- data/lib/decidim/feature_manifest.rb +2 -2
- metadata +16 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 889376b1a7af947c4cfdd5c6182211e66a1feebb
|
4
|
+
data.tar.gz: 8257ffd74960e6fe3f2ccdac75c8fbda7c67f634
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b9c5be3cb7b7a5878fb33ba611b452e56ee998dffc1a361483858fe714c63d382b74b128d6e531f50c329c31fe5c8aee4ed9b56a873570a41bd799b026ebd3c
|
7
|
+
data.tar.gz: 9c1c5e92003d02865b8b78bd31b52d13047536b9e46538ac52003f6831e9feae527ddaf12d410d948d823a02ed07ac55cd5a967f58432ff90354afb17cc47420
|
@@ -0,0 +1,38 @@
|
|
1
|
+
#participatory_process-statistics{
|
2
|
+
margin-bottom: 1.5rem;
|
3
|
+
}
|
4
|
+
|
5
|
+
.process_stats{
|
6
|
+
padding: 0;
|
7
|
+
.process_stats-item{
|
8
|
+
width: 33.3%;
|
9
|
+
@include breakpoint(large down){
|
10
|
+
width: 33.3%;
|
11
|
+
}
|
12
|
+
@include breakpoint(medium down){
|
13
|
+
width: 49.9%;
|
14
|
+
}
|
15
|
+
@include breakpoint(smallmedium down){
|
16
|
+
width: 100%;
|
17
|
+
}
|
18
|
+
display: inline-block;
|
19
|
+
padding: 1em;
|
20
|
+
border: $border;
|
21
|
+
background: $white;
|
22
|
+
.icon {
|
23
|
+
width: 1.5em;
|
24
|
+
height: 1.5em;
|
25
|
+
color: #599aa6;
|
26
|
+
vertical-align: middle;
|
27
|
+
margin-right: 0.5rem;
|
28
|
+
}
|
29
|
+
.process_stats-text{
|
30
|
+
text-transform: uppercase;
|
31
|
+
letter-spacing: 0.03em;
|
32
|
+
font-size: 90%;
|
33
|
+
color: #3D393C;
|
34
|
+
font-weight: 600;
|
35
|
+
line-height: 1;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
@@ -91,7 +91,7 @@
|
|
91
91
|
.subhero{
|
92
92
|
padding: 4rem 0;
|
93
93
|
text-align: center;
|
94
|
-
|
94
|
+
|
95
95
|
.heading3{
|
96
96
|
@include breakpoint(medium down){
|
97
97
|
font-size: 1.3em;
|
@@ -202,7 +202,7 @@
|
|
202
202
|
border-bottom: $border;
|
203
203
|
border-right: $border;
|
204
204
|
}
|
205
|
-
|
205
|
+
|
206
206
|
&:last-child{
|
207
207
|
border-right: none;
|
208
208
|
}
|
@@ -1,18 +1,30 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "active_support/concern"
|
4
|
-
|
5
3
|
module Decidim
|
6
4
|
# Shared behaviour for controllers that need an organization present in order
|
7
5
|
# to work. The organization is injected via the CurrentOrganization
|
8
6
|
# middleware.
|
9
7
|
module NeedsOrganization
|
10
|
-
|
8
|
+
def self.enhance_controller(instance_or_module)
|
9
|
+
instance_or_module.class_eval do
|
10
|
+
before_action :verify_organization
|
11
|
+
helper_method :current_organization
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.extended(base)
|
16
|
+
base.extend InstanceMethods
|
11
17
|
|
12
|
-
|
13
|
-
|
14
|
-
|
18
|
+
enhance_controller(base)
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.included(base)
|
22
|
+
base.include InstanceMethods
|
23
|
+
|
24
|
+
enhance_controller(base)
|
25
|
+
end
|
15
26
|
|
27
|
+
module InstanceMethods
|
16
28
|
# The current organization for the request.
|
17
29
|
#
|
18
30
|
# Returns an Organization.
|
@@ -1,10 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_dependency "decidim/application_controller"
|
4
|
-
|
5
3
|
module Decidim
|
6
4
|
# The controller to handle the user's account page.
|
7
|
-
class AccountController < ApplicationController
|
5
|
+
class AccountController < Decidim::ApplicationController
|
8
6
|
helper_method :authorizations
|
9
7
|
include Decidim::UserProfile
|
10
8
|
|
@@ -1,11 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_dependency "decidim/application_controller"
|
4
|
-
|
5
3
|
module Decidim
|
6
4
|
# This controller allows users to create and destroy their authorizations. It
|
7
5
|
# shouldn't be necessary to expand it to add new authorization schemes.
|
8
|
-
class AuthorizationsController < ApplicationController
|
6
|
+
class AuthorizationsController < Decidim::ApplicationController
|
9
7
|
helper_method :handler, :handlers, :stored_location
|
10
8
|
before_action :valid_handler, only: [:new, :create]
|
11
9
|
|
@@ -1,10 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_dependency "decidim/application_controller"
|
4
|
-
|
5
3
|
module Decidim
|
6
4
|
# This controller allows the user to accept the cookie policy.
|
7
|
-
class CookiePolicyController < ApplicationController
|
5
|
+
class CookiePolicyController < Decidim::ApplicationController
|
8
6
|
skip_authorization_check
|
9
7
|
|
10
8
|
def accept
|
@@ -1,10 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_dependency "decidim/application_controller"
|
4
|
-
|
5
3
|
module Decidim
|
6
4
|
# A controller to allow users switching their locale.
|
7
|
-
class LocalesController < ApplicationController
|
5
|
+
class LocalesController < Decidim::ApplicationController
|
8
6
|
authorize_resource :locales, class: false
|
9
7
|
|
10
8
|
def create
|
@@ -1,10 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_dependency "decidim/application_controller"
|
4
|
-
|
5
3
|
module Decidim
|
6
4
|
# The controller to handle the user's notifications settings page.
|
7
|
-
class NotificationsSettingsController < ApplicationController
|
5
|
+
class NotificationsSettingsController < Decidim::ApplicationController
|
8
6
|
include Decidim::UserProfile
|
9
7
|
|
10
8
|
def show
|
@@ -1,11 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_dependency "decidim/application_controller"
|
4
|
-
|
5
3
|
module Decidim
|
6
4
|
# The controller to handle managing the current user's
|
7
5
|
# UserGroups.
|
8
|
-
class OwnUserGroupsController < ApplicationController
|
6
|
+
class OwnUserGroupsController < Decidim::ApplicationController
|
9
7
|
include Decidim::UserProfile
|
10
8
|
|
11
9
|
def index
|
@@ -1,11 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_dependency "decidim/application_controller"
|
4
3
|
require_dependency "decidim/page_finder"
|
5
4
|
|
6
5
|
module Decidim
|
7
6
|
# This controller serves static pages using HighVoltage.
|
8
|
-
class PagesController < ApplicationController
|
7
|
+
class PagesController < Decidim::ApplicationController
|
9
8
|
include HighVoltage::StaticPage
|
10
9
|
|
11
10
|
layout "layouts/decidim/application"
|
@@ -1,9 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_dependency "decidim/application_controller"
|
4
|
-
|
5
3
|
module Decidim
|
6
|
-
class ParticipatoryProcessGroupsController < ApplicationController
|
4
|
+
class ParticipatoryProcessGroupsController < Decidim::ApplicationController
|
7
5
|
helper_method :participatory_processes, :group, :collection
|
8
6
|
|
9
7
|
before_action :set_group
|
@@ -1,11 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_dependency "decidim/application_controller"
|
4
|
-
|
5
3
|
module Decidim
|
6
4
|
# A controller that holds the logic to show ParticipatoryProcessSteps in a
|
7
5
|
# public layout.
|
8
|
-
class ParticipatoryProcessStepsController < ApplicationController
|
6
|
+
class ParticipatoryProcessStepsController < Decidim::ApplicationController
|
9
7
|
helper_method :participatory_process, :current_participatory_process
|
10
8
|
layout "layouts/decidim/participatory_process", only: [:index]
|
11
9
|
include NeedsParticipatoryProcess
|
@@ -1,21 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_dependency "decidim/application_controller"
|
4
|
-
|
5
3
|
module Decidim
|
6
4
|
# A controller that holds the logic to show ParticipatoryProcesses in a
|
7
5
|
# public layout.
|
8
|
-
class ParticipatoryProcessesController < ApplicationController
|
6
|
+
class ParticipatoryProcessesController < Decidim::ApplicationController
|
9
7
|
layout "layouts/decidim/participatory_process", only: [:show]
|
10
8
|
|
11
|
-
before_action -> { extend
|
9
|
+
before_action -> { extend NeedsParticipatoryProcess }, only: [:show]
|
12
10
|
|
13
11
|
helper Decidim::AttachmentsHelper
|
14
12
|
helper Decidim::ParticipatoryProcessHelper
|
15
13
|
helper Decidim::IconHelper
|
16
14
|
helper Decidim::WidgetUrlsHelper
|
17
15
|
|
18
|
-
helper_method :collection, :promoted_participatory_processes, :participatory_processes
|
16
|
+
helper_method :collection, :promoted_participatory_processes, :participatory_processes, :stats
|
19
17
|
|
20
18
|
def index
|
21
19
|
authorize! :read, ParticipatoryProcess
|
@@ -43,5 +41,9 @@ module Decidim
|
|
43
41
|
def participatory_process_groups
|
44
42
|
@process_groups ||= Decidim::ParticipatoryProcessGroup.where(organization: current_organization)
|
45
43
|
end
|
44
|
+
|
45
|
+
def stats
|
46
|
+
@stats ||= ParticipatoryProcessStatsPresenter.new(participatory_process: current_participatory_process)
|
47
|
+
end
|
46
48
|
end
|
47
49
|
end
|
@@ -13,5 +13,29 @@ module Decidim
|
|
13
13
|
dates = [participatory_process_step.start_date, participatory_process_step.end_date]
|
14
14
|
dates.map { |date| date ? localize(date.to_date, format: :default) : "?" }.join(" - ")
|
15
15
|
end
|
16
|
+
|
17
|
+
# Public: Returns an icon given an instance of a Feature. It defaults to
|
18
|
+
# a question mark when no icon is found.
|
19
|
+
#
|
20
|
+
# feature - The feature to generate the icon for.
|
21
|
+
#
|
22
|
+
# Returns an HTML tag with the icon.
|
23
|
+
def feature_icon(feature)
|
24
|
+
feature_manifest_icon(feature.manifest)
|
25
|
+
end
|
26
|
+
|
27
|
+
# Public: Returns an icon given an instance of a Feature Manifest. It defaults to
|
28
|
+
# a question mark when no icon is found.
|
29
|
+
#
|
30
|
+
# feature_manifest - The feature manifest to generate the icon for.
|
31
|
+
#
|
32
|
+
# Returns an HTML tag with the icon.
|
33
|
+
def feature_manifest_icon(feature_manifest)
|
34
|
+
if feature_manifest.icon
|
35
|
+
external_icon feature_manifest.icon
|
36
|
+
else
|
37
|
+
icon "question-mark"
|
38
|
+
end
|
39
|
+
end
|
16
40
|
end
|
17
41
|
end
|
@@ -11,6 +11,7 @@ module Decidim
|
|
11
11
|
highlighted_stats = highlighted_stats.concat(global_stats(priority: StatsRegistry::HIGH_PRIORITY))
|
12
12
|
highlighted_stats = highlighted_stats.concat(feature_stats(priority: StatsRegistry::HIGH_PRIORITY))
|
13
13
|
highlighted_stats = highlighted_stats.reject(&:empty?)
|
14
|
+
highlighted_stats = highlighted_stats.reject { |_name, data| data.zero? }
|
14
15
|
|
15
16
|
safe_join(
|
16
17
|
highlighted_stats.in_groups_of(2, false).map do |stats|
|
@@ -30,9 +31,10 @@ module Decidim
|
|
30
31
|
not_highlighted_stats = global_stats(priority: StatsRegistry::MEDIUM_PRIORITY)
|
31
32
|
not_highlighted_stats = not_highlighted_stats.concat(feature_stats(priority: StatsRegistry::MEDIUM_PRIORITY))
|
32
33
|
not_highlighted_stats = not_highlighted_stats.reject(&:empty?)
|
34
|
+
not_highlighted_stats = not_highlighted_stats.reject { |_name, data| data.zero? }
|
33
35
|
|
34
36
|
safe_join(
|
35
|
-
not_highlighted_stats.in_groups_of(3,
|
37
|
+
not_highlighted_stats.in_groups_of(3, [:empty]).map do |stats|
|
36
38
|
content_tag :div, class: "home-pam__lowlight" do
|
37
39
|
safe_join(
|
38
40
|
stats.map do |name, data|
|
@@ -61,15 +63,19 @@ module Decidim
|
|
61
63
|
|
62
64
|
def render_stats_data(name, data)
|
63
65
|
content_tag :div, "", class: "home-pam__data" do
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
66
|
+
if name == :empty
|
67
|
+
" ".html_safe
|
68
|
+
else
|
69
|
+
safe_join([
|
70
|
+
content_tag(:h4, I18n.t(name, scope: "pages.home.statistics"), class: "home-pam__title"),
|
71
|
+
content_tag(:span, " #{number_with_delimiter(data)}", class: "home-pam__number #{name}")
|
72
|
+
])
|
73
|
+
end
|
68
74
|
end
|
69
75
|
end
|
70
76
|
|
71
77
|
def published_features
|
72
|
-
@published_features ||= Feature.where(participatory_process: organization.participatory_processes.published)
|
78
|
+
@published_features ||= Feature.where(participatory_process: organization.participatory_processes.published).published
|
73
79
|
end
|
74
80
|
end
|
75
81
|
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
# A presenter to render statistics in the homepage.
|
5
|
+
class ParticipatoryProcessStatsPresenter < Rectify::Presenter
|
6
|
+
attribute :participatory_process, Decidim::ParticipatoryProcess
|
7
|
+
include Decidim::ParticipatoryProcessHelper
|
8
|
+
|
9
|
+
# Public: Render a collection of primary stats.
|
10
|
+
def highlighted
|
11
|
+
highlighted_stats = feature_stats(priority: StatsRegistry::HIGH_PRIORITY)
|
12
|
+
highlighted_stats = highlighted_stats.concat(feature_stats(priority: StatsRegistry::MEDIUM_PRIORITY))
|
13
|
+
highlighted_stats = highlighted_stats.reject(&:empty?)
|
14
|
+
highlighted_stats = highlighted_stats.reject { |_manifest, _name, data| data.zero? }
|
15
|
+
grouped_highlighted_stats = highlighted_stats.group_by { |stats| stats.first.name }
|
16
|
+
|
17
|
+
safe_join(
|
18
|
+
grouped_highlighted_stats.map do |_manifest_name, stats|
|
19
|
+
content_tag :div, class: "process_stats-item" do
|
20
|
+
safe_join(
|
21
|
+
stats.each_with_index.map do |stat, index|
|
22
|
+
render_stats_data(stat[0], stat[1], stat[2], index)
|
23
|
+
end
|
24
|
+
)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
)
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def feature_stats(conditions)
|
33
|
+
Decidim.feature_manifests.map do |feature_manifest|
|
34
|
+
feature_manifest.stats.filter(conditions).with_context(published_features).map { |name, data| [feature_manifest, name, data] }.flatten
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def render_stats_data(feature_manifest, name, data, index)
|
39
|
+
safe_join([
|
40
|
+
index.zero? ? feature_manifest_icon(feature_manifest) : " / ".html_safe,
|
41
|
+
content_tag(:span, "#{number_with_delimiter(data)} " + I18n.t(name, scope: "decidim.participatory_processes.statistics"),
|
42
|
+
class: "#{name} process_stats-text")
|
43
|
+
])
|
44
|
+
end
|
45
|
+
|
46
|
+
def published_features
|
47
|
+
@published_features ||= Feature.where(participatory_process: participatory_process).published
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<% if attached_to.attachments.any? %>
|
2
2
|
<div class="row attachments">
|
3
|
-
<div class="columns large-
|
3
|
+
<div class="columns large-12">
|
4
4
|
<%= render partial: "documents", locals: { documents: attached_to.documents } %>
|
5
5
|
<%= render partial: "photos", locals: { photos: attached_to.photos } %>
|
6
6
|
</div>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<section class="extended" id="participatory_process-statistics" class="statistics">
|
2
|
+
<div class="row column">
|
3
|
+
<h4 class="section-heading"><%= t(".headline", participatory_process: translated_attribute(current_participatory_process.title)) %></h3>
|
4
|
+
</div>
|
5
|
+
<div class="row">
|
6
|
+
<div class="columns small-centered mediumlarge-12 large-12 process_stats">
|
7
|
+
<%= stats.highlighted %>
|
8
|
+
</div>
|
9
|
+
</div>
|
10
|
+
</section>
|
@@ -15,6 +15,7 @@
|
|
15
15
|
</div>
|
16
16
|
<%== translated_attribute(current_participatory_process.description) %>
|
17
17
|
</div>
|
18
|
+
<%= attachments_for current_participatory_process %>
|
18
19
|
</div>
|
19
20
|
<div class="section columns medium-5 mediumlarge-4 large-3">
|
20
21
|
<div class="card extra definition-data">
|
@@ -67,17 +68,13 @@
|
|
67
68
|
</div>
|
68
69
|
<% end %>
|
69
70
|
</div>
|
70
|
-
</div>
|
71
|
-
</div>
|
72
|
-
|
73
|
-
<div class="row">
|
74
|
-
<div class="columns section view-side mediumlarge-4 mediumlarge-push-8 large-3 large-push-9">
|
75
71
|
<%= render partial: "decidim/shared/share_modal" %>
|
76
72
|
<%= embed_modal_for participatory_process_participatory_process_widget_url(current_participatory_process, format: :js) %>
|
77
73
|
</div>
|
78
74
|
</div>
|
79
|
-
|
80
|
-
|
75
|
+
<% if current_participatory_process.show_statistics? %>
|
76
|
+
<%= render partial: 'statistics' %>
|
77
|
+
<% end %>
|
81
78
|
</div>
|
82
79
|
|
83
80
|
<%= javascript_include_tag "decidim/proposals/social_share" %>
|
data/config/i18n-tasks.yml
CHANGED
@@ -105,8 +105,8 @@ ignore_unused:
|
|
105
105
|
- decidim.participatory_processes.scopes.global
|
106
106
|
- decidim.participatory_processes.participatory_process_groups.none
|
107
107
|
- pages.home.statistics.*
|
108
|
+
- decidim.participatory_processes.statistics.*
|
108
109
|
- forms.*
|
109
|
-
|
110
110
|
# - 'activerecord.attributes.*'
|
111
111
|
# - '{devise,kaminari,will_paginate}.*'
|
112
112
|
# - 'simple_form.{yes,no}'
|
data/config/locales/en.yml
CHANGED
@@ -206,6 +206,20 @@ en:
|
|
206
206
|
participatory_structure: Participatory structure
|
207
207
|
scope: Scope
|
208
208
|
target: Target
|
209
|
+
statistics:
|
210
|
+
answers_count: Answers
|
211
|
+
comments_count: Comments
|
212
|
+
headline: Activity
|
213
|
+
meetings_count: Meetings
|
214
|
+
orders_count: Orders
|
215
|
+
pages_count: Pages
|
216
|
+
processes_count: Processes
|
217
|
+
projects_count: Projects
|
218
|
+
proposals_count: Proposals
|
219
|
+
results_count: Results
|
220
|
+
surveys_count: Surveys
|
221
|
+
users_count: Participants
|
222
|
+
votes_count: Votes
|
209
223
|
reported_mailer:
|
210
224
|
hide:
|
211
225
|
hello: Hello %{name},
|
@@ -383,12 +397,17 @@ en:
|
|
383
397
|
active_step: Active step
|
384
398
|
see_all_processes: See all processes
|
385
399
|
statistics:
|
400
|
+
answers_count: Answers
|
386
401
|
comments_count: Comments
|
387
402
|
headline: Current state of %{organization}
|
388
403
|
meetings_count: Meetings
|
404
|
+
orders_count: Orders
|
405
|
+
pages_count: Pages
|
389
406
|
processes_count: Processes
|
407
|
+
projects_count: Projects
|
390
408
|
proposals_count: Proposals
|
391
409
|
results_count: Results
|
410
|
+
surveys_count: Surveys
|
392
411
|
users_count: Participants
|
393
412
|
votes_count: Votes
|
394
413
|
sub_hero:
|
data/config/locales/it.yml
CHANGED
@@ -124,26 +124,26 @@ it:
|
|
124
124
|
verified: Verificato
|
125
125
|
pages:
|
126
126
|
index:
|
127
|
-
title:
|
127
|
+
title: Informazione
|
128
128
|
participatory_process_groups:
|
129
129
|
show:
|
130
|
-
group_participatory_processes: Processi per
|
130
|
+
group_participatory_processes: Processi per %{group}
|
131
131
|
title: Titolo
|
132
132
|
participatory_process_steps:
|
133
133
|
index:
|
134
134
|
process_steps: Fasi del processo
|
135
|
-
title: Fasi del processo
|
135
|
+
title: Fasi del processo partecipativo
|
136
136
|
participatory_processes:
|
137
137
|
index:
|
138
|
-
title:
|
138
|
+
title: Processi partecipativi
|
139
139
|
participatory_process_groups:
|
140
140
|
none: Nessuno
|
141
141
|
scopes:
|
142
142
|
global: Ambito globale
|
143
143
|
show:
|
144
|
-
developer_group: Gruppo
|
144
|
+
developer_group: Gruppo promotore
|
145
145
|
end_date: Data di fine
|
146
|
-
local_area:
|
146
|
+
local_area: Municipi
|
147
147
|
participatory_scope: Ambito partecipativo
|
148
148
|
participatory_structure: Struttura partecipativa
|
149
149
|
scope: Ambito
|
@@ -151,48 +151,47 @@ it:
|
|
151
151
|
hide:
|
152
152
|
hello: Ciao %{name},
|
153
153
|
report_html: <p>Il seguente <a href="%{url}">contenuto</a> è stato nascosto automaticamente.</p>
|
154
|
-
subject:
|
154
|
+
subject: Un contenuto è stato cancellato automaticamente
|
155
155
|
report:
|
156
156
|
hello: Ciao %{name},
|
157
|
-
subject:
|
157
|
+
subject: Un contenuto è stato denunciato
|
158
158
|
reports:
|
159
159
|
create:
|
160
|
-
error: Si è verificato un errore
|
161
|
-
success:
|
160
|
+
error: Si è verificato un un errore. Ti preghiamo di riprovare.
|
161
|
+
success: Il report è stato creato e sarà rivisto da un amministratore.
|
162
162
|
shared:
|
163
163
|
action_authorization_modal:
|
164
164
|
incomplete:
|
165
165
|
cancel: Annulla
|
166
|
-
explanation: '
|
167
|
-
reauthorize: Ri-
|
168
|
-
title: Per
|
166
|
+
explanation: 'Nonostante già sei autorizzato con "%{authorization}", abbiamo bisogno che tu richieda una nuova autorizzazione poiché risultano mancanti i seguenti dati:'
|
167
|
+
reauthorize: Ri-autorizzare
|
168
|
+
title: Per favore, occorre una nuova autorizzazione
|
169
169
|
missing:
|
170
|
-
authorize:
|
171
|
-
explanation: Per effettuare questa operazione
|
172
|
-
title:
|
170
|
+
authorize: Autorizzare con "%{authorization}"
|
171
|
+
explanation: Per effettuare questa operazione devi disporre della autorizzazione "%{authorization}".
|
172
|
+
title: Autorizzazione richiesta
|
173
173
|
unauthorized:
|
174
|
-
explanation:
|
175
|
-
invalid: "
|
174
|
+
explanation: Non puoi eseguire questa azione poiché alcuni dei tuoi dati di autorizzazione non corrispondono.
|
175
|
+
invalid: "%{field} non è valido."
|
176
176
|
title: Non autorizzato
|
177
177
|
embed_modal:
|
178
178
|
close_window: Chiudi la finestra
|
179
|
-
embed: Per
|
179
|
+
embed: Per favore, incolla questo codice nella tua pagina
|
180
180
|
embed_link: Incorpora
|
181
181
|
flag_modal:
|
182
|
-
already_reported: Questo contenuto è già stato riportato e sarà revisionato da
|
182
|
+
already_reported: Questo contenuto è già stato riportato e sarà revisionato da un amministratore.
|
183
183
|
close: Chiudi
|
184
184
|
description: Questo contenuto è inappropriato?
|
185
|
-
does_not_belong: Contiene attività
|
185
|
+
does_not_belong: Contiene attività illegali, istigazione al suicidio, informazioni personali o riservate, o altre cose che tu credi che non sono appropriato per %{organization_name}.
|
186
186
|
offensive: Contiene contenuti razzisti, diffamatori, sessisti, insulti o attacchi personali, minacce di morte, istigazioni al suicidio o altre forme di odio verbale.
|
187
|
-
spam: Contiene pubblicità, truffe
|
187
|
+
spam: Contiene clickbait, pubblicità, truffe o script bots.
|
188
188
|
title: Segnala un problema
|
189
189
|
login_modal:
|
190
|
-
please_sign_in: Per cortesia effettua l'accesso.
|
191
190
|
sign_up: Registrazione
|
192
191
|
share_modal:
|
193
192
|
close_window: Chiudi questa finestra
|
194
193
|
share: Condividi
|
195
|
-
share_link: Condividi
|
194
|
+
share_link: Condividi link
|
196
195
|
devise:
|
197
196
|
invitations:
|
198
197
|
edit:
|
@@ -201,48 +200,45 @@ it:
|
|
201
200
|
mailer:
|
202
201
|
invitation_instructions:
|
203
202
|
accept: Accetta l'invito
|
204
|
-
accept_until: Questo invito
|
203
|
+
accept_until: Questo invito scade il %{due_date}.
|
205
204
|
hello: Ciao %{email},
|
206
205
|
ignore: |-
|
207
|
-
Se non
|
208
|
-
Non verrà un account relativo al tuo profilo fino a che non effettuerai l'accesso al link precedente ed imposterai la tua password.
|
206
|
+
Se non desideri accettare l'invito, ignora questa email.<br /> Il tuo account non verrà creato finché non accedi al link precedente e imposti la tua password.
|
209
207
|
invited_you_as_admin: "%{invited_by} ti ha invitato come amministratore di %{application}, puoi accettare l'invito tramite il seguente link."
|
210
|
-
someone_invited_you: Sei stato invitato
|
211
|
-
invite_admin:
|
212
|
-
subject: Sei stato invitato per la gestione della sezione relativa all'organizzazione %{organization}
|
208
|
+
someone_invited_you: Sei stato invitato a %{application}, puoi accettare l'invito tramite il seguente link.
|
213
209
|
invite_collaborator:
|
214
|
-
subject: Sei stato invitato a collaborare
|
210
|
+
subject: Sei stato invitato a collaborare nella %{organization}
|
215
211
|
organization_admin_invitation_instructions:
|
216
|
-
subject: Sei stato invitato a gestire
|
212
|
+
subject: Sei stato invitato a gestire %{organization}
|
217
213
|
password_change:
|
218
214
|
greeting: Ciao %{recipient}!
|
219
|
-
message:
|
215
|
+
message: Ti contattiamo per informarti che la tua password è stata modificata.
|
220
216
|
subject: Password modificata
|
221
217
|
errors:
|
222
218
|
messages:
|
223
219
|
content_type_whitelist_error: Il tipo di file non è valido.
|
224
|
-
file_size_is_less_than_or_equal_to:
|
220
|
+
file_size_is_less_than_or_equal_to: la dimensione del file deve essere inferiore o uguale a %{count}
|
225
221
|
invalid_manifest: Manifesto non valido
|
226
222
|
invalid_participatory_process: Processo partecipativo non valido
|
227
223
|
long_words: Contiene parole troppo lunghe
|
228
|
-
must_start_with_caps: Deve iniziare in
|
229
|
-
nesting_too_deep: Non può
|
230
|
-
too_many_marks:
|
231
|
-
too_much_caps:
|
224
|
+
must_start_with_caps: Deve iniziare in maiuscola
|
225
|
+
nesting_too_deep: Non può stare all'interno di una subcategoria
|
226
|
+
too_many_marks: Sta utilizzando troppi segni di punteggiatura
|
227
|
+
too_much_caps: Sta utilizzando troppe maiuscole
|
232
228
|
too_short: Il contenuto è troppo breve
|
233
229
|
invisible_captcha:
|
234
230
|
sentence_for_humans: Se sei una persona e non un computer, ignora questo campo
|
235
|
-
timestamp_error_message: Mi
|
231
|
+
timestamp_error_message: Mi dispiace, troppo veloce! Per favore, invia di nuovo.
|
236
232
|
layouts:
|
237
233
|
decidim:
|
238
234
|
cookie_warning:
|
239
|
-
description_html: Questo sito utilizza
|
235
|
+
description_html: Questo sito utilizza cookies. Se continui la navigazione significa che approvi i nostri termini di utilizzo di cookies. Per saperne di più, leggi %{link}.
|
240
236
|
link_label: qui
|
241
237
|
ok: OK, accetto
|
242
238
|
footer:
|
243
|
-
made_with_open_source: '
|
239
|
+
made_with_open_source: 'Sito web creato con <a target="_blank" href="https://github.com/decidim/decidim">software libero</a>.'
|
244
240
|
header:
|
245
|
-
close_menu:
|
241
|
+
close_menu: Chiudere menu
|
246
242
|
navigation: Navigazione
|
247
243
|
sign_in: Accedi
|
248
244
|
sign_up: Registrati
|
@@ -257,18 +253,18 @@ it:
|
|
257
253
|
index:
|
258
254
|
promoted_processes: Processi evidenziati
|
259
255
|
no_processes_yet:
|
260
|
-
no_processes_yet: Non ci sono ancora
|
256
|
+
no_processes_yet: Non ci sono ancora processi partecipativi!
|
261
257
|
order_by_processes:
|
262
258
|
processes:
|
263
259
|
one: "%{count} processo"
|
264
260
|
other: "%{count} processi"
|
265
261
|
participatory_process:
|
266
262
|
active_step: 'Fase attuale:'
|
267
|
-
take_part:
|
263
|
+
take_part: Partecipa
|
268
264
|
promoted_process:
|
269
265
|
active_step: 'Fase attuale:'
|
270
266
|
more_info: Più informazioni
|
271
|
-
take_part:
|
267
|
+
take_part: Partecipa
|
272
268
|
process_header:
|
273
269
|
process_menu_item: Il processo
|
274
270
|
unfold: Espandi
|
data/db/seeds.rb
CHANGED
@@ -55,25 +55,13 @@ if !Rails.env.production? || ENV["SEED"]
|
|
55
55
|
replies_notifications: true
|
56
56
|
)
|
57
57
|
|
58
|
-
|
59
|
-
|
60
|
-
user_group = Decidim::UserGroup.create!(
|
61
|
-
name: Faker::Company.name,
|
62
|
-
document_number: Faker::Number.number(10),
|
63
|
-
phone: Faker::PhoneNumber.phone_number,
|
64
|
-
verified_at: Time.current,
|
65
|
-
decidim_organization_id: user.organization.id
|
66
|
-
)
|
67
|
-
|
68
|
-
Decidim::UserGroupMembership.create!(
|
69
|
-
user: user,
|
70
|
-
user_group: user_group
|
71
|
-
)
|
72
|
-
|
58
|
+
Decidim::User.find_each do |user|
|
59
|
+
[nil, Time.current].each do |verified_at|
|
73
60
|
user_group = Decidim::UserGroup.create!(
|
74
61
|
name: Faker::Company.unique.name,
|
75
62
|
document_number: Faker::Number.number(10),
|
76
63
|
phone: Faker::PhoneNumber.phone_number,
|
64
|
+
verified_at: verified_at,
|
77
65
|
decidim_organization_id: user.organization.id
|
78
66
|
)
|
79
67
|
|
@@ -84,6 +72,8 @@ if !Rails.env.production? || ENV["SEED"]
|
|
84
72
|
end
|
85
73
|
end
|
86
74
|
|
75
|
+
seeds_root = File.join(__dir__, "seeds")
|
76
|
+
|
87
77
|
process_groups = []
|
88
78
|
3.times do
|
89
79
|
process_groups << Decidim::ParticipatoryProcessGroup.create!(
|
@@ -91,7 +81,7 @@ if !Rails.env.production? || ENV["SEED"]
|
|
91
81
|
description: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
|
92
82
|
Decidim::Faker::Localized.paragraph(3)
|
93
83
|
end,
|
94
|
-
hero_image: File.new(File.join(
|
84
|
+
hero_image: File.new(File.join(seeds_root, "city.jpeg")),
|
95
85
|
organization: organization
|
96
86
|
)
|
97
87
|
end
|
@@ -108,8 +98,8 @@ if !Rails.env.production? || ENV["SEED"]
|
|
108
98
|
description: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
|
109
99
|
Decidim::Faker::Localized.paragraph(3)
|
110
100
|
end,
|
111
|
-
hero_image: File.new(File.join(
|
112
|
-
banner_image: File.new(File.join(
|
101
|
+
hero_image: File.new(File.join(seeds_root, "city.jpeg")),
|
102
|
+
banner_image: File.new(File.join(seeds_root, "city2.jpeg")),
|
113
103
|
promoted: true,
|
114
104
|
published_at: 2.weeks.ago,
|
115
105
|
organization: organization,
|
@@ -153,21 +143,21 @@ if !Rails.env.production? || ENV["SEED"]
|
|
153
143
|
|
154
144
|
Decidim::ParticipatoryProcessUserRole.create!(user: user, participatory_process: process, role: role)
|
155
145
|
end
|
156
|
-
end
|
157
146
|
|
158
|
-
Decidim::ParticipatoryProcess.find_each do |process|
|
159
147
|
Decidim::Attachment.create!(
|
160
148
|
title: Decidim::Faker::Localized.sentence(2),
|
161
149
|
description: Decidim::Faker::Localized.sentence(5),
|
162
|
-
file: File.new(File.join(
|
150
|
+
file: File.new(File.join(seeds_root, "city.jpeg")),
|
163
151
|
attached_to: process
|
164
152
|
)
|
153
|
+
|
165
154
|
Decidim::Attachment.create!(
|
166
155
|
title: Decidim::Faker::Localized.sentence(2),
|
167
156
|
description: Decidim::Faker::Localized.sentence(5),
|
168
|
-
file: File.new(File.join(
|
157
|
+
file: File.new(File.join(seeds_root, "Exampledocument.pdf")),
|
169
158
|
attached_to: process
|
170
159
|
)
|
160
|
+
|
171
161
|
2.times do
|
172
162
|
Decidim::Category.create!(
|
173
163
|
name: Decidim::Faker::Localized.sentence(5),
|
data/lib/decidim/core.rb
CHANGED
@@ -43,19 +43,13 @@ module Decidim
|
|
43
43
|
original_locale = I18n.available_locales
|
44
44
|
I18n.available_locales = original_locale + [:en] unless original_locale.include?(:en)
|
45
45
|
|
46
|
-
|
47
|
-
railtie.respond_to?(:load_seed) && railtie.class.name.include?("Decidim::")
|
48
|
-
end
|
46
|
+
Rails.application.railties.to_a.uniq.each do |railtie|
|
47
|
+
next unless railtie.respond_to?(:load_seed) && railtie.class.name.include?("Decidim::")
|
49
48
|
|
50
|
-
railties.each do |railtie|
|
51
|
-
puts "Creating #{railtie.class.name} seeds..."
|
52
49
|
railtie.load_seed
|
53
50
|
end
|
54
51
|
|
55
|
-
Decidim.feature_manifests.each
|
56
|
-
puts "Creating Feature (#{feature.name}) seeds..."
|
57
|
-
feature.seed!
|
58
|
-
end
|
52
|
+
Decidim.feature_manifests.each(&:seed!)
|
59
53
|
|
60
54
|
I18n.available_locales = original_locale
|
61
55
|
end
|
data/lib/decidim/core/engine.rb
CHANGED
@@ -142,7 +142,7 @@ module Decidim
|
|
142
142
|
menu.item I18n.t("menu.home", scope: "decidim"),
|
143
143
|
decidim.root_path,
|
144
144
|
position: 1,
|
145
|
-
active:
|
145
|
+
active: :exact
|
146
146
|
|
147
147
|
menu.item I18n.t("menu.processes", scope: "decidim"),
|
148
148
|
decidim.participatory_processes_path,
|
@@ -4,7 +4,7 @@ require "decidim/faker/localized"
|
|
4
4
|
require "decidim/dev"
|
5
5
|
|
6
6
|
FactoryGirl.define do
|
7
|
-
sequence
|
7
|
+
sequence(:name) do |n|
|
8
8
|
"#{Faker::Name.name} #{n}"
|
9
9
|
end
|
10
10
|
|
@@ -41,12 +41,12 @@ FactoryGirl.define do
|
|
41
41
|
sequence(:host) { |n| "#{n}.lvh.me" }
|
42
42
|
description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { Decidim::Faker::Localized.sentence(2) } }
|
43
43
|
welcome_text { Decidim::Faker::Localized.wrapped("<p>", "</p>") { Decidim::Faker::Localized.sentence(2) } }
|
44
|
-
homepage_image { test_file("city.jpeg", "image/jpeg") }
|
45
|
-
favicon { test_file("icon.png", "image/png") }
|
44
|
+
homepage_image { Decidim::Dev.test_file("city.jpeg", "image/jpeg") }
|
45
|
+
favicon { Decidim::Dev.test_file("icon.png", "image/png") }
|
46
46
|
default_locale { I18n.default_locale }
|
47
47
|
available_locales { Decidim.available_locales }
|
48
|
-
official_img_header { test_file("avatar.jpg", "image/jpeg") }
|
49
|
-
official_img_footer { test_file("avatar.jpg", "image/jpeg") }
|
48
|
+
official_img_header { Decidim::Dev.test_file("avatar.jpg", "image/jpeg") }
|
49
|
+
official_img_footer { Decidim::Dev.test_file("avatar.jpg", "image/jpeg") }
|
50
50
|
official_url { Faker::Internet.url }
|
51
51
|
end
|
52
52
|
|
@@ -56,8 +56,8 @@ FactoryGirl.define do
|
|
56
56
|
subtitle { Decidim::Faker::Localized.sentence(1) }
|
57
57
|
short_description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { Decidim::Faker::Localized.sentence(2) } }
|
58
58
|
description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { Decidim::Faker::Localized.sentence(4) } }
|
59
|
-
hero_image { test_file("city.jpeg", "image/jpeg") }
|
60
|
-
banner_image { test_file("city2.jpeg", "image/jpeg") }
|
59
|
+
hero_image { Decidim::Dev.test_file("city.jpeg", "image/jpeg") }
|
60
|
+
banner_image { Decidim::Dev.test_file("city2.jpeg", "image/jpeg") }
|
61
61
|
published_at { Time.current }
|
62
62
|
organization
|
63
63
|
meta_scope { Decidim::Faker::Localized.word }
|
@@ -67,6 +67,8 @@ FactoryGirl.define do
|
|
67
67
|
participatory_scope { Decidim::Faker::Localized.sentence(1) }
|
68
68
|
participatory_structure { Decidim::Faker::Localized.sentence(2) }
|
69
69
|
end_date 2.month.from_now.at_midnight
|
70
|
+
show_statistics true
|
71
|
+
|
70
72
|
trait :promoted do
|
71
73
|
promoted true
|
72
74
|
end
|
@@ -103,7 +105,7 @@ FactoryGirl.define do
|
|
103
105
|
factory :participatory_process_group, class: Decidim::ParticipatoryProcessGroup do
|
104
106
|
name { Decidim::Faker::Localized.sentence(3) }
|
105
107
|
description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { Decidim::Faker::Localized.sentence(4) } }
|
106
|
-
hero_image { test_file("city.jpeg", "image/jpeg") }
|
108
|
+
hero_image { Decidim::Dev.test_file("city.jpeg", "image/jpeg") }
|
107
109
|
organization
|
108
110
|
end
|
109
111
|
|
@@ -133,7 +135,7 @@ FactoryGirl.define do
|
|
133
135
|
organization
|
134
136
|
locale { organization.default_locale }
|
135
137
|
tos_agreement "1"
|
136
|
-
avatar { test_file("avatar.jpg", "image/jpeg") }
|
138
|
+
avatar { Decidim::Dev.test_file("avatar.jpg", "image/jpeg") }
|
137
139
|
comments_notifications true
|
138
140
|
replies_notifications true
|
139
141
|
|
@@ -160,35 +162,19 @@ FactoryGirl.define do
|
|
160
162
|
role: :admin
|
161
163
|
end
|
162
164
|
end
|
165
|
+
end
|
163
166
|
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
create :participatory_process_user_role,
|
169
|
-
user: user,
|
170
|
-
participatory_process: evaluator.participatory_process,
|
171
|
-
role: :collaborator
|
172
|
-
end
|
173
|
-
end
|
174
|
-
|
175
|
-
trait :process_moderator do
|
176
|
-
transient { participatory_process nil }
|
177
|
-
|
178
|
-
after(:create) do |user, evaluator|
|
179
|
-
create :participatory_process_user_role,
|
180
|
-
user: user,
|
181
|
-
participatory_process: evaluator.participatory_process,
|
182
|
-
role: :moderator
|
183
|
-
end
|
184
|
-
end
|
167
|
+
factory :participatory_process_user_role, class: Decidim::ParticipatoryProcessUserRole do
|
168
|
+
user
|
169
|
+
participatory_process
|
170
|
+
role "admin"
|
185
171
|
end
|
186
172
|
|
187
173
|
factory :user_group, class: Decidim::UserGroup do
|
188
174
|
name { Faker::Educator.course }
|
189
175
|
document_number { Faker::Number.number(8) + "X" }
|
190
176
|
phone { Faker::PhoneNumber.phone_number }
|
191
|
-
avatar { test_file("avatar.jpg", "image/jpeg") }
|
177
|
+
avatar { Decidim::Dev.test_file("avatar.jpg", "image/jpeg") }
|
192
178
|
organization
|
193
179
|
|
194
180
|
transient do
|
@@ -245,23 +231,23 @@ FactoryGirl.define do
|
|
245
231
|
factory :attachment, class: Decidim::Attachment do
|
246
232
|
title { Decidim::Faker::Localized.sentence(3) }
|
247
233
|
description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { Decidim::Faker::Localized.sentence(4) } }
|
248
|
-
file { test_file("city.jpeg", "image/jpeg") }
|
234
|
+
file { Decidim::Dev.test_file("city.jpeg", "image/jpeg") }
|
249
235
|
attached_to { build(:participatory_process) }
|
250
236
|
|
251
237
|
trait :with_image do
|
252
|
-
file { test_file("city.jpeg", "image/jpeg") }
|
238
|
+
file { Decidim::Dev.test_file("city.jpeg", "image/jpeg") }
|
253
239
|
end
|
254
240
|
|
255
241
|
trait :with_pdf do
|
256
|
-
file { test_file("Exampledocument.pdf", "application/pdf") }
|
242
|
+
file { Decidim::Dev.test_file("Exampledocument.pdf", "application/pdf") }
|
257
243
|
end
|
258
244
|
|
259
245
|
trait :with_doc do
|
260
|
-
file { test_file("Exampledocument.doc", "application/msword") }
|
246
|
+
file { Decidim::Dev.test_file("Exampledocument.doc", "application/msword") }
|
261
247
|
end
|
262
248
|
|
263
249
|
trait :with_odt do
|
264
|
-
file { test_file("Exampledocument.odt", "application/vnd.oasis.opendocument") }
|
250
|
+
file { Decidim::Dev.test_file("Exampledocument.odt", "application/vnd.oasis.opendocument") }
|
265
251
|
end
|
266
252
|
end
|
267
253
|
|
@@ -271,10 +257,6 @@ FactoryGirl.define do
|
|
271
257
|
manifest_name "dummy"
|
272
258
|
published_at { Time.now }
|
273
259
|
|
274
|
-
after(:create) do |feature, _evaluator|
|
275
|
-
feature.participatory_process.steps.reload
|
276
|
-
end
|
277
|
-
|
278
260
|
trait :unpublished do
|
279
261
|
published_at { nil }
|
280
262
|
end
|
@@ -293,7 +275,6 @@ FactoryGirl.define do
|
|
293
275
|
title { generate(:name) }
|
294
276
|
feature { create(:feature, manifest_name: "dummy") }
|
295
277
|
author { create(:user, :confirmed, organization: feature.organization) }
|
296
|
-
category { create(:category, participatory_process: feature.participatory_process) }
|
297
278
|
end
|
298
279
|
|
299
280
|
factory :resource_link, class: Decidim::ResourceLink do
|
@@ -321,8 +302,3 @@ FactoryGirl.define do
|
|
321
302
|
reason "spam"
|
322
303
|
end
|
323
304
|
end
|
324
|
-
|
325
|
-
def test_file(filename, content_type)
|
326
|
-
asset = Decidim::Dev.asset(filename)
|
327
|
-
Rack::Test::UploadedFile.new(asset, content_type)
|
328
|
-
end
|
data/lib/decidim/core/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
require "decidim/features/settings_manifest"
|
4
|
+
require "decidim/features/export_manifest"
|
5
5
|
|
6
6
|
module Decidim
|
7
7
|
# This class handles all the logic associated to configuring a feature
|
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
|
+
version: 0.4.3
|
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-
|
13
|
+
date: 2017-07-25 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -466,70 +466,70 @@ dependencies:
|
|
466
466
|
requirements:
|
467
467
|
- - '='
|
468
468
|
- !ruby/object:Gem::Version
|
469
|
-
version: 0.4.
|
469
|
+
version: 0.4.3
|
470
470
|
type: :runtime
|
471
471
|
prerelease: false
|
472
472
|
version_requirements: !ruby/object:Gem::Requirement
|
473
473
|
requirements:
|
474
474
|
- - '='
|
475
475
|
- !ruby/object:Gem::Version
|
476
|
-
version: 0.4.
|
476
|
+
version: 0.4.3
|
477
477
|
- !ruby/object:Gem::Dependency
|
478
478
|
name: decidim-dev
|
479
479
|
requirement: !ruby/object:Gem::Requirement
|
480
480
|
requirements:
|
481
481
|
- - '='
|
482
482
|
- !ruby/object:Gem::Version
|
483
|
-
version: 0.4.
|
483
|
+
version: 0.4.3
|
484
484
|
type: :development
|
485
485
|
prerelease: false
|
486
486
|
version_requirements: !ruby/object:Gem::Requirement
|
487
487
|
requirements:
|
488
488
|
- - '='
|
489
489
|
- !ruby/object:Gem::Version
|
490
|
-
version: 0.4.
|
490
|
+
version: 0.4.3
|
491
491
|
- !ruby/object:Gem::Dependency
|
492
492
|
name: decidim-proposals
|
493
493
|
requirement: !ruby/object:Gem::Requirement
|
494
494
|
requirements:
|
495
495
|
- - '='
|
496
496
|
- !ruby/object:Gem::Version
|
497
|
-
version: 0.4.
|
497
|
+
version: 0.4.3
|
498
498
|
type: :development
|
499
499
|
prerelease: false
|
500
500
|
version_requirements: !ruby/object:Gem::Requirement
|
501
501
|
requirements:
|
502
502
|
- - '='
|
503
503
|
- !ruby/object:Gem::Version
|
504
|
-
version: 0.4.
|
504
|
+
version: 0.4.3
|
505
505
|
- !ruby/object:Gem::Dependency
|
506
506
|
name: decidim-meetings
|
507
507
|
requirement: !ruby/object:Gem::Requirement
|
508
508
|
requirements:
|
509
509
|
- - '='
|
510
510
|
- !ruby/object:Gem::Version
|
511
|
-
version: 0.4.
|
511
|
+
version: 0.4.3
|
512
512
|
type: :development
|
513
513
|
prerelease: false
|
514
514
|
version_requirements: !ruby/object:Gem::Requirement
|
515
515
|
requirements:
|
516
516
|
- - '='
|
517
517
|
- !ruby/object:Gem::Version
|
518
|
-
version: 0.4.
|
518
|
+
version: 0.4.3
|
519
519
|
- !ruby/object:Gem::Dependency
|
520
520
|
name: decidim-results
|
521
521
|
requirement: !ruby/object:Gem::Requirement
|
522
522
|
requirements:
|
523
523
|
- - '='
|
524
524
|
- !ruby/object:Gem::Version
|
525
|
-
version: 0.4.
|
525
|
+
version: 0.4.3
|
526
526
|
type: :development
|
527
527
|
prerelease: false
|
528
528
|
version_requirements: !ruby/object:Gem::Requirement
|
529
529
|
requirements:
|
530
530
|
- - '='
|
531
531
|
- !ruby/object:Gem::Version
|
532
|
-
version: 0.4.
|
532
|
+
version: 0.4.3
|
533
533
|
description: Adds core features so other engines can hook into the framework.
|
534
534
|
email:
|
535
535
|
- josepjaume@gmail.com
|
@@ -585,6 +585,7 @@ files:
|
|
585
585
|
- app/assets/stylesheets/decidim/extras/_embed.scss
|
586
586
|
- app/assets/stylesheets/decidim/extras/_label-required.scss
|
587
587
|
- app/assets/stylesheets/decidim/extras/_leaflet.scss
|
588
|
+
- app/assets/stylesheets/decidim/extras/_process_stats.scss
|
588
589
|
- app/assets/stylesheets/decidim/extras/_quill.scss
|
589
590
|
- app/assets/stylesheets/decidim/extras/_reference.scss
|
590
591
|
- app/assets/stylesheets/decidim/extras/_register_form.scss
|
@@ -765,6 +766,7 @@ files:
|
|
765
766
|
- app/presenters/decidim/home_stats_presenter.rb
|
766
767
|
- app/presenters/decidim/menu_item_presenter.rb
|
767
768
|
- app/presenters/decidim/menu_presenter.rb
|
769
|
+
- app/presenters/decidim/participatory_process_stats_presenter.rb
|
768
770
|
- app/presenters/decidim/resource_locator_presenter.rb
|
769
771
|
- app/queries/decidim/highlighted_participatory_processes.rb
|
770
772
|
- app/queries/decidim/organization_participatory_processes.rb
|
@@ -829,6 +831,7 @@ files:
|
|
829
831
|
- app/views/decidim/participatory_processes/_order_by_processes.html.erb
|
830
832
|
- app/views/decidim/participatory_processes/_participatory_process.html.erb
|
831
833
|
- app/views/decidim/participatory_processes/_promoted_process.html.erb
|
834
|
+
- app/views/decidim/participatory_processes/_statistics.html.erb
|
832
835
|
- app/views/decidim/participatory_processes/index.html.erb
|
833
836
|
- app/views/decidim/participatory_processes/show.html.erb
|
834
837
|
- app/views/decidim/reported_mailer/hide.html.erb
|
@@ -974,6 +977,7 @@ files:
|
|
974
977
|
- db/migrate/20170612100253_create_decidim_categorizations.rb
|
975
978
|
- db/migrate/20170713131206_add_admin_to_users.rb
|
976
979
|
- db/migrate/20170713131308_migrate_user_roles_to_participatory_process_roles.rb
|
980
|
+
- db/migrate/20170725085104_add_show_statistics_to_participatory_processes.rb
|
977
981
|
- db/seeds.rb
|
978
982
|
- db/seeds/Exampledocument.pdf
|
979
983
|
- db/seeds/city.jpeg
|