decidim-admin 0.0.6 → 0.0.7

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 (130) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/decidim/admin/_decidim.scss +9 -0
  3. data/app/assets/stylesheets/decidim/admin/_variables.scss +7 -0
  4. data/app/assets/stylesheets/decidim/admin/application.scss +2 -19
  5. data/app/assets/stylesheets/decidim/admin/extra/_categories.scss +5 -0
  6. data/app/assets/stylesheets/decidim/admin/{_email_preview.scss → extra/_email_preview.scss} +0 -0
  7. data/app/assets/stylesheets/decidim/admin/{_login.scss → extra/_login.scss} +0 -0
  8. data/app/assets/stylesheets/decidim/admin/extra/_select_multiple.scss +3 -0
  9. data/app/assets/stylesheets/decidim/admin/extra/_title_bar.scss +5 -0
  10. data/app/assets/stylesheets/decidim/admin/modules/_action-icon.scss +13 -0
  11. data/app/assets/stylesheets/decidim/admin/modules/_buttons.scss +44 -0
  12. data/app/assets/stylesheets/decidim/admin/modules/_callouts.scss +32 -0
  13. data/app/assets/stylesheets/decidim/admin/modules/_cards.scss +36 -0
  14. data/app/assets/stylesheets/decidim/admin/modules/_char-counter.scss +20 -0
  15. data/app/assets/stylesheets/decidim/admin/modules/_component-counter.scss +17 -0
  16. data/app/assets/stylesheets/decidim/admin/modules/_forms.scss +80 -0
  17. data/app/assets/stylesheets/decidim/admin/modules/_icons.scss +65 -0
  18. data/app/assets/stylesheets/decidim/admin/modules/_layout.scss +67 -0
  19. data/app/assets/stylesheets/decidim/admin/modules/_main-nav.scss +41 -0
  20. data/app/assets/stylesheets/decidim/admin/modules/_modules.scss +24 -0
  21. data/app/assets/stylesheets/decidim/admin/modules/_process-header.scss +11 -0
  22. data/app/assets/stylesheets/decidim/admin/modules/_secondary-nav.scss +95 -0
  23. data/app/assets/stylesheets/decidim/admin/modules/_table-list.scss +78 -0
  24. data/app/assets/stylesheets/decidim/admin/modules/_tabs.scss +49 -0
  25. data/app/assets/stylesheets/decidim/admin/modules/_title-bar.scss +32 -0
  26. data/app/assets/stylesheets/decidim/admin/modules/_typography.scss +15 -0
  27. data/app/assets/stylesheets/decidim/admin/modules/_user-login.scss +23 -0
  28. data/app/assets/stylesheets/decidim/admin/utils/_fontface.scss +27 -0
  29. data/app/assets/stylesheets/decidim/admin/utils/_helpers.scss +25 -0
  30. data/app/assets/stylesheets/decidim/admin/utils/_keyframes.scss +21 -0
  31. data/app/assets/stylesheets/decidim/admin/utils/_mixins.scss +20 -0
  32. data/app/assets/stylesheets/decidim/admin/utils/_settings.scss +590 -0
  33. data/app/assets/stylesheets/decidim/admin/utils/_toggle-expand.scss +8 -0
  34. data/app/commands/decidim/admin/create_attachment.rb +13 -4
  35. data/app/commands/decidim/admin/update_participatory_process.rb +3 -3
  36. data/app/commands/decidim/admin/update_participatory_process_admin.rb +40 -0
  37. data/app/controllers/decidim/admin/application_controller.rb +7 -1
  38. data/app/controllers/decidim/admin/newsletters_controller.rb +1 -1
  39. data/app/controllers/decidim/admin/organization_controller.rb +2 -0
  40. data/app/controllers/decidim/admin/participatory_process_user_roles_controller.rb +29 -0
  41. data/app/controllers/decidim/admin/participatory_processes_controller.rb +2 -2
  42. data/app/controllers/decidim/admin/scopes_controller.rb +2 -0
  43. data/app/controllers/decidim/admin/static_pages_controller.rb +2 -0
  44. data/app/controllers/decidim/admin/user_groups_controller.rb +3 -1
  45. data/app/controllers/decidim/admin/users_controller.rb +1 -1
  46. data/app/helpers/decidim/admin/application_helper.rb +8 -0
  47. data/app/helpers/decidim/admin/icon_link_helper.rb +30 -0
  48. data/app/jobs/decidim/admin/newsletter_job.rb +1 -1
  49. data/app/queries/decidim/admin/process_admin_roles_for_process.rb +1 -1
  50. data/app/views/decidim/admin/attachments/_form.html.erb +29 -8
  51. data/app/views/decidim/admin/attachments/edit.html.erb +3 -5
  52. data/app/views/decidim/admin/attachments/index.html.erb +45 -35
  53. data/app/views/decidim/admin/attachments/new.html.erb +3 -5
  54. data/app/views/decidim/admin/categories/_form.html.erb +18 -10
  55. data/app/views/decidim/admin/categories/edit.html.erb +3 -5
  56. data/app/views/decidim/admin/categories/index.html.erb +57 -42
  57. data/app/views/decidim/admin/categories/new.html.erb +3 -5
  58. data/app/views/decidim/admin/dashboard/show.html.erb +6 -3
  59. data/app/views/decidim/admin/features/_feature.html.erb +11 -11
  60. data/app/views/decidim/admin/features/_form.html.erb +56 -48
  61. data/app/views/decidim/admin/features/edit.html.erb +3 -5
  62. data/app/views/decidim/admin/features/index.html.erb +21 -19
  63. data/app/views/decidim/admin/features/new.html.erb +3 -4
  64. data/app/views/decidim/admin/moderations/index.html.erb +71 -61
  65. data/app/views/decidim/admin/newsletters/_form.html.erb +7 -1
  66. data/app/views/decidim/admin/newsletters/edit.html.erb +10 -8
  67. data/app/views/decidim/admin/newsletters/index.html.erb +50 -43
  68. data/app/views/decidim/admin/newsletters/new.html.erb +10 -8
  69. data/app/views/decidim/admin/newsletters/show.html.erb +20 -12
  70. data/app/views/decidim/admin/organization/_form.html.erb +98 -62
  71. data/app/views/decidim/admin/organization/edit.html.erb +11 -8
  72. data/app/views/decidim/admin/participatory_process_groups/_form.html.erb +4 -4
  73. data/app/views/decidim/admin/participatory_process_groups/edit.html.erb +15 -9
  74. data/app/views/decidim/admin/participatory_process_groups/index.html.erb +37 -35
  75. data/app/views/decidim/admin/participatory_process_groups/new.html.erb +10 -8
  76. data/app/views/decidim/admin/participatory_process_steps/_form.html.erb +21 -11
  77. data/app/views/decidim/admin/participatory_process_steps/edit.html.erb +3 -4
  78. data/app/views/decidim/admin/participatory_process_steps/index.html.erb +60 -51
  79. data/app/views/decidim/admin/participatory_process_steps/new.html.erb +4 -5
  80. data/app/views/decidim/admin/participatory_process_user_roles/_form.html.erb +23 -0
  81. data/app/views/decidim/admin/participatory_process_user_roles/edit.html.erb +7 -0
  82. data/app/views/decidim/admin/participatory_process_user_roles/index.html.erb +46 -34
  83. data/app/views/decidim/admin/participatory_process_user_roles/new.html.erb +7 -0
  84. data/app/views/decidim/admin/participatory_processes/_form.html.erb +103 -72
  85. data/app/views/decidim/admin/participatory_processes/edit.html.erb +15 -17
  86. data/app/views/decidim/admin/participatory_processes/index.html.erb +52 -43
  87. data/app/views/decidim/admin/participatory_processes/new.html.erb +6 -5
  88. data/app/views/decidim/admin/scopes/edit.html.erb +9 -7
  89. data/app/views/decidim/admin/scopes/index.html.erb +37 -36
  90. data/app/views/decidim/admin/scopes/new.html.erb +9 -6
  91. data/app/views/decidim/admin/static_pages/_form.html.erb +3 -3
  92. data/app/views/decidim/admin/static_pages/edit.html.erb +10 -8
  93. data/app/views/decidim/admin/static_pages/index.html.erb +38 -37
  94. data/app/views/decidim/admin/static_pages/new.html.erb +10 -8
  95. data/app/views/decidim/admin/user_groups/index.html.erb +37 -31
  96. data/app/views/decidim/admin/users/_form.html.erb +5 -4
  97. data/app/views/decidim/admin/users/index.html.erb +57 -52
  98. data/app/views/decidim/admin/users/new.html.erb +10 -7
  99. data/app/views/layouts/decidim/admin/_application.html.erb +23 -36
  100. data/app/views/layouts/decidim/admin/_callouts_full.html.erb +10 -0
  101. data/app/views/layouts/decidim/admin/_language_chooser.html.erb +9 -9
  102. data/app/views/layouts/decidim/admin/_main_nav.html.erb +11 -0
  103. data/app/views/layouts/decidim/admin/_template_bottom.html.erb +2 -0
  104. data/app/views/layouts/decidim/admin/_template_top.html.erb +3 -0
  105. data/app/views/layouts/decidim/admin/_title_bar.html.erb +20 -0
  106. data/app/views/layouts/decidim/admin/newsletters.erb +14 -0
  107. data/app/views/layouts/decidim/admin/pages.html.erb +14 -0
  108. data/app/views/layouts/decidim/admin/participatory_process.html.erb +55 -53
  109. data/app/views/layouts/decidim/admin/participatory_process_groups.html.erb +14 -0
  110. data/app/views/layouts/decidim/admin/participatory_processes.html.erb +14 -0
  111. data/app/views/layouts/decidim/admin/settings.html.erb +19 -0
  112. data/app/views/layouts/decidim/admin/users.html.erb +21 -0
  113. data/config/i18n-tasks.yml +1 -0
  114. data/config/locales/ca.yml +77 -22
  115. data/config/locales/en.yml +75 -20
  116. data/config/locales/es.yml +77 -22
  117. data/config/locales/eu.yml +191 -16
  118. data/config/locales/fi.yml +0 -29
  119. data/config/routes.rb +1 -1
  120. data/lib/decidim/admin/test/manage_attachments_examples.rb +11 -11
  121. metadata +54 -18
  122. data/app/assets/stylesheets/decidim/admin/_actions.scss +0 -8
  123. data/app/assets/stylesheets/decidim/admin/_forms.scss +0 -10
  124. data/app/assets/stylesheets/decidim/admin/_foundation_and_overrides.scss +0 -53
  125. data/app/assets/stylesheets/decidim/admin/_icons.scss +0 -9
  126. data/app/assets/stylesheets/decidim/admin/_layout.scss +0 -27
  127. data/app/assets/stylesheets/decidim/admin/_settings.scss +0 -566
  128. data/app/assets/stylesheets/decidim/admin/_tables.scss +0 -21
  129. data/app/views/layouts/decidim/admin/_login_items.html.erb +0 -8
  130. data/app/views/layouts/decidim/admin/_sidebar.html.erb +0 -22
@@ -1,21 +1,19 @@
1
- <div class="actions">
2
- <% if can? :publish, participatory_process %>
3
- <% if participatory_process.published? %>
4
- <%= link_to t("actions.unpublish", scope: "decidim.admin"), participatory_process_publish_path(participatory_process), method: :delete, class: "small button secondary" %>
5
- <% else %>
6
- <%= link_to t("actions.publish", scope: "decidim.admin"), participatory_process_publish_path(participatory_process), method: :post, class: "small button secondary" %>
7
- <% end %>
8
- <% end %>
9
-
10
- <% if can? :destroy, participatory_process %>
11
- <%= link_to t("decidim.admin.actions.destroy"), participatory_process, method: :delete, class: "alert button", data: { confirm: t("decidim.admin.actions.confirm_destroy") } %>
12
- <% end %>
13
- </div>
14
-
15
- <%= decidim_form_for(@form) do |f| %>
1
+ <%= decidim_form_for(@form, html: { class: "form edit_participatory_process" }) do |f| %>
16
2
  <%= render partial: 'form', object: f %>
3
+ <div class="button--double form-general-submit">
4
+ <%= f.submit t(".update"), class: "button" %>
17
5
 
18
- <div class="actions">
19
- <%= f.submit t(".update") %>
6
+ <% if can? :publish, participatory_process %>
7
+ <% if participatory_process.published? %>
8
+ <%= link_to t("actions.unpublish", scope: "decidim.admin"), participatory_process_publish_path(participatory_process), method: :delete, class: "button muted" %>
9
+ <% else %>
10
+ <%= link_to t("actions.publish", scope: "decidim.admin"), participatory_process_publish_path(participatory_process), method: :post, class: "button hollow" %>
11
+ <% end %>
12
+ <% end %>
13
+
14
+ <% if can? :destroy, participatory_process %>
15
+ <%= link_to t("decidim.admin.actions.destroy"), participatory_process, method: :delete, class: "alert button", data: { confirm: t("decidim.admin.actions.confirm_destroy") } %>
16
+ <% end %>
20
17
  </div>
21
18
  <% end %>
19
+
@@ -1,45 +1,54 @@
1
- <% provide :title do %>
2
- <h2><%= t "decidim.admin.titles.participatory_processes" %></h2>
3
- <% end %>
1
+ <div class="card" id="processes">
2
+ <div class="card-divider">
3
+ <h2 class="card-title">
4
+ <%= t "decidim.admin.titles.participatory_processes" %><%= link_to t("actions.new", scope: "decidim.admin", name: t("models.participatory_process.name", scope: "decidim.admin")), ['new', 'participatory_process'], class: 'button tiny button--title' if can? :create, Decidim::ParticipatoryProcess %>
5
+ </h2>
6
+ </div>
7
+ <div class="card-section">
8
+ <div class="table-scroll">
9
+ <table class="table-list">
10
+ <thead>
11
+ <tr>
12
+ <th><%= t("models.participatory_process.fields.title", scope: "decidim.admin") %></th>
13
+ <th><%= t("models.participatory_process.fields.created_at", scope: "decidim.admin") %></th>
14
+ <th class="table-list__actions"><%= t("models.participatory_process.fields.published", scope: "decidim.admin") %></th>
15
+ <th></th>
16
+ </tr>
17
+ </thead>
18
+ <tbody>
19
+ <% @participatory_processes.each do |process| %>
20
+ <tr>
21
+ <td>
22
+ <% if process.promoted? %>
23
+ <span data-tooltip class="icon-state icon-highlight" aria-haspopup="true" data-disable-hover="false" title="<%= t("models.participatory_process.fields.promoted", scope: "decidim.admin") %>">
24
+ <%= icon "star" %>
25
+ </span>
26
+ <% end %>
27
+ <%= link_to translated_attribute(process.title), edit_participatory_process_path(process) %><br />
28
+ </td>
29
+ <td>
30
+ <%= l process.created_at, format: :short %>
31
+ </td>
32
+ <td class="table-list__state">
33
+ <% if process.published? %>
34
+ <strong class="text-success"><%= t('.published') %></strong>
35
+ <% else %>
36
+ <strong class="text-alert"><%= t('.not_published') %></strong>
37
+ <% end %>
38
+ </td>
39
+ <td class="table-list__actions">
40
+ <% if can? :update, process %>
41
+ <%= icon_link_to "pencil", edit_participatory_process_path(process), t("actions.configure", scope: "decidim.admin"), class: "action-icon--new" %>
42
+ <% end %>
4
43
 
5
- <div class="actions title">
6
- <%= link_to t("actions.new", scope: "decidim.admin", name: t("models.participatory_process.name", scope: "decidim.admin")), ['new', 'participatory_process'], class: 'new' if can? :create, Decidim::ParticipatoryProcess %>
7
- </div>
8
-
9
- <table class="stack">
10
- <thead>
11
- <tr>
12
- <th><%= t("models.participatory_process.fields.title", scope: "decidim.admin") %></th>
13
- <th><%= t("models.participatory_process.fields.promoted", scope: "decidim.admin") %></th>
14
- <th><%= t("models.participatory_process.fields.published", scope: "decidim.admin") %></th>
15
- <th><%= t("models.participatory_process.fields.created_at", scope: "decidim.admin") %></th>
16
- <th class="actions"><%= t("actions.title", scope: "decidim.admin") %></th>
17
- </tr>
18
- </thead>
19
- <tbody>
20
- <% @participatory_processes.each do |process| %>
21
- <tr>
22
- <td>
23
- <%= link_to translated_attribute(process.title), process %><br />
24
- </td>
25
- <td>
26
- <%= humanize_boolean process.promoted? %>
27
- </td>
28
- <td>
29
- <%= humanize_boolean process.published? %>
30
- </td>
31
- <td>
32
- <%= l process.created_at, format: :short %>
33
- </td>
34
- <td class="actions">
35
- <% if can? :preview, process %>
36
- <%= link_to t("actions.preview", scope: "decidim.admin"), decidim.participatory_process_path(process) %>
44
+ <% if can? :preview, process %>
45
+ <%= icon_link_to "eye", decidim.participatory_process_path(process), t("actions.preview", scope: "decidim.admin"), class: "action-icon--preview" %>
46
+ <% end %>
47
+ </td>
48
+ </tr>
37
49
  <% end %>
38
- <% if can? :update, process %>
39
- <%= link_to t("actions.configure", scope: "decidim.admin"), process, class: "small button secondary" %>
40
- <% end %>
41
- </td>
42
- </tr>
43
- <% end %>
44
- </tbody>
45
- </table>
50
+ </tbody>
51
+ </table>
52
+ </div>
53
+ </div>
54
+ </div>
@@ -1,11 +1,12 @@
1
- <% provide :title do %>
2
- <h2><%= t ".title" %></h2>
3
- <% end %>
1
+ <h2 class="process-title-summary">
2
+ <%= t ".title" %>
3
+ </h2>
4
4
 
5
- <%= decidim_form_for(@form) do |f| %>
5
+ <%= decidim_form_for(@form, html: { class: "form new_participatory_process" }) do |f| %>
6
6
  <%= render partial: 'form', object: f %>
7
7
 
8
- <div class="actions">
8
+ <div class="button--double form-general-submit">
9
9
  <%= f.submit t(".create") %>
10
10
  </div>
11
11
  <% end %>
12
+
@@ -1,11 +1,13 @@
1
- <% provide :title do %>
2
- <h2><%= t ".title" %></h2>
3
- <% end %>
4
-
5
1
  <%= decidim_form_for(@form) do |f| %>
6
- <%= render partial: 'form', object: f %>
7
-
8
- <div class="actions">
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">
9
11
  <%= f.submit t(".update") %>
10
12
  </div>
11
13
  <% end %>
@@ -1,38 +1,39 @@
1
- <% provide :title do %>
2
- <h2><%= t "decidim.admin.titles.scopes" %></h2>
3
- <% end %>
1
+ <div class="card">
2
+ <div class="card-divider">
3
+ <h2 class="card-title"><%= t "decidim.admin.titles.scopes" %> <%= link_to t("actions.add", scope: "decidim.admin"), ['new', 'scope'], class: 'button tiny button--title' %></h2>
4
+ </div>
5
+ <div class="card-section">
6
+ <div class="table-scroll">
7
+ <table class="table-list">
8
+ <thead>
9
+ <tr>
10
+ <th><%= t("models.scope.fields.name", scope: "decidim.admin") %></th>
11
+ <th><%= t("models.scope.fields.created_at", scope: "decidim.admin") %></th>
12
+ <th></th>
13
+ </tr>
14
+ </thead>
15
+ <tbody>
16
+ <% @scopes.each do |scope| %>
17
+ <tr>
18
+ <td>
19
+ <%= scope.name %><br />
20
+ </td>
21
+ <td>
22
+ <%= l scope.created_at, format: :short %>
23
+ </td>
24
+ <td class="table-list__actions">
25
+ <% if can? :update, scope %>
26
+ <%= icon_link_to "pencil", ['edit', scope], t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit", method: :get, data: {} %>
27
+ <% end %>
4
28
 
5
- <div class="actions title">
6
- <%= link_to t("actions.new", scope: "decidim.admin", name: t("models.scope.name", scope: "decidim.admin")), ['new', 'scope'], class: 'new' %>
7
- </div>
8
-
9
- <table class="stack">
10
- <thead>
11
- <tr>
12
- <th><%= t("models.scope.fields.name", scope: "decidim.admin") %></th>
13
- <th><%= t("models.scope.fields.created_at", scope: "decidim.admin") %></th>
14
- <th class="actions"><%= t("actions.title", scope: "decidim.admin") %></th>
15
- </tr>
16
- </thead>
17
- <tbody>
18
- <% @scopes.each do |scope| %>
19
- <tr>
20
- <td>
21
- <%= scope.name %><br />
22
- </td>
23
- <td>
24
- <%= l scope.created_at, format: :short %>
25
- </td>
26
- <td class="actions">
27
- <% if can? :update, scope %>
28
- <%= link_to t("actions.edit", scope: "decidim.admin"), ['edit', scope] %>
29
+ <% if can? :destroy, scope %>
30
+ <%= icon_link_to "circle-x", scope, t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %>
31
+ <% end %>
32
+ </td>
33
+ </tr>
29
34
  <% end %>
30
-
31
- <% if can? :destroy, scope %>
32
- <%= link_to t("actions.destroy", scope: "decidim.admin"), scope, method: :delete, class: "small alert button", data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %>
33
- <% end %>
34
- </td>
35
- </tr>
36
- <% end %>
37
- </tbody>
38
- </table>
35
+ </tbody>
36
+ </table>
37
+ </div>
38
+ </div>
39
+ </div>
@@ -1,11 +1,14 @@
1
- <% provide :title do %>
2
- <h2><%= t ".title" %></h2>
3
- <% end %>
4
1
 
5
2
  <%= decidim_form_for(@form) do |f| %>
6
- <%= render partial: 'form', object: f %>
7
-
8
- <div class="actions">
3
+ <div class="card">
4
+ <div class="card-divider">
5
+ <h2 class="card-title"><%= t ".title" %></h2>
6
+ </div>
7
+ <div class="card-section">
8
+ <%= render partial: 'form', object: f %>
9
+ </div>
10
+ </div>
11
+ <div class="button--double form-general-submit">
9
12
  <%= f.submit t(".create") %>
10
13
  </div>
11
14
  <% end %>
@@ -1,13 +1,13 @@
1
- <div class="field">
1
+ <div class="row column">
2
2
  <%= form.translated :text_field, :title, autofocus: true %>
3
3
  </div>
4
4
 
5
5
  <% if can? :update_slug, form.object %>
6
- <div class="field">
6
+ <div class="row column">
7
7
  <%= form.text_field :slug %>
8
8
  </div>
9
9
  <% end %>
10
10
 
11
- <div class="field">
11
+ <div class="row column">
12
12
  <%= form.translated :editor, :content, toolbar: :full, lines: 25 %>
13
13
  </div>
@@ -1,11 +1,13 @@
1
- <% provide :title do %>
2
- <h2><%= t ".title" %></h2>
3
- <% end %>
4
-
5
- <%= decidim_form_for(@form) do |f| %>
6
- <%= render partial: 'form', object: f %>
7
-
8
- <div class="actions">
1
+ <%= decidim_form_for(@form, html: { class: "form edit_static_page" }) 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">
9
11
  <%= f.submit t(".update") %>
10
12
  </div>
11
13
  <% end %>
@@ -1,40 +1,41 @@
1
- <% provide :title do %>
2
- <h2><%= t "decidim.admin.titles.static_pages" %></h2>
3
- <% end %>
1
+ <div class="card">
2
+ <div class="card-divider">
3
+ <h2 class="card-title"><%= t "decidim.admin.titles.static_pages" %> <%= link_to t("static_pages.new.title", scope: "decidim.admin"), ['new', 'static_page'], class: 'button tiny button--title new' %></h2>
4
+ </div>
5
+ <div class="card-section">
6
+ <div class="table-scroll">
7
+ <table class="table-list">
8
+ <thead>
9
+ <tr>
10
+ <th><%= t("models.static_page.fields.title", scope: "decidim.admin") %></th>
11
+ <th><%= t("models.static_page.fields.created_at", scope: "decidim.admin") %></th>
12
+ <th></th>
13
+ </tr>
14
+ </thead>
15
+ <tbody>
16
+ <% @pages.each do |page| %>
17
+ <tr>
18
+ <td>
19
+ <%= link_to translated_attribute(page.title), page %><br />
20
+ </td>
21
+ <td>
22
+ <%= l page.created_at, format: :short %>
23
+ </td>
24
+ <td class="table-list__actions">
25
+ <% if can? :update, page %>
26
+ <%= icon_link_to "pencil", ['edit', page], t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit" %>
27
+ <% end %>
4
28
 
5
- <div class="actions title">
6
- <%= link_to t("actions.new", scope: "decidim.admin", name: t("models.static_page.name", scope: "decidim.admin")), ['new', 'static_page'], class: 'new' %>
7
- </div>
8
-
9
- <table class="stack">
10
- <thead>
11
- <tr>
12
- <th><%= t("models.static_page.fields.title", scope: "decidim.admin") %></th>
13
- <th><%= t("models.static_page.fields.created_at", scope: "decidim.admin") %></th>
14
- <th class="actions"><%= t("actions.title", scope: "decidim.admin") %></th>
15
- </tr>
16
- </thead>
17
- <tbody>
18
- <% @pages.each do |page| %>
19
- <tr>
20
- <td>
21
- <%= link_to translated_attribute(page.title), page %><br />
22
- </td>
23
- <td>
24
- <%= l page.created_at, format: :short %>
25
- </td>
26
- <td class="actions">
27
- <% if can? :update, page %>
28
- <%= link_to t("actions.edit", scope: "decidim.admin"), ['edit', page] %>
29
- <% end %>
29
+ <%= icon_link_to "eye", decidim.page_path(page), t("actions.view", scope: "decidim.admin.static_pages"), class: "action-icon--preview" %>
30
30
 
31
- <% if can? :destroy, page %>
32
- <%= link_to t("actions.destroy", scope: "decidim.admin"), page, method: :delete, class: "small alert button", data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %>
31
+ <% if can? :destroy, page %>
32
+ <%= icon_link_to "circle-x", page, t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %>
33
+ <% end %>
34
+ </td>
35
+ </tr>
33
36
  <% end %>
34
-
35
- <%= link_to t("actions.view", scope: "decidim.admin.static_pages"), decidim.page_path(page) %>
36
- </td>
37
- </tr>
38
- <% end %>
39
- </tbody>
40
- </table>
37
+ </tbody>
38
+ </table>
39
+ </div>
40
+ </div>
41
+ </div>
@@ -1,11 +1,13 @@
1
- <% provide :title do %>
2
- <h2><%= t ".title" %></h2>
3
- <% end %>
4
-
5
- <%= decidim_form_for(@form) do |f| %>
6
- <%= render partial: 'form', object: f %>
7
-
8
- <div class="actions">
1
+ <%= decidim_form_for(@form, html: { class: "form new_static_page" }) 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">
9
11
  <%= f.submit t(".create") %>
10
12
  </div>
11
13
  <% end %>
@@ -1,32 +1,38 @@
1
- <% provide :title do %>
2
- <h2><%= t "decidim.admin.titles.user_groups" %></h2>
3
- <% end %>
4
-
5
- <table class="stack user-groups">
6
- <thead>
7
- <tr>
8
- <th><%= t("models.user_group.fields.name", scope: "decidim.admin") %></th>
9
- <th><%= t("models.user_group.fields.document_number", scope: "decidim.admin") %></th>
10
- <th><%= t("models.user_group.fields.phone", scope: "decidim.admin") %></th>
11
- <th><%= t("models.user_group.fields.users_count", scope: "decidim.admin") %></th>
12
- <th><%= t("models.user_group.fields.created_at", scope: "decidim.admin") %></th>
13
- <th class="actions"><%= t("actions.title", scope: "decidim.admin") %></th>
14
- </tr>
15
- </thead>
16
- <tbody>
17
- <% @user_groups.each do |user_group| %>
18
- <tr data-user-group-id="<%= user_group.id %>">
19
- <td><%= user_group.name %></td>
20
- <td><%= user_group.document_number %></td>
21
- <td><%= user_group.phone %></td>
22
- <td><%= user_group.users.size %></td>
23
- <td><%= l user_group.created_at, format: :short %></td>
24
- <td class="actions">
25
- <% if can?(:verify, user_group) && !user_group.verified? %>
26
- <%= button_to t("actions.verify", scope: "decidim.admin"), decidim_admin.verify_user_group_path(user_group), method: :put %>
1
+ <div class="card">
2
+ <div class="card-divider">
3
+ <h2 class="card-title"><%= t "decidim.admin.titles.user_groups" %></h2>
4
+ </div>
5
+ <div class="card-section">
6
+ <div class="table-scroll">
7
+ <table class="table-list">
8
+ <thead>
9
+ <tr>
10
+ <th><%= t("models.user_group.fields.name", scope: "decidim.admin") %></th>
11
+ <th><%= t("models.user_group.fields.document_number", scope: "decidim.admin") %></th>
12
+ <th><%= t("models.user_group.fields.phone", scope: "decidim.admin") %></th>
13
+ <th><%= t("models.user_group.fields.users_count", scope: "decidim.admin") %></th>
14
+ <th><%= t("models.user_group.fields.created_at", scope: "decidim.admin") %></th>
15
+ <th></th>
16
+ </tr>
17
+ </thead>
18
+ <tbody>
19
+ <% @user_groups.each do |user_group| %>
20
+ <tr data-user-group-id="<%= user_group.id %>">
21
+ <td><%= user_group.name %></td>
22
+ <td><%= user_group.document_number %></td>
23
+ <td><%= user_group.phone %></td>
24
+ <td><%= user_group.users.size %></td>
25
+ <td><%= l user_group.created_at, format: :short %></td>
26
+ <td class="text-right">
27
+ <% if can?(:verify, user_group) && !user_group.verified? %>
28
+ <%= link_to t("actions.verify", scope: "decidim.admin"), decidim_admin.verify_user_group_path(user_group), method: :put, class: "button tiny" %>
29
+ <% end %>
30
+ </td>
31
+ </tr>
27
32
  <% end %>
28
- </td>
29
- </tr>
30
- <% end %>
31
- </tbody>
32
- </table>
33
+ </tbody>
34
+ </table>
35
+ <%= paginate @user_groups, theme: "decidim" %>
36
+ </div>
37
+ </div>
38
+ </div>