decidim-initiatives 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE-AGPLv3.txt +661 -0
- data/README.md +118 -0
- data/Rakefile +3 -0
- data/app/assets/config/admin_decidim_initiatives_manifest.js +3 -0
- data/app/assets/config/decidim_initiatives_manifest.js +7 -0
- data/app/assets/javascripts/decidim/initiatives/admin/invite_users.js +24 -0
- data/app/assets/javascripts/decidim/initiatives/application.js +1 -0
- data/app/assets/javascripts/decidim/initiatives/identity_selector_dialog.js +17 -0
- data/app/assets/javascripts/decidim/initiatives/scoped_type.js +35 -0
- data/app/assets/javascripts/decidim/initiatives/social_share.js +2 -0
- data/app/assets/stylesheet/decidim/initiatives/admin.css.scss +34 -0
- data/app/assets/stylesheet/decidim/initiatives/application.css.scss +82 -0
- data/app/assets/stylesheet/decidim/initiatives/popularity_item.css.scss +61 -0
- data/app/assets/stylesheet/decidim/initiatives/print-initiative.css.scss +125 -0
- data/app/assets/stylesheet/decidim/initiatives/social_share.css.scss +18 -0
- data/app/assets/stylesheet/decidim/initiatives/statistics.css.scss +15 -0
- data/app/commands/decidim/initiatives/admin/create_initiative_type.rb +56 -0
- data/app/commands/decidim/initiatives/admin/create_initiative_type_scope.rb +55 -0
- data/app/commands/decidim/initiatives/admin/update_initiative.rb +63 -0
- data/app/commands/decidim/initiatives/admin/update_initiative_type.rb +54 -0
- data/app/commands/decidim/initiatives/admin/update_initiative_type_scope.rb +44 -0
- data/app/commands/decidim/initiatives/create_initiative.rb +104 -0
- data/app/commands/decidim/initiatives/spawn_committee_request.rb +50 -0
- data/app/commands/decidim/initiatives/unvote_initiative.rb +42 -0
- data/app/commands/decidim/initiatives/vote_initiative.rb +57 -0
- data/app/constraints/decidim/initiatives/current_feature.rb +28 -0
- data/app/constraints/decidim/initiatives/current_initiative.rb +34 -0
- data/app/controllers/concerns/decidim/initiatives/action_authorization.rb +38 -0
- data/app/controllers/concerns/decidim/initiatives/admin/initiative_admin.rb +32 -0
- data/app/controllers/concerns/decidim/initiatives/needs_initiative.rb +55 -0
- data/app/controllers/concerns/decidim/initiatives/orderable.rb +59 -0
- data/app/controllers/concerns/decidim/initiatives/type_selector_options.rb +41 -0
- data/app/controllers/decidim/initiatives/admin/application_controller.rb +12 -0
- data/app/controllers/decidim/initiatives/admin/committee_requests_controller.rb +38 -0
- data/app/controllers/decidim/initiatives/admin/feature_permissions_controller.rb +13 -0
- data/app/controllers/decidim/initiatives/admin/features_controller.rb +16 -0
- data/app/controllers/decidim/initiatives/admin/initiative_attachments_controller.rb +25 -0
- data/app/controllers/decidim/initiatives/admin/initiatives_controller.rb +137 -0
- data/app/controllers/decidim/initiatives/admin/initiatives_type_scopes_controller.rb +81 -0
- data/app/controllers/decidim/initiatives/admin/initiatives_types_controller.rb +94 -0
- data/app/controllers/decidim/initiatives/committee_requests_controller.rb +43 -0
- data/app/controllers/decidim/initiatives/create_initiative_controller.rb +135 -0
- data/app/controllers/decidim/initiatives/initiative_types_controller.rb +16 -0
- data/app/controllers/decidim/initiatives/initiative_votes_controller.rb +56 -0
- data/app/controllers/decidim/initiatives/initiative_widgets_controller.rb +30 -0
- data/app/controllers/decidim/initiatives/initiatives_controller.rb +96 -0
- data/app/controllers/decidim/initiatives/initiatives_type_scopes_controller.rb +22 -0
- data/app/events/decidim/initiatives/create_initiative_event.rb +54 -0
- data/app/events/decidim/initiatives/endorse_initiative_event.rb +54 -0
- data/app/forms/decidim/initiatives/admin/initiative_form.rb +50 -0
- data/app/forms/decidim/initiatives/admin/initiative_type_form.rb +23 -0
- data/app/forms/decidim/initiatives/admin/initiative_type_scope_form.rb +23 -0
- data/app/forms/decidim/initiatives/initiative_form.rb +30 -0
- data/app/forms/decidim/initiatives/previous_form.rb +20 -0
- data/app/forms/decidim/initiatives/select_initiative_type_form.rb +14 -0
- data/app/helpers/decidim/initiatives/create_initiative_helper.rb +46 -0
- data/app/helpers/decidim/initiatives/initiative_helper.rb +75 -0
- data/app/helpers/decidim/initiatives/initiatives_helper.rb +22 -0
- data/app/helpers/decidim/initiatives/partial_translations_helper.rb +28 -0
- data/app/mailers/decidim/initiatives/initiatives_mailer.rb +87 -0
- data/app/models/decidim/initiative.rb +279 -0
- data/app/models/decidim/initiatives/abilities/admin/attachments_ability.rb +54 -0
- data/app/models/decidim/initiatives/abilities/admin/committee_admin_ability.rb +36 -0
- data/app/models/decidim/initiatives/abilities/admin/committee_user_ability.rb +50 -0
- data/app/models/decidim/initiatives/abilities/admin/features_ability.rb +25 -0
- data/app/models/decidim/initiatives/abilities/admin/initiative_admin_ability.rb +65 -0
- data/app/models/decidim/initiatives/abilities/admin/initiative_type_ability.rb +42 -0
- data/app/models/decidim/initiatives/abilities/admin/initiative_user_ability.rb +68 -0
- data/app/models/decidim/initiatives/abilities/current_user_ability.rb +58 -0
- data/app/models/decidim/initiatives/abilities/everyone_ability.rb +22 -0
- data/app/models/decidim/initiatives/abilities/non_logged_user_ability.rb +33 -0
- data/app/models/decidim/initiatives/abilities/vote_ability.rb +57 -0
- data/app/models/decidim/initiatives_committee_member.rb +22 -0
- data/app/models/decidim/initiatives_type.rb +20 -0
- data/app/models/decidim/initiatives_type_scope.rb +27 -0
- data/app/models/decidim/initiatives_vote.rb +67 -0
- data/app/presenters/decidim/initiatives/initiative_stats_presenter.rb +52 -0
- data/app/queries/decidim/initiatives/admin/manageable_initiatives.rb +65 -0
- data/app/queries/decidim/initiatives/freetext_initiative_types.rb +39 -0
- data/app/queries/decidim/initiatives/initiative_types.rb +27 -0
- data/app/queries/decidim/initiatives/initiatives_created.rb +29 -0
- data/app/queries/decidim/initiatives/initiatives_promoted.rb +32 -0
- data/app/queries/decidim/initiatives/organization_prioritized_initiatives.rb +18 -0
- data/app/queries/decidim/initiatives/outdated_validating_initiatives.rb +30 -0
- data/app/queries/decidim/initiatives/similar_initiatives.rb +54 -0
- data/app/queries/decidim/initiatives/support_period_finished_initiatives.rb +19 -0
- data/app/queries/decidim/initiatives/user_authorizations.rb +29 -0
- data/app/services/decidim/initiatives/initiative_search.rb +73 -0
- data/app/services/decidim/initiatives/progress_notifier.rb +36 -0
- data/app/services/decidim/initiatives/status_change_notifier.rb +86 -0
- data/app/views/decidim/initiatives/_initiative.html.erb +35 -0
- data/app/views/decidim/initiatives/admin/committee_requests/index.html.erb +67 -0
- data/app/views/decidim/initiatives/admin/initiatives/_form.html.erb +76 -0
- data/app/views/decidim/initiatives/admin/initiatives/edit.html.erb +62 -0
- data/app/views/decidim/initiatives/admin/initiatives/index.html.erb +103 -0
- data/app/views/decidim/initiatives/admin/initiatives/show.html.erb +178 -0
- data/app/views/decidim/initiatives/admin/initiatives_type_scopes/_form.html.erb +9 -0
- data/app/views/decidim/initiatives/admin/initiatives_type_scopes/edit.html.erb +21 -0
- data/app/views/decidim/initiatives/admin/initiatives_type_scopes/new.html.erb +14 -0
- data/app/views/decidim/initiatives/admin/initiatives_types/_form.html.erb +24 -0
- data/app/views/decidim/initiatives/admin/initiatives_types/_initiative_type_scopes.html.erb +39 -0
- data/app/views/decidim/initiatives/admin/initiatives_types/edit.html.erb +15 -0
- data/app/views/decidim/initiatives/admin/initiatives_types/index.html.erb +34 -0
- data/app/views/decidim/initiatives/admin/initiatives_types/new.html.erb +11 -0
- data/app/views/decidim/initiatives/committee_requests/new.html.erb +37 -0
- data/app/views/decidim/initiatives/create_initiative/_compare_help.ca.html.erb +2 -0
- data/app/views/decidim/initiatives/create_initiative/_compare_help.en.html.erb +2 -0
- data/app/views/decidim/initiatives/create_initiative/_compare_help.es.html.erb +2 -0
- data/app/views/decidim/initiatives/create_initiative/_finish_help.ca.html.erb +19 -0
- data/app/views/decidim/initiatives/create_initiative/_finish_help.en.html.erb +20 -0
- data/app/views/decidim/initiatives/create_initiative/_finish_help.es.html.erb +19 -0
- data/app/views/decidim/initiatives/create_initiative/_share_committee_link.html.erb +24 -0
- data/app/views/decidim/initiatives/create_initiative/fill_data.html.erb +64 -0
- data/app/views/decidim/initiatives/create_initiative/finish.html.erb +30 -0
- data/app/views/decidim/initiatives/create_initiative/previous_form.html.erb +39 -0
- data/app/views/decidim/initiatives/create_initiative/promotal_committee.html.erb +21 -0
- data/app/views/decidim/initiatives/create_initiative/select_initiative_type.html.erb +40 -0
- data/app/views/decidim/initiatives/create_initiative/show_similar_initiatives.html.erb +23 -0
- data/app/views/decidim/initiatives/initiative_votes/update_buttons_and_counters.js.erb +21 -0
- data/app/views/decidim/initiatives/initiative_widgets/show.html.erb +4 -0
- data/app/views/decidim/initiatives/initiatives/_author.html.erb +35 -0
- data/app/views/decidim/initiatives/initiatives/_count.html.erb +1 -0
- data/app/views/decidim/initiatives/initiatives/_filters.html.erb +44 -0
- data/app/views/decidim/initiatives/initiatives/_filters_small_view.html.erb +18 -0
- data/app/views/decidim/initiatives/initiatives/_index_header.html.erb +11 -0
- data/app/views/decidim/initiatives/initiatives/_initiative_badge.html.erb +5 -0
- data/app/views/decidim/initiatives/initiatives/_initiatives.html.erb +14 -0
- data/app/views/decidim/initiatives/initiatives/_linked_initiatives.html.erb +0 -0
- data/app/views/decidim/initiatives/initiatives/_no_initiatives_yet.html.erb +3 -0
- data/app/views/decidim/initiatives/initiatives/_result.html.erb +26 -0
- data/app/views/decidim/initiatives/initiatives/_statistics.html.erb +21 -0
- data/app/views/decidim/initiatives/initiatives/_supports.html.erb +22 -0
- data/app/views/decidim/initiatives/initiatives/_supports_count.html.erb +7 -0
- data/app/views/decidim/initiatives/initiatives/_tags.html.erb +4 -0
- data/app/views/decidim/initiatives/initiatives/_vote_button.html.erb +18 -0
- data/app/views/decidim/initiatives/initiatives/_vote_cabin.html.erb +26 -0
- data/app/views/decidim/initiatives/initiatives/_votes_count.html.erb +12 -0
- data/app/views/decidim/initiatives/initiatives/index.html.erb +24 -0
- data/app/views/decidim/initiatives/initiatives/index.js.erb +10 -0
- data/app/views/decidim/initiatives/initiatives/show.html.erb +74 -0
- data/app/views/decidim/initiatives/initiatives/signature_identities.html.erb +30 -0
- data/app/views/decidim/initiatives/initiatives_mailer/_initiative_link.html.erb +5 -0
- data/app/views/decidim/initiatives/initiatives_mailer/notify_creation.html.erb +22 -0
- data/app/views/decidim/initiatives/initiatives_mailer/notify_progress.html.erb +3 -0
- data/app/views/decidim/initiatives/initiatives_mailer/notify_state_change.html.erb +3 -0
- data/app/views/decidim/initiatives/initiatives_mailer/notify_validating_request.html.erb +3 -0
- data/app/views/decidim/initiatives/initiatives_type_scopes/search.html.erb +1 -0
- data/app/views/decidim/initiatives/pages/home/_highlighted_initiatives.html.erb +27 -0
- data/app/views/layouts/decidim/_initiative_creation_header.html.erb +36 -0
- data/app/views/layouts/decidim/_initiative_header.html.erb +65 -0
- data/app/views/layouts/decidim/_initiative_header_steps.html.erb +20 -0
- data/app/views/layouts/decidim/admin/initiative.html.erb +54 -0
- data/app/views/layouts/decidim/admin/initiatives.html.erb +20 -0
- data/app/views/layouts/decidim/initiative.html.erb +15 -0
- data/app/views/layouts/decidim/initiative_creation.html.erb +10 -0
- data/config/initializers/mail_previews.rb +5 -0
- data/config/initializers/social_share_button.rb +5 -0
- data/config/locales/ca.yml +325 -0
- data/config/locales/en.yml +327 -0
- data/config/locales/es.yml +325 -0
- data/db/migrate/20170906091626_create_decidim_initiatives_types.rb +19 -0
- data/db/migrate/20170906094044_create_decidim_initiatives.rb +42 -0
- data/db/migrate/20170917072556_create_decidim_initiatives_votes.rb +13 -0
- data/db/migrate/20170922152432_create_decidim_initiatives_committee_members.rb +18 -0
- data/db/migrate/20170927131354_add_decidim_user_group_id_to_decidim_initiatives.rb +8 -0
- data/db/migrate/20170927153744_change_signature_interval_to_optional.rb +6 -0
- data/db/migrate/20170928160302_add_decidim_user_group_id_to_decidim_initiatives_votes.rb +6 -0
- data/db/migrate/20170928160912_remove_scope_from_decidim_initiatives_votes.rb +5 -0
- data/db/migrate/20171011110714_add_banner_image_to_initiative_type.rb +5 -0
- data/db/migrate/20171011152425_add_hashtag_to_initiatives.rb +5 -0
- data/db/migrate/20171013090432_add_initiative_supports_count_to_initiative.rb +14 -0
- data/db/migrate/20171017090551_create_decidim_initiatives_decidim_initiatives_type_scopes.rb +11 -0
- data/db/migrate/20171017091458_remove_supports_required_from_decidim_initiatives_types.rb +5 -0
- data/db/migrate/20171017091734_add_scopes_for_all_initiative_types.rb +22 -0
- data/db/migrate/20171017094911_add_scoped_type_to_initiative.rb +6 -0
- data/db/migrate/20171017095143_update_initiative_scoped_type.rb +15 -0
- data/db/migrate/20171017103029_remove_unused_attributes_from_initiative.rb +7 -0
- data/db/migrate/20171019103358_add_initiative_notification_dates.rb +9 -0
- data/db/migrate/20171023075942_create_initiative_extra_data.rb +9 -0
- data/db/migrate/20171023122747_create_static_pages.rb +24 -0
- data/db/migrate/20171023141639_optional_validation_support.rb +6 -0
- data/db/migrate/20171031183855_add_offline_votes_to_initiative.rb +6 -0
- data/db/migrate/20171102094250_drop_initiative_description_index.rb +5 -0
- data/db/migrate/20171102094556_create_initiative_description_index.rb +9 -0
- data/db/migrate/20171109132011_enable_pg_extensions.rb +9 -0
- data/db/migrate/20171204094639_drop_decidim_initiatives_extra_data.rb +13 -0
- data/db/migrate/20171204103119_remove_requires_validation_from_decidim_initiatives_type.rb +6 -0
- data/db/migrate/20171214161410_add_unique_on_votes.rb +40 -0
- data/db/seeds/city2.jpeg +0 -0
- data/lib/decidim/initiatives.rb +99 -0
- data/lib/decidim/initiatives/admin.rb +10 -0
- data/lib/decidim/initiatives/admin_engine.rb +95 -0
- data/lib/decidim/initiatives/current_locale.rb +13 -0
- data/lib/decidim/initiatives/engine.rb +99 -0
- data/lib/decidim/initiatives/initiative_slug.rb +18 -0
- data/lib/decidim/initiatives/initiatives_filter_form_builder.rb +49 -0
- data/lib/decidim/initiatives/participatory_space.rb +74 -0
- data/lib/decidim/initiatives/test/factories.rb +120 -0
- data/lib/decidim/initiatives/version.rb +8 -0
- data/lib/tasks/decidim_initiatives.rake +51 -0
- metadata +398 -0
data/README.md
ADDED
@@ -0,0 +1,118 @@
|
|
1
|
+
# Decidim::Initiatives
|
2
|
+
|
3
|
+
Initiatives is the place on Decidim's where citizens can promote a civic initiative. Unlike
|
4
|
+
participatory processes that must be created by an administrator, Civic initiatives can be
|
5
|
+
created by any user of the platform.
|
6
|
+
|
7
|
+
An initiative will contain attachments and comments from other users as well.
|
8
|
+
|
9
|
+
Prior to be published an initiative must be technically validated. All the validation
|
10
|
+
process and communication between the platform administrators and the sponsorship
|
11
|
+
committee is managed via an administration UI.
|
12
|
+
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
This plugin provides:
|
16
|
+
|
17
|
+
* A CRUD engine to manage initiatives.
|
18
|
+
|
19
|
+
* Public views for initiatives via a high level section in the main menu.
|
20
|
+
|
21
|
+
## Installation
|
22
|
+
Add this line to your application's Gemfile:
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
gem 'decidim-initiatives'
|
26
|
+
```
|
27
|
+
|
28
|
+
And then execute:
|
29
|
+
```bash
|
30
|
+
$ bundle
|
31
|
+
$ bundle exec rails decidim_initiatives:install:migrations
|
32
|
+
$ bundle exec rails db:migrate
|
33
|
+
```
|
34
|
+
|
35
|
+
## Database
|
36
|
+
|
37
|
+
The database requires the extension pg_trgm enabled. Contact your DBA to enable it.
|
38
|
+
|
39
|
+
```sql
|
40
|
+
CREATE EXTENSION pg_trgm;
|
41
|
+
```
|
42
|
+
|
43
|
+
## Rake tasks
|
44
|
+
|
45
|
+
This engine comes with three rake tasks that should be executed on daily basis. The best
|
46
|
+
way to execute these tasks is using cron jobs. You can manage this cron jobs in your
|
47
|
+
Rails application using the [Whenever GEM](https://github.com/javan/whenever) or even
|
48
|
+
creating them by hand.
|
49
|
+
|
50
|
+
### decidim_initiatives:check_validating
|
51
|
+
|
52
|
+
This task move all initiatives in validation phase without changes for the amount of
|
53
|
+
time defined in __Decidim::Initiatives::max_time_in_validating_state__. These initiatives
|
54
|
+
will be moved to __discarded__ state.
|
55
|
+
|
56
|
+
### decidim_initiatives:check_published
|
57
|
+
|
58
|
+
This task retrieves all published initiatives whose support method is online and the support
|
59
|
+
period has expired. Initiatives that have reached the minimum supports required will pass
|
60
|
+
to state __accepted__. The initiatives without enough supports will pass to __rejected__ state.
|
61
|
+
|
62
|
+
Initiatives with offline support method enabled (pure offline or mixed) will get its status updated
|
63
|
+
after the presential supports have been registered into the system.
|
64
|
+
|
65
|
+
### decidim_initiatives:notify_progress
|
66
|
+
|
67
|
+
This task sends notification mails when initiatives reaches the support percentages defined in
|
68
|
+
__Decidim::Initiatives.first_notification_percentage__ and __Decidim::Initiatives.second_notification_percentage__.
|
69
|
+
|
70
|
+
Author, members of the promoter committee and followers will receive it.
|
71
|
+
|
72
|
+
## Exporting online votes.
|
73
|
+
|
74
|
+
When the supporting method is set to any or face to face it may be necessary to implement
|
75
|
+
a mechanism to validate that do not exist duplicated supports. To do so the engine provides
|
76
|
+
a functionality that allows exporting the online votes to validate them against physical
|
77
|
+
votes.
|
78
|
+
|
79
|
+
The votes are exported as a hash string in order to preserve the identity of the voter.
|
80
|
+
Each hash is composed with the following criteria:
|
81
|
+
|
82
|
+
* Algorithm used: SHA1
|
83
|
+
* Format of the string hashed: "#{unique_id}#{title}#{description}"
|
84
|
+
|
85
|
+
There are some considerations that you must keep in mind:
|
86
|
+
|
87
|
+
* Title and description will be hashed using the same format included in the database, this is including html tags.
|
88
|
+
* Title and description will be hashed using the same locale used by the initiative author. In case there is more
|
89
|
+
than one locale available be sure that you change your locale settings to be inline with
|
90
|
+
the locale used to generate the hashes outside Decidim.
|
91
|
+
|
92
|
+
## Seeding example data
|
93
|
+
|
94
|
+
In order to populate the database with example data proceed as usual in rails:
|
95
|
+
```bash
|
96
|
+
$ bundle exec rails db:seed
|
97
|
+
```
|
98
|
+
|
99
|
+
## Aditional considerations
|
100
|
+
|
101
|
+
### Cookies
|
102
|
+
This engine makes use of cookies to store large form data. You should change the
|
103
|
+
default session store or you might experience problems.
|
104
|
+
|
105
|
+
Check the [Rails configuration guide](http://guides.rubyonrails.org/configuring.html#rails-general-configuration)
|
106
|
+
in order to get instructions about changing the default session store.
|
107
|
+
|
108
|
+
### Translations
|
109
|
+
There are some legal texts that are adapted for Barcelona's city council. You should
|
110
|
+
adapt them for your decidim instance. The files that you need to check are:
|
111
|
+
|
112
|
+
* app/views/decidim/initiatives/_legal_text.*.html.erb
|
113
|
+
|
114
|
+
## Contributing
|
115
|
+
See [Decidim](https://github.com/decidim/decidim).
|
116
|
+
|
117
|
+
## License
|
118
|
+
See [Decidim](https://github.com/decidim/decidim).
|
data/Rakefile
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
//= link decidim/initiatives/social_share.js
|
2
|
+
//= link decidim/initiatives/application.js
|
3
|
+
//= link decidim/initiatives/application.css
|
4
|
+
//= link decidim/initiatives/social_share.css
|
5
|
+
//= link decidim/initiatives/identity_selector_dialog.js
|
6
|
+
//= link decidim/initiatives/scoped_type.js
|
7
|
+
//= link decidim/initiatives/admin/invite_users.js
|
@@ -0,0 +1,24 @@
|
|
1
|
+
(function () {
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
var inviteUsersButton = document.querySelector('.invite-users-link');
|
5
|
+
|
6
|
+
if (inviteUsersButton !== null) {
|
7
|
+
inviteUsersButton.addEventListener('click', function (event) {
|
8
|
+
var link = document.querySelector('#committee_link'),
|
9
|
+
range = document.createRange();
|
10
|
+
|
11
|
+
event.preventDefault();
|
12
|
+
|
13
|
+
range.selectNode(link);
|
14
|
+
window.getSelection().addRange(range);
|
15
|
+
|
16
|
+
try {
|
17
|
+
document.execCommand('copy');
|
18
|
+
} catch (err) {
|
19
|
+
}
|
20
|
+
|
21
|
+
window.getSelection().removeAllRanges();
|
22
|
+
});
|
23
|
+
}
|
24
|
+
}());
|
@@ -0,0 +1 @@
|
|
1
|
+
// = require decidim/editor
|
@@ -0,0 +1,17 @@
|
|
1
|
+
$(document).ready(function () {
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
var userIdentitiesDialog = $('#user-identities'),
|
5
|
+
button = $('#select-identity-button'),
|
6
|
+
refreshUrl;
|
7
|
+
|
8
|
+
if (userIdentitiesDialog.length) {
|
9
|
+
refreshUrl = userIdentitiesDialog.data('refresh-url');
|
10
|
+
|
11
|
+
button.click(function () {
|
12
|
+
$.ajax(refreshUrl).done(function(response){
|
13
|
+
userIdentitiesDialog.html(response).foundation('open');
|
14
|
+
});
|
15
|
+
});
|
16
|
+
}
|
17
|
+
});
|
@@ -0,0 +1,35 @@
|
|
1
|
+
$(document).ready(function () {
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
var typeSelector = $('[data-scope-selector]'),
|
5
|
+
refresh,
|
6
|
+
targetElement,
|
7
|
+
currentValue,
|
8
|
+
searchUrl;
|
9
|
+
|
10
|
+
if (typeSelector.length) {
|
11
|
+
targetElement = $('#' + typeSelector.data('scope-selector'));
|
12
|
+
currentValue = typeSelector.data('scope-id');
|
13
|
+
searchUrl = typeSelector.data('scope-search-url');
|
14
|
+
|
15
|
+
if (targetElement.length) {
|
16
|
+
refresh = function () {
|
17
|
+
$.ajax({
|
18
|
+
url: searchUrl,
|
19
|
+
cache: false,
|
20
|
+
dataType: 'html',
|
21
|
+
data: {
|
22
|
+
type_id: typeSelector.val(),
|
23
|
+
selected: currentValue
|
24
|
+
},
|
25
|
+
success: function (data) {
|
26
|
+
targetElement.html(data);
|
27
|
+
}
|
28
|
+
});
|
29
|
+
};
|
30
|
+
|
31
|
+
typeSelector.change(refresh);
|
32
|
+
refresh();
|
33
|
+
}
|
34
|
+
}
|
35
|
+
});
|
@@ -0,0 +1,34 @@
|
|
1
|
+
.committee_link {
|
2
|
+
border: 1px solid lightgray;
|
3
|
+
|
4
|
+
float: left;
|
5
|
+
padding: 0.85em 1em;
|
6
|
+
width: auto;
|
7
|
+
}
|
8
|
+
|
9
|
+
.invite-users-link {
|
10
|
+
padding: 0.85em 1em;
|
11
|
+
}
|
12
|
+
|
13
|
+
#initiatives_type_remove_banner_image {
|
14
|
+
display: none;
|
15
|
+
}
|
16
|
+
|
17
|
+
#initiatives_type_remove_banner_image + label {
|
18
|
+
display: none;
|
19
|
+
}
|
20
|
+
|
21
|
+
.text-right {
|
22
|
+
text-align: right !important;
|
23
|
+
}
|
24
|
+
|
25
|
+
.white-button {
|
26
|
+
color: #599aa6;
|
27
|
+
background: white;
|
28
|
+
}
|
29
|
+
|
30
|
+
.white-button:hover {
|
31
|
+
color: #599aa6;
|
32
|
+
background: white;
|
33
|
+
font-weight: bold;
|
34
|
+
}
|
@@ -0,0 +1,82 @@
|
|
1
|
+
@import "decidim/editor";
|
2
|
+
@import "popularity_item";
|
3
|
+
@import "statistics";
|
4
|
+
@import "admin";
|
5
|
+
|
6
|
+
.ql-formats {
|
7
|
+
.ql-video {
|
8
|
+
margin: 0;
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
12
|
+
.initiative-status {
|
13
|
+
float: left;
|
14
|
+
margin-right: .5rem;
|
15
|
+
}
|
16
|
+
|
17
|
+
.supports-list {
|
18
|
+
.author {
|
19
|
+
margin-right: 15px;
|
20
|
+
|
21
|
+
.author__name {
|
22
|
+
color: #599aa6;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
.initiative-authors {
|
28
|
+
padding-left: 0 !important;
|
29
|
+
|
30
|
+
.publish-date {
|
31
|
+
display: inline-block;
|
32
|
+
margin-left: -10px;
|
33
|
+
}
|
34
|
+
|
35
|
+
.author {
|
36
|
+
margin-right: 15px;
|
37
|
+
}
|
38
|
+
|
39
|
+
.author__avatar--small {
|
40
|
+
margin-left: 0 !important;
|
41
|
+
}
|
42
|
+
|
43
|
+
.author__name {
|
44
|
+
margin-left: 25px;
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
.pull-left {
|
49
|
+
float: left;
|
50
|
+
}
|
51
|
+
|
52
|
+
.pull-right {
|
53
|
+
float: right;
|
54
|
+
}
|
55
|
+
|
56
|
+
.lowercase {
|
57
|
+
text-transform: lowercase !important;
|
58
|
+
}
|
59
|
+
|
60
|
+
.initiative-creation-header__container {
|
61
|
+
position: relative;
|
62
|
+
z-index: 1;
|
63
|
+
padding: 0 0 0 1rem;
|
64
|
+
background: #fafafa;
|
65
|
+
|
66
|
+
.initiative-creation-header__phase {
|
67
|
+
background: #fafafa;
|
68
|
+
color: #fff;
|
69
|
+
text-align: center;
|
70
|
+
padding: 0 1rem;
|
71
|
+
margin-left: -1rem;
|
72
|
+
|
73
|
+
.caption {
|
74
|
+
color: #8c838a;
|
75
|
+
font-size: .9em;
|
76
|
+
}
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
.legal_text {
|
81
|
+
font-size: 8pt;
|
82
|
+
}
|
@@ -0,0 +1,61 @@
|
|
1
|
+
.popularity {
|
2
|
+
min-width: 100px;
|
3
|
+
margin-top: 5px
|
4
|
+
}
|
5
|
+
|
6
|
+
.popularity::before, .popularity::after {
|
7
|
+
display: table;
|
8
|
+
content: ' '
|
9
|
+
}
|
10
|
+
|
11
|
+
.popularity::after {
|
12
|
+
clear: both
|
13
|
+
}
|
14
|
+
|
15
|
+
.popularity.extra__popularity {
|
16
|
+
margin-top: 1.5rem;
|
17
|
+
margin-bottom: 1.5rem
|
18
|
+
}
|
19
|
+
|
20
|
+
.popularity__desc {
|
21
|
+
color: #8c838a;
|
22
|
+
text-transform: uppercase;
|
23
|
+
font-size: 90%;
|
24
|
+
padding-top: .3rem;
|
25
|
+
display: block;
|
26
|
+
clear: both
|
27
|
+
}
|
28
|
+
|
29
|
+
.popularity__item {
|
30
|
+
float: left;
|
31
|
+
width: 18.4%;
|
32
|
+
height: 4px;
|
33
|
+
background-color: lightgrey;
|
34
|
+
margin-left: 2%
|
35
|
+
}
|
36
|
+
|
37
|
+
.popularity__item:first-of-type {
|
38
|
+
margin-left: 0
|
39
|
+
}
|
40
|
+
|
41
|
+
.popularity--level1 .popularity__item:first-of-type, .popularity--level2 .popularity__item:first-of-type, .popularity--level3 .popularity__item:first-of-type, .popularity--level4 .popularity__item:first-of-type, .popularity--level5 .popularity__item:first-of-type, .popularity--level6 .popularity__item:first-of-type {
|
42
|
+
background: #53c9c8
|
43
|
+
}
|
44
|
+
|
45
|
+
.popularity--level2 .popularity__item:nth-of-type(2), .popularity--level3 .popularity__item:nth-of-type(2), .popularity--level4 .popularity__item:nth-of-type(2), .popularity--level5 .popularity__item:nth-of-type(2), .popularity--level6 .popularity__item:nth-of-type(2) {
|
46
|
+
background: -webkit-linear-gradient(left, #53c9c8, #f9bc48);
|
47
|
+
background: linear-gradient(to right, #53c9c8, #f9bc48)
|
48
|
+
}
|
49
|
+
|
50
|
+
.popularity--level3 .popularity__item:nth-of-type(3), .popularity--level4 .popularity__item:nth-of-type(3), .popularity--level5 .popularity__item:nth-of-type(3), .popularity--level6 .popularity__item:nth-of-type(3) {
|
51
|
+
background: #f9bc48
|
52
|
+
}
|
53
|
+
|
54
|
+
.popularity--level4 .popularity__item:nth-of-type(4), .popularity--level5 .popularity__item:nth-of-type(4), .popularity--level6 .popularity__item:nth-of-type(4) {
|
55
|
+
background: -webkit-linear-gradient(left, #f9bc48 50%, #f85a39);
|
56
|
+
background: linear-gradient(to right, #f9bc48 50%, #f85a39)
|
57
|
+
}
|
58
|
+
|
59
|
+
.popularity--level5 .popularity__item:nth-of-type(5), .popularity--level6 .popularity__item:nth-of-type(5) {
|
60
|
+
background: #f85a39
|
61
|
+
}
|
@@ -0,0 +1,125 @@
|
|
1
|
+
@media all {
|
2
|
+
.initiative-letterhead {
|
3
|
+
font-size: 14pt;
|
4
|
+
font-weight: bold;
|
5
|
+
|
6
|
+
img {
|
7
|
+
margin-right: 5pt;
|
8
|
+
}
|
9
|
+
}
|
10
|
+
|
11
|
+
.initiative-print-title {
|
12
|
+
border: 1pt solid black;
|
13
|
+
margin: 15pt 0;
|
14
|
+
font-size: 12pt;
|
15
|
+
font-weight: bold;
|
16
|
+
text-transform: uppercase;
|
17
|
+
text-align: center;
|
18
|
+
}
|
19
|
+
|
20
|
+
.print-table {
|
21
|
+
width: 100%;
|
22
|
+
display: block;
|
23
|
+
border: 1pt solid black;
|
24
|
+
|
25
|
+
.print-table-header {
|
26
|
+
background-color: lightgray;
|
27
|
+
display: inline-block;
|
28
|
+
width: 100%;
|
29
|
+
text-transform: uppercase;
|
30
|
+
padding-left: 5pt;
|
31
|
+
font-size: 12pt;
|
32
|
+
font-weight: bold;
|
33
|
+
border-bottom: 1pt solid black;
|
34
|
+
}
|
35
|
+
|
36
|
+
.print-table-row {
|
37
|
+
width: 100%;
|
38
|
+
display: inline-block;
|
39
|
+
min-height: 33pt;
|
40
|
+
border-bottom: 1pt solid black;
|
41
|
+
}
|
42
|
+
|
43
|
+
.print-table-row:after {
|
44
|
+
content: '';
|
45
|
+
display: inline-block;
|
46
|
+
clear: both;
|
47
|
+
}
|
48
|
+
|
49
|
+
.print-table-row:last-child {
|
50
|
+
border-bottom: 0;
|
51
|
+
}
|
52
|
+
|
53
|
+
.print-table-cell {
|
54
|
+
padding-left: 5pt;
|
55
|
+
display: inline-block;
|
56
|
+
float: left;
|
57
|
+
border-right: 1pt solid black;
|
58
|
+
min-height: 36pt;
|
59
|
+
|
60
|
+
.cell-content {
|
61
|
+
font-size: 10pt;
|
62
|
+
word-wrap: break-word;
|
63
|
+
}
|
64
|
+
}
|
65
|
+
|
66
|
+
.checkbox-cell {
|
67
|
+
width: 36pt;
|
68
|
+
}
|
69
|
+
|
70
|
+
.print-table-cell:last-child {
|
71
|
+
border-right: 0;
|
72
|
+
}
|
73
|
+
|
74
|
+
.w33 {
|
75
|
+
width: 33%;
|
76
|
+
}
|
77
|
+
|
78
|
+
.w66 {
|
79
|
+
width: 66%;
|
80
|
+
}
|
81
|
+
|
82
|
+
.w50 {
|
83
|
+
width: 50%;
|
84
|
+
}
|
85
|
+
}
|
86
|
+
|
87
|
+
.no-border {
|
88
|
+
border: none !important;
|
89
|
+
}
|
90
|
+
|
91
|
+
.print-section-title {
|
92
|
+
font-size: 12pt;
|
93
|
+
font-weight: bold;
|
94
|
+
margin-top: 15pt;
|
95
|
+
text-transform: uppercase;
|
96
|
+
}
|
97
|
+
|
98
|
+
.print-initiative-legal-text {
|
99
|
+
font-size: 10pt;
|
100
|
+
margin-top: 80pt;
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
104
|
+
@page {
|
105
|
+
size: A4;
|
106
|
+
margin: 17mm 17mm 11mm 11mm;
|
107
|
+
}
|
108
|
+
|
109
|
+
@media print {
|
110
|
+
.title-bar {
|
111
|
+
display: none;
|
112
|
+
}
|
113
|
+
|
114
|
+
.layout-nav {
|
115
|
+
display: none;
|
116
|
+
}
|
117
|
+
|
118
|
+
.button.expanded {
|
119
|
+
display: none;
|
120
|
+
}
|
121
|
+
|
122
|
+
.page-break {
|
123
|
+
page-break-before: auto;
|
124
|
+
}
|
125
|
+
}
|