decidim-core 0.0.3 → 0.0.5

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.
Files changed (158) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/decidim_core_manifest.js +1 -0
  3. data/app/assets/images/decidim/process.svg +10 -0
  4. data/app/assets/javascripts/decidim.js.es6 +2 -0
  5. data/app/assets/javascripts/decidim/editor.js.es6 +2 -2
  6. data/app/assets/javascripts/decidim/filters.js.es6 +1 -1
  7. data/app/assets/javascripts/decidim/form_filter.component.js.es6 +26 -5
  8. data/app/assets/javascripts/decidim/form_filter.component.test.js +1 -18
  9. data/app/assets/javascripts/decidim/foundation.js.es6 +1 -0
  10. data/app/assets/javascripts/decidim/history.js.es6 +35 -0
  11. data/app/assets/javascripts/decidim/orders.js.es6 +28 -0
  12. data/app/assets/stylesheets/decidim/_decidim.scss +1 -0
  13. data/app/assets/stylesheets/decidim/email.css +21 -3
  14. data/app/assets/stylesheets/decidim/extras/_leaflet.scss +4 -2
  15. data/app/assets/stylesheets/decidim/extras/_quill.scss +8 -0
  16. data/app/assets/stylesheets/decidim/extras/_register_form.scss +9 -0
  17. data/app/assets/stylesheets/decidim/modules/_buttons.scss +19 -3
  18. data/app/assets/stylesheets/decidim/utils/_mixins.scss +8 -4
  19. data/app/commands/decidim/authorize_user.rb +9 -4
  20. data/app/commands/decidim/create_omniauth_registration.rb +4 -2
  21. data/app/commands/decidim/create_registration.rb +4 -1
  22. data/app/commands/decidim/invite_user.rb +3 -1
  23. data/app/commands/decidim/update_notifications_settings.rb +31 -0
  24. data/app/constraints/decidim/current_feature.rb +16 -15
  25. data/app/controllers/concerns/decidim/action_authorization.rb +73 -0
  26. data/app/controllers/concerns/decidim/feature_settings.rb +2 -5
  27. data/app/controllers/concerns/decidim/needs_authorization.rb +5 -1
  28. data/app/controllers/concerns/decidim/user_profile.rb +1 -0
  29. data/app/controllers/decidim/application_controller.rb +12 -0
  30. data/app/controllers/decidim/authorizations_controller.rb +10 -12
  31. data/app/controllers/decidim/cookie_policy_controller.rb +15 -0
  32. data/app/controllers/decidim/devise/confirmations_controller.rb +4 -0
  33. data/app/controllers/decidim/devise/invitations_controller.rb +4 -0
  34. data/app/controllers/decidim/devise/omniauth_registrations_controller.rb +10 -3
  35. data/app/controllers/decidim/devise/passwords_controller.rb +4 -0
  36. data/app/controllers/decidim/devise/registrations_controller.rb +21 -0
  37. data/app/controllers/decidim/devise/sessions_controller.rb +4 -0
  38. data/app/controllers/decidim/notifications_settings_controller.rb +31 -0
  39. data/app/controllers/decidim/pages_controller.rb +17 -6
  40. data/app/controllers/decidim/participatory_processes_controller.rb +5 -5
  41. data/app/forms/decidim/notifications_settings_form.rb +17 -0
  42. data/app/forms/decidim/registration_form.rb +2 -1
  43. data/app/helpers/decidim/action_authorization_helper.rb +82 -0
  44. data/app/helpers/decidim/application_helper.rb +2 -0
  45. data/app/helpers/decidim/authorization_form_helper.rb +1 -1
  46. data/app/helpers/decidim/cookies_helper.rb +11 -0
  47. data/app/helpers/decidim/decidim_form_helper.rb +18 -0
  48. data/app/helpers/decidim/language_chooser_helper.rb +18 -0
  49. data/app/helpers/decidim/layout_helper.rb +0 -5
  50. data/app/helpers/decidim/localized_locales_helper.rb +1 -1
  51. data/app/helpers/decidim/meta_tags_helper.rb +104 -0
  52. data/app/helpers/decidim/orders_helper.rb +28 -0
  53. data/app/helpers/decidim/resource_helper.rb +46 -6
  54. data/app/mailers/decidim/application_mailer.rb +2 -2
  55. data/app/mailers/decidim/decidim_devise_mailer.rb +0 -1
  56. data/app/mailers/decidim/newsletter_mailer.rb +24 -0
  57. data/app/models/decidim/abilities/everyone.rb +2 -0
  58. data/app/models/decidim/feature.rb +30 -0
  59. data/app/models/decidim/newsletter.rb +24 -0
  60. data/app/models/decidim/organization.rb +2 -0
  61. data/app/models/decidim/user.rb +3 -2
  62. data/app/queries/decidim/highlighted_participatory_processes.rb +10 -0
  63. data/app/queries/decidim/promoted_participatory_processes.rb +9 -0
  64. data/app/queries/decidim/public_participatory_processes.rb +10 -0
  65. data/app/services/decidim/action_authorizer.rb +102 -0
  66. data/app/services/decidim/resource_search.rb +1 -1
  67. data/app/uploaders/decidim/official_image_footer_uploader.rb +12 -0
  68. data/app/uploaders/decidim/official_image_header_uploader.rb +12 -0
  69. data/app/validators/etiquette_validator.rb +42 -0
  70. data/app/views/decidim/account/show.html.erb +1 -1
  71. data/app/views/decidim/authorizations/index.html.erb +4 -4
  72. data/app/views/decidim/authorizations/new.html.erb +2 -2
  73. data/app/views/decidim/cookie_policy/accept.js.erb +3 -0
  74. data/app/views/decidim/devise/confirmations/new.html.erb +3 -1
  75. data/app/views/decidim/devise/invitations/edit.html.erb +1 -1
  76. data/app/views/decidim/devise/omniauth_registrations/new.html.erb +1 -1
  77. data/app/views/decidim/devise/passwords/edit.html.erb +1 -1
  78. data/app/views/decidim/devise/passwords/new.html.erb +3 -1
  79. data/app/views/decidim/devise/registrations/edit.html.erb +2 -1
  80. data/app/views/decidim/devise/registrations/new.html.erb +13 -1
  81. data/app/views/decidim/devise/sessions/new.html.erb +3 -1
  82. data/app/views/decidim/newsletter_mailer/newsletter.html.erb +5 -0
  83. data/app/views/decidim/notifications_settings/show.html.erb +26 -0
  84. data/app/views/decidim/pages/index.html.erb +34 -0
  85. data/app/views/decidim/participatory_process_steps/index.html.erb +1 -1
  86. data/app/views/decidim/participatory_processes/_participatory_process.html.erb +4 -2
  87. data/app/views/decidim/participatory_processes/_promoted_process.html.erb +1 -1
  88. data/app/views/decidim/participatory_processes/index.html.erb +3 -3
  89. data/app/views/decidim/participatory_processes/show.html.erb +30 -9
  90. data/app/views/decidim/shared/_action_authorization_modal.html.erb +55 -0
  91. data/app/views/decidim/shared/_login_modal.html.erb +2 -3
  92. data/app/views/decidim/shared/_orders.html.erb +15 -0
  93. data/app/views/decidim/shared/_share_modal.html.erb +33 -0
  94. data/app/views/devise/mailer/organization_admin_invitation_instructions.html.erb +1 -1
  95. data/app/views/layouts/decidim/_application.html.erb +12 -0
  96. data/app/views/layouts/decidim/_cookie_warning.html.erb +8 -0
  97. data/app/views/layouts/decidim/_footer.html.erb +6 -0
  98. data/app/views/layouts/decidim/_header.html.erb +7 -9
  99. data/app/views/layouts/decidim/_language_chooser.html.erb +3 -3
  100. data/app/views/layouts/decidim/_logo.html.erb +1 -1
  101. data/app/views/layouts/decidim/_mailer_logo.html.erb +31 -0
  102. data/app/views/layouts/decidim/_main_nav.html.erb +11 -0
  103. data/app/views/layouts/decidim/_process_header.html.erb +9 -7
  104. data/app/views/layouts/decidim/_social_media_links.html.erb +39 -0
  105. data/app/views/layouts/decidim/_social_meta.html.erb +8 -8
  106. data/app/views/layouts/decidim/mailer.html.erb +110 -62
  107. data/app/views/layouts/decidim/participatory_process.html.erb +14 -3
  108. data/app/views/layouts/decidim/user_profile.html.erb +1 -0
  109. data/app/views/pages/decidim_page.html.erb +5 -0
  110. data/app/views/pages/home.html.erb +4 -0
  111. data/app/views/pages/home/_extended.html.erb +2 -2
  112. data/app/views/pages/home/_footer_sub_hero.html.erb +12 -0
  113. data/app/views/pages/home/_hero.html.erb +2 -2
  114. data/app/views/pages/home/_highlighted_processes.html.erb +2 -2
  115. data/config/i18n-tasks.yml +6 -2
  116. data/config/initializers/invisible_captcha.rb +10 -0
  117. data/config/initializers/mail_previews.rb +4 -0
  118. data/config/locales/ca.yml +129 -23
  119. data/config/locales/en.yml +98 -13
  120. data/config/locales/es.yml +128 -22
  121. data/config/locales/eu.yml +5 -0
  122. data/config/routes.rb +13 -5
  123. data/db/migrate/20170131134349_add_action_permissions_to_decidim_features.rb +5 -0
  124. data/db/migrate/20170202084913_add_comments_and_replies_notifications_to_users.rb +6 -0
  125. data/db/migrate/20170203150545_add_newsletter_notifications_to_users.rb +5 -0
  126. data/db/migrate/20170206083118_rename_extra_info_on_processes.rb +12 -0
  127. data/db/migrate/20170206142116_add_published_at_to_decidim_features.rb +6 -0
  128. data/db/migrate/20170207091021_add_social_media_handlers_to_organization.rb +8 -0
  129. data/db/migrate/20170207093048_add_organization_logo_and_url.rb +7 -0
  130. data/db/migrate/20170213081133_create_decidim_newsletters.rb +15 -0
  131. data/db/seeds.rb +29 -4
  132. data/lib/decidim/attributes.rb +6 -0
  133. data/lib/decidim/attributes/time_with_zone.rb +13 -0
  134. data/lib/decidim/authorable.rb +2 -2
  135. data/lib/decidim/core.rb +11 -0
  136. data/lib/decidim/core/api.rb +11 -0
  137. data/lib/decidim/core/api/author_interface.rb +11 -0
  138. data/lib/decidim/core/api/localized_string_type.rb +11 -0
  139. data/{app/types/decidim → lib/decidim/core/api}/process_step_type.rb +2 -2
  140. data/{app/types/decidim → lib/decidim/core/api}/process_type.rb +1 -1
  141. data/{app/types/decidim → lib/decidim/core/api}/session_type.rb +0 -0
  142. data/lib/decidim/core/api/translated_field_type.rb +42 -0
  143. data/{app/types/decidim → lib/decidim/core/api}/user_group_type.rb +1 -1
  144. data/{app/types/decidim → lib/decidim/core/api}/user_type.rb +1 -1
  145. data/lib/decidim/core/engine.rb +7 -1
  146. data/lib/decidim/core/test.rb +1 -0
  147. data/lib/decidim/core/test/factories.rb +41 -8
  148. data/lib/decidim/core/test/shared_examples/localised_email.rb +24 -0
  149. data/lib/decidim/core/version.rb +1 -1
  150. data/lib/decidim/feature_manifest.rb +11 -0
  151. data/{app/validators → lib/decidim}/feature_validator.rb +1 -3
  152. data/lib/decidim/features/base_controller.rb +6 -1
  153. data/lib/decidim/form_builder.rb +166 -1
  154. data/lib/decidim/has_feature.rb +2 -1
  155. data/lib/decidim/resourceable.rb +26 -0
  156. data/vendor/assets/javascripts/morphdom.js +679 -0
  157. metadata +174 -49
  158. data/lib/decidim/has_attachment.rb +0 -32
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a032ffa156def30465db5d8b3d20ca95a7ea2dc0
4
- data.tar.gz: 855965c6e8eecfbe557440501e0d717c4a7a4a80
3
+ metadata.gz: 48f0431d35a86ad18b3150daa3eb86220cdd95ff
4
+ data.tar.gz: 62ed99da05742f4543482e60c63f836d284b4aa2
5
5
  SHA512:
6
- metadata.gz: 1552bb8342aebc959620e05d4934651d0a54aa61d508a6b2c3db634e27418b3d28211173fdddea6a3964a07decb467da0ea87a439ea63de0b81cfb1ae749bff6
7
- data.tar.gz: 246850a6564065e2f2ee93b0c49c1a41f5cfbf902cdd3675f114e9648eecd24011665141115fdd609681b98bea1219f69344583870d6f6440c451ca2a86a6e40
6
+ metadata.gz: 4e0c2a51aa16df05edbac2e0ba457d2d45c196a16df81ed93592397c845aabedb4ffca95d3dfb8defb75e295f8ae759e796df817dffd4049fb9a3454c1ce7079
7
+ data.tar.gz: 911e75063269ab61745d32e9dfe035a2fc6da51d6f67847753bd65ee30f0fc4fab4d57485a008a8c6c2ddcff49e04067362d711109992b0240882ce155e4ef23
@@ -2,3 +2,4 @@
2
2
  //= link_directory ../fonts/decidim/
3
3
  //= link_directory ../images/decidim/
4
4
  //= link decidim/filters
5
+ //= link decidim/orders
@@ -0,0 +1,10 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36.02 36.02">
2
+ <path d="M883.8,543.84a18,18,0,1,1,18-18A18,18,0,0,1,883.8,543.84Zm0-34a16,16,0,1,0,16,16A16,16,0,0,0,883.8,509.83Z" transform="translate(-865.8 -507.83)"/>
3
+ <g transform="rotate(60 18.1 18.1)">
4
+ <path d="M883.8,528.75a2.91,2.91,0,1,1,2.91-2.91A2.92,2.92,0,0,1,883.8,528.75Zm0-3.83a0.91,0.91,0,1,0,.91.92A0.92,0.92,0,0,0,883.8,524.92Z" transform="translate(-865.8 -507.83)"/>
5
+ <path d="M883.8,521.18a2.91,2.91,0,1,1,2.91-2.91A2.92,2.92,0,0,1,883.8,521.18Zm0-3.83a0.91,0.91,0,1,0,.91.92A0.92,0.92,0,0,0,883.8,517.35Z" transform="translate(-865.8 -507.83)"/>
6
+ <path d="M883.8,536.32a2.92,2.92,0,1,1,2.91-2.91A2.92,2.92,0,0,1,883.8,536.32Zm0-3.83a0.92,0.92,0,1,0,.91.92A0.92,0.92,0,0,0,883.8,532.49Z" transform="translate(-865.8 -507.83)"/>
7
+ <path d="M881.52,526.85a4.79,4.79,0,1,1,0-9.59,1,1,0,0,1,0,2,2.79,2.79,0,1,0,0,5.59A1,1,0,0,1,881.52,526.85Z" transform="translate(-865.8 -507.83)"/>
8
+ <path d="M886.09,534.47a1,1,0,0,1,0-2,2.79,2.79,0,0,0,0-5.59,1,1,0,0,1,0-2A4.79,4.79,0,0,1,886.09,534.47Z" transform="translate(-865.8 -507.83)"/>
9
+ </g>
10
+ </svg>
@@ -1,6 +1,8 @@
1
1
  // = require decidim/foundation
2
2
  // = require modernizr
3
3
  // = require svg4everybody.min
4
+ // = require morphdom
5
+ // = require decidim/history
4
6
  // = require decidim/append_elements
5
7
  // = require decidim/user_registrations
6
8
 
@@ -3,7 +3,7 @@
3
3
 
4
4
  $(() => {
5
5
  const $container = $('.editor-container');
6
- const quillFormats = ['bold', 'italic', 'link', 'underline', 'header', 'list'];
6
+ const quillFormats = ['bold', 'italic', 'link', 'underline', 'header', 'list', 'video'];
7
7
 
8
8
  $container.each((idx, container) => {
9
9
  const toolbar = $(container).data('toolbar');
@@ -11,7 +11,7 @@ $(() => {
11
11
  let quillToolbar = [
12
12
  ['bold', 'italic', 'underline'],
13
13
  [{ list: 'ordered' }, { list: 'bullet' }],
14
- ['link', 'clean']
14
+ ['link', 'video', 'clean']
15
15
  ];
16
16
 
17
17
  if (toolbar === 'full') {
@@ -5,7 +5,7 @@
5
5
  // Initializes the form filter.
6
6
  ((exports) => {
7
7
  const { Decidim: { FormFilterComponent } } = exports;
8
-
8
+
9
9
  $(() => {
10
10
  $('form.new_filter').each(function () {
11
11
  const formFilter = new FormFilterComponent($(this));
@@ -27,8 +27,7 @@
27
27
  if (this.mounted) {
28
28
  this.mounted = false;
29
29
  this.$form.off('change', 'input, select', this._onFormChange);
30
-
31
- exports.onpopstate = null;
30
+ exports.Decidim.History.unregisterCallback(`filters-${this.$form.attr('id')}`)
32
31
  }
33
32
  }
34
33
 
@@ -41,8 +40,9 @@
41
40
  if (this.$form.length > 0 && !this.mounted) {
42
41
  this.mounted = true;
43
42
  this.$form.on('change', 'input, select', this._onFormChange);
44
-
45
- exports.onpopstate = this._onPopState;
43
+ exports.Decidim.History.registerCallback(`filters-${this.$form.attr('id')}`, () => {
44
+ this._onPopState();
45
+ });
46
46
  }
47
47
  }
48
48
 
@@ -94,6 +94,24 @@
94
94
  return null;
95
95
  }
96
96
 
97
+ /**
98
+ * Parse current location and get the current order.
99
+ * @private
100
+ * @returns {string} - The current order
101
+ */
102
+ _parseLocationOrderValue() {
103
+ const url = this._getLocation();
104
+ const match = url.match(/order=([^&]*)/);
105
+ const $orderMenu = $('.order-by .menu');
106
+ let order = $orderMenu.find('.menu a:first').data('order');
107
+
108
+ if (match) {
109
+ order = match[1];
110
+ }
111
+
112
+ return order;
113
+ }
114
+
97
115
  /**
98
116
  * Clears the form to start with a clean state.
99
117
  * @private
@@ -120,6 +138,9 @@
120
138
  this._clearForm();
121
139
 
122
140
  const filterParams = this._parseLocationFilterValues();
141
+ const currentOrder = this._parseLocationOrderValue();
142
+
143
+ this.$form.find('input.order_filter').val(currentOrder);
123
144
 
124
145
  if (filterParams) {
125
146
  const fieldIds = Object.keys(filterParams);
@@ -167,7 +188,7 @@
167
188
  newUrl = `${formAction}&${params}`;
168
189
  }
169
190
 
170
- exports.history.pushState(null, null, newUrl);
191
+ exports.Decidim.History.pushState(newUrl);
171
192
  }
172
193
  }
173
194
 
@@ -1,5 +1,6 @@
1
1
  /* eslint-disable no-unused-expressions */
2
2
  require('jquery');
3
+ require('./history.js.es6');
3
4
  require('./form_filter.component.js.es6');
4
5
 
5
6
  const { Decidim: { FormFilterComponent } } = window;
@@ -31,9 +32,6 @@ describe('FormFilterComponent', () => {
31
32
  </form>
32
33
  `;
33
34
  $('body').append(form);
34
- window.history = {
35
- pushState: sinon.stub()
36
- };
37
35
  subject = new FormFilterComponent($(document).find('form'));
38
36
  });
39
37
 
@@ -64,10 +62,6 @@ describe('FormFilterComponent', () => {
64
62
  expect(subject.mounted).to.be.truthy;
65
63
  });
66
64
 
67
- it('mounts the component', () => {
68
- expect(window.onpopstate).to.equal(subject._onPopState);
69
- });
70
-
71
65
  it('binds the form change event', () => {
72
66
  expect(subject.$form.on).to.have.been.calledWith('change', 'input, select', subject._onFormChange);
73
67
  });
@@ -84,13 +78,6 @@ describe('FormFilterComponent', () => {
84
78
 
85
79
  expect(stub).to.have.been.calledOnce;
86
80
  })
87
-
88
- it('sets the onpopostate callback', () => {
89
- sinon.stub(subject.$form, 'serialize').returns('order_start_time=desc')
90
- $(selector).find('input[name=order_start_time][value=desc]').trigger('change');
91
-
92
- expect(window.history.pushState).to.have.been.calledWith(null, null, '/filters?order_start_time=desc');
93
- });
94
81
  });
95
82
 
96
83
  describe('onpopstate event', () => {
@@ -139,10 +126,6 @@ describe('FormFilterComponent', () => {
139
126
  it('unbinds the form change event', () => {
140
127
  expect(subject.$form.off).to.have.been.calledWith('change', 'input, select', subject._onFormChange);
141
128
  });
142
-
143
- it('removes the onpopostate callback', () => {
144
- expect(window.onpopstate).not.to.exist;
145
- });
146
129
  });
147
130
 
148
131
  afterEach(() => {
@@ -15,3 +15,4 @@
15
15
  // = require foundation.util.nest.js
16
16
  // = require foundation.util.touch.js
17
17
  // = require foundation.util.triggers.js
18
+ // = require foundation.abide.js
@@ -0,0 +1,35 @@
1
+ /* eslint-disable no-prototype-builtins, no-restricted-syntax, no-param-reassign */
2
+ // require self
3
+
4
+ ((exports) => {
5
+ let callbacks = {};
6
+
7
+ exports.onpopstate = () => {
8
+ for (let callbackId in callbacks) {
9
+ if (callbacks.hasOwnProperty(callbackId)) {
10
+ callbacks[callbackId]();
11
+ }
12
+ }
13
+ };
14
+
15
+ const registerCallback = (callbackId, callback) => {
16
+ callbacks[callbackId] = callback;
17
+ };
18
+
19
+ const unregisterCallback = (callbackId) => {
20
+ callbacks[callbackId] = null;
21
+ }
22
+
23
+ const pushState = (url) => {
24
+ if (window.history) {
25
+ window.history.pushState(null, null, url);
26
+ }
27
+ };
28
+
29
+ exports.Decidim = exports.Decidim || {};
30
+ exports.Decidim.History = {
31
+ registerCallback,
32
+ unregisterCallback,
33
+ pushState
34
+ };
35
+ })(window);
@@ -0,0 +1,28 @@
1
+ // = require_self
2
+
3
+ $(() => {
4
+ const { pushState, registerCallback } = window.Decidim.History;
5
+
6
+ $(document).on("click", ".order-by a", (event) => {
7
+ const $target = $(event.target);
8
+
9
+ $target.parents('.menu').find('a:first').text($target.text());
10
+
11
+ pushState($target.attr('href'));
12
+ })
13
+
14
+ registerCallback("orders", () => {
15
+ const url = window.location.toString();
16
+ const match = url.match(/order=([^&]*)/);
17
+ const $orderMenu = $('.order-by .menu');
18
+ let order = $orderMenu.find('.menu a:first').data('order');
19
+
20
+ if (match) {
21
+ order = match[1];
22
+ }
23
+
24
+ const linkText = $orderMenu.find(`.menu a[data-order="${order}"]`).text();
25
+
26
+ $orderMenu.find('a:first').text(linkText);
27
+ });
28
+ });
@@ -7,3 +7,4 @@
7
7
 
8
8
  @import "modules/modules";
9
9
  @import "layouts/*";
10
+ @import "extras/*";
@@ -88,7 +88,6 @@ table.body {
88
88
  width: 100%; }
89
89
 
90
90
  table.container {
91
- background: #fefefe;
92
91
  width: 580px;
93
92
  margin: 0 auto;
94
93
  Margin: 0 auto;
@@ -1358,15 +1357,25 @@ body.outlook p {
1358
1357
 
1359
1358
  /* 2 - Custom styles ---------*/
1360
1359
 
1361
- .decidim-bar{
1360
+ table.body th.decidim-bar, table.body td.decidim-bar{
1361
+ padding: 10px 0;
1362
1362
  background-color: #1a181d;
1363
1363
  }
1364
1364
 
1365
+ table.body{
1366
+ background-color: #f3f3f3;
1367
+ margin: 20px 0;
1368
+ }
1365
1369
 
1366
1370
  .decidim-logo{
1367
1371
  margin-top: 16px;
1368
1372
  }
1369
1373
 
1374
+ .decidim-logo a{
1375
+ display: inline-block;
1376
+ height: 30px;
1377
+ }
1378
+
1370
1379
  .cityhall-bar{
1371
1380
  background-color: #2c2930;
1372
1381
  }
@@ -1374,4 +1383,13 @@ body.outlook p {
1374
1383
  .cityhall-logo{
1375
1384
  width: 150px;
1376
1385
  margin-top: 16px;
1377
- }
1386
+ }
1387
+
1388
+ .footnote {
1389
+ padding-top: 10px;
1390
+ color: #666;
1391
+ }
1392
+
1393
+ table.container.main {
1394
+ background: #fefefe;
1395
+ }
@@ -3,11 +3,13 @@
3
3
  border: 1px solid $primary;
4
4
 
5
5
  .leaflet-popup-content-wrapper {
6
- border-radius: 0;
6
+ border-radius: 2px;
7
7
  }
8
-
9
8
  a.button {
10
9
  color: #fff;
11
10
  }
12
11
  }
12
+ .leaflet-popup-tip{
13
+ border: 1px solid $primary;
14
+ }
13
15
  }
@@ -0,0 +1,8 @@
1
+ .ql-video {
2
+ max-width: 600px;
3
+ width: 100%;
4
+ height: 450px;
5
+ max-height: 70vh;
6
+ margin: 40px auto;
7
+ display: block;
8
+ }
@@ -0,0 +1,9 @@
1
+ .lopd-text {
2
+ padding: 0.5rem;
3
+ border: 1px solid #e8e8e8;
4
+ margin: 1rem 0;
5
+ max-height: 10rem;
6
+ overflow: auto;
7
+ font-size: 0.8rem;
8
+ font-style: italic;
9
+ }
@@ -9,14 +9,30 @@
9
9
  padding-top: .25rem;
10
10
  padding-bottom: .25rem;
11
11
  }
12
+ }
12
13
 
13
- &:disabled{
14
- @extend .button;
15
- @extend .button.disabled;
14
+ // Overwrite Foundation hover styles in hollow disabled buttons
15
+ .button.hollow:disabled:hover,
16
+ .button.hollow.disabled:hover{
17
+ background-color: transparent;
18
+ border-color: inherit;
19
+ color: $primary;
20
+ &.secondary{
21
+ color: $secondary;
22
+ }
23
+ &.success{
24
+ color: $success;
25
+ }
26
+ &.alert{
27
+ color: $alert;
28
+ }
29
+ &.warning{
30
+ color: $warning;
16
31
  }
17
32
  }
18
33
 
19
34
 
35
+
20
36
  /*Extra buttons styles*/
21
37
 
22
38
  .button--icon{
@@ -30,8 +30,12 @@
30
30
  background: rgba(#27353B, 0.6);
31
31
  }
32
32
 
33
- // Usefull Compass mixins
33
+ /// Slightly lighten a color
34
+ @function tint($color, $percentage) {
35
+ @return mix(white, $color, $percentage);
36
+ }
34
37
 
35
- // +font-face
36
- // +ellipsis
37
- // +clearfix
38
+ /// Slightly darken a color
39
+ @function shade($color, $percentage) {
40
+ @return mix(black, $color, $percentage);
41
+ }
@@ -27,19 +27,24 @@ module Decidim
27
27
  attr_reader :handler
28
28
 
29
29
  def create_authorization
30
- Authorization.create!(
30
+ authorization = Authorization.find_or_initialize_by(
31
31
  user: handler.user,
32
+ name: handler.handler_name
33
+ )
34
+
35
+ authorization.attributes = {
32
36
  unique_id: handler.unique_id,
33
- name: handler.handler_name,
34
37
  metadata: handler.metadata
35
- )
38
+ }
39
+
40
+ authorization.save!
36
41
  end
37
42
 
38
43
  def unique?
39
44
  return true if handler.unique_id.nil?
40
45
 
41
46
  duplicates = Authorization.where(
42
- user: User.where(organization: handler.user.organization.id),
47
+ user: User.where.not(id: handler.user.id).where(organization: handler.user.organization.id),
43
48
  name: handler.handler_name,
44
49
  unique_id: handler.unique_id
45
50
  )
@@ -29,8 +29,8 @@ module Decidim
29
29
  end
30
30
 
31
31
  broadcast(:ok, @user)
32
- rescue ActiveRecord::RecordInvalid
33
- broadcast(:invalid)
32
+ rescue ActiveRecord::RecordInvalid => error
33
+ broadcast(:error, error.record)
34
34
  end
35
35
  end
36
36
 
@@ -52,6 +52,8 @@ module Decidim
52
52
  @user.password = generated_password
53
53
  @user.password_confirmation = generated_password
54
54
  @user.skip_confirmation! if verified_email
55
+ @user.comments_notifications = true
56
+ @user.replies_notifications = true
55
57
  end
56
58
 
57
59
  @user.tos_agreement = "1"