decidim-assemblies 0.27.9 → 0.28.0.rc4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (198) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/assemblies/assemblies/show.erb +16 -0
  3. data/app/cells/decidim/assemblies/assemblies_cell.rb +24 -0
  4. data/app/cells/decidim/assemblies/assembly_cell.rb +7 -2
  5. data/app/cells/decidim/assemblies/assembly_dropdown_metadata_cell.rb +19 -0
  6. data/app/cells/decidim/assemblies/assembly_g_cell.rb +23 -0
  7. data/app/cells/decidim/assemblies/assembly_member/data.erb +19 -0
  8. data/app/cells/decidim/assemblies/assembly_member/name_and_position.erb +11 -0
  9. data/app/cells/decidim/assemblies/assembly_member/show.erb +8 -52
  10. data/app/cells/decidim/assemblies/assembly_metadata_g_cell.rb +46 -0
  11. data/app/cells/decidim/assemblies/assembly_s_cell.rb +15 -0
  12. data/app/cells/decidim/assemblies/content_block_cell.rb +21 -0
  13. data/app/cells/decidim/assemblies/content_blocks/children_assemblies_cell.rb +27 -0
  14. data/app/cells/decidim/assemblies/content_blocks/dates_metadata_cell.rb +23 -0
  15. data/app/cells/decidim/assemblies/content_blocks/extra_data_cell.rb +39 -0
  16. data/app/cells/decidim/assemblies/content_blocks/highlighted_assemblies_cell.rb +15 -23
  17. data/app/cells/decidim/assemblies/content_blocks/highlighted_assemblies_settings_form/show.erb +1 -1
  18. data/app/cells/decidim/assemblies/content_blocks/main_data_cell.rb +52 -0
  19. data/app/cells/decidim/assemblies/content_blocks/metadata_cell.rb +23 -0
  20. data/app/cells/decidim/assemblies/content_blocks/related_assemblies/content.erb +1 -0
  21. data/app/cells/decidim/assemblies/content_blocks/related_assemblies_cell.rb +34 -0
  22. data/app/cells/decidim/assemblies/content_blocks/stats_cell.rb +15 -0
  23. data/app/commands/decidim/assemblies/admin/copy_assembly.rb +2 -2
  24. data/app/commands/decidim/assemblies/admin/create_assemblies_type.rb +1 -1
  25. data/app/commands/decidim/assemblies/admin/create_assembly.rb +2 -1
  26. data/app/commands/decidim/assemblies/admin/create_assembly_member.rb +3 -3
  27. data/app/commands/decidim/assemblies/admin/destroy_assemblies_type.rb +1 -1
  28. data/app/commands/decidim/assemblies/admin/destroy_assembly_member.rb +1 -1
  29. data/app/commands/decidim/assemblies/admin/import_assembly.rb +1 -1
  30. data/app/commands/decidim/assemblies/admin/update_assemblies_type.rb +1 -1
  31. data/app/commands/decidim/assemblies/admin/update_assembly.rb +1 -1
  32. data/app/commands/decidim/assemblies/admin/update_assembly_member.rb +1 -1
  33. data/app/constraints/decidim/assemblies/current_assembly.rb +1 -1
  34. data/app/controllers/concerns/decidim/assemblies/admin/assembly_context.rb +1 -1
  35. data/app/controllers/concerns/decidim/assemblies/admin/assembly_members/filterable.rb +39 -0
  36. data/app/controllers/concerns/decidim/assemblies/assembly_breadcrumb.rb +36 -0
  37. data/app/controllers/decidim/assemblies/admin/assemblies_controller.rb +1 -0
  38. data/app/controllers/decidim/assemblies/admin/assemblies_types_controller.rb +1 -1
  39. data/app/controllers/decidim/assemblies/admin/assembly_attachment_collections_controller.rb +5 -0
  40. data/app/controllers/decidim/assemblies/admin/assembly_attachments_controller.rb +5 -0
  41. data/app/controllers/decidim/assemblies/admin/assembly_imports_controller.rb +2 -0
  42. data/app/controllers/decidim/assemblies/admin/assembly_landing_page_content_blocks_controller.rb +35 -0
  43. data/app/controllers/decidim/assemblies/admin/assembly_landing_page_controller.rb +37 -0
  44. data/app/controllers/decidim/assemblies/admin/assembly_members_controller.rb +2 -6
  45. data/app/controllers/decidim/assemblies/admin/assembly_publications_controller.rb +9 -29
  46. data/app/controllers/decidim/assemblies/admin/assembly_user_roles_controller.rb +8 -91
  47. data/app/controllers/decidim/assemblies/admin/concerns/assembly_admin.rb +1 -1
  48. data/app/controllers/decidim/assemblies/assemblies_controller.rb +12 -7
  49. data/app/controllers/decidim/assemblies/assembly_members_controller.rb +2 -0
  50. data/app/events/decidim/assemblies/create_assembly_member_event.rb +1 -1
  51. data/app/events/decidim/role_assigned_to_assembly_event.rb +11 -6
  52. data/app/forms/decidim/assemblies/admin/assembly_copy_form.rb +1 -1
  53. data/app/forms/decidim/assemblies/admin/assembly_form.rb +1 -1
  54. data/app/forms/decidim/assemblies/admin/assembly_import_form.rb +1 -1
  55. data/app/forms/decidim/assemblies/admin/assembly_user_role_form.rb +2 -18
  56. data/app/helpers/decidim/assemblies/admin/assembly_members_helper.rb +11 -0
  57. data/app/helpers/decidim/assemblies/application_helper.rb +12 -0
  58. data/app/helpers/decidim/assemblies/assemblies_helper.rb +21 -19
  59. data/app/helpers/decidim/assemblies/filter_assemblies_helper.rb +15 -30
  60. data/app/models/decidim/assembly.rb +6 -5
  61. data/app/models/decidim/assembly_user_role.rb +5 -33
  62. data/app/packs/entrypoints/decidim_assemblies.js +0 -1
  63. data/app/packs/src/decidim/assemblies/admin/assemblies.js +2 -2
  64. data/app/packs/src/decidim/assemblies/orgchart.js +0 -701
  65. data/app/permissions/decidim/assemblies/permissions.rb +14 -27
  66. data/app/presenters/decidim/assemblies/admin_log/assemblies_setting_presenter.rb +2 -2
  67. data/app/presenters/decidim/assemblies/admin_log/assemblies_type_presenter.rb +2 -2
  68. data/app/presenters/decidim/assemblies/admin_log/assembly_member_presenter.rb +2 -2
  69. data/app/presenters/decidim/assemblies/admin_log/assembly_presenter.rb +2 -2
  70. data/app/presenters/decidim/assemblies/admin_log/assembly_user_role_presenter.rb +2 -2
  71. data/app/presenters/decidim/assemblies/assembly_presenter.rb +38 -0
  72. data/app/presenters/decidim/assemblies/assembly_stats_presenter.rb +2 -41
  73. data/app/presenters/decidim/assembly_member_presenter.rb +18 -4
  74. data/app/queries/decidim/assemblies/admin/admin_users.rb +1 -1
  75. data/app/queries/decidim/assemblies/assemblies_with_user_role.rb +2 -2
  76. data/app/serializers/decidim/assemblies/assembly_importer.rb +3 -3
  77. data/app/serializers/decidim/assemblies/assembly_serializer.rb +1 -1
  78. data/app/views/decidim/assemblies/admin/assemblies/_form.html.erb +218 -176
  79. data/app/views/decidim/assemblies/admin/assemblies/edit.html.erb +25 -11
  80. data/app/views/decidim/assemblies/admin/assemblies/index.html.erb +105 -115
  81. data/app/views/decidim/assemblies/admin/assemblies/new.html.erb +16 -9
  82. data/app/views/decidim/assemblies/admin/assemblies_types/_form.html.erb +6 -8
  83. data/app/views/decidim/assemblies/admin/assemblies_types/edit.html.erb +11 -5
  84. data/app/views/decidim/assemblies/admin/assemblies_types/index.html.erb +34 -35
  85. data/app/views/decidim/assemblies/admin/assemblies_types/new.html.erb +16 -6
  86. data/app/views/decidim/assemblies/admin/assembly_copies/_form.html.erb +12 -20
  87. data/app/views/decidim/assemblies/admin/assembly_copies/new.html.erb +17 -5
  88. data/app/views/decidim/assemblies/admin/assembly_imports/_form.html.erb +28 -37
  89. data/app/views/decidim/assemblies/admin/assembly_imports/new.html.erb +17 -5
  90. data/app/views/decidim/assemblies/admin/assembly_members/_form.html.erb +45 -49
  91. data/app/views/decidim/assemblies/admin/assembly_members/edit.html.erb +17 -6
  92. data/app/views/decidim/assemblies/admin/assembly_members/index.html.erb +51 -88
  93. data/app/views/decidim/assemblies/admin/assembly_members/new.html.erb +17 -6
  94. data/app/views/decidim/assemblies/admin/assembly_user_roles/_form.html.erb +14 -18
  95. data/app/views/decidim/assemblies/admin/assembly_user_roles/edit.html.erb +17 -6
  96. data/app/views/decidim/assemblies/admin/assembly_user_roles/index.html.erb +54 -55
  97. data/app/views/decidim/assemblies/admin/assembly_user_roles/new.html.erb +17 -6
  98. data/app/views/decidim/assemblies/assemblies/_collection.html.erb +7 -0
  99. data/app/views/decidim/assemblies/assemblies/index.html.erb +20 -19
  100. data/app/views/decidim/assemblies/assemblies/index.js.erb +1 -8
  101. data/app/views/decidim/assemblies/assemblies/show.html.erb +17 -207
  102. data/app/views/decidim/assemblies/assembly_members/index.html.erb +7 -5
  103. data/app/views/decidim/assemblies/pages/user_profile/_member_of.html.erb +6 -9
  104. data/app/views/layouts/decidim/admin/_manage_assemblies.html.erb +36 -0
  105. data/app/views/layouts/decidim/admin/assemblies.html.erb +13 -11
  106. data/app/views/layouts/decidim/admin/assemblies_imports.html.erb +9 -0
  107. data/app/views/layouts/decidim/admin/assemblies_types.html.erb +17 -0
  108. data/app/views/layouts/decidim/admin/assembly.html.erb +12 -13
  109. data/app/views/layouts/decidim/assembly.html.erb +7 -14
  110. data/config/locales/ar.yml +7 -68
  111. data/config/locales/bg.yml +0 -466
  112. data/config/locales/ca.yml +62 -71
  113. data/config/locales/cs.yml +59 -66
  114. data/config/locales/de.yml +60 -69
  115. data/config/locales/el.yml +11 -61
  116. data/config/locales/en.yml +57 -66
  117. data/config/locales/es-MX.yml +57 -66
  118. data/config/locales/es-PY.yml +57 -66
  119. data/config/locales/es.yml +63 -72
  120. data/config/locales/eu.yml +57 -70
  121. data/config/locales/fi-plain.yml +58 -67
  122. data/config/locales/fi.yml +57 -66
  123. data/config/locales/fr-CA.yml +57 -66
  124. data/config/locales/fr.yml +57 -66
  125. data/config/locales/ga-IE.yml +4 -15
  126. data/config/locales/gl.yml +4 -62
  127. data/config/locales/hu.yml +33 -65
  128. data/config/locales/id-ID.yml +6 -47
  129. data/config/locales/is-IS.yml +5 -40
  130. data/config/locales/it.yml +5 -62
  131. data/config/locales/ja.yml +51 -66
  132. data/config/locales/kaa.yml +0 -8
  133. data/config/locales/ko.yml +0 -92
  134. data/config/locales/lb.yml +5 -61
  135. data/config/locales/lt.yml +40 -63
  136. data/config/locales/lv.yml +5 -57
  137. data/config/locales/nl.yml +4 -62
  138. data/config/locales/no.yml +5 -62
  139. data/config/locales/pl.yml +3 -93
  140. data/config/locales/pt-BR.yml +77 -132
  141. data/config/locales/pt.yml +5 -62
  142. data/config/locales/ro-RO.yml +20 -63
  143. data/config/locales/ru.yml +4 -44
  144. data/config/locales/sk.yml +0 -26
  145. data/config/locales/sl.yml +5 -48
  146. data/config/locales/sq-AL.yml +0 -364
  147. data/config/locales/sr-CS.yml +0 -5
  148. data/config/locales/sv.yml +132 -193
  149. data/config/locales/tr-TR.yml +8 -69
  150. data/config/locales/uk.yml +4 -44
  151. data/config/locales/zh-CN.yml +5 -60
  152. data/config/locales/zh-TW.yml +7 -63
  153. data/db/migrate/20200108123050_migrate_decidim_assembly_types.rb +1 -1
  154. data/lib/decidim/api/assemblies_type_type.rb +1 -1
  155. data/lib/decidim/api/assembly_member_type.rb +1 -1
  156. data/lib/decidim/api/assembly_type.rb +1 -1
  157. data/lib/decidim/assemblies/admin_engine.rb +21 -126
  158. data/lib/decidim/assemblies/content_blocks/registry_manager.rb +184 -0
  159. data/lib/decidim/assemblies/engine.rb +15 -21
  160. data/lib/decidim/assemblies/menu.rb +161 -0
  161. data/lib/decidim/assemblies/participatory_space.rb +7 -229
  162. data/lib/decidim/assemblies/query_extensions.rb +6 -6
  163. data/lib/decidim/assemblies/seeds.rb +161 -0
  164. data/lib/decidim/assemblies/test/factories.rb +47 -55
  165. data/lib/decidim/assemblies/version.rb +1 -1
  166. metadata +54 -51
  167. data/app/cells/decidim/assemblies/assembly_m/footer.erb +0 -15
  168. data/app/cells/decidim/assemblies/assembly_m/tags.erb +0 -1
  169. data/app/cells/decidim/assemblies/assembly_m_cell.rb +0 -77
  170. data/app/cells/decidim/assemblies/content_blocks/highlighted_assemblies/show.erb +0 -30
  171. data/app/commands/decidim/assemblies/admin/create_assembly_admin.rb +0 -54
  172. data/app/commands/decidim/assemblies/admin/destroy_assembly_admin.rb +0 -58
  173. data/app/commands/decidim/assemblies/admin/notify_role_assigned_to_assembly.rb +0 -22
  174. data/app/commands/decidim/assemblies/admin/publish_assembly.rb +0 -39
  175. data/app/commands/decidim/assemblies/admin/unpublish_assembly.rb +0 -39
  176. data/app/commands/decidim/assemblies/admin/update_assemblies_setting.rb +0 -46
  177. data/app/commands/decidim/assemblies/admin/update_assembly_admin.rb +0 -53
  178. data/app/controllers/decidim/assemblies/admin/assemblies_settings_controller.rb +0 -49
  179. data/app/controllers/decidim/assemblies/widgets_controller.rb +0 -33
  180. data/app/forms/decidim/assemblies/admin/assemblies_setting_form.rb +0 -14
  181. data/app/models/decidim/assemblies_setting.rb +0 -17
  182. data/app/queries/decidim/assemblies/admin/assembly_members.rb +0 -56
  183. data/app/views/decidim/assemblies/_filter_by_type.html.erb +0 -19
  184. data/app/views/decidim/assemblies/admin/assemblies_settings/_form.html.erb +0 -10
  185. data/app/views/decidim/assemblies/admin/assemblies_settings/edit.html.erb +0 -7
  186. data/app/views/decidim/assemblies/assemblies/_count.html.erb +0 -1
  187. data/app/views/decidim/assemblies/assemblies/_nav_breadcumb.html.erb +0 -11
  188. data/app/views/decidim/assemblies/assemblies/_parent_assemblies.html.erb +0 -15
  189. data/app/views/decidim/assemblies/assemblies/_promoted_assembly.html.erb +0 -27
  190. data/app/views/layouts/decidim/_assembly_header.html.erb +0 -27
  191. data/app/views/layouts/decidim/_assembly_navigation.html.erb +0 -24
  192. data/app/views/layouts/decidim/admin/assembly_members.html.erb +0 -18
  193. data/config/locales/he-IL.yml +0 -110
  194. data/db/seeds/Exampledocument.pdf +0 -0
  195. data/db/seeds/city.jpeg +0 -0
  196. data/db/seeds/city2.jpeg +0 -0
  197. data/db/seeds/homepage_image.jpg +0 -0
  198. data/decidim-assemblies.gemspec +0 -32
@@ -1,66 +1,62 @@
1
- <div class="card">
2
- <div class="card-divider">
3
- <h2 class="card-title">
4
- <%= title %>
5
- </h2>
6
- </div>
7
-
8
- <div class="card-section">
9
- <div class="user-fields">
10
- <div class="row column">
11
- <%= form.select :existing_user, [[t(".non_user"), false], [t(".existing_user"), true]], label: t(".user_type") %>
1
+ <div class="form__wrapper">
2
+ <div class="card pt-4">
3
+ <div class="card-section">
4
+ <div class="user-fields">
5
+ <div class="row column">
6
+ <%= form.select :existing_user, [[t(".non_user"), false], [t(".existing_user"), true]], label: t(".user_type") %>
7
+ </div>
8
+
9
+ <div class="row column user-fields--full-name">
10
+ <%= form.text_field :full_name, autofocus: true %>
11
+ </div>
12
+
13
+ <div class="row column user-fields--non-user-avatar">
14
+ <%= form.upload :non_user_avatar, help_i18n_messages: %w(non_user_avatar_help image_guide), help_i18n_scope: "decidim.assemblies.admin.assembly_members.form", button_class: "button button__sm button__transparent-secondary" %>
15
+ </div>
16
+
17
+ <div class="row column user-fields--user-picker">
18
+ <% prompt_options = { url: decidim_admin.user_entities_organization_url, placeholder: t(".select_user") } %>
19
+ <%= form.autocomplete_select(:user_id, form.object.user.presence, { multiple: false }, prompt_options) do |user|
20
+ { value: user.id, label: "#{user.name} (@#{user.nickname})" }
21
+ end %>
22
+ </div>
12
23
  </div>
13
24
 
14
- <div class="row column user-fields--full-name">
15
- <%= form.text_field :full_name, autofocus: true %>
16
- </div>
25
+ <div class="position-fields">
26
+ <div class="row column">
27
+ <%= form.select :position, @form.positions_for_select, { include_blank: t(".select_a_position") }, { multiple: false } %>
28
+ </div>
17
29
 
18
- <div class="row column user-fields--non-user-avatar">
19
- <%= form.upload :non_user_avatar, help_i18n_messages: ["non_user_avatar_help", "image_guide"], help_i18n_scope: "decidim.assemblies.admin.assembly_members.form" %>
30
+ <div class="row column position-fields--position-other">
31
+ <%= form.text_field :position_other %>
32
+ </div>
20
33
  </div>
21
34
 
22
- <div class="row column user-fields--user-picker">
23
- <% prompt_options = { url: decidim_admin.user_entities_organization_url, placeholder: t(".select_user") } %>
24
- <%= form.autocomplete_select(:user_id, form.object.user.presence, { multiple: false }, prompt_options) do |user|
25
- { value: user.id, label: "#{user.name} (@#{user.nickname})" }
26
- end %>
35
+ <div class="row column">
36
+ <%= form.number_field :weight %>
27
37
  </div>
28
- </div>
29
38
 
30
- <div class="position-fields">
31
39
  <div class="row column">
32
- <%= form.select :position, @form.positions_for_select, { include_blank: t(".select_a_position") }, { multiple: false } %>
40
+ <%= form.date_field :designation_date %>
33
41
  </div>
34
42
 
35
- <div class="row column position-fields--position-other">
36
- <%= form.text_field :position_other %>
43
+ <div class="row column">
44
+ <%= form.date_field :ceased_date %>
37
45
  </div>
38
- </div>
39
-
40
- <div class="row column">
41
- <%= form.number_field :weight %>
42
- </div>
43
-
44
- <div class="row column">
45
- <%= form.date_field :designation_date %>
46
- </div>
47
46
 
48
- <div class="row column">
49
- <%= form.date_field :ceased_date %>
50
- </div>
51
-
52
- <div class="row column">
53
- <%= form.text_field :gender %>
54
- </div>
47
+ <div class="row column">
48
+ <%= form.text_field :gender %>
49
+ </div>
55
50
 
56
- <div class="row column">
57
- <%= form.date_field :birthday %>
58
- </div>
51
+ <div class="row column">
52
+ <%= form.date_field :birthday %>
53
+ </div>
59
54
 
60
- <div class="row column">
61
- <%= form.text_field :birthplace %>
55
+ <div class="row column">
56
+ <%= form.text_field :birthplace %>
57
+ </div>
62
58
  </div>
63
59
  </div>
64
- </div>
65
60
 
66
- <%= javascript_pack_tag "decidim_assemblies_admin" %>
61
+ <%= append_javascript_pack_tag "decidim_assemblies_admin" %>
62
+ </div>
@@ -1,7 +1,18 @@
1
- <%= decidim_form_for(@form, url: assembly_member_path(@assembly_member.assembly, @assembly_member), html: { class: "form edit_assembly_member" }) do |f| %>
2
- <%= render partial: "form", object: f, locals: { title: t("assembly_members.edit.title", scope: "decidim.admin") } %>
3
-
4
- <div class="button--double form-general-submit">
5
- <%= f.submit t("assembly_members.edit.update", scope: "decidim.admin") %>
1
+ <% add_decidim_page_title(t("assembly_members.edit.title", scope: "decidim.admin")) %>
2
+ <div class="item_show__header">
3
+ <h2 class="item_show__header-title">
4
+ <%= t("assembly_members.edit.title", scope: "decidim.admin") %>
5
+ </h2>
6
+ </div>
7
+ <div class="item__edit item__edit-1col">
8
+ <div class="item__edit-form">
9
+ <%= decidim_form_for(@form, url: assembly_member_path(@assembly_member.assembly, @assembly_member), html: { class: "form form-defaults edit_assembly_member" }) do |f| %>
10
+ <%= render partial: "form", object: f %>
11
+ <div class="item__edit-sticky">
12
+ <div class="item__edit-sticky-container">
13
+ <%= f.submit t("assembly_members.edit.update", scope: "decidim.admin"), class: "button button__sm button__secondary" %>
14
+ </div>
15
+ </div>
16
+ <% end %>
6
17
  </div>
7
- <% end %>
18
+ </div>
@@ -1,92 +1,55 @@
1
- <div class='card' id="assembly_members">
2
- <div class="card-divider">
3
- <h2 class="card-title">
4
- <%= t("assembly_members.index.assembly_members_title", scope: "decidim.admin") %>
5
- <% if allowed_to? :create, :assembly_member %>
6
- <%= link_to t("actions.new", scope: "decidim.admin", name: t("models.assembly_member.name", scope: "decidim.admin")), new_assembly_member_path(current_assembly), class: "button tiny button--title new" %>
7
- <% end %>
8
- </h2>
9
- </div>
10
- <div class="filters__section">
11
- <div class="fcell filter">
12
- <span class="dropdown-menu-inverted_label"><%= t(".filter_by") %> :</span>
13
- <ul class="dropdown menu dropdown-inverted" data-dropdown-menu data-close-on-click-inside="false">
14
- <li class="is-dropdown-submenu-parent">
15
- <a href="#">
16
- <% if @status.present? %>
17
- <%= t(".filter.#{@status}") %>
18
- <% else %>
19
- <%= t(".filter.all") %>
20
- <% end %>
21
- </a>
22
- <ul class="menu is-dropdown-submenu">
23
- <li><%= link_to t(".filter.ceased"), url_for(status: "ceased", q: @query) %></li>
24
- <li><%= link_to t(".filter.not_ceased"), url_for(status: "not_ceased", q: @query) %></li>
25
- <li><%= link_to t(".filter.all"), url_for(q: @query) %></li>
26
- </ul>
27
- </li>
28
- </ul>
29
- </div>
30
- <div class="fcell search">
31
- <div class="column medium-4">
32
- <%= form_tag "", method: :get do %>
33
- <div class="filters__search">
34
- <div class="input-group">
35
- <%= search_field_tag :q, @query,label: false, class: "input-group-field", placeholder: t(".search") %>
36
- <%= hidden_field_tag :status, @status %>
37
- <div class="input-group-button">
38
- <button type="submit" class="button">
39
- <%= icon "magnifying-glass", aria_label: t(".search"), role: "img" %>
40
- </button>
41
- </div>
42
- </div>
43
- </div>
44
- <% end %>
45
- </div>
46
- </div>
47
- </div>
48
- <div class="card-section">
49
- <div class="table-scroll">
50
- <table class="stack">
51
- <thead>
1
+ <% add_decidim_page_title(t("assembly_members_title", scope: "decidim.admin.assembly_members.index")) %>
2
+ <div class="item_show__header">
3
+ <h2 class="item_show__header-title">
4
+ <%= t("assembly_members_title", scope: "decidim.admin.assembly_members.index") %>
5
+ <% if allowed_to? :create, :assembly_member %>
6
+ <%= link_to t("actions.new_assembly_member", scope: "decidim.admin"), new_assembly_member_path(current_assembly), class: "button button__sm button__secondary new" %>
7
+ <% end %>
8
+ </h2>
9
+ </div>
10
+
11
+ <div class="card" id="assembly_members">
12
+ <%= admin_filter_selector %>
13
+ <div class="table-scroll">
14
+ <table class="table-list">
15
+ <thead>
16
+ <tr>
17
+ <th><%= t("models.assembly_member.fields.full_name", scope: "decidim.admin") %></th>
18
+ <th><%= t("models.assembly_member.fields.position", scope: "decidim.admin") %></th>
19
+ <th><%= t("models.assembly_member.fields.designation_date", scope: "decidim.admin") %></th>
20
+ <th><%= t("models.assembly_member.fields.ceased_date", scope: "decidim.admin") %></th>
21
+ <th class="actions"></th>
22
+ </tr>
23
+ </thead>
24
+ <tbody>
25
+ <% @assembly_members.each do |member| %>
26
+ <% member_presenter = Decidim::Admin::AssemblyMemberPresenter.new(member) %>
52
27
  <tr>
53
- <th><%= t("models.assembly_member.fields.full_name", scope: "decidim.admin") %></th>
54
- <th><%= t("models.assembly_member.fields.position", scope: "decidim.admin") %></th>
55
- <th><%= t("models.assembly_member.fields.designation_date", scope: "decidim.admin") %></th>
56
- <th><%= t("models.assembly_member.fields.ceased_date", scope: "decidim.admin") %></th>
57
- <th class="actions"></th>
58
- </tr>
59
- </thead>
60
- <tbody>
61
- <% @assembly_members.each do |member| %>
62
- <% member_presenter = Decidim::Admin::AssemblyMemberPresenter.new(member) %>
63
- <tr>
64
- <td>
65
- <%= member_presenter.name %>
66
- </td>
67
- <td>
68
- <%= member_presenter.position %>
69
- </td>
70
- <td>
71
- <%= l member.designation_date, format: :decidim_short %>
72
- </td>
73
- <td>
74
- <%= member.ceased_date ? l(member.ceased_date, format: :decidim_short) : nil %>
75
- </td>
76
- <td class="table-list__actions">
77
- <% if allowed_to? :update, :assembly_member, member: member %>
78
- <%= icon_link_to "pencil", edit_assembly_member_path(current_assembly, member), t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit" %>
79
- <% end %>
28
+ <td>
29
+ <%= member_presenter.name %>
30
+ </td>
31
+ <td>
32
+ <%= member_presenter.position %>
33
+ </td>
34
+ <td>
35
+ <%= l member.designation_date, format: :decidim_short %>
36
+ </td>
37
+ <td>
38
+ <%= member.ceased_date ? l(member.ceased_date, format: :decidim_short) : nil %>
39
+ </td>
40
+ <td class="table-list__actions">
41
+ <% if allowed_to? :update, :assembly_member, member: member %>
42
+ <%= icon_link_to "pencil-line", edit_assembly_member_path(current_assembly, member), t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit" %>
43
+ <% end %>
80
44
 
81
- <% if allowed_to? :destroy, :assembly_member, member: member %>
82
- <%= icon_link_to "circle-x", assembly_member_path(current_assembly, member), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %>
83
- <% end %>
84
- </td>
85
- </tr>
86
- <% end %>
87
- </tbody>
88
- </table>
89
- <%= paginate @assembly_members, theme: "decidim" %>
90
- </div>
45
+ <% if allowed_to? :destroy, :assembly_member, member: member %>
46
+ <%= icon_link_to "delete-bin-line", assembly_member_path(current_assembly, member), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %>
47
+ <% end %>
48
+ </td>
49
+ </tr>
50
+ <% end %>
51
+ </tbody>
52
+ </table>
91
53
  </div>
54
+ <%= decidim_paginate @assembly_members %>
92
55
  </div>
@@ -1,7 +1,18 @@
1
- <%= decidim_form_for(@form, html: { class: "form new_assembly_member" }) do |f| %>
2
- <%= render partial: "form", object: f, locals: { title: t("assembly_members.new.title", scope: "decidim.admin") } %>
3
-
4
- <div class="button--double form-general-submit">
5
- <%= f.submit t("assembly_members.new.create", scope: "decidim.admin") %>
1
+ <% add_decidim_page_title(t("assembly_members.new.title", scope: "decidim.admin")) %>
2
+ <div class="item_show__header">
3
+ <h2 class="item_show__header-title">
4
+ <%= t("assembly_members.new.title", scope: "decidim.admin") %>
5
+ </h2>
6
+ </div>
7
+ <div class="item__edit item__edit-1col">
8
+ <div class="item__edit-form">
9
+ <%= decidim_form_for(@form, html: { class: "form-defaults form new_assembly_member" }) do |f| %>
10
+ <%= render partial: "form", object: f %>
11
+ <div class="item__edit-sticky">
12
+ <div class="item__edit-sticky-container">
13
+ <%= f.submit t("assembly_members.new.create", scope: "decidim.admin"), class: "button button__sm button__secondary" %>
14
+ </div>
15
+ </div>
16
+ <% end %>
6
17
  </div>
7
- <% end %>
18
+ </div>
@@ -1,21 +1,17 @@
1
- <div class="card">
2
- <div class="card-divider">
3
- <h2 class="card-title">
4
- <%= title %>
5
- </h2>
6
- </div>
7
-
8
- <div class="card-section">
9
- <div class="row">
10
- <div class="columns xlarge-4">
11
- <%= form.text_field :name, readonly: @form.persisted? %>
12
- </div>
13
- <div class="columns xlarge-4">
14
- <%= form.email_field :email, readonly: @form.persisted? %>
15
- </div>
16
- <div class="columns xlarge-4">
17
- <%= form.label :role %>
18
- <%= select :assembly_user_role, :role, @form.roles, include_blank: false %>
1
+ <div class="form__wrapper">
2
+ <div class="card pt-4">
3
+ <div class="card-section">
4
+ <div class="row">
5
+ <div class="columns">
6
+ <%= form.text_field :name, readonly: @form.persisted? %>
7
+ </div>
8
+ <div class="columns">
9
+ <%= form.email_field :email, readonly: @form.persisted? %>
10
+ </div>
11
+ <div class="columns">
12
+ <%= form.label :role %>
13
+ <%= select :assembly_user_role, :role, @form.roles, include_blank: false %>
14
+ </div>
19
15
  </div>
20
16
  </div>
21
17
  </div>
@@ -1,7 +1,18 @@
1
- <%= decidim_form_for(@form, url: assembly_user_role_path(@user_role.assembly, @user_role), html: { class: "form edit_assembly_user_roles" }) do |f| %>
2
- <%= render partial: "form", object: f, locals: { title: t("assembly_user_roles.edit.title", scope: "decidim.admin") } %>
3
-
4
- <div class="button--double form-general-submit">
5
- <%= f.submit t("assembly_user_roles.edit.update", scope: "decidim.admin") %>
1
+ <% add_decidim_page_title(t("assembly_user_roles.edit.title", scope: "decidim.admin")) %>
2
+ <div class="item_show__header">
3
+ <h2 class="item_show__header-title">
4
+ <%= t("assembly_user_roles.edit.title", scope: "decidim.admin") %>
5
+ </h2>
6
+ </div>
7
+ <div class="item__edit item__edit-1col">
8
+ <div class="item__edit-form">
9
+ <%= decidim_form_for(@form, url: assembly_user_role_path(@user_role.assembly, @user_role), html: { class: "form-defaults form edit_assembly_user_roles" }) do |f| %>
10
+ <%= render partial: "form", object: f %>
11
+ <div class="item__edit-sticky">
12
+ <div class="item__edit-sticky-container">
13
+ <%= f.submit t("assembly_user_roles.edit.update", scope: "decidim.admin"), class: "button button__sm button__secondary" %>
14
+ </div>
15
+ </div>
16
+ <% end %>
6
17
  </div>
7
- <% end %>
18
+ </div>
@@ -1,66 +1,65 @@
1
- <div class='card' id="assembly_admins">
2
- <div class="card-divider">
3
- <h2 class="card-title">
1
+ <% add_decidim_page_title(t("assembly_user_roles.index.assembly_admins_title", scope: "decidim.admin")) %>
2
+ <div class="card" id="assembly_admins">
3
+ <div class="item_show__header">
4
+ <h2 class="item_show__header-title">
4
5
  <%= t("assembly_user_roles.index.assembly_admins_title", scope: "decidim.admin") %>
5
6
  <% if allowed_to? :create, :assembly_user_role %>
6
- <%= link_to t("actions.new", scope: "decidim.admin", name: t("models.assembly_user_role.name", scope: "decidim.admin")), new_assembly_user_role_path(current_assembly), class: "button tiny button--title new" %>
7
+ <%= link_to t("actions.new_assembly_user_role", scope: "decidim.admin"), new_assembly_user_role_path(current_assembly), class: "button button__sm button__secondary new" %>
7
8
  <% end %>
8
9
  </h2>
9
10
  </div>
10
11
  <%= admin_filter_selector %>
11
-
12
- <div class="card-section">
13
- <div class="table-scroll">
14
- <table class="stack table-list">
15
- <thead>
12
+ <div class="table-scroll">
13
+ <table class="table-list">
14
+ <thead>
15
+ <tr>
16
+ <th><%= sort_link(query, :name,t("models.assembly_user_role.fields.name", scope: "decidim.admin"), default_order: :desc) %></th>
17
+ <th><%= sort_link(query, :email, t("models.assembly_user_role.fields.email", scope: "decidim.admin"), default_order: :desc) %></th>
18
+ <th><%= sort_link(query, :last_sign_in_at, t("models.user.fields.last_sign_in_at", scope: "decidim.admin"), default_order: :desc) %></th>
19
+ <th><%= sort_link(query, :invitation_accepted_at, t("models.user.fields.invitation_accepted_at", scope: "decidim.admin"), default_order: :desc) %></th>
20
+ <th><%= sort_link(query, :role, t("models.assembly_user_role.fields.role", scope: "decidim.admin"), default_order: :desc) %></th>
21
+ <th class="actions"></th>
22
+ </tr>
23
+ </thead>
24
+ <tbody>
25
+ <% filtered_collection.each do |role| %>
16
26
  <tr>
17
- <th><%= sort_link(query, :name,t("models.assembly_user_role.fields.name", scope: "decidim.admin"), default_order: :desc) %></th>
18
- <th><%= sort_link(query, :email, t("models.assembly_user_role.fields.email", scope: "decidim.admin"), default_order: :desc) %></th>
19
- <th><%= sort_link(query, :last_sign_in_at, t("models.user.fields.last_sign_in_at", scope: "decidim.admin"), default_order: :desc) %></th>
20
- <th><%= sort_link(query, :invitation_accepted_at, t("models.user.fields.invitation_accepted_at", scope: "decidim.admin"), default_order: :desc) %></th>
21
- <th><%= sort_link(query, :role, t("models.assembly_user_role.fields.role", scope: "decidim.admin"), default_order: :desc) %></th>
22
- <th class="actions"></th>
23
- </tr>
24
- </thead>
25
- <tbody>
26
- <% @assembly_user_roles.each do |role| %>
27
- <tr>
28
- <td>
29
- <%= role.user.name %><br>
30
- </td>
31
- <td>
32
- <%= role.user.email %><br>
33
- </td>
34
- <td>
35
- <% if role.user.invitation_sent_at %>
36
- <%= l role.user.invitation_sent_at, format: :short %>
37
- <% end %>
38
- </td>
39
- <td>
40
- <% if role.user.invitation_accepted_at %>
41
- <%= l role.user.invitation_accepted_at, format: :short %>
42
- <% end %>
43
- </td>
44
- <td>
45
- <%= t("#{role.role}", scope: "decidim.admin.models.assembly_user_role.roles") %><br>
46
- </td>
47
- <td class="table-list__actions">
48
- <% if allowed_to?(:invite, :assembly_user_role, user_role: role) && role.user.invited_to_sign_up? %>
49
- <%= icon_link_to "reload", resend_invitation_assembly_user_role_path(current_assembly, role), t("actions.resend_invitation", scope: "decidim.admin"), class: "resend-invitation", method: :post %>
50
- <% end %>
27
+ <td>
28
+ <%= role.user.name %><br>
29
+ </td>
30
+ <td>
31
+ <%= role.user.email %><br>
32
+ </td>
33
+ <td>
34
+ <% if role.user.invitation_sent_at %>
35
+ <%= l role.user.invitation_sent_at, format: :short %>
36
+ <% end %>
37
+ </td>
38
+ <td>
39
+ <% if role.user.invitation_accepted_at %>
40
+ <%= l role.user.invitation_accepted_at, format: :short %>
41
+ <% end %>
42
+ </td>
43
+ <td>
44
+ <%= t("#{role.role}", scope: "decidim.admin.models.assembly_user_role.roles") %><br>
45
+ </td>
46
+ <td class="table-list__actions">
47
+ <% if allowed_to?(:invite, :assembly_user_role, user_role: role) && role.user.invited_to_sign_up? %>
48
+ <%= icon_link_to "refresh-line", resend_invitation_assembly_user_role_path(current_assembly, role), t("actions.resend_invitation", scope: "decidim.admin"), class: "resend-invitation", method: :post %>
49
+ <% end %>
51
50
 
52
- <% if allowed_to? :update, :assembly_user_role, user_role: role %>
53
- <%= icon_link_to "pencil", edit_assembly_user_role_path(current_assembly, role), t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit" %>
54
- <% end %>
51
+ <% if allowed_to? :update, :assembly_user_role, user_role: role %>
52
+ <%= icon_link_to "pencil-line", edit_assembly_user_role_path(current_assembly, role), t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit" %>
53
+ <% end %>
55
54
 
56
- <% if allowed_to? :destroy, :assembly_user_role, user_role: role %>
57
- <%= icon_link_to "circle-x", assembly_user_role_path(current_assembly, role), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %>
58
- <% end %>
59
- </td>
60
- </tr>
61
- <% end %>
62
- </tbody>
63
- </table>
64
- </div>
55
+ <% if allowed_to? :destroy, :assembly_user_role, user_role: role %>
56
+ <%= icon_link_to "delete-bin-line", assembly_user_role_path(current_assembly, role), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %>
57
+ <% end %>
58
+ </td>
59
+ </tr>
60
+ <% end %>
61
+ </tbody>
62
+ </table>
65
63
  </div>
66
64
  </div>
65
+ <%= decidim_paginate filtered_collection %>
@@ -1,7 +1,18 @@
1
- <%= decidim_form_for(@form, html: { class: "form new_assembly_user_role" }) do |f| %>
2
- <%= render partial: "form", object: f, locals: { title: t("assembly_user_roles.new.title", scope: "decidim.admin") } %>
3
-
4
- <div class="button--double form-general-submit">
5
- <%= f.submit t("assembly_user_roles.new.create", scope: "decidim.admin") %>
1
+ <% add_decidim_page_title(t("assembly_user_roles.new.title", scope: "decidim.admin")) %>
2
+ <div class="item_show__header">
3
+ <h2 class="item_show__header-title">
4
+ <%= t("assembly_user_roles.new.title", scope: "decidim.admin") %>
5
+ </h2>
6
+ </div>
7
+ <div class="item__edit item__edit-1col">
8
+ <div class="item__edit-form">
9
+ <%= decidim_form_for(@form, html: { class: "form-defaults form new_assembly_user_role" }) do |f| %>
10
+ <%= render partial: "form", object: f %>
11
+ <div class="item__edit-sticky">
12
+ <div class="item__edit-sticky-container">
13
+ <%= f.submit t("assembly_user_roles.new.create", scope: "decidim.admin"), class: "button button__sm button__secondary" %>
14
+ </div>
15
+ </div>
16
+ <% end %>
6
17
  </div>
7
- <% end %>
18
+ </div>
@@ -0,0 +1,7 @@
1
+ <h2 class="h5 md:h3 decorator"><%= t("assemblies.order_by_assemblies.assemblies", scope: "layouts.decidim", count: collection.total_count) %></h2>
2
+
3
+ <div class="card__grid-grid">
4
+ <%= render(collection) %>
5
+ </div>
6
+
7
+ <%= decidim_paginate collection %>
@@ -8,28 +8,29 @@ edit_link(
8
8
  )
9
9
  %>
10
10
 
11
- <%= participatory_space_wrapper do %>
12
- <% if promoted_assemblies.any? %>
13
- <section id="highlighted-assemblies" class="row section">
14
- <h1 class="section-heading"><%= t("assemblies.index.promoted_assemblies", scope: "layouts.decidim") %></h1>
15
- <%= render partial: "promoted_assembly", collection: promoted_assemblies, as: :promoted_assembly %>
16
- </section>
17
- <% end %>
11
+ <%= append_stylesheet_pack_tag "decidim_assemblies", media: "all" %>
12
+ <%= append_javascript_pack_tag "decidim_assemblies" %>
18
13
 
19
- <%= render partial: "parent_assemblies" %>
14
+ <% content_for :aside do %>
15
+ <h1 class="title-decorator"><%= t("decidim.menu.assemblies") %></h1>
16
+
17
+ <%= render partial: "decidim/shared/filters", locals: { filter_sections:, skip_to_id: "assemblies-grid" } %>
18
+ <% end %>
20
19
 
21
- <% if current_assemblies_settings.enable_organization_chart %>
22
- <section id="assemblies-chart" class="row column section">
23
- <div class="row column">
24
- <h3 class="section-heading"><%= t("assemblies.index.organizational_chart", scope: "layouts.decidim") %></h3>
25
- <div id="orgchart-<%= SecureRandom.hex(5) %>" class="card orgchart js-orgchart absolutes" data-url="<%= decidim_assemblies.assemblies_path(format: :json) %>">
26
- <button class="medium-1 m-s top left button small hollow invisible js-reset-orgchart"><%= t("assemblies.index.reset_chart", scope: "layouts.decidim") %></button>
27
- </div>
28
- </div>
20
+ <%= render layout:"layouts/decidim/shared/layout_two_col" do %>
21
+
22
+ <%= participatory_space_floating_help %>
23
+
24
+ <% if promoted_assemblies.any? %>
25
+ <section id="highlighted-assemblies" class="layout-main__section layout-main__heading">
26
+ <h2 class="h5 md:h3 decorator"><%= t("assemblies.index.promoted_assemblies", scope: "layouts.decidim") %></h2>
27
+ <% promoted_assemblies.each do |promoted_assembly| %>
28
+ <%= card_for promoted_assembly, highlight: true, size: :g %>
29
+ <% end %>
29
30
  </section>
30
31
  <% end %>
31
- <% end %>
32
32
 
33
- <% content_for :js_content do %>
34
- <%= javascript_pack_tag "decidim_assemblies" %>
33
+ <section id="assemblies-grid" class="layout-main__section layout-main__heading">
34
+ <%= render partial: "collection" %>
35
+ </section>
35
36
  <% end %>
@@ -1,8 +1 @@
1
- var $grid = $('#parent-assemblies');
2
- var $assembliesCount = $('#assemblies-count');
3
- var $assembliesFilter = $('#assemblies-filter');
4
-
5
- $grid.find('.card-grid').html('<%= j(render(parent_assemblies)).strip.html_safe %>');
6
- $assembliesCount.html('<%= j(render partial: "count").strip.html_safe %>');
7
- $assembliesFilter.html('<%= j(render partial: "decidim/assemblies/filter_by_type") %>');
8
- $assembliesFilter.foundation();
1
+ $('#assemblies-grid').html('<%= j(render(partial: "collection")).strip.html_safe %>');