decidim-core 0.10.1 → 0.11.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (269) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -11
  3. data/app/assets/images/decidim/icons.svg +25 -6
  4. data/app/assets/javascripts/decidim/account_form.js.es6 +8 -8
  5. data/app/assets/javascripts/decidim/append_elements.js.es6 +1 -1
  6. data/app/assets/javascripts/decidim/append_redirect_url_to_modals.js.es6 +5 -5
  7. data/app/assets/javascripts/decidim/data_picker.js.es6 +10 -10
  8. data/app/assets/javascripts/decidim/editor.js.es6 +37 -22
  9. data/app/assets/javascripts/decidim/filters.js.es6 +1 -1
  10. data/app/assets/javascripts/decidim/form_filter.component.js.es6 +15 -15
  11. data/app/assets/javascripts/decidim/form_filter.component.test.js +29 -29
  12. data/app/assets/javascripts/decidim/impersonation.js.es6 +3 -3
  13. data/app/assets/javascripts/decidim/input_mentions.js.es6 +100 -0
  14. data/app/assets/javascripts/decidim/input_tags.js.es6 +12 -0
  15. data/app/assets/javascripts/decidim/{map.js.es6.erb → map.js.es6} +9 -9
  16. data/app/assets/javascripts/decidim/notifications.js.es6 +10 -10
  17. data/app/assets/javascripts/decidim/orders.js.es6 +5 -5
  18. data/app/assets/javascripts/decidim/user_registrations.js.es6 +4 -4
  19. data/app/assets/javascripts/decidim/widget.js.es6 +1 -1
  20. data/app/assets/javascripts/decidim.js.es6 +10 -0
  21. data/app/assets/stylesheets/decidim/application.scss.erb +1 -1
  22. data/app/assets/stylesheets/decidim/modules/_author-avatar.scss +39 -0
  23. data/app/assets/stylesheets/decidim/modules/_cards.scss +158 -3
  24. data/app/assets/stylesheets/decidim/modules/_definition-data.scss +6 -0
  25. data/app/assets/stylesheets/decidim/modules/_extra.scss +1 -3
  26. data/app/assets/stylesheets/decidim/modules/_icons.scss +14 -6
  27. data/app/assets/stylesheets/decidim/modules/_inline-filters.scss +61 -0
  28. data/app/assets/stylesheets/decidim/modules/_input-mentions.scss +124 -0
  29. data/app/assets/stylesheets/decidim/modules/_input-tags.scss +55 -0
  30. data/app/assets/stylesheets/decidim/modules/_modules.scss +3 -0
  31. data/app/assets/stylesheets/decidim/modules/_status-labels.scss +4 -0
  32. data/app/assets/stylesheets/decidim/modules/_typography.scss +16 -0
  33. data/app/assets/stylesheets/decidim/utils/_helpers.scss +29 -0
  34. data/app/assets/stylesheets/decidim/utils/_mixins.scss +6 -0
  35. data/app/cells/decidim/author_box/show.erb +10 -0
  36. data/app/cells/decidim/author_box_cell.rb +21 -0
  37. data/app/cells/decidim/card/show.erb +17 -0
  38. data/app/cells/decidim/card_cell.rb +29 -0
  39. data/app/cells/decidim/profile/profile_inline.erb +21 -0
  40. data/app/cells/decidim/profile/show.erb +13 -0
  41. data/app/cells/decidim/profile_cell.rb +17 -0
  42. data/app/commands/decidim/create_omniauth_registration.rb +3 -2
  43. data/app/commands/decidim/create_report.rb +1 -1
  44. data/app/commands/decidim/invite_user.rb +2 -0
  45. data/app/constraints/decidim/current_component.rb +41 -0
  46. data/app/controllers/concerns/decidim/action_authorization.rb +3 -3
  47. data/app/controllers/concerns/decidim/devise_controllers.rb +2 -1
  48. data/app/controllers/concerns/decidim/filter_resource.rb +1 -1
  49. data/app/controllers/concerns/decidim/form_factory.rb +1 -1
  50. data/app/controllers/concerns/decidim/impersonate_users.rb +6 -2
  51. data/app/controllers/concerns/decidim/needs_authorization.rb +2 -2
  52. data/app/controllers/concerns/decidim/participatory_space_context.rb +15 -0
  53. data/app/controllers/concerns/decidim/settings.rb +5 -5
  54. data/app/controllers/decidim/application_controller.rb +2 -1
  55. data/app/controllers/decidim/{features → components}/base_controller.rb +16 -8
  56. data/app/controllers/decidim/devise/omniauth_registrations_controller.rb +3 -1
  57. data/app/controllers/decidim/devise/registrations_controller.rb +1 -3
  58. data/app/controllers/decidim/doorkeeper/authorizations_controller.rb +16 -0
  59. data/app/controllers/decidim/doorkeeper/credentials_controller.rb +46 -0
  60. data/app/controllers/decidim/doorkeeper/token_info_controller.rb +9 -0
  61. data/app/controllers/decidim/doorkeeper/tokens_controller.rb +9 -0
  62. data/app/controllers/decidim/widgets_controller.rb +1 -1
  63. data/app/forms/decidim/follow_form.rb +1 -1
  64. data/app/forms/decidim/form.rb +1 -1
  65. data/app/forms/decidim/omniauth_registration_form.rb +1 -0
  66. data/app/forms/decidim/registration_form.rb +5 -5
  67. data/app/helpers/decidim/card_helper.rb +16 -0
  68. data/app/helpers/decidim/component_path_helper.rb +36 -0
  69. data/app/helpers/decidim/icon_helper.rb +7 -7
  70. data/app/helpers/decidim/messaging/conversation_helper.rb +4 -3
  71. data/app/helpers/decidim/paginate_helper.rb +1 -1
  72. data/app/helpers/decidim/resource_helper.rb +2 -2
  73. data/app/jobs/decidim/export_job.rb +3 -3
  74. data/app/mailers/decidim/messaging/conversation_mailer.rb +0 -2
  75. data/app/middleware/decidim/current_organization.rb +2 -2
  76. data/app/models/decidim/abilities/admin_ability.rb +1 -1
  77. data/app/models/decidim/abilities/everyone_ability.rb +1 -1
  78. data/app/models/decidim/abilities/participatory_process_admin_ability.rb +2 -2
  79. data/app/models/decidim/abilities/participatory_process_collaborator_ability.rb +2 -2
  80. data/app/models/decidim/action_log.rb +7 -5
  81. data/app/models/decidim/area.rb +7 -0
  82. data/app/models/decidim/authorization.rb +14 -0
  83. data/app/models/decidim/{feature.rb → component.rb} +15 -15
  84. data/app/models/decidim/moderation.rb +1 -1
  85. data/app/models/decidim/oauth_application.rb +24 -0
  86. data/app/models/decidim/organization.rb +5 -0
  87. data/app/models/decidim/participatory_space_link.rb +20 -0
  88. data/app/models/decidim/participatory_space_private_user.rb +19 -0
  89. data/app/models/decidim/user.rb +7 -0
  90. data/app/presenters/decidim/admin_log/area_presenter.rb +38 -0
  91. data/app/presenters/decidim/admin_log/{feature_presenter.rb → component_presenter.rb} +5 -5
  92. data/app/presenters/decidim/admin_log/newsletter_resource_presenter.rb +1 -1
  93. data/app/presenters/decidim/admin_log/oauth_application_presenter.rb +50 -0
  94. data/app/presenters/decidim/admin_log/oauth_application_resource_presenter.rb +18 -0
  95. data/app/presenters/decidim/home_stats_presenter.rb +7 -7
  96. data/app/presenters/decidim/log/value_types/area_presenter.rb +1 -1
  97. data/app/presenters/decidim/log/value_types/area_type_presenter.rb +28 -0
  98. data/app/presenters/decidim/log/value_types/currency_presenter.rb +20 -0
  99. data/app/presenters/decidim/log/value_types/scope_presenter.rb +1 -1
  100. data/app/presenters/decidim/log/value_types/scope_type_presenter.rb +1 -1
  101. data/app/presenters/decidim/resource_locator_presenter.rb +3 -3
  102. data/app/services/decidim/action_authorizer.rb +9 -9
  103. data/app/services/decidim/action_logger.rb +9 -7
  104. data/app/services/decidim/email_notification_generator.rb +1 -1
  105. data/app/services/decidim/notification_generator_for_recipient.rb +1 -1
  106. data/app/services/decidim/resource_search.rb +8 -8
  107. data/app/services/decidim/settings_change.rb +5 -5
  108. data/app/services/decidim/static_map_generator.rb +1 -1
  109. data/app/types/decidim/core/attachment_type.rb +14 -0
  110. data/app/types/decidim/core/category_type.rb +16 -0
  111. data/app/types/decidim/core/coordinates_type.rb +19 -0
  112. data/app/types/decidim/core/scope_api_type.rb +16 -0
  113. data/app/uploaders/decidim/oauth_application_logo_uploader.rb +9 -0
  114. data/app/validators/geocoding_validator.rb +2 -2
  115. data/app/views/decidim/account/delete.html.erb +7 -7
  116. data/app/views/decidim/application/_collection.html.erb +1 -1
  117. data/app/views/decidim/application/_document.html.erb +1 -1
  118. data/app/views/decidim/application/_photos.html.erb +1 -1
  119. data/app/views/decidim/devise/invitations/edit.html.erb +1 -1
  120. data/app/views/decidim/devise/omniauth_registrations/new.html.erb +1 -1
  121. data/app/views/decidim/devise/registrations/new.html.erb +1 -1
  122. data/app/views/decidim/devise/sessions/new.html.erb +2 -2
  123. data/app/views/decidim/devise/shared/_omniauth_buttons.html.erb +1 -1
  124. data/app/views/decidim/devise/shared/_omniauth_buttons_mini.html.erb +1 -1
  125. data/app/views/decidim/doorkeeper/authorizations/new.html.erb +58 -0
  126. data/app/views/decidim/messaging/conversations/_show.html.erb +1 -1
  127. data/app/views/decidim/messaging/conversations/index.html.erb +1 -1
  128. data/app/views/decidim/notifications/index.html.erb +1 -1
  129. data/app/views/decidim/notifications_settings/show.html.erb +2 -2
  130. data/app/views/decidim/own_user_groups/index.html.erb +3 -3
  131. data/app/views/decidim/scopes/_scopes_picker_input.html.erb +4 -4
  132. data/app/views/decidim/scopes/picker.html.erb +3 -3
  133. data/app/views/decidim/shared/_action_authorization_modal.html.erb +1 -1
  134. data/app/views/decidim/shared/_author.html.erb +1 -1
  135. data/app/views/decidim/shared/_author_reference.html.erb +1 -12
  136. data/app/views/decidim/shared/{_feature_announcement.html.erb → _component_announcement.html.erb} +2 -2
  137. data/app/views/decidim/shared/_embed_modal.html.erb +1 -1
  138. data/app/views/decidim/shared/_flag_modal.html.erb +5 -5
  139. data/app/views/decidim/shared/_login_modal.html.erb +3 -3
  140. data/app/views/decidim/shared/_private_participatory_space.html.erb +5 -0
  141. data/app/views/decidim/shared/_share_modal.html.erb +1 -1
  142. data/app/views/decidim/shared/_tags.html.erb +1 -1
  143. data/app/views/decidim/shared/_version_author.html.erb +1 -1
  144. data/app/views/decidim/widgets/_data_picker.html.erb +4 -4
  145. data/app/views/devise/mailer/confirmation_instructions.html.erb +3 -3
  146. data/app/views/devise/mailer/invite_private_user.html.erb +17 -0
  147. data/app/views/devise/mailer/invite_private_user.text.erb +15 -0
  148. data/app/views/devise/mailer/password_change.html.erb +2 -2
  149. data/app/views/devise/mailer/reset_password_instructions.html.erb +5 -5
  150. data/app/views/kaminari/decidim/_first_page.html.erb +2 -3
  151. data/app/views/kaminari/decidim/_gap.html.erb +2 -3
  152. data/app/views/kaminari/decidim/_last_page.html.erb +2 -3
  153. data/app/views/kaminari/decidim/_next_page.html.erb +2 -3
  154. data/app/views/kaminari/decidim/_page.html.erb +2 -3
  155. data/app/views/kaminari/decidim/_paginator.html.erb +1 -2
  156. data/app/views/kaminari/decidim/_prev_page.html.erb +2 -3
  157. data/app/views/layouts/decidim/_application.html.erb +4 -4
  158. data/app/views/layouts/decidim/_component_authorization_modals.html.erb +5 -0
  159. data/app/views/layouts/decidim/_cookie_warning.html.erb +2 -2
  160. data/app/views/layouts/decidim/_head.html.erb +4 -4
  161. data/app/views/layouts/decidim/_impersonation_warning.html.erb +4 -4
  162. data/app/views/layouts/decidim/_language_chooser.html.erb +1 -1
  163. data/app/views/layouts/decidim/_social_media_links.html.erb +5 -5
  164. data/app/views/layouts/decidim/_wrapper.html.erb +5 -5
  165. data/app/views/layouts/decidim/mailer.html.erb +1 -1
  166. data/app/views/layouts/decidim/widget.html.erb +5 -5
  167. data/app/views/pages/home/_hero.html.erb +1 -1
  168. data/app/views/pages/home.html.erb +6 -6
  169. data/config/locales/ca.yml +66 -27
  170. data/config/locales/en.yml +69 -30
  171. data/config/locales/es.yml +66 -27
  172. data/config/locales/eu.yml +69 -30
  173. data/config/locales/fi.yml +69 -30
  174. data/config/locales/fr.yml +85 -46
  175. data/config/locales/gl.yml +69 -30
  176. data/config/locales/it.yml +69 -30
  177. data/config/locales/nl.yml +122 -83
  178. data/config/locales/pl.yml +69 -30
  179. data/config/locales/pt-BR.yml +69 -30
  180. data/config/locales/pt.yml +69 -30
  181. data/config/locales/ru.yml +0 -7
  182. data/config/locales/sv.yml +69 -30
  183. data/config/locales/uk.yml +0 -13
  184. data/config/routes.rb +8 -0
  185. data/db/migrate/20180206183235_create_participatory_space_private_users.rb +15 -0
  186. data/db/migrate/20180221101934_fix_nickname_index.rb +5 -6
  187. data/db/migrate/20180226140756_add_version_to_action_logs.rb +5 -1
  188. data/db/migrate/20180227131727_create_participatory_space_links.rb +12 -0
  189. data/db/migrate/20180305132906_rename_features_to_components.rb +13 -0
  190. data/db/migrate/20180308113207_doorkeeper_models.rb +85 -0
  191. data/db/migrate/20180314085339_rename_maximum_votes_per_proposal_to_threshold_per_proposal.rb +2 -2
  192. data/db/migrate/{20180326075746_change_event_name_and_class_to_rename_to_publish_proposal_event.rb → 20180323102631_change_event_name_and_class_to_rename_to_publish_proposal_event.rb} +0 -0
  193. data/db/seeds.rb +12 -2
  194. data/lib/decidim/api/attachable_interface.rb +13 -0
  195. data/lib/decidim/api/authorable_interface.rb +13 -0
  196. data/lib/decidim/api/categorizable_interface.rb +13 -0
  197. data/lib/decidim/api/participatory_space_interface.rb +4 -4
  198. data/lib/decidim/api/scopable_interface.rb +13 -0
  199. data/lib/decidim/authorable.rb +8 -0
  200. data/lib/decidim/{feature_manifest.rb → component_manifest.rb} +24 -21
  201. data/lib/decidim/{feature_validator.rb → component_validator.rb} +6 -6
  202. data/lib/decidim/{features → components}/export_manifest.rb +4 -4
  203. data/lib/decidim/components/namer.rb +35 -0
  204. data/lib/decidim/components.rb +9 -0
  205. data/lib/decidim/content_parsers/user_parser.rb +1 -1
  206. data/lib/decidim/core/api.rb +13 -0
  207. data/lib/decidim/core/engine.rb +76 -3
  208. data/lib/decidim/core/test/factories.rb +43 -10
  209. data/lib/decidim/core/test/shared_examples/announcements_examples.rb +9 -9
  210. data/lib/decidim/core/test/shared_examples/attachable_interface_examples.rb +16 -0
  211. data/lib/decidim/core/test/shared_examples/authorable_interface_examples.rb +33 -0
  212. data/lib/decidim/core/test/shared_examples/categorizable_interface_examples.rb +19 -0
  213. data/lib/decidim/core/test/shared_examples/comments_examples.rb +3 -3
  214. data/lib/decidim/core/test/shared_examples/follows_examples.rb +1 -1
  215. data/lib/decidim/core/test/shared_examples/has_component.rb +21 -0
  216. data/lib/decidim/core/test/shared_examples/has_reference.rb +2 -2
  217. data/lib/decidim/core/test/shared_examples/localised_email.rb +1 -1
  218. data/lib/decidim/core/test/shared_examples/paginated_resource_examples.rb +1 -1
  219. data/lib/decidim/core/test/shared_examples/reportable.rb +8 -6
  220. data/lib/decidim/core/test/shared_examples/reports_examples.rb +1 -1
  221. data/lib/decidim/core/test/shared_examples/scopable_interface_examples.rb +19 -0
  222. data/lib/decidim/core/test/shared_examples/scope_helper_examples.rb +8 -3
  223. data/lib/decidim/core/test/shared_examples/simple_event.rb +1 -1
  224. data/lib/decidim/core/test/shared_examples/user_localised_email_examples.rb +1 -1
  225. data/lib/decidim/core/test.rb +1 -1
  226. data/lib/decidim/core/version.rb +1 -1
  227. data/lib/decidim/core.rb +35 -37
  228. data/lib/decidim/events/base_event.rb +5 -5
  229. data/lib/decidim/events/simple_event.rb +8 -8
  230. data/lib/decidim/form_builder.rb +48 -3
  231. data/lib/decidim/has_attachment_collections.rb +1 -1
  232. data/lib/decidim/has_attachments.rb +1 -1
  233. data/lib/decidim/has_category.rb +2 -2
  234. data/lib/decidim/has_component.rb +23 -0
  235. data/lib/decidim/has_private_users.rb +26 -0
  236. data/lib/decidim/has_reference.rb +3 -3
  237. data/lib/decidim/page_finder.rb +1 -1
  238. data/lib/decidim/participatory_space_manifest.rb +3 -3
  239. data/lib/decidim/participatory_space_resourceable.rb +80 -0
  240. data/lib/decidim/publicable.rb +2 -2
  241. data/lib/decidim/query_extensions.rb +2 -2
  242. data/lib/decidim/rectify_ext.rb +32 -0
  243. data/lib/decidim/reportable.rb +1 -1
  244. data/lib/decidim/resource_manifest.rb +13 -13
  245. data/lib/decidim/resourceable.rb +8 -8
  246. data/lib/decidim/scopable.rb +1 -1
  247. data/lib/decidim/{scopable_feature.rb → scopable_component.rb} +1 -1
  248. data/lib/decidim/settings_manifest.rb +1 -1
  249. data/lib/decidim/stats_registry.rb +1 -1
  250. data/lib/decidim/view_model.rb +9 -0
  251. data/vendor/assets/javascripts/datepicker-locales/foundation-datepicker.fr.js +4 -1
  252. data/vendor/assets/javascripts/form_datepicker.js.es6 +10 -10
  253. data/vendor/assets/javascripts/quill.min.js +2 -2
  254. data/vendor/assets/javascripts/quill.min.js.map +1 -1
  255. data/vendor/assets/javascripts/tagsinput.js +683 -0
  256. data/vendor/assets/javascripts/tribute.js +1607 -0
  257. data/vendor/assets/stylesheets/quill.bubble.css +30 -16
  258. data/vendor/assets/stylesheets/quill.core.css +19 -9
  259. data/vendor/assets/stylesheets/quill.snow.css +30 -16
  260. data/vendor/assets/stylesheets/tagsinput.css +55 -0
  261. data/vendor/assets/stylesheets/tribute.css +27 -0
  262. metadata +164 -27
  263. data/app/constraints/decidim/current_feature.rb +0 -41
  264. data/app/helpers/decidim/feature_path_helper.rb +0 -36
  265. data/app/views/layouts/decidim/_feature_authorization_modals.html.erb +0 -5
  266. data/lib/decidim/core/test/shared_examples/has_feature.rb +0 -21
  267. data/lib/decidim/features/namer.rb +0 -35
  268. data/lib/decidim/features.rb +0 -9
  269. data/lib/decidim/has_feature.rb +0 -23
@@ -17,6 +17,7 @@ $card-proposal: $proposals;
17
17
  $card-action: $actions;
18
18
  $card-debate: $debates;
19
19
  $card-meeting: $meetings;
20
+ $card-spaces: $card-meeting;
20
21
 
21
22
  $datetime-bg: $primary;
22
23
 
@@ -56,6 +57,14 @@ $datetime-bg: $primary;
56
57
  }
57
58
  }
58
59
 
60
+ .card__content--multiple{
61
+ @extend .card__content;
62
+
63
+ display: flex;
64
+ justify-content: space-around;
65
+ align-items: center;
66
+ }
67
+
59
68
  .card__content--center{
60
69
  text-align: center;
61
70
  }
@@ -76,6 +85,10 @@ $datetime-bg: $primary;
76
85
 
77
86
  .card__header{
78
87
  margin-bottom: $card-padding / 2;
88
+
89
+ &.collapse{
90
+ margin-bottom: 0;
91
+ }
79
92
  }
80
93
 
81
94
  .card__button{
@@ -120,6 +133,16 @@ $datetime-bg: $primary;
120
133
  display: block;
121
134
  margin-top: $global-margin / 2;
122
135
  }
136
+
137
+ &:not(:last-child){
138
+ margin-bottom: $global-margin / 2;
139
+ }
140
+
141
+ &.card--picture-offset{
142
+ // _author-avatar.scss:58 (.author-data--big .author__avatar img)
143
+ // _author-avatar.scss:133 padding (.author__avatar)
144
+ margin-left: calc(#{rem-calc(54)} + .5rem);
145
+ }
123
146
  }
124
147
 
125
148
  .card__image{
@@ -168,6 +191,12 @@ $datetime-bg: $primary;
168
191
  .card__content{
169
192
  display: flex;
170
193
  }
194
+
195
+ &.card__footer--spaces{
196
+ background: rgba($card-spaces, .2);
197
+ border-top-color: rgba($card-spaces, .6);
198
+ border-top-width: .25rem;
199
+ }
171
200
  }
172
201
 
173
202
  .card__footer--transparent{
@@ -241,6 +270,10 @@ $datetime-bg: $primary;
241
270
  margin-right: -1px;
242
271
  border-top: $border;
243
272
  margin-top: -1px;
273
+
274
+ .card-data__item--centerblock{
275
+ margin: 0 auto;
276
+ }
244
277
  }
245
278
 
246
279
  .card-data__item__number{
@@ -304,6 +337,23 @@ $datetime-bg: $primary;
304
337
  color: $muted;
305
338
  }
306
339
 
340
+ .card__support__data--left{
341
+ @extend .card__support__data;
342
+
343
+ text-align: left;
344
+ text-transform: none;
345
+ margin-bottom: 0;
346
+ color: $muted;
347
+ max-width: 60%;
348
+
349
+ strong{
350
+ font-size: rem-calc(16);
351
+ white-space: nowrap;
352
+ overflow: hidden;
353
+ text-overflow: ellipsis;
354
+ }
355
+ }
356
+
307
357
  .card__support__number{
308
358
  line-height: 1;
309
359
  font-weight: 600;
@@ -371,6 +421,8 @@ $datetime-bg: $primary;
371
421
  display: none;
372
422
  fill: $anchor-color;
373
423
 
424
+ @include modifiers(fill);
425
+
374
426
  @include breakpoint(medium){
375
427
  margin-right: 1rem;
376
428
  display: block;
@@ -388,6 +440,10 @@ $datetime-bg: $primary;
388
440
  align-items: center;
389
441
  padding: 1rem 1rem 1rem 0;
390
442
 
443
+ &.card--list__text--top{
444
+ align-items: start;
445
+ }
446
+
391
447
  .card--list--mini &{
392
448
  padding: .5rem .5rem .5rem 0;
393
449
  }
@@ -503,7 +559,6 @@ $datetime-bg: $primary;
503
559
  }
504
560
 
505
561
  /* Card full width variant */
506
-
507
562
  .card--full{
508
563
  margin-bottom: $card-margin-bottom*2;
509
564
 
@@ -607,8 +662,7 @@ $datetime-bg: $primary;
607
662
  }
608
663
  }
609
664
 
610
- /* Card mini */
611
-
665
+ // card mini
612
666
  .card--mini{
613
667
  .card__content{
614
668
  padding: $card-padding $card-padding-small;
@@ -714,3 +768,104 @@ $datetime-bg: $primary;
714
768
  }
715
769
  }
716
770
  }
771
+
772
+ .card__block{
773
+ @extend .card__icondata;
774
+
775
+ margin-bottom: $global-margin / 2;
776
+
777
+ ul{
778
+ border: $border;
779
+
780
+ li{
781
+ padding: .25em;
782
+ }
783
+ }
784
+ }
785
+
786
+ // card stack
787
+ .card--stack{
788
+ position: relative;
789
+ overflow: visible;
790
+ z-index: 0;
791
+
792
+ &,
793
+ &::after,
794
+ &::before{
795
+ /* Add shadow to distinguish sheets from one another */
796
+ box-shadow: 1px 1px 1px rgba(0, 0, 0, .15);
797
+ }
798
+
799
+ &::after,
800
+ &::before{
801
+ content: "";
802
+ position: absolute;
803
+ width: 100%;
804
+ height: 100%;
805
+ border-radius: $card-border-radius;
806
+ }
807
+
808
+ /* Second sheet of paper */
809
+ &::before{
810
+ left: 3px;
811
+ top: 3px;
812
+ z-index: -1;
813
+ }
814
+
815
+ /* Third sheet of paper */
816
+ &::after{
817
+ left: 5px;
818
+ top: 5px;
819
+ z-index: -2;
820
+ }
821
+ }
822
+
823
+ .card--widget{
824
+ .card-data{
825
+ flex-wrap: inherit;
826
+
827
+ .card-data__item{
828
+ color: $body-font-color;
829
+ text-transform: none;
830
+
831
+ strong{
832
+ display: block;
833
+ text-transform: uppercase;
834
+ font-size: rem-calc(16);
835
+
836
+ &:not(:first-child){
837
+ margin-top: $global-margin;
838
+ }
839
+ }
840
+
841
+ span{
842
+ color: $muted;
843
+ font-size: 90%;
844
+ }
845
+
846
+ @include modifiers(color);
847
+
848
+ &:first-child{
849
+ flex: 0;
850
+ background-color: $card-secondary-bg;
851
+ }
852
+ }
853
+ }
854
+
855
+ &.card--widget__list{
856
+ @extend .card--list;
857
+
858
+ .card--list__item{
859
+ padding-left: $global-padding;
860
+
861
+ > :first-child{
862
+ flex-grow: 0;
863
+ flex-shrink: 0;
864
+ }
865
+ }
866
+ }
867
+
868
+ &:not(:last-child){
869
+ margin-bottom: $global-margin;
870
+ }
871
+ }
@@ -12,6 +12,12 @@
12
12
  &:last-child{
13
13
  border-bottom: 0;
14
14
  }
15
+
16
+ &.social_networks{
17
+ a{
18
+ display: block;
19
+ }
20
+ }
15
21
  }
16
22
 
17
23
  .definition-data__item--double{
@@ -1,4 +1,3 @@
1
-
2
1
  .extra{
3
2
  text-align: center;
4
3
  margin-bottom: 1rem;
@@ -41,8 +40,7 @@
41
40
  .extra__time{
42
41
  display: block;
43
42
  font-size: 1.2rem;
44
- margin: 1rem 0;
45
- font-weight: 600;
43
+ margin: .5rem 0 0;
46
44
  }
47
45
 
48
46
  .extra--text{
@@ -1,21 +1,29 @@
1
1
  $icon-size: rem-calc(14);
2
- $icon-size-small: rem-calc(10);
3
- $icon-size-big: rem-calc(24);
2
+ $icon-size-sm: rem-calc(10);
3
+ $icon-size-l: rem-calc(24);
4
+ $icon-size-xl: rem-calc(30);
4
5
 
5
6
  .icon{
6
7
  width: $icon-size;
7
8
  height: $icon-size;
8
9
  fill: currentColor;
10
+
11
+ @include modifiers(color, (muted: $muted));
9
12
  }
10
13
 
11
14
  .icon--small{
12
- width: $icon-size-small;
13
- height: $icon-size-small;
15
+ width: $icon-size-sm;
16
+ height: $icon-size-sm;
14
17
  }
15
18
 
16
19
  .icon--big{
17
- width: $icon-size-big;
18
- height: $icon-size-big;
20
+ width: $icon-size-l;
21
+ height: $icon-size-l;
22
+ }
23
+
24
+ .icon--large{
25
+ width: $icon-size-xl;
26
+ height: $icon-size-xl;
19
27
  }
20
28
 
21
29
  .icon--action{
@@ -0,0 +1,61 @@
1
+ .inline-filters{
2
+ display: flex;
3
+ justify-content: space-between;
4
+
5
+ @include flexgap($global-margin * 2);
6
+
7
+ label{
8
+ display: flex;
9
+ align-items: baseline;
10
+
11
+ @include flexgap($global-margin / 2);
12
+
13
+ span{
14
+ white-space: nowrap;
15
+ }
16
+ }
17
+
18
+ $dropdown-width: 12rem;
19
+
20
+ button[data-toggle]{
21
+ color: $secondary;
22
+ margin: 0;
23
+ width: $dropdown-width;
24
+
25
+ @extend select;
26
+
27
+ &.hover{
28
+ border-bottom-left-radius: 0;
29
+ border-bottom-right-radius: 0;
30
+ }
31
+ }
32
+
33
+ .dropdown-pane{
34
+ padding: 0;
35
+ background-color: $white;
36
+ width: $dropdown-width;
37
+
38
+ li{
39
+ padding: $global-padding;
40
+
41
+ a{
42
+ color: $body-font-color;
43
+ }
44
+
45
+ &:not(:last-child){
46
+ border-bottom: $border;
47
+ }
48
+
49
+ &:hover{
50
+ cursor: pointer;
51
+ background-color: rgba($secondary, .05);
52
+ }
53
+ }
54
+
55
+ &.is-open{
56
+ margin-top: -1px;
57
+ border-top-left-radius: 0;
58
+ border-top-right-radius: 0;
59
+ }
60
+ }
61
+ }
@@ -0,0 +1,124 @@
1
+ @import "tribute";
2
+
3
+ .mentions__container{
4
+ width: 100%;
5
+
6
+ span{
7
+ color: $secondary;
8
+ }
9
+
10
+ [type=text]{
11
+ white-space: nowrap;
12
+ overflow: hidden;
13
+
14
+ br{
15
+ display: none;
16
+ }
17
+
18
+ *{
19
+ display: inline;
20
+ white-space: nowrap;
21
+ }
22
+ }
23
+
24
+ [contenteditable=true]:empty::before{
25
+ color: $input-placeholder-color;
26
+ content: attr(placeholder);
27
+ display: block; // firefox
28
+ }
29
+
30
+ &.mentions__container--textarea{
31
+ [contenteditable=true]{
32
+ -webkit-appearance: textfield;
33
+ -moz-appearance: textfield-multiline;
34
+ appearance: textfield;
35
+
36
+ // foundation defaults
37
+ @include form-element();
38
+
39
+ max-width: 100%;
40
+ // Min size, 3 times input textfield
41
+ min-height: 3 * (($input-font-size * unitless-calc($input-line-height)) + (get-side($input-padding, 'top') + get-side($input-padding, 'bottom')));
42
+ height: auto;
43
+
44
+ // Placeholder text
45
+ &::placeholder{
46
+ color: $input-placeholder-color;
47
+ }
48
+
49
+ // Disabled/readonly state
50
+ &:disabled,
51
+ &[readonly]{
52
+ background-color: $input-background-disabled;
53
+ cursor: $input-cursor-disabled;
54
+ }
55
+ }
56
+ }
57
+
58
+ // Override defaults
59
+ .tribute-container{
60
+ position: relative;
61
+ min-width: 100%;
62
+ top: -1rem - rem-calc(1);
63
+
64
+ ul{
65
+ //reset list
66
+ margin: 0;
67
+ list-style: none;
68
+ // input defaults
69
+ outline: none;
70
+ border: $input-border-focus;
71
+ border-radius: $input-radius;
72
+ background-color: $input-background-focus;
73
+ box-shadow: $input-shadow-focus;
74
+
75
+ @if has-value($input-transition){
76
+ transition: $input-transition;
77
+ }
78
+
79
+ li{
80
+ padding: $input-padding;
81
+ border-top: $border;
82
+ }
83
+ }
84
+
85
+ .highlight{
86
+ background-color: $input-prefix-background;
87
+ }
88
+ }
89
+
90
+ &.is-active{
91
+ [contenteditable=true],
92
+ input,
93
+ textarea{
94
+ border-bottom-left-radius: 0;
95
+ border-bottom-right-radius: 0;
96
+ }
97
+
98
+ .tribute-container{
99
+ ul{
100
+ border-top: 0;
101
+ border-top-left-radius: 0;
102
+ border-top-right-radius: 0;
103
+ }
104
+ }
105
+
106
+ // Quill.js
107
+ &.editor{
108
+ > :first-child{
109
+ border-top-left-radius: $input-radius;
110
+ border-top-right-radius: $input-radius;
111
+ border-top: $input-border-focus;
112
+ border-right: $input-border-focus;
113
+ border-left: $input-border-focus;
114
+ }
115
+
116
+ .editor-container{
117
+ border-right: $input-border-focus;
118
+ border-left: $input-border-focus;
119
+ margin-bottom: 1rem;
120
+ outline: none;
121
+ }
122
+ }
123
+ }
124
+ }
@@ -0,0 +1,55 @@
1
+ @import "tagsinput";
2
+
3
+ $tag-padding: .25rem;
4
+ $tag-margin: .2rem;
5
+
6
+ .input__tag{
7
+ background-color: rgba($medium-gray, .5);
8
+ border-radius: $input-radius;
9
+ padding: $tag-padding;
10
+ display: inline-block;
11
+ cursor: pointer;
12
+ -webkit-user-select: none;
13
+ -moz-user-select: none;
14
+ -ms-user-select: none;
15
+ user-select: none;
16
+
17
+ span{
18
+ color: $secondary;
19
+ }
20
+ }
21
+
22
+ // Override defaults
23
+ .bootstrap-tagsinput{
24
+ // Use foundation precalculated methods to get accurate form css properties
25
+ $height: ($input-font-size * unitless-calc($input-line-height)) + (get-side($input-padding, 'top') + get-side($input-padding, 'bottom'));
26
+ $tag-line-height: rem-calc(22);
27
+ $span-height: ($input-font-size * unitless-calc($tag-line-height)) + (get-side($tag-padding, 'top') + get-side($tag-padding, 'bottom')) - rem-calc(1);
28
+
29
+ width: 100%;
30
+ border: $border;
31
+ min-height: $height;
32
+ padding-bottom: $tag-margin / 4;
33
+
34
+ &.focus{
35
+ outline: none;
36
+ border: $input-border-focus;
37
+ background-color: $input-background-focus;
38
+ box-shadow: $input-shadow-focus;
39
+
40
+ @if has-value($input-transition){
41
+ transition: $input-transition;
42
+ }
43
+ }
44
+
45
+ input{
46
+ height: $span-height;
47
+ display: inline-block;
48
+ }
49
+
50
+ .tag{
51
+ color: inherit;
52
+ margin-right: 0; // fix whitespace
53
+ margin-bottom: $tag-margin;
54
+ }
55
+ }
@@ -33,6 +33,8 @@
33
33
  @import "address";
34
34
  @import "order-by";
35
35
  @import "tags";
36
+ @import "input-tags";
37
+ @import "input-mentions";
36
38
  @import "list-docs";
37
39
  @import "datepicker";
38
40
  @import "pagination";
@@ -48,6 +50,7 @@
48
50
  @import "timeline";
49
51
  @import "filter-tags";
50
52
  @import "filters";
53
+ @import "inline-filters";
51
54
  @import "reference";
52
55
  @import "status-labels";
53
56
 
@@ -20,3 +20,7 @@
20
20
  margin: .2rem .2rem .2rem 0;
21
21
  padding: .2rem .3rem;
22
22
  }
23
+
24
+ .label.light{
25
+ color: $white;
26
+ }
@@ -53,6 +53,10 @@ input{
53
53
 
54
54
  hr{
55
55
  width: 50%;
56
+
57
+ &.reset{
58
+ width: 100%;
59
+ }
56
60
  }
57
61
 
58
62
  /* New typographic styles */
@@ -74,6 +78,10 @@ hr{
74
78
  margin-right: .5rem;
75
79
  margin-bottom: -.1rem;
76
80
  }
81
+
82
+ &.collapse{
83
+ margin: 0;
84
+ }
77
85
  }
78
86
 
79
87
  .mini-title{
@@ -135,6 +143,14 @@ hr{
135
143
  text-transform: uppercase;
136
144
  }
137
145
 
146
+ .text-ellipsis{
147
+ @include ellipsis();
148
+ }
149
+
150
+ .text-compact{
151
+ line-height: 1;
152
+ }
153
+
138
154
  .word-wrapper{
139
155
  display: inline-block;
140
156
  }
@@ -37,3 +37,32 @@
37
37
  margin-left: .5rem;
38
38
  }
39
39
  }
40
+
41
+ // flex--cc:
42
+ // justify-content: center;
43
+ // align-items: center;
44
+ .flex--cc{
45
+ @include flex;
46
+ @include flex-align($x: center, $y: middle);
47
+ }
48
+
49
+ // flex--sbc:
50
+ // justify-content: space-between;
51
+ // align-items: center;
52
+ .flex--sbc{
53
+ @include flex;
54
+ @include flex-align($x: justify, $y: middle);
55
+ }
56
+
57
+ // flex--sbe:
58
+ // justify-content: space-between;
59
+ // align-items: flex-end;
60
+ .flex--sbe{
61
+ @include flex;
62
+ @include flex-align($x: justify, $y: bottom);
63
+ }
64
+
65
+ .scroll{
66
+ max-height: 50vh;
67
+ overflow-y: scroll;
68
+ }
@@ -90,3 +90,9 @@ $palette: $foundation-palette;
90
90
  }
91
91
  }
92
92
 
93
+ @mixin ellipsis(){
94
+ white-space: nowrap;
95
+ overflow: hidden;
96
+ text-overflow: ellipsis;
97
+ line-height: $global-lineheight;
98
+ }
@@ -0,0 +1,10 @@
1
+ <div class="<%= author_box_classes %>">
2
+ <div class="author-data__main">
3
+ <%= cell "decidim/profile", model %>
4
+ </div>
5
+ <% if @options[:extra] %>
6
+ <div class="author-data__extra">
7
+ <%= options[:extra] %>
8
+ </div>
9
+ <% end %>
10
+ </div>
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ # This cell renders the author of a resource. It is intended to be used
5
+ # below resource titles to indicate its authorship & such, and is intended
6
+ # for resources that have a single author.
7
+ class AuthorBoxCell < Decidim::ViewModel
8
+ include LayoutHelper
9
+ include Messaging::ConversationHelper
10
+
11
+ def show
12
+ render
13
+ end
14
+
15
+ delegate :user_signed_in?, :current_user, to: :parent_controller
16
+
17
+ def author_box_classes
18
+ (["author-data"] + options[:extra_classes].to_a).join(" ")
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,17 @@
1
+ <article class="card">
2
+ <div class="card__content">
3
+ <% if title.present? %>
4
+ <div class="card__header">
5
+ <h5 class="card__title">
6
+ <%= title %>
7
+ </h5>
8
+ </div>
9
+ <% end %>
10
+
11
+ <% if body.present? %>
12
+ <p>
13
+ <%= body %>
14
+ </p>
15
+ <% end %>
16
+ </div>
17
+ </article>