decidim-admin 0.10.1 → 0.11.0.pre1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of decidim-admin might be problematic. Click here for more details.

Files changed (190) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/app/assets/config/decidim_admin_manifest.js +1 -0
  4. data/app/assets/javascripts/decidim/admin/application.js.es6 +13 -5
  5. data/app/assets/javascripts/decidim/admin/auto_buttons_by_position.component.js.es6 +42 -0
  6. data/app/assets/javascripts/decidim/admin/auto_label_by_position.component.js.es6 +33 -0
  7. data/app/assets/javascripts/decidim/admin/dynamic_fields.component.js.es6 +163 -0
  8. data/app/assets/javascripts/decidim/admin/field_dependent_inputs.component.js.es6 +39 -0
  9. data/app/assets/javascripts/decidim/admin/managed_users.js.es6 +12 -0
  10. data/app/assets/javascripts/decidim/admin/sort_list.component.js.es6 +1 -1
  11. data/app/assets/javascripts/decidim/admin/subform_toggler.component.js.es6 +35 -0
  12. data/app/assets/javascripts/decidim/admin/tab_focus.js.es6 +4 -4
  13. data/app/assets/stylesheets/decidim/admin/application.scss.erb +1 -1
  14. data/app/assets/stylesheets/decidim/admin/extra/_dropdown_inverted.scss +7 -5
  15. data/app/assets/stylesheets/decidim/admin/modules/_agenda.scss +34 -0
  16. data/app/assets/stylesheets/decidim/admin/modules/_buttons.scss +5 -0
  17. data/app/assets/stylesheets/decidim/admin/modules/_cards.scss +15 -0
  18. data/app/assets/stylesheets/decidim/admin/modules/_forms.scss +4 -0
  19. data/app/assets/stylesheets/decidim/admin/modules/_modules.scss +1 -0
  20. data/app/assets/stylesheets/decidim/admin/modules/_typography.scss +8 -0
  21. data/app/assets/stylesheets/decidim/admin/utils/_flex.scss +2 -2
  22. data/app/assets/stylesheets/decidim/admin/utils/_helpers.scss +28 -0
  23. data/app/assets/stylesheets/decidim/admin/utils/_mixins.scss +44 -0
  24. data/app/commands/decidim/admin/create_area.rb +3 -1
  25. data/app/commands/decidim/admin/{create_feature.rb → create_component.rb} +11 -11
  26. data/app/commands/decidim/admin/create_oauth_application.rb +36 -0
  27. data/app/commands/decidim/admin/create_participatory_space_private_user.rb +85 -0
  28. data/app/commands/decidim/admin/destroy_area.rb +42 -0
  29. data/app/commands/decidim/admin/{destroy_feature.rb → destroy_component.rb} +11 -11
  30. data/app/commands/decidim/admin/destroy_oauth_application.rb +39 -0
  31. data/app/commands/decidim/admin/{impersonate_managed_user.rb → impersonate_user.rb} +19 -13
  32. data/app/commands/decidim/admin/publish_component.rb +51 -0
  33. data/app/commands/decidim/admin/{unpublish_feature.rb → unpublish_component.rb} +12 -12
  34. data/app/commands/decidim/admin/update_area.rb +5 -1
  35. data/app/commands/decidim/admin/update_component.rb +62 -0
  36. data/app/commands/decidim/admin/{update_feature_permissions.rb → update_component_permissions.rb} +10 -10
  37. data/app/commands/decidim/admin/update_oauth_application.rb +39 -0
  38. data/app/controllers/decidim/admin/application_controller.rb +1 -1
  39. data/app/controllers/decidim/admin/areas_controller.rb +6 -4
  40. data/app/controllers/decidim/admin/{feature_permissions_controller.rb → component_permissions_controller.rb} +12 -12
  41. data/app/controllers/decidim/admin/{features → components}/base_controller.rb +9 -9
  42. data/app/controllers/decidim/admin/components_controller.rb +142 -0
  43. data/app/controllers/decidim/admin/concerns/has_private_users.rb +102 -0
  44. data/app/controllers/decidim/admin/dashboard_controller.rb +1 -1
  45. data/app/controllers/decidim/admin/exports_controller.rb +6 -6
  46. data/app/controllers/decidim/admin/impersonatable_users_controller.rb +29 -0
  47. data/app/controllers/decidim/admin/impersonations_controller.rb +122 -0
  48. data/app/controllers/decidim/admin/logs_controller.rb +1 -1
  49. data/app/controllers/decidim/admin/managed_users/impersonation_logs_controller.rb +25 -0
  50. data/app/controllers/decidim/admin/managed_users/promotions_controller.rb +3 -5
  51. data/app/controllers/decidim/admin/newsletters_controller.rb +1 -1
  52. data/app/controllers/decidim/admin/oauth_applications_controller.rb +90 -0
  53. data/app/controllers/decidim/admin/officializations_controller.rb +4 -3
  54. data/app/events/decidim/component_published_event.rb +6 -0
  55. data/app/forms/decidim/admin/{feature_form.rb → component_form.rb} +3 -3
  56. data/app/forms/decidim/admin/impersonate_user_form.rb +26 -0
  57. data/app/forms/decidim/admin/oauth_application_form.rb +32 -0
  58. data/app/forms/decidim/admin/organization_appearance_form.rb +6 -1
  59. data/app/forms/decidim/admin/organization_form.rb +1 -1
  60. data/app/forms/decidim/admin/participatory_space_private_user_form.rb +18 -0
  61. data/app/forms/decidim/admin/permissions_form.rb +1 -1
  62. data/app/helpers/decidim/admin/attributes_display_helper.rb +10 -3
  63. data/app/helpers/decidim/admin/bulk_actions_helper.rb +36 -0
  64. data/app/helpers/decidim/admin/exports_helper.rb +10 -10
  65. data/app/helpers/decidim/admin/settings_helper.rb +1 -1
  66. data/app/models/decidim/admin/abilities/admin_ability.rb +12 -9
  67. data/app/models/decidim/admin/abilities/participatory_process_admin_ability.rb +2 -2
  68. data/app/models/decidim/admin/abilities/user_manager_ability.rb +7 -6
  69. data/app/queries/decidim/admin/user_filter.rb +59 -0
  70. data/app/views/decidim/admin/area_types/edit.html.erb +1 -1
  71. data/app/views/decidim/admin/area_types/index.html.erb +2 -2
  72. data/app/views/decidim/admin/area_types/new.html.erb +1 -1
  73. data/app/views/decidim/admin/areas/edit.html.erb +1 -1
  74. data/app/views/decidim/admin/areas/index.html.erb +2 -2
  75. data/app/views/decidim/admin/areas/new.html.erb +1 -1
  76. data/app/views/decidim/admin/attachment_collections/edit.html.erb +1 -1
  77. data/app/views/decidim/admin/attachment_collections/index.html.erb +2 -2
  78. data/app/views/decidim/admin/attachment_collections/new.html.erb +1 -1
  79. data/app/views/decidim/admin/attachment_collections/show.html.erb +2 -3
  80. data/app/views/decidim/admin/attachments/edit.html.erb +1 -1
  81. data/app/views/decidim/admin/attachments/index.html.erb +1 -1
  82. data/app/views/decidim/admin/attachments/new.html.erb +1 -1
  83. data/app/views/decidim/admin/attachments/show.html.erb +2 -3
  84. data/app/views/decidim/admin/bulk_actions/_recategorize.html.erb +1 -1
  85. data/app/views/decidim/admin/categories/edit.html.erb +1 -1
  86. data/app/views/decidim/admin/categories/index.html.erb +2 -2
  87. data/app/views/decidim/admin/categories/new.html.erb +1 -1
  88. data/app/views/decidim/admin/categories/show.html.erb +2 -3
  89. data/app/views/decidim/admin/{feature_permissions → component_permissions}/edit.html.erb +3 -3
  90. data/app/views/decidim/admin/components/_component.html.erb +37 -0
  91. data/app/views/decidim/admin/{features → components}/_form.html.erb +6 -6
  92. data/app/views/decidim/admin/{features → components}/_settings_fields.html.erb +2 -2
  93. data/app/views/decidim/admin/components/edit.html.erb +7 -0
  94. data/app/views/decidim/admin/{features → components}/index.html.erb +6 -6
  95. data/app/views/decidim/admin/components/new.html.erb +8 -0
  96. data/app/views/decidim/admin/devise/mailers/reset_password_instructions.html.erb +1 -1
  97. data/app/views/decidim/admin/exports/_dropdown.html.erb +3 -3
  98. data/app/views/decidim/admin/impersonatable_users/index.html.erb +84 -0
  99. data/app/views/decidim/admin/impersonations/_form.html.erb +40 -0
  100. data/app/views/decidim/admin/impersonations/_handler_form.html.erb +5 -0
  101. data/app/views/decidim/admin/impersonations/new.html.erb +23 -0
  102. data/app/views/decidim/admin/managed_users/{impersonations → impersonation_logs}/index.html.erb +2 -0
  103. data/app/views/decidim/admin/managed_users/promotions/new.html.erb +4 -4
  104. data/app/views/decidim/admin/moderations/index.html.erb +2 -2
  105. data/app/views/decidim/admin/newsletters/_form.html.erb +1 -1
  106. data/app/views/decidim/admin/newsletters/edit.html.erb +1 -1
  107. data/app/views/decidim/admin/newsletters/index.html.erb +1 -1
  108. data/app/views/decidim/admin/newsletters/new.html.erb +1 -1
  109. data/app/views/decidim/admin/newsletters/show.html.erb +1 -1
  110. data/app/views/decidim/admin/oauth_applications/_form.html.erb +19 -0
  111. data/app/views/decidim/admin/oauth_applications/edit.html.erb +13 -0
  112. data/app/views/decidim/admin/oauth_applications/index.html.erb +38 -0
  113. data/app/views/decidim/admin/oauth_applications/new.html.erb +13 -0
  114. data/app/views/decidim/admin/oauth_applications/show.html.erb +27 -0
  115. data/app/views/decidim/admin/officializations/index.html.erb +2 -2
  116. data/app/views/decidim/admin/officializations/new.html.erb +2 -2
  117. data/app/views/decidim/admin/organization/_form.html.erb +1 -1
  118. data/app/views/decidim/admin/organization/edit.html.erb +1 -2
  119. data/app/views/decidim/admin/organization_appearance/edit.html.erb +1 -2
  120. data/app/views/decidim/admin/participatory_space_private_users/_form.html.erb +18 -0
  121. data/app/views/decidim/admin/participatory_space_private_users/index.html.erb +59 -0
  122. data/app/views/decidim/admin/participatory_space_private_users/new.html.erb +7 -0
  123. data/app/views/decidim/admin/scope_types/edit.html.erb +1 -1
  124. data/app/views/decidim/admin/scope_types/index.html.erb +2 -2
  125. data/app/views/decidim/admin/scope_types/new.html.erb +1 -1
  126. data/app/views/decidim/admin/scopes/edit.html.erb +1 -1
  127. data/app/views/decidim/admin/scopes/index.html.erb +3 -3
  128. data/app/views/decidim/admin/scopes/new.html.erb +1 -1
  129. data/app/views/decidim/admin/static_pages/edit.html.erb +1 -1
  130. data/app/views/decidim/admin/static_pages/index.html.erb +3 -3
  131. data/app/views/decidim/admin/static_pages/new.html.erb +1 -1
  132. data/app/views/decidim/admin/static_pages/show.html.erb +2 -3
  133. data/app/views/decidim/admin/user_groups/index.html.erb +3 -3
  134. data/app/views/decidim/admin/users/_form.html.erb +3 -3
  135. data/app/views/decidim/admin/users/index.html.erb +2 -2
  136. data/app/views/decidim/admin/users/new.html.erb +1 -1
  137. data/app/views/layouts/decidim/admin/_application.html.erb +9 -9
  138. data/app/views/layouts/decidim/admin/_header.html.erb +3 -4
  139. data/app/views/layouts/decidim/admin/_template_top.html.erb +1 -1
  140. data/app/views/layouts/decidim/admin/_title_bar.html.erb +1 -1
  141. data/app/views/layouts/decidim/admin/login.html.erb +1 -1
  142. data/app/views/layouts/decidim/admin/pages.html.erb +1 -1
  143. data/app/views/layouts/decidim/admin/users.html.erb +5 -3
  144. data/config/locales/ca.yml +119 -50
  145. data/config/locales/en.yml +119 -50
  146. data/config/locales/es.yml +120 -51
  147. data/config/locales/eu.yml +122 -53
  148. data/config/locales/fi.yml +121 -52
  149. data/config/locales/fr.yml +159 -90
  150. data/config/locales/gl.yml +119 -50
  151. data/config/locales/it.yml +120 -51
  152. data/config/locales/nl.yml +207 -138
  153. data/config/locales/pl.yml +119 -50
  154. data/config/locales/pt-BR.yml +120 -51
  155. data/config/locales/pt.yml +120 -51
  156. data/config/locales/ru.yml +7 -51
  157. data/config/locales/sv.yml +120 -51
  158. data/config/locales/uk.yml +7 -52
  159. data/config/routes.rb +6 -2
  160. data/db/migrate/20180413233318_add_reason_to_decidim_impersonation_logs.rb +7 -0
  161. data/lib/decidim/admin/components.rb +11 -0
  162. data/lib/decidim/admin/engine.rb +12 -3
  163. data/lib/decidim/admin/test/forms/attachment_collection_form_examples.rb +9 -9
  164. data/lib/decidim/admin/test/forms/attachment_form_examples.rb +1 -1
  165. data/lib/decidim/admin/test/forms/category_form_examples.rb +11 -11
  166. data/lib/decidim/admin/test/{manage_feature_permissions_examples.rb → manage_component_permissions_examples.rb} +9 -9
  167. data/lib/decidim/admin/test/manage_moderations_examples.rb +2 -2
  168. data/lib/decidim/admin/test.rb +1 -1
  169. data/lib/decidim/admin/version.rb +1 -1
  170. data/lib/decidim/admin.rb +1 -1
  171. metadata +66 -43
  172. data/app/commands/decidim/admin/create_managed_user.rb +0 -69
  173. data/app/commands/decidim/admin/publish_feature.rb +0 -51
  174. data/app/commands/decidim/admin/update_feature.rb +0 -62
  175. data/app/controllers/decidim/admin/features_controller.rb +0 -142
  176. data/app/controllers/decidim/admin/managed_users/impersonations_controller.rb +0 -78
  177. data/app/controllers/decidim/admin/managed_users_controller.rb +0 -83
  178. data/app/events/decidim/feature_published_event.rb +0 -6
  179. data/app/forms/decidim/admin/impersonate_managed_user_form.rb +0 -20
  180. data/app/forms/decidim/admin/managed_user_form.rb +0 -24
  181. data/app/queries/decidim/admin/users_officialization.rb +0 -56
  182. data/app/views/decidim/admin/features/_feature.html.erb +0 -37
  183. data/app/views/decidim/admin/features/edit.html.erb +0 -7
  184. data/app/views/decidim/admin/features/new.html.erb +0 -8
  185. data/app/views/decidim/admin/managed_users/_form.html.erb +0 -12
  186. data/app/views/decidim/admin/managed_users/impersonations/_form.html.erb +0 -10
  187. data/app/views/decidim/admin/managed_users/impersonations/new.html.erb +0 -15
  188. data/app/views/decidim/admin/managed_users/index.html.erb +0 -44
  189. data/app/views/decidim/admin/managed_users/new.html.erb +0 -47
  190. data/lib/decidim/admin/features.rb +0 -11
@@ -0,0 +1,13 @@
1
+ <%= decidim_form_for(@form, html: { class: "form new_oauth_application" }) do |f| %>
2
+ <div class="card">
3
+ <div class="card-divider">
4
+ <h2 class="card-title"><%= t ".title" %></h2>
5
+ </div>
6
+ <div class="card-section">
7
+ <%= render partial: "form", object: f %>
8
+ </div>
9
+ </div>
10
+ <div class="button--double form-general-submit">
11
+ <%= f.submit t(".save") %>
12
+ </div>
13
+ <% end %>
@@ -0,0 +1,27 @@
1
+ <div class="card">
2
+ <div class="card-divider">
3
+ <h2 class="card-title"><%= @oauth_application.name %></h2>
4
+ </div>
5
+ <div class="card-section">
6
+ <dl>
7
+ <%= display_for @oauth_application,
8
+ { uid: :client_id },
9
+ { secret: :client_secret },
10
+ :organization_name,
11
+ :organization_url,
12
+ :redirect_uri %>
13
+
14
+ <dt><%= display_label(@oauth_application, :authorize_url) %></dt>
15
+ <dd><%= decidim.oauth_authorization_url(host: @oauth_application.owner.host) %></dd>
16
+
17
+ <dt><%= display_label(@oauth_application, :site) %></dt>
18
+ <dd><%= decidim.root_url(host: @oauth_application.owner.host) %></dd>
19
+
20
+ <dt><%= display_label(@oauth_application, :authorized_tokens) %></dt>
21
+ <dd><%= @oauth_application.authorized_tokens.count %></dd>
22
+
23
+ <dt><%= display_label(@oauth_application, :authorization_url) %></dt>
24
+ <dd><%= decidim.oauth_authorization_url(host: @oauth_application.owner.host, client_id: @oauth_application.uid, redirect_uri: @oauth_application.redirect_uri, response_type: "code") %></dd>
25
+ </dl>
26
+ </div>
27
+ </div>
@@ -22,11 +22,11 @@
22
22
  <%= form_tag "", method: :get do %>
23
23
  <div class="filters__search">
24
24
  <div class="input-group">
25
- <%= search_field_tag :q, @query,label: false, class: "input-group-field", placeholder: t('.search') %>
25
+ <%= search_field_tag :q, @query,label: false, class: "input-group-field", placeholder: t(".search") %>
26
26
  <%= hidden_field_tag :state, @state %>
27
27
  <div class="input-group-button">
28
28
  <button type="submit" class="button button--muted">
29
- <%= icon "magnifying-glass", aria_label: t('.search') %>
29
+ <%= icon "magnifying-glass", aria_label: t(".search") %>
30
30
  </button>
31
31
  </div>
32
32
  </div>
@@ -1,5 +1,5 @@
1
1
  <h2 class="process-title-summary">
2
- <%= t('.title', name: user.name) %>
2
+ <%= t(".title", name: user.name) %>
3
3
  </h2>
4
4
 
5
5
  <%= decidim_form_for(@form, html: { class: "form new_officialization" }, url: officializations_path, method: :post) do |f| %>
@@ -7,7 +7,7 @@
7
7
  <div class="card-section">
8
8
  <div class="row column">
9
9
  <%= f.hidden_field :user_id %>
10
- <%= f.translated :text_field, :officialized_as, label: t('.badge') %>
10
+ <%= f.translated :text_field, :officialized_as, label: t(".badge") %>
11
11
  </div>
12
12
  </div>
13
13
  </div>
@@ -6,7 +6,7 @@
6
6
  <div class="columns xlarge-6">
7
7
  <div class="label--tabs">
8
8
  <label for="organization_social_handlers">
9
- <%= t('.social_handlers') %>
9
+ <%= t(".social_handlers") %>
10
10
  </label>
11
11
  <ul class="tabs tabs--lang" data-tabs id="organization_social_handlers">
12
12
  <% Decidim::Organization::SOCIAL_HANDLERS.each do |handler| %>
@@ -4,11 +4,10 @@
4
4
  <h2 class="card-title"><%= t ".title" %></h2>
5
5
  </div>
6
6
  <div class="card-section">
7
- <%= render partial: 'form', object: f %>
7
+ <%= render partial: "form", object: f %>
8
8
  </div>
9
9
  </div>
10
10
  <div class="button--double form-general-submit">
11
11
  <%= f.submit t(".update") %>
12
12
  </div>
13
13
  <% end %>
14
-
@@ -1,7 +1,6 @@
1
1
  <%= decidim_form_for(@form, html: { class: "form edit_organization_appearance" }, url: organization_appearance_path, method: :put) do |f| %>
2
- <%= render partial: 'form', object: f %>
2
+ <%= render partial: "form", object: f %>
3
3
  <div class="button--double form-general-submit">
4
4
  <%= f.submit t(".update") %>
5
5
  </div>
6
6
  <% end %>
7
-
@@ -0,0 +1,18 @@
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>
17
+ </div>
18
+ </div>
@@ -0,0 +1,59 @@
1
+ <div class='card' id="private_users">
2
+ <div class="card-divider">
3
+ <h2 class="card-title">
4
+ <%= t(".title") %>
5
+ <% if can? :create, authorization_object %>
6
+ <%= link_to t("actions.new", scope: "decidim.admin", name: t("models.participatory_space_private_user.name", scope: "decidim.admin")), url_for(action: :new), class: "button tiny button--title new" %>
7
+ <% end %>
8
+ </h2>
9
+ </div>
10
+
11
+ <div class="card-section">
12
+ <% if privatable_to.participatory_space_private_users.any? %>
13
+ <div class="table-scroll">
14
+ <table class="stack">
15
+ <thead>
16
+ <tr>
17
+ <th><%= t("models.assembly_user_role.fields.name", scope: "decidim.admin") %></th>
18
+ <th><%= t("models.assembly_user_role.fields.email", scope: "decidim.admin") %></th>
19
+ <th><%= t("models.user.fields.invitation_sent_at", scope: "decidim.admin") %></th>
20
+ <th><%= t("models.user.fields.invitation_accepted_at", scope: "decidim.admin") %></th>
21
+ <th class="actions"></th>
22
+ </tr>
23
+ </thead>
24
+ <tbody>
25
+ <% privatable_to.participatory_space_private_users.each do |private_user| %>
26
+ <tr>
27
+ <td>
28
+ <%= private_user.user.name %><br />
29
+ </td>
30
+ <td>
31
+ <%= private_user.user.email %><br />
32
+ </td>
33
+ <td>
34
+ <% if private_user.user.invitation_sent_at %>
35
+ <%= l private_user.user.invitation_sent_at, format: :short %>
36
+ <% end %>
37
+ </td>
38
+ <td>
39
+ <% if private_user.user.invitation_accepted_at %>
40
+ <%= l private_user.user.invitation_accepted_at, format: :short %>
41
+ <% end %>
42
+ </td>
43
+ <td class="table-list__actions">
44
+ <% if can?(:invite, private_user) && private_user.user.invited_to_sign_up? %>
45
+ <%= icon_link_to "reload", resend_invitation_participatory_space_private_user_path(current_participatory_space, private_user), t("actions.resend_invitation", scope: "decidim.admin"), class: "resend-invitation", method: :post %>
46
+ <% end %>
47
+
48
+ <% if can? :destroy, private_user %>
49
+ <%= icon_link_to "circle-x", participatory_space_private_user_path(current_participatory_space, private_user), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %>
50
+ <% end %>
51
+ </td>
52
+ </tr>
53
+ <% end %>
54
+ </tbody>
55
+ </table>
56
+ </div>
57
+ <% end %>
58
+ </div>
59
+ </div>
@@ -0,0 +1,7 @@
1
+ <%= decidim_form_for(@form, url: participatory_space_private_users_path(current_participatory_space), html: { class: "form new_participatory_space_private_user" }) do |f| %>
2
+ <%= render partial: "decidim/admin/participatory_space_private_users/form", object: f, locals: { title: t(".title") } %>
3
+
4
+ <div class="button--double form-general-submit">
5
+ <%= f.submit t(".create") %>
6
+ </div>
7
+ <% end %>
@@ -4,7 +4,7 @@
4
4
  <h2 class="card-title"><%= t ".title" %></h2>
5
5
  </div>
6
6
  <div class="card-section">
7
- <%= render partial: 'form', object: f %>
7
+ <%= render partial: "form", object: f %>
8
8
  </div>
9
9
  </div>
10
10
  <div class="button--double form-general-submit">
@@ -1,6 +1,6 @@
1
1
  <div class="card">
2
2
  <div class="card-divider">
3
- <h2 class="card-title"><%= t "decidim.admin.titles.scope_types" %> <%= link_to t("actions.add", scope: "decidim.admin"), ['new', 'scope_type'], class: 'button tiny button--title' %></h2>
3
+ <h2 class="card-title"><%= t "decidim.admin.titles.scope_types" %> <%= link_to t("actions.add", scope: "decidim.admin"), ["new", "scope_type"], class: "button tiny button--title" %></h2>
4
4
  </div>
5
5
  <div class="card-section">
6
6
  <div class="table-scroll">
@@ -24,7 +24,7 @@
24
24
  <td class="table-list__actions">
25
25
 
26
26
  <% if can? :update, scope_type %>
27
- <%= icon_link_to "pencil", ['edit', scope_type], t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit", method: :get, data: {} %>
27
+ <%= icon_link_to "pencil", ["edit", scope_type], t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit", method: :get, data: {} %>
28
28
  <% end %>
29
29
 
30
30
  <% if can? :destroy, scope_type %>
@@ -4,7 +4,7 @@
4
4
  <h2 class="card-title"><%= t ".title" %></h2>
5
5
  </div>
6
6
  <div class="card-section">
7
- <%= render partial: 'form', object: f %>
7
+ <%= render partial: "form", object: f %>
8
8
  </div>
9
9
  </div>
10
10
  <div class="button--double form-general-submit">
@@ -4,7 +4,7 @@
4
4
  <h2 class="card-title"><%= t ".title" %></h2>
5
5
  </div>
6
6
  <div class="card-section">
7
- <%= render partial: 'form', object: f %>
7
+ <%= render partial: "form", object: f %>
8
8
  </div>
9
9
  </div>
10
10
  <div class="button--double form-general-submit">
@@ -2,9 +2,9 @@
2
2
  <div class="card-divider">
3
3
  <h2 class="card-title">
4
4
  <% if parent_scope %>
5
- <%= scope_breadcrumbs(parent_scope).join(" - ").html_safe %> <%= link_to t("actions.add", scope: "decidim.admin"), new_scope_scope_path(parent_scope), class: 'button tiny button--title' %><%= link_to t("actions.edit", scope: "decidim.admin"), edit_scope_path(parent_scope), class: 'button tiny button--title' %>
5
+ <%= scope_breadcrumbs(parent_scope).join(" - ").html_safe %> <%= link_to t("actions.add", scope: "decidim.admin"), new_scope_scope_path(parent_scope), class: "button tiny button--title" %><%= link_to t("actions.edit", scope: "decidim.admin"), edit_scope_path(parent_scope), class: "button tiny button--title" %>
6
6
  <% else %>
7
- <%= t "decidim.admin.titles.scopes" %> <%= link_to t("actions.add", scope: "decidim.admin"), new_scope_path, class: 'button tiny button--title' %>
7
+ <%= t "decidim.admin.titles.scopes" %> <%= link_to t("actions.add", scope: "decidim.admin"), new_scope_path, class: "button tiny button--title" %>
8
8
  <% end %>
9
9
  </h2>
10
10
  </div>
@@ -32,7 +32,7 @@
32
32
  <%= icon_link_to "zoom-in", scope_scopes_path(scope), t("actions.browse", scope: "decidim.admin"), class: "action-icon--browse", method: :get, data: {} %>
33
33
 
34
34
  <% if can? :update, scope %>
35
- <%= icon_link_to "pencil", ['edit', scope], t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit", method: :get, data: {} %>
35
+ <%= icon_link_to "pencil", ["edit", scope], t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit", method: :get, data: {} %>
36
36
  <% end %>
37
37
 
38
38
  <% if can? :destroy, scope %>
@@ -4,7 +4,7 @@
4
4
  <h2 class="card-title"><%= t ".title" %></h2>
5
5
  </div>
6
6
  <div class="card-section">
7
- <%= render partial: 'form', object: f %>
7
+ <%= render partial: "form", object: f %>
8
8
  </div>
9
9
  </div>
10
10
  <div class="button--double form-general-submit">
@@ -4,7 +4,7 @@
4
4
  <h2 class="card-title"><%= t ".title" %></h2>
5
5
  </div>
6
6
  <div class="card-section">
7
- <%= render partial: 'form', object: f %>
7
+ <%= render partial: "form", object: f %>
8
8
  </div>
9
9
  </div>
10
10
  <div class="button--double form-general-submit">
@@ -1,6 +1,6 @@
1
1
  <div class="card">
2
2
  <div class="card-divider">
3
- <h2 class="card-title"><%= t "decidim.admin.titles.static_pages" %> <%= link_to t("static_pages.new.create", scope: "decidim.admin"), ['new', 'static_page'], class: 'button tiny button--title new' %></h2>
3
+ <h2 class="card-title"><%= t "decidim.admin.titles.static_pages" %> <%= link_to t("static_pages.new.create", scope: "decidim.admin"), ["new", "static_page"], class: "button tiny button--title new" %></h2>
4
4
  </div>
5
5
  <div class="card-section">
6
6
  <div class="table-scroll">
@@ -16,14 +16,14 @@
16
16
  <% @pages.each do |page| %>
17
17
  <tr>
18
18
  <td>
19
- <%= link_to translated_attribute(page.title), ['edit', page] %><br />
19
+ <%= link_to translated_attribute(page.title), ["edit", page] %><br />
20
20
  </td>
21
21
  <td>
22
22
  <%= l page.created_at, format: :short %>
23
23
  </td>
24
24
  <td class="table-list__actions">
25
25
  <% if can? :update, page %>
26
- <%= icon_link_to "pencil", ['edit', page], t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit" %>
26
+ <%= icon_link_to "pencil", ["edit", page], t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit" %>
27
27
  <% end %>
28
28
 
29
29
  <%= icon_link_to "eye", decidim.page_path(page), t("actions.view", scope: "decidim.admin.static_pages"), class: "action-icon--preview" %>
@@ -4,7 +4,7 @@
4
4
  <h2 class="card-title"><%= t ".title" %></h2>
5
5
  </div>
6
6
  <div class="card-section">
7
- <%= render partial: 'form', object: f %>
7
+ <%= render partial: "form", object: f %>
8
8
  </div>
9
9
  </div>
10
10
  <div class="button--double form-general-submit">
@@ -5,7 +5,7 @@
5
5
  <div class="actions">
6
6
  <hr />
7
7
  <% if can? :update, @page %>
8
- <%= link_to t("decidim.admin.actions.edit"), ['edit', @page] %>
8
+ <%= link_to t("decidim.admin.actions.edit"), ["edit", @page] %>
9
9
  <% end %>
10
10
 
11
11
  <% if can? :destroy, @page %>
@@ -17,6 +17,5 @@
17
17
  <%= display_for @page,
18
18
  :title,
19
19
  :slug,
20
- :content
21
- %>
20
+ :content %>
22
21
  </dl>
@@ -23,11 +23,11 @@
23
23
  <%= form_tag "", method: :get do %>
24
24
  <div class="filters__search">
25
25
  <div class="input-group">
26
- <%= search_field_tag :q, @query,label: false, class: "input-group-field", placeholder: t('.search') %>
26
+ <%= search_field_tag :q, @query,label: false, class: "input-group-field", placeholder: t(".search") %>
27
27
  <%= hidden_field_tag :state, @state %>
28
28
  <div class="input-group-button">
29
29
  <button type="submit" class="button button--muted">
30
- <%= icon "magnifying-glass", aria_label: t('.search') %>
30
+ <%= icon "magnifying-glass", aria_label: t(".search") %>
31
31
  </button>
32
32
  </div>
33
33
  </div>
@@ -69,7 +69,7 @@
69
69
  <% if user_group.rejected? %>
70
70
  <%= t(".state.rejected") %>
71
71
  <% end %>
72
- <% if user_group.pending?%>
72
+ <% if user_group.pending? %>
73
73
  <%= t(".state.pending") %>
74
74
  <% end %>
75
75
  </td>
@@ -1,11 +1,11 @@
1
1
  <div class="row column">
2
- <%= form.text_field :name, label: t('.name') %>
2
+ <%= form.text_field :name, label: t(".name") %>
3
3
  </div>
4
4
 
5
5
  <div class="row column">
6
- <%= form.email_field :email, label: t('.email') %>
6
+ <%= form.email_field :email, label: t(".email") %>
7
7
  </div>
8
8
 
9
9
  <div class="row column">
10
- <%= form.select :role, @form.available_roles_for_select, label: t('.role') %>
10
+ <%= form.select :role, @form.available_roles_for_select, label: t(".role") %>
11
11
  </div>
@@ -2,7 +2,7 @@
2
2
  <div class="card-divider">
3
3
  <h2 class="card-title">
4
4
  <%= t "decidim.admin.titles.users" %>
5
- <%= link_to t("actions.new", scope: "decidim.admin", name: t("models.user.name", scope: "decidim.admin")), ['new', 'user'], class: 'button tiny button--title' %>
5
+ <%= link_to t("actions.new", scope: "decidim.admin", name: t("models.user.name", scope: "decidim.admin")), ["new", "user"], class: "button tiny button--title" %>
6
6
  </h2>
7
7
  </div>
8
8
  <div class="card-section">
@@ -44,7 +44,7 @@
44
44
  <td><%= l user.created_at, format: :short %></td>
45
45
  <td class="table-list__actions">
46
46
  <% if can?(:invite, user) && user.invited_to_sign_up? %>
47
- <%= icon_link_to "reload", ['resend_invitation', user], t("actions.resend_invitation", scope: "decidim.admin"), class: "resend-invitation", method: :post %>
47
+ <%= icon_link_to "reload", ["resend_invitation", user], t("actions.resend_invitation", scope: "decidim.admin"), class: "resend-invitation", method: :post %>
48
48
  <% end %>
49
49
 
50
50
  <% if can? :destroy, user %>
@@ -4,7 +4,7 @@
4
4
  <h2 class="card-title"><%= t ".title" %></h2>
5
5
  </div>
6
6
  <div class="card-section">
7
- <%= render partial: 'form', object: f %>
7
+ <%= render partial: "form", object: f %>
8
8
  </div>
9
9
  </div>
10
10
 
@@ -1,28 +1,28 @@
1
1
  <!doctype html>
2
2
  <html lang="<%= I18n.locale %>">
3
3
  <head>
4
- <meta charset="utf-8">
5
- <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
6
- <meta name="author" content="">
7
- <meta name="copyright" content="">
4
+ <meta charset="utf-8" />
5
+ <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible" />
6
+ <meta name="author" content="" />
7
+ <meta name="copyright" content="" />
8
8
  <meta name="description" content="" />
9
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
9
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
10
10
  <title><%= title %></title>
11
- <%= render partial: 'layouts/decidim/admin/header' %>
11
+ <%= render partial: "layouts/decidim/admin/header" %>
12
12
  <%= foundation_datepicker_locale_tag %>
13
13
  </head>
14
14
  <body>
15
- <%= render partial: 'layouts/decidim/admin/template_top' %>
15
+ <%= render partial: "layouts/decidim/admin/template_top" %>
16
16
  <div class="layout-nav">
17
17
  <%= main_menu.render %>
18
18
  <%= yield :secondary_nav if content_for? :secondary_nav %>
19
19
  </div>
20
20
  <div class="layout-content">
21
- <%= render partial: 'layouts/decidim/admin/callouts_full' %>
21
+ <%= render partial: "layouts/decidim/admin/callouts_full" %>
22
22
  <div class="container">
23
23
  <%= yield %>
24
24
  </div>
25
25
  </div>
26
- <%= render partial: 'layouts/decidim/admin/template_bottom' %>
26
+ <%= render partial: "layouts/decidim/admin/template_bottom" %>
27
27
  </body>
28
28
  </html>
@@ -1,5 +1,4 @@
1
- <meta name="viewport" content="width=device-width, initial-scale=1">
1
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
2
2
  <%= csrf_meta_tags %>
3
- <%= stylesheet_link_tag 'decidim/admin/application', media: 'all' %>
4
- <%= javascript_include_tag 'decidim/admin/application' %>
5
-
3
+ <%= stylesheet_link_tag "decidim/admin/application", media: "all" %>
4
+ <%= javascript_include_tag "decidim/admin/application" %>
@@ -1,3 +1,3 @@
1
- <%= render partial: 'layouts/decidim/admin/title_bar' %>
1
+ <%= render partial: "layouts/decidim/admin/title_bar" %>
2
2
  <main class="main">
3
3
  <div class="layout-wrapper">
@@ -15,7 +15,7 @@
15
15
  <%= link_to t("name", scope: "locale"), "#" %>
16
16
  <ul class="menu is-dropdown-submenu">
17
17
  <% (available_locales - [I18n.locale.to_s]).each do |locale| %>
18
- <li><%= link_to locale_name(locale), decidim.locale_path(locale: locale), method: :post%></li>
18
+ <li><%= link_to locale_name(locale), decidim.locale_path(locale: locale), method: :post %></li>
19
19
  <% end %>
20
20
  </ul>
21
21
  </li>
@@ -2,7 +2,7 @@
2
2
  <html>
3
3
  <head>
4
4
  <title>Decidim - Login</title>
5
- <%= render partial: 'layouts/decidim/admin/header' %>
5
+ <%= render partial: "layouts/decidim/admin/header" %>
6
6
  </head>
7
7
 
8
8
  <body class="login">
@@ -4,7 +4,7 @@
4
4
  <%= t "decidim.admin.titles.static_pages" %>
5
5
  </div>
6
6
  <div class="secondary-nav__actions">
7
- <%= link_to t("static_pages.new.create", scope: "decidim.admin"), ['new', 'static_page'], class: 'button expanded small new' %>
7
+ <%= link_to t("static_pages.new.create", scope: "decidim.admin"), ["new", "static_page"], class: "button expanded small new" %>
8
8
  </div>
9
9
  </div>
10
10
  <% end %>
@@ -19,9 +19,11 @@
19
19
  <%= link_to t("menu.officializations", scope: "decidim.admin"), decidim_admin.officializations_path %>
20
20
  </li>
21
21
  <% end %>
22
- <li <% if is_active_link?(decidim_admin.managed_users_path) %> class="is-active" <% end %>>
23
- <%= link_to t("menu.managed_users", scope: "decidim.admin"), decidim_admin.managed_users_path %>
24
- </li>
22
+ <% if can? :index, :impersonatable_users %>
23
+ <li <% if is_active_link?(decidim_admin.impersonatable_users_path) %> class="is-active" <% end %>>
24
+ <%= link_to t("menu.impersonations", scope: "decidim.admin"), decidim_admin.impersonatable_users_path %>
25
+ </li>
26
+ <% end %>
25
27
  <li <% if is_active_link?(decidim_admin.authorization_workflows_path) %> class="is-active" <% end %>>
26
28
  <%= link_to t("menu.authorization_workflows", scope: "decidim.admin"), decidim_admin.authorization_workflows_path %>
27
29
  <ul>