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,126 +1,116 @@
1
1
  <% add_decidim_page_title(t("assemblies", scope: "decidim.admin.titles")) %>
2
- <div class="card with-overflow" id="assemblies">
3
- <div class="card-divider">
4
- <h2 class="card-title">
5
- <% parent_assembly.self_and_ancestors.each do |assembly| %>
6
- <%= link_to translated_attribute(assembly.title), edit_assembly_path(assembly) %>
7
- <span>&gt;</span>
8
- <% end if parent_assembly %>
2
+ <div class="card" id="assemblies">
9
3
 
10
- <%= t("assemblies", scope: "decidim.admin.titles") %>
11
-
12
- <% if allowed_to? :import, :assembly %>
13
- <%= link_to t("actions.import_assembly", scope: "decidim.admin"),
14
- new_import_path,
15
- class: "button tiny button--title" %>
16
- <% end %>
4
+ <% if parent_assembly && parent_assembly.self_and_ancestors.length %>
5
+ <div class="item_show__header">
6
+ <h2 class="item_show__header-title">
7
+ <% parent_assembly.self_and_ancestors.each_with_index do |assembly, ix| %>
8
+ <%= translated_attribute(assembly.title) %>
9
+ <% unless ix == parent_assembly.self_and_ancestors.length - 1 %>
10
+ &gt;
11
+ <% end %>
12
+ <% end if parent_assembly %>
13
+ </h2>
14
+ </div>
15
+ <% end %>
17
16
 
18
- <% if allowed_to? :create, :assembly %>
19
- <%= link_to t("actions.new_assembly", scope: "decidim.admin"),
20
- new_assembly_path(parent_id: parent_assembly&.id),
21
- class: "button tiny button--title" %>
22
- <% end %>
23
- </h2>
24
- </div>
25
17
  <%= admin_filter_selector %>
26
- <div class="card-section">
27
- <div class="table-scroll">
28
- <table class="table-list">
29
- <thead>
18
+
19
+ <div class="table-scroll">
20
+ <table class="table-list">
21
+ <thead>
22
+ <tr>
23
+ <th>
24
+ <%= sort_link(query, :title, t("models.assembly.fields.title", scope: "decidim.admin")) %>
25
+ </th>
26
+ <th>
27
+ <%= sort_link(query, :created_at, t("models.assembly.fields.created_at", scope: "decidim.admin"), default_order: :desc) %>
28
+ </th>
29
+ <th>
30
+ <%= sort_link(query, :private_space, t("models.assembly.fields.private", scope: "decidim.admin")) %>
31
+ </th>
32
+ <th class="table-list__actions">
33
+ <%= sort_link(query, :published_at, t("models.assembly.fields.published", scope: "decidim.admin")) %>
34
+ </th>
35
+ <th>
36
+ <%= t("models.assembly.fields.actions", scope: "decidim.admin") %>
37
+ </th>
38
+ </tr>
39
+ </thead>
40
+ <tbody>
41
+ <% @assemblies.each do |assembly| %>
42
+ <% next unless allowed_to? :list, :assembly, assembly: assembly %>
30
43
  <tr>
31
- <th>
32
- <%= sort_link(query, :title, t("models.assembly.fields.title", scope: "decidim.admin")) %>
33
- </th>
34
- <th>
35
- <%= sort_link(query, :created_at, t("models.assembly.fields.created_at", scope: "decidim.admin"), default_order: :desc) %>
36
- </th>
37
- <th>
38
- <%= sort_link(query, :private_space, t("models.assembly.fields.private", scope: "decidim.admin")) %>
39
- </th>
40
- <th class="table-list__actions">
41
- <%= sort_link(query, :published_at, t("models.assembly.fields.published", scope: "decidim.admin")) %>
42
- </th>
43
- <th></th>
44
- </tr>
45
- </thead>
46
- <tbody>
47
- <% @assemblies.each do |assembly| %>
48
- <% next unless allowed_to? :list, :assembly, assembly: assembly %>
49
- <tr>
50
- <td>
51
- <% if assembly.promoted? %>
52
- <span data-tooltip class="icon-state icon-highlight" data-disable-hover="false" title="<%= t("models.assembly.fields.promoted", scope: "decidim.admin") %>">
53
- <%= icon "star", role: "img", "aria-hidden": true %>
54
- </span>
55
- <% end %>
56
- <% if allowed_to? :update, :assembly, assembly: assembly %>
57
- <%= link_to translated_attribute(assembly.title), edit_assembly_path(assembly) %><br>
58
- <% elsif allowed_to? :read, :component, assembly: assembly %>
59
- <%= link_to translated_attribute(assembly.title), components_path(assembly) %><br>
60
- <% elsif allowed_to? :preview, :assembly, assembly: assembly %>
61
- <%= link_to translated_attribute(assembly.title), decidim_assemblies.assembly_path(assembly) %><br>
62
- <% elsif allowed_to? :read, :moderation, assembly: assembly %>
63
- <%= link_to translated_attribute(assembly.title), moderations_path(assembly) %><br>
64
- <% else %>
65
- <%= translated_attribute(assembly.title) %>
66
- <% end %>
67
- </td>
68
- <td>
69
- <%= l(assembly.created_at, format: :short) %>
70
- </td>
71
- <td class="table-list__state">
72
- <% if assembly.private_space? %>
73
- <strong class="text-alert"><%= t("assemblies.index.private", scope: "decidim.admin") %></strong>
74
- <% else %>
75
- <strong class="text-success"><%= t("assemblies.index.public", scope: "decidim.admin") %></strong>
76
- <% end %>
77
- </td>
78
- <td class="table-list__state">
79
- <% if assembly.published? %>
80
- <strong class="text-success"><%= t("assemblies.index.published", scope: "decidim.admin") %></strong>
81
- <% else %>
82
- <strong class="text-alert"><%= t("assemblies.index.not_published", scope: "decidim.admin") %></strong>
83
- <% end %>
84
- </td>
85
- <td class="table-list__actions">
86
- <% if allowed_to? :export, :assembly, assembly: assembly %>
87
- <%= icon_link_to "data-transfer-download", assembly_export_path(assembly), t("actions.export", scope: "decidim.admin"), method: :post, class: "action-icon--export" %>
88
- <% else %>
89
- <span class="action-space icon"></span>
90
- <% end %>
44
+ <td>
45
+ <% if assembly.promoted? %>
46
+ <%= icon_with_tooltip "star-s-fill", t("models.assembly.fields.promoted", scope: "decidim.admin") %>
47
+ <% end %>
91
48
 
92
- <% if allowed_to? :copy, :assembly, assembly: assembly %>
93
- <%= icon_link_to "clipboard", new_assembly_copy_path(assembly), t("actions.duplicate", scope: "decidim.admin"), class: "action-icon--copy" %>
94
- <% else %>
95
- <span class="action-space icon"></span>
96
- <% end %>
49
+ <% if allowed_to? :update, :assembly, assembly: assembly %>
50
+ <%= link_to translated_attribute(assembly.title), edit_assembly_path(assembly) %>
51
+ <% else %>
52
+ <%= translated_attribute(assembly.title) %>
53
+ <% end %>
54
+ </td>
55
+ <td class="table-list__date">
56
+ <%= l(assembly.created_at, format: :short) %>
57
+ </td>
58
+ <td class="table-list__state">
59
+ <% if assembly.private_space? %>
60
+ <span><%= t("assemblies.index.private", scope: "decidim.admin") %></span>
61
+ <% else %>
62
+ <span><%= t("assemblies.index.public", scope: "decidim.admin") %></span>
63
+ <% end %>
64
+ </td>
65
+ <td class="table-list__state">
66
+ <% if assembly.published? %>
67
+ <span class="label success !text-sm"><%= t("assemblies.index.published", scope: "decidim.admin") %></span>
68
+ <% else %>
69
+ <span class="label alert !text-sm"><%= t("assemblies.index.unpublished", scope: "decidim.admin") %></span>
70
+ <% end %>
71
+ </td>
72
+ <td class="table-list__actions">
73
+ <% if allowed_to? :update, :assembly, assembly: assembly %>
74
+ <%= icon_link_to "pencil-line", edit_assembly_path(assembly), t("actions.configure", scope: "decidim.admin"), class: "action-icon--new" %>
75
+ <% else %>
76
+ <span class="action-space icon"></span>
77
+ <% end %>
78
+ <% if assembly.children.count.positive? || allowed_to?(:create, :assembly) %>
79
+ <%= icon_link_to "government-line",
80
+ url_for(query_params_with(parent_id_eq: assembly.id)),
81
+ t("decidim.admin.titles.assemblies"),
82
+ class: "action-icon--dial #{"highlighted" if assembly.children.count.positive?}" %>
83
+ <% else %>
84
+ <span class="action-space icon"></span>
85
+ <% end %>
86
+ <% if allowed_to? :copy, :assembly, assembly: assembly %>
87
+ <%= icon_link_to "file-copy-line", new_assembly_copy_path(assembly), t("actions.duplicate", scope: "decidim.admin"), class: "action-icon--copy" %>
88
+ <% else %>
89
+ <span class="action-space icon"></span>
90
+ <% end %>
97
91
 
98
- <% if allowed_to? :update, :assembly, assembly: assembly %>
99
- <%= icon_link_to "pencil", edit_assembly_path(assembly), t("actions.configure", scope: "decidim.admin"), class: "action-icon--new" %>
100
- <% else %>
101
- <span class="action-space icon"></span>
102
- <% end %>
92
+ <% if allowed_to? :export, :assembly, assembly: assembly %>
93
+ <%= icon_link_to "download-line", assembly_export_path(assembly), t("actions.export", scope: "decidim.admin"), method: :post, class: "action-icon--export" %>
94
+ <% else %>
95
+ <span class="action-space icon"></span>
96
+ <% end %>
103
97
 
104
- <% if assembly.children.count.positive? || allowed_to?(:create, :assembly) %>
105
- <%= icon_link_to "dial",
106
- url_for(query_params_with(parent_id_eq: assembly.id)),
107
- t("decidim.admin.titles.assemblies"),
108
- class: "action-icon--dial #{'highlighted' if assembly.children.count.positive?}" %>
109
- <% else %>
110
- <span class="action-space icon"></span>
111
- <% end %>
98
+ <% if allowed_to? :preview, :assembly, assembly: assembly %>
99
+ <%= icon_link_to "eye-line", decidim_assemblies.assembly_path(assembly), t("actions.preview", scope: "decidim.admin"), class: "action-icon--preview", target: "_blank", data: { "external-link": false } %>
100
+ <% else %>
101
+ <span class="action-space icon"></span>
102
+ <% end %>
112
103
 
113
- <% if allowed_to? :preview, :assembly, assembly: assembly %>
114
- <%= icon_link_to "eye", decidim_assemblies.assembly_path(assembly), t("actions.preview", scope: "decidim.admin"), class: "action-icon--preview" %>
115
- <% else %>
116
- <span class="action-space icon"></span>
117
- <% end %>
118
- </td>
119
- </tr>
120
- <% end %>
121
- </tbody>
122
- </table>
123
- <%= paginate @assemblies, theme: "decidim" %>
124
- </div>
104
+ <% if allowed_to? :read, :moderation, assembly: assembly %>
105
+ <%= icon_link_to "flag-line", moderations_path(assembly), t("actions.moderate", scope: "decidim.admin"), class: "action-icon--moderate" %>
106
+ <% else %>
107
+ <span class="action-space icon"></span>
108
+ <% end %>
109
+ </td>
110
+ </tr>
111
+ <% end %>
112
+ </tbody>
113
+ </table>
125
114
  </div>
115
+ <%= decidim_paginate @assemblies %>
126
116
  </div>
@@ -1,13 +1,20 @@
1
1
  <% add_decidim_page_title(t("assemblies.new.title", scope: "decidim.admin")) %>
2
2
 
3
- <h2 class="assembly-title-summary">
4
- <%= t "assemblies.new.title", scope: "decidim.admin" %>
5
- </h2>
3
+ <div class="item_show__header">
4
+ <h2 class="item_show__header-title">
5
+ <%= t "assemblies.new.title", scope: "decidim.admin" %>
6
+ </h2>
7
+ </div>
6
8
 
7
- <%= decidim_form_for(@form, html: { class: "form new_assembly assembly_form_admin" }) do |f| %>
8
- <%= render partial: "form", object: f %>
9
-
10
- <div class="button--double form-general-submit">
11
- <%= f.submit t("assemblies.new.create", scope: "decidim.admin") %>
9
+ <div class="item__edit item__edit-1col">
10
+ <div class="item__edit-form">
11
+ <%= decidim_form_for(@form, html: { class: "form-defaults form new_assembly assembly_form_admin" }) do |f| %>
12
+ <%= render partial: "form", object: f %>
13
+ <div class="item__edit-sticky">
14
+ <div class="item__edit-sticky-container">
15
+ <%= f.submit t("assemblies.new.create", scope: "decidim.admin"), class: "button button__sm button__secondary" %>
16
+ </div>
17
+ </div>
18
+ <% end %>
12
19
  </div>
13
- <% end %>
20
+ </div>
@@ -1,11 +1,9 @@
1
- <div class="card">
2
- <div class="card-divider">
3
- <h2 class="card-title"><%= t(".title") %></h2>
4
- </div>
5
-
6
- <div class="card-section">
7
- <div class="row column">
8
- <%= form.translated :text_field, :title, autofocus: true %>
1
+ <div class="form__wrapper">
2
+ <div class="card pt-4">
3
+ <div class="card-section">
4
+ <div class="row column">
5
+ <%= form.translated :text_field, :title, autofocus: true, aria: { label: :title } %>
6
+ </div>
9
7
  </div>
10
8
  </div>
11
9
  </div>
@@ -1,7 +1,13 @@
1
1
  <% add_decidim_page_title(t("decidim.assemblies.admin.assemblies_types.form.title")) %>
2
- <%= decidim_form_for(@form, html: { class: "form edit_assembly_type" }) do |f| %>
3
- <%= render partial: "form", object: f %>
4
- <div class="button--double form-general-submit">
5
- <%= f.submit t("assemblies.edit.update", scope: "decidim.admin"), class: "button" %>
2
+ <div class="item__edit item__edit-1col">
3
+ <div class="item__edit-form">
4
+ <%= decidim_form_for(@form, html: { class: "form-defaults form edit_assembly_type" }) do |f| %>
5
+ <%= render partial: "form", object: f %>
6
+ <div class="item__edit-sticky">
7
+ <div class="item__edit-sticky-container">
8
+ <%= f.submit t("assemblies.edit.update", scope: "decidim.admin"), class: "button button__sm button__secondary" %>
9
+ </div>
10
+ </div>
11
+ <% end %>
6
12
  </div>
7
- <% end %>
13
+ </div>
@@ -1,45 +1,44 @@
1
1
  <% add_decidim_page_title(t("decidim.admin.titles.assemblies_types")) %>
2
2
 
3
3
  <div class="card" id="assembly-types">
4
- <div class="card-divider">
5
- <h2 class="card-title">
4
+ <div class="item_show__header">
5
+ <h2 class="item_show__header-title">
6
6
  <%= t "decidim.admin.titles.assemblies_types" %>
7
7
  <%= link_to t("actions.new_assembly_type", scope: "decidim.admin"),
8
8
  [:new, :assemblies_type],
9
- class: "button tiny button--title" if allowed_to? :create, :assembly_type %>
9
+ class: "button button__sm button__secondary" if allowed_to? :create, :assembly_type %>
10
10
  </h2>
11
11
  </div>
12
- <div class="card-section">
13
- <div class="table-scroll">
14
- <table class="table-list">
15
- <thead>
16
- <tr>
17
- <th><%= t("models.assemblies_types.fields.title", scope: "decidim.admin") %></th>
18
- <th><%= t("models.assemblies_types.fields.created_at", scope: "decidim.admin") %></th>
19
- <th></th>
20
- </tr>
21
- </thead>
22
- <tbody>
23
- <% available_assemblies_types.each do |assembly_type| %>
24
- <tr>
25
- <td>
26
- <% if allowed_to? :update, :assembly_type, assembly_type: assembly_type %>
27
- <%= link_to translated_attribute(assembly_type.title), edit_assemblies_type_path(assembly_type) %>
28
- <% else %>
29
- <%= translated_attribute assembly_type.title %></td>
30
- <% end %>
31
- <td><%= l assembly_type.created_at, format: :short %></td>
32
- <td class="table-list__actions">
33
- <% if allowed_to? :update, :assembly_type, assembly_type: assembly_type %>
34
- <%= icon_link_to "pencil", edit_assemblies_type_path(assembly_type), t("actions.edit", scope: "decidim.admin"), class: "action-icon--new" %>
35
- <% end %>
36
- <% if allowed_to? :destroy, :assembly_type, assembly_type: assembly_type %>
37
- <%= icon_link_to "circle-x", assemblies_type_path(assembly_type), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %>
38
- <% end %>
39
- </td>
40
- <% end %>
41
- </tbody>
42
- </table>
43
- </div>
12
+ <div class="table-scroll">
13
+ <table class="table-list">
14
+ <thead>
15
+ <tr>
16
+ <th><%= t("models.assemblies_types.fields.title", scope: "decidim.admin") %></th>
17
+ <th><%= t("models.assemblies_types.fields.created_at", scope: "decidim.admin") %></th>
18
+ <th></th>
19
+ </tr>
20
+ </thead>
21
+ <tbody>
22
+ <% available_assemblies_types.each do |assembly_type| %>
23
+ <tr>
24
+ <td>
25
+ <% if allowed_to? :update, :assembly_type, assembly_type: assembly_type %>
26
+ <%= link_to translated_attribute(assembly_type.title), edit_assemblies_type_path(assembly_type) %>
27
+ <% else %>
28
+ <%= translated_attribute assembly_type.title %></td>
29
+ <% end %>
30
+ <td><%= l assembly_type.created_at, format: :short %></td>
31
+ <td class="table-list__actions">
32
+ <% if allowed_to? :update, :assembly_type, assembly_type: assembly_type %>
33
+ <%= icon_link_to "pencil-line", edit_assemblies_type_path(assembly_type), t("actions.edit", scope: "decidim.admin"), class: "action-icon--new" %>
34
+ <% end %>
35
+ <% if allowed_to? :destroy, :assembly_type, assembly_type: assembly_type %>
36
+ <%= icon_link_to "delete-bin-line", assemblies_type_path(assembly_type), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %>
37
+ <% end %>
38
+ </td>
39
+ </tr>
40
+ <% end %>
41
+ </tbody>
42
+ </table>
44
43
  </div>
45
44
  </div>
@@ -1,8 +1,18 @@
1
1
  <% add_decidim_page_title(t("assemblies_types.new.title", scope: "decidim.admin")) %>
2
- <%= decidim_form_for(@form, html: { class: "form new_assembly_type" }) do |f| %>
3
- <%= render partial: "form", object: f, locals: { title: t("assemblies_types.new.title", scope: "decidim.admin") } %>
4
-
5
- <div class="button--double form-general-submit">
6
- <%= f.submit t("assemblies_types.new.create", scope: "decidim.admin") %>
2
+ <div class="item_show__header">
3
+ <h2 class="item_show__header-title">
4
+ <%= t("assemblies_types.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_type" }) 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("assemblies_types.new.create", scope: "decidim.admin"), class: "button button__sm button__secondary" %>
14
+ </div>
15
+ </div>
16
+ <% end %>
7
17
  </div>
8
- <% end %>
18
+ </div>
@@ -1,32 +1,24 @@
1
- <%= javascript_pack_tag "decidim_assemblies_admin" %>
2
-
3
- <div class="card" id="assemblies">
4
- <div class="card-divider">
5
- <h2 class="card-title"><%= title %></h2>
6
- </div>
7
-
8
- <div class="card-section">
9
- <div class="row column">
10
- <div class="row">
11
- <div class="column xlarge-8">
12
- <%= form.translated :text_field, :title, autofocus: true %>
13
- </div>
14
- <div class="column xlarge-4 slug">
15
- <%= form.text_field :slug %>
16
- <p class="help-text"><%== t(".slug_help", url: decidim_form_slug_url(:assemblies, form.object.slug)) %></p>
17
- </div>
1
+ <%= append_javascript_pack_tag "decidim_assemblies_admin" %>
2
+ <div class="form__wrapper">
3
+ <div class="card pt-4" id="assemblies">
4
+ <div class="card-section">
5
+ <div class="row column">
6
+ <%= form.translated :text_field, :title, autofocus: true, aria: { label: :title } %>
7
+ </div>
8
+ <div class="row column slug">
9
+ <%= form.text_field :slug, help_text: t(".slug_help_html", url: decidim_form_slug_url(:assemblies, form.object.slug)) %>
18
10
  </div>
19
11
  <div class="card">
20
12
  <div class="card-divider">
21
- <legend><%= select %></legend>
13
+ <legend><%= t("assembly_copies.new.select", scope: "decidim.admin") %></legend>
22
14
  </div>
23
15
  <div class="card-section">
24
16
  <div class="row">
25
- <div class="columns xlarge-3">
17
+ <div class="columns">
26
18
  <%= form.check_box :copy_categories %>
27
19
  </div>
28
20
 
29
- <div class="columns xlarge-6">
21
+ <div class="columns">
30
22
  <%= form.check_box :copy_components %>
31
23
  </div>
32
24
  </div>
@@ -1,7 +1,19 @@
1
- <%= decidim_form_for(@form, url: assembly_copies_path(current_assembly), method: :post, html: { class: "form copy_assembly" }) do |f| %>
2
- <%= render partial: "form", object: f, locals: { title: t("assembly_copies.new.title", scope: "decidim.admin"), select: t("assembly_copies.new.select", scope: "decidim.admin") } %>
1
+ <% add_decidim_page_title(t("assembly_copies.new.title", scope: "decidim.admin")) %>
2
+ <div class="item_show__header">
3
+ <h2 class="item_show__header-title">
4
+ <%= t("assembly_copies.new.title", scope: "decidim.admin") %>
5
+ </h2>
6
+ </div>
3
7
 
4
- <div class="button--double form-general-submit">
5
- <%= f.submit t("assembly_copies.new.copy", scope: "decidim.admin") %>
8
+ <div class="item__edit item__edit-1col">
9
+ <div class="item__edit-form">
10
+ <%= decidim_form_for(@form, url: assembly_copies_path(current_assembly), method: :post, html: { class: "form form-defaults copy_assembly" }) do |f| %>
11
+ <%= render partial: "form", object: f %>
12
+ <div class="item__edit-sticky">
13
+ <div class="item__edit-sticky-container">
14
+ <%= f.submit t("assembly_copies.new.copy", scope: "decidim.admin"), class: "button button__sm button__secondary" %>
15
+ </div>
16
+ </div>
17
+ <% end %>
6
18
  </div>
7
- <% end %>
19
+ </div>
@@ -1,42 +1,33 @@
1
- <%= javascript_pack_tag "decidim_assemblies_admin" %>
1
+ <%= append_javascript_pack_tag "decidim_assemblies_admin" %>
2
2
 
3
- <div class="card" id="assemblies">
4
- <div class="card-divider">
5
- <h2 class="card-title"><%= title %></h2>
6
- </div>
7
- <div class="card-section">
8
- <div class="row column">
9
- <div class="row">
10
- <div class="column xlarge-8">
11
- <%= form.translated :text_field, :title, autofocus: true %>
12
- </div>
13
- <div class="column xlarge-4 slug">
14
- <%= form.text_field :slug %>
15
- <p class="help-text"><%== t(".slug_help", url: decidim_form_slug_url(:assemblies, form.object.slug)) %></p>
16
- </div>
17
- <div class="column xlarge-8">
18
- <fieldset>
19
- <legend><%= t(".document_legend") %> </legend>
20
- <div class="row column">
21
- <%= form.upload :document, required: true %>
22
- </div>
23
- </fieldset>
24
- </div>
3
+ <div class="form__wrapper">
4
+ <div class="card pt-4" id="assemblies">
5
+ <div class="card-section">
6
+ <div class="row column">
7
+ <%= form.translated :text_field, :title, autofocus: true, aria: { label: :title } %>
25
8
  </div>
26
- <div class="card">
27
- <div class="card-divider">
28
- <legend><%= select %></legend>
29
- </div>
30
- <div class="card-section">
31
- <div class="row">
32
- <div class="columns xlarge-3">
33
- <%= form.check_box :import_categories %>
34
- </div>
35
- <div class="columns xlarge-3">
36
- <%= form.check_box :import_attachments %>
37
- </div>
38
- <div class="columns xlarge-6">
39
- <%= form.check_box :import_components %>
9
+ <div class="row column">
10
+ <%= form.text_field :slug, help_text: t(".slug_help_html", url: decidim_form_slug_url(:assemblies, form.object.slug)) %>
11
+ </div>
12
+ <div class="row column">
13
+ <%= form.upload :document, button_class: "button button__sm button__transparent-secondary" %>
14
+ </div>
15
+ <div class="row column">
16
+ <div class="card">
17
+ <div class="card-divider">
18
+ <legend><%= t("assembly_imports.new.select", scope: "decidim.admin") %></legend>
19
+ </div>
20
+ <div class="card-section">
21
+ <div class="row">
22
+ <div class="columns">
23
+ <%= form.check_box :import_categories %>
24
+ </div>
25
+ <div class="columns">
26
+ <%= form.check_box :import_attachments %>
27
+ </div>
28
+ <div class="columns">
29
+ <%= form.check_box :import_components %>
30
+ </div>
40
31
  </div>
41
32
  </div>
42
33
  </div>
@@ -1,7 +1,19 @@
1
- <%= decidim_form_for(@form, url: imports_path, method: :post, html: { class: "form import_assembly" }) do |f| %>
2
- <%= render partial: "form", object: f, locals: { title: t("assembly_imports.new.title", scope: "decidim.admin"), select: t("assembly_imports.new.select", scope: "decidim.admin") } %>
1
+ <% add_decidim_page_title(t("assembly_imports.new.title", scope: "decidim.admin")) %>
2
+ <div class="item_show__header">
3
+ <h2 class="item_show__header-title">
4
+ <%= t("assembly_imports.new.title", scope: "decidim.admin") %>
5
+ </h2>
6
+ </div>
3
7
 
4
- <div class="button--double form-general-submit">
5
- <%= f.submit t("assembly_imports.new.import", scope: "decidim.admin") %>
8
+ <div class="item__edit item__edit-1col">
9
+ <div class="item__edit-form">
10
+ <%= decidim_form_for(@form, url: imports_path, method: :post, html: { class: "form form-defaults import_assembly" }) do |f| %>
11
+ <%= render partial: "form", object: f %>
12
+ <div class="item__edit-sticky">
13
+ <div class="item__edit-sticky-container">
14
+ <%= f.submit t("assembly_imports.new.import", scope: "decidim.admin"), class: "button button__sm button__secondary" %>
15
+ </div>
16
+ </div>
17
+ <% end %>
6
18
  </div>
7
- <% end %>
19
+ </div>