decidim-admin 0.0.1.alpha9 → 0.0.1
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.
- checksums.yaml +4 -4
- data/README.md +33 -8
- data/Rakefile +0 -25
- data/app/assets/javascripts/decidim/admin/application.js.es6 +17 -10
- data/app/assets/javascripts/decidim/admin/sort_steps.js.es6 +20 -11
- data/app/assets/javascripts/decidim/admin/tab_focus.js.es6 +22 -0
- data/app/assets/stylesheets/decidim/admin/_forms.scss +10 -0
- data/app/assets/stylesheets/decidim/admin/_layout.scss +11 -0
- data/app/assets/stylesheets/decidim/admin/_tables.scss +4 -0
- data/app/assets/stylesheets/decidim/admin/application.scss +8 -2
- data/app/commands/decidim/admin/activate_participatory_process_step.rb +1 -1
- data/app/commands/decidim/admin/create_category.rb +44 -0
- data/app/commands/decidim/admin/create_feature.rb +48 -0
- data/app/commands/decidim/admin/create_participatory_process.rb +3 -6
- data/app/commands/decidim/admin/create_participatory_process_admin.rb +51 -0
- data/app/commands/decidim/admin/create_participatory_process_attachment.rb +44 -0
- data/app/commands/decidim/admin/create_participatory_process_step.rb +3 -3
- data/app/commands/decidim/admin/create_scope.rb +38 -0
- data/app/commands/decidim/admin/create_static_page.rb +40 -0
- data/app/commands/decidim/admin/destroy_category.rb +36 -0
- data/app/commands/decidim/admin/destroy_feature.rb +39 -0
- data/app/commands/decidim/admin/publish_participatory_process.rb +1 -1
- data/app/commands/decidim/admin/reorder_participatory_process_steps.rb +5 -2
- data/app/commands/decidim/admin/unpublish_participatory_process.rb +1 -1
- data/app/commands/decidim/admin/update_category.rb +48 -0
- data/app/commands/decidim/admin/update_organization.rb +49 -0
- data/app/commands/decidim/admin/update_participatory_process.rb +2 -2
- data/app/commands/decidim/admin/update_participatory_process_attachment.rb +49 -0
- data/app/commands/decidim/admin/update_participatory_process_step.rb +1 -1
- data/app/commands/decidim/admin/update_scope.rb +43 -0
- data/app/commands/decidim/admin/update_static_page.rb +45 -0
- data/app/constraints/decidim/admin/organization_dashboard_constraint.rb +5 -1
- data/app/controllers/decidim/admin/application_controller.rb +8 -0
- data/app/controllers/decidim/admin/categories_controller.rb +90 -0
- data/app/controllers/decidim/admin/concerns/participatory_process_admin.rb +31 -0
- data/app/controllers/decidim/admin/features_controller.rb +74 -0
- data/app/controllers/decidim/admin/organization_controller.rb +40 -0
- data/app/controllers/decidim/admin/participatory_process_attachments_controller.rb +84 -0
- data/app/controllers/decidim/admin/participatory_process_publications_controller.rb +2 -7
- data/app/controllers/decidim/admin/participatory_process_step_activations_controller.rb +6 -8
- data/app/controllers/decidim/admin/participatory_process_step_ordering_controller.rb +2 -4
- data/app/controllers/decidim/admin/participatory_process_steps_controller.rb +13 -11
- data/app/controllers/decidim/admin/participatory_process_user_roles_controller.rb +54 -0
- data/app/controllers/decidim/admin/participatory_processes_controller.rb +11 -6
- data/app/controllers/decidim/admin/scopes_controller.rb +79 -0
- data/app/controllers/decidim/admin/static_pages_controller.rb +94 -0
- data/app/forms/decidim/admin/category_form.rb +37 -0
- data/app/forms/decidim/admin/feature_form.rb +16 -0
- data/app/forms/decidim/admin/organization_form.rb +31 -0
- data/app/forms/decidim/admin/participatory_process_attachment_form.rb +19 -0
- data/app/forms/decidim/admin/participatory_process_form.rb +4 -7
- data/app/forms/decidim/admin/participatory_process_step_form.rb +12 -2
- data/app/forms/decidim/admin/participatory_process_user_role_form.rb +15 -0
- data/app/forms/decidim/admin/scope_form.rb +24 -0
- data/app/forms/decidim/admin/static_page_form.rb +30 -0
- data/app/helpers/decidim/admin/application_helper.rb +1 -0
- data/app/helpers/decidim/admin/aria_selected_link_to_helper.rb +28 -0
- data/app/helpers/decidim/admin/attributes_display_helper.rb +13 -5
- data/app/models/decidim/admin/abilities/admin_user.rb +34 -0
- data/app/models/decidim/admin/abilities/base.rb +19 -0
- data/app/models/decidim/admin/abilities/participatory_process_admin.rb +51 -0
- data/app/models/decidim/admin/participatory_process_user_role.rb +14 -0
- data/app/queries/decidim/admin/manageable_participatory_processes_for_user.rb +41 -0
- data/app/queries/decidim/admin/process_admin_roles_for_process.rb +35 -0
- data/app/views/decidim/admin/categories/_form.html.erb +12 -0
- data/app/views/decidim/admin/categories/edit.html.erb +9 -0
- data/app/views/decidim/admin/categories/index.html.erb +44 -0
- data/app/views/decidim/admin/categories/new.html.erb +9 -0
- data/app/views/decidim/admin/categories/show.html.erb +14 -0
- data/app/views/decidim/admin/features/_feature.html.erb +20 -0
- data/app/views/decidim/admin/features/_form.html.erb +3 -0
- data/app/views/decidim/admin/features/index.html.erb +23 -0
- data/app/views/decidim/admin/features/new.html.erb +9 -0
- data/app/views/decidim/admin/organization/_form.html.erb +23 -0
- data/app/views/decidim/admin/organization/edit.html.erb +11 -0
- data/app/views/decidim/admin/participatory_process_attachments/_form.html.erb +11 -0
- data/app/views/decidim/admin/participatory_process_attachments/edit.html.erb +9 -0
- data/app/views/decidim/admin/participatory_process_attachments/index.html.erb +37 -0
- data/app/views/decidim/admin/participatory_process_attachments/new.html.erb +9 -0
- data/app/views/decidim/admin/participatory_process_attachments/show.html.erb +25 -0
- data/app/views/decidim/admin/participatory_process_steps/_form.html.erb +2 -2
- data/app/views/decidim/admin/participatory_process_steps/edit.html.erb +1 -3
- data/app/views/decidim/admin/participatory_process_steps/{_table.html.erb → index.html.erb} +15 -11
- data/app/views/decidim/admin/participatory_process_steps/new.html.erb +1 -3
- data/app/views/decidim/admin/participatory_process_steps/show.html.erb +1 -4
- data/app/views/decidim/admin/participatory_process_user_roles/index.html.erb +34 -0
- data/app/views/decidim/admin/participatory_processes/_form.html.erb +2 -2
- data/app/views/decidim/admin/participatory_processes/edit.html.erb +13 -3
- data/app/views/decidim/admin/participatory_processes/index.html.erb +5 -14
- data/app/views/decidim/admin/participatory_processes/show.html.erb +19 -36
- data/app/views/decidim/admin/scopes/_form.html.erb +3 -0
- data/app/views/decidim/admin/scopes/edit.html.erb +11 -0
- data/app/views/decidim/admin/scopes/index.html.erb +38 -0
- data/app/views/decidim/admin/scopes/new.html.erb +11 -0
- data/app/views/decidim/admin/static_pages/_form.html.erb +13 -0
- data/app/views/decidim/admin/static_pages/edit.html.erb +11 -0
- data/app/views/decidim/admin/static_pages/index.html.erb +40 -0
- data/app/views/decidim/admin/static_pages/new.html.erb +11 -0
- data/app/views/decidim/admin/static_pages/show.html.erb +22 -0
- data/app/views/layouts/decidim/admin/_application.html.erb +40 -0
- data/app/views/layouts/decidim/admin/_sidebar.html.erb +5 -2
- data/app/views/layouts/decidim/admin/application.html.erb +3 -40
- data/app/views/layouts/decidim/admin/participatory_process.html.erb +54 -0
- data/config/i18n-tasks.yml +3 -2
- data/config/locales/ca.yml +138 -6
- data/config/locales/en.yml +191 -13
- data/config/locales/es.yml +139 -7
- data/config/routes.rb +23 -1
- data/db/migrate/20161102144648_add_admin_participatory_process_user_roles.rb +15 -0
- data/db/seeds.rb +21 -0
- data/lib/decidim/admin/engine.rb +10 -3
- data/lib/decidim/admin/features/base_controller.rb +33 -0
- data/lib/decidim/admin/features.rb +10 -0
- data/lib/decidim/admin.rb +1 -0
- data/vendor/assets/javascripts/html.sortable.js +691 -0
- metadata +98 -33
- data/LICENSE.txt +0 -619
- data/app/models/decidim/admin/abilities/admin.rb +0 -21
- data/vendor/assets/javascripts/html.sortable.min.js +0 -2
@@ -1,7 +1,4 @@
|
|
1
|
-
|
2
|
-
<h2><%= link_to translated_attribute(@participatory_process_step.participatory_process.title), @participatory_process_step.participatory_process %></h2>
|
3
|
-
<h3 class="subheader"><%= translated_attribute(@participatory_process_step.title) %></h3>
|
4
|
-
<% end %>
|
1
|
+
<h3><%= translated_attribute(@participatory_process_step.title) %></h3>
|
5
2
|
|
6
3
|
<div class="actions">
|
7
4
|
<hr />
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<section id="process_admins">
|
2
|
+
<h3><%= t(".process_admins_title", scope: "decidim.admin") %></h3>
|
3
|
+
|
4
|
+
<%= form_for :participatory_process_user_role, url: participatory_process_user_roles_path(participatory_process) do |f| %>
|
5
|
+
<table class="stack">
|
6
|
+
<thead>
|
7
|
+
<tr>
|
8
|
+
<th><%= t("models.participatory_process_user_role.fields.email", scope: "decidim.admin") %></th>
|
9
|
+
<th class="actions"><%= t("actions.title", scope: "decidim.admin") %></th>
|
10
|
+
</tr>
|
11
|
+
</thead>
|
12
|
+
<tbody>
|
13
|
+
<% process_admin_roles.each do |role| %>
|
14
|
+
<tr>
|
15
|
+
<td>
|
16
|
+
<%= role.user.email %><br />
|
17
|
+
</td>
|
18
|
+
<td class="actions">
|
19
|
+
<%= link_to t("actions.destroy", scope: "decidim.admin"), participatory_process_user_role_path(participatory_process, role), method: :delete, class: "small alert button", data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } if can? :destroy, role %>
|
20
|
+
</td>
|
21
|
+
</tr>
|
22
|
+
<% end %>
|
23
|
+
<tr>
|
24
|
+
<td>
|
25
|
+
<%= f.email_field :email, label: false %>
|
26
|
+
</td>
|
27
|
+
<td class="actions">
|
28
|
+
<%= f.submit t("actions.create", scope: "decidim.admin") %>
|
29
|
+
</td>
|
30
|
+
</tr>
|
31
|
+
</tbody>
|
32
|
+
</table>
|
33
|
+
<% end %>
|
34
|
+
</section>
|
@@ -15,11 +15,11 @@
|
|
15
15
|
</div>
|
16
16
|
|
17
17
|
<div class="field">
|
18
|
-
<%= form.translated :
|
18
|
+
<%= form.translated :editor, :short_description %>
|
19
19
|
</div>
|
20
20
|
|
21
21
|
<div class="field">
|
22
|
-
<%= form.translated :
|
22
|
+
<%= form.translated :editor, :description, toolbar: :full, lines: 20 %>
|
23
23
|
</div>
|
24
24
|
|
25
25
|
<div class="field">
|
@@ -1,6 +1,16 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
<%
|
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>
|
4
14
|
|
5
15
|
<%= form_for(@form) do |f| %>
|
6
16
|
<%= render partial: 'form', object: f %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
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' %>
|
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
7
|
</div>
|
8
8
|
|
9
9
|
<table class="stack">
|
@@ -32,20 +32,11 @@
|
|
32
32
|
<%= l process.created_at, format: :short %>
|
33
33
|
</td>
|
34
34
|
<td class="actions">
|
35
|
-
<% if can? :
|
36
|
-
<%= link_to t("actions.
|
37
|
-
<% end %>
|
38
|
-
|
39
|
-
<% if can? :publish, process %>
|
40
|
-
<% if process.published? %>
|
41
|
-
<%= link_to t("actions.unpublish", scope: "decidim.admin"), participatory_process_publish_path(process), method: :delete, class: "small button secondary" %>
|
42
|
-
<% else %>
|
43
|
-
<%= link_to t("actions.publish", scope: "decidim.admin"), participatory_process_publish_path(process), method: :post, class: "small button secondary" %>
|
44
|
-
<% end %>
|
35
|
+
<% if can? :preview, process %>
|
36
|
+
<%= link_to t("actions.preview", scope: "decidim.admin"), decidim.participatory_process_path(process) %>
|
45
37
|
<% end %>
|
46
|
-
|
47
|
-
|
48
|
-
<%= link_to t("actions.destroy", scope: "decidim.admin"), process, method: :delete, class: "small alert button", data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %>
|
38
|
+
<% if can? :update, process %>
|
39
|
+
<%= link_to t("actions.configure", scope: "decidim.admin"), process, class: "small button secondary" %>
|
49
40
|
<% end %>
|
50
41
|
</td>
|
51
42
|
</tr>
|
@@ -1,44 +1,27 @@
|
|
1
|
-
<% content_for :title do %>
|
2
|
-
<h2><%= link_to translated_attribute(@participatory_process.title), @participatory_process %></h2>
|
3
|
-
<h3 class="subheader"><%= translated_attribute(@participatory_process.subtitle) %></h3>
|
4
|
-
<% end %>
|
5
|
-
|
6
|
-
<div class="actions">
|
7
|
-
<hr />
|
8
|
-
<% if can? :update, @participatory_process %>
|
9
|
-
<%= link_to t("decidim.admin.actions.edit"), ['edit', @participatory_process] %>
|
10
|
-
<% end %>
|
11
|
-
|
12
|
-
<% if can? :publish, @participatory_process %>
|
13
|
-
<% if @participatory_process.published? %>
|
14
|
-
<%= link_to t("actions.unpublish", scope: "decidim.admin"), participatory_process_publish_path(@participatory_process), method: :delete, class: "small button secondary" %>
|
15
|
-
<% else %>
|
16
|
-
<%= link_to t("actions.publish", scope: "decidim.admin"), participatory_process_publish_path(@participatory_process), method: :post, class: "small button secondary" %>
|
17
|
-
<% end %>
|
18
|
-
<% end %>
|
19
|
-
|
20
|
-
<% if can? :destroy, @participatory_process %>
|
21
|
-
<%= link_to t("decidim.admin.actions.destroy"), @participatory_process, method: :delete, class: "alert button", data: { confirm: t("decidim.admin.actions.confirm_destroy") } %>
|
22
|
-
<% end %>
|
23
|
-
</div>
|
24
|
-
|
25
1
|
<dl>
|
26
|
-
<%= display_for
|
2
|
+
<%= display_for participatory_process,
|
27
3
|
:title,
|
28
4
|
:subtitle,
|
29
5
|
:hashtag,
|
30
6
|
:slug,
|
31
7
|
:short_description,
|
32
8
|
:description
|
33
|
-
|
34
|
-
<dt><%= display_label(@participatory_process, :hero_image) %></dt>
|
35
|
-
<dd><%= image_tag @participatory_process.hero_image.url.to_s %></dd>
|
36
|
-
<dt><%= display_label(@participatory_process, :banner_image) %></dt>
|
37
|
-
<dd><%= image_tag @participatory_process.banner_image.url.to_s %></dd>
|
38
|
-
<dt><%= display_label(@participatory_process, :promoted) %></dt>
|
39
|
-
<dd><%= humanize_boolean @participatory_process.promoted? %></dd>
|
40
|
-
</dl>
|
9
|
+
%>
|
41
10
|
|
42
|
-
|
43
|
-
|
44
|
-
<%
|
11
|
+
<dt><%= display_label(participatory_process, :hero_image) %></dt>
|
12
|
+
<dd>
|
13
|
+
<% if participatory_process.hero_image? %>
|
14
|
+
<%= image_tag participatory_process.hero_image.url.to_s %>
|
15
|
+
<% end %>
|
16
|
+
</dd>
|
17
|
+
|
18
|
+
<dt><%= display_label(participatory_process, :banner_image) %></dt>
|
19
|
+
<dd>
|
20
|
+
<% if participatory_process.banner_image? %>
|
21
|
+
<%= image_tag participatory_process.banner_image.url.to_s %>
|
22
|
+
<% end %>
|
23
|
+
</dd>
|
24
|
+
|
25
|
+
<dt><%= display_label(participatory_process, :promoted) %></dt>
|
26
|
+
<dd><%= humanize_boolean participatory_process.promoted? %></dd>
|
27
|
+
</dl>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<% content_for :title do %>
|
2
|
+
<h2><%= t "decidim.admin.titles.scopes" %></h2>
|
3
|
+
<% end %>
|
4
|
+
|
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
|
+
<% 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>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<div class="field">
|
2
|
+
<%= form.translated :text_field, :title, autofocus: true %>
|
3
|
+
</div>
|
4
|
+
|
5
|
+
<% if can? :update_slug, form.object %>
|
6
|
+
<div class="field">
|
7
|
+
<%= form.text_field :slug %>
|
8
|
+
</div>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<div class="field">
|
12
|
+
<%= form.translated :editor, :content %>
|
13
|
+
</div>
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<% content_for :title do %>
|
2
|
+
<h2><%= t "decidim.admin.titles.static_pages" %></h2>
|
3
|
+
<% end %>
|
4
|
+
|
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 %>
|
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") } %>
|
33
|
+
<% 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>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<% content_for :title do %>
|
2
|
+
<h2><%= link_to translated_attribute(@page.title), @page %></h2>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<div class="actions">
|
6
|
+
<hr />
|
7
|
+
<% if can? :update, @page %>
|
8
|
+
<%= link_to t("decidim.admin.actions.edit"), ['edit', @page] %>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<% if can? :destroy, @page %>
|
12
|
+
<%= link_to t("decidim.admin.actions.destroy"), @page, method: :delete, class: "alert button", data: { confirm: t("decidim.admin.actions.confirm_destroy") } %>
|
13
|
+
<% end %>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
<dl>
|
17
|
+
<%= display_for @page,
|
18
|
+
:title,
|
19
|
+
:slug,
|
20
|
+
:content
|
21
|
+
%>
|
22
|
+
</dl>
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Decidim - admin</title>
|
5
|
+
<%= render partial: 'layouts/decidim/admin/header' %>
|
6
|
+
</head>
|
7
|
+
|
8
|
+
<body>
|
9
|
+
<div class="off-canvas-wrapper">
|
10
|
+
<div class="off-canvas-wrapper-inner" data-off-canvas-wrapper>
|
11
|
+
<div class="off-canvas position-left reveal-for-large" id="my-info" data-off-canvas data-position="left">
|
12
|
+
<div class="sidebar">
|
13
|
+
<%= render partial: 'layouts/decidim/admin/sidebar' %>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<div class="off-canvas-content" data-off-canvas-content>
|
18
|
+
<div class="title-bar hide-for-large">
|
19
|
+
<div class="title-bar-left">
|
20
|
+
<button class="menu-icon" type="button" data-open="my-info"></button>
|
21
|
+
<span class="title-bar-title"><%= title %></span>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
<div class="row main-content">
|
25
|
+
<div class="small-12 column">
|
26
|
+
<% if content_for?(:title) %>
|
27
|
+
<section class="page-title">
|
28
|
+
<%= content_for :title %>
|
29
|
+
</section>
|
30
|
+
<% end %>
|
31
|
+
|
32
|
+
<%= display_flash_messages %>
|
33
|
+
<%= yield %>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
</body>
|
40
|
+
</html>
|
@@ -7,8 +7,11 @@
|
|
7
7
|
</div>
|
8
8
|
|
9
9
|
<nav class="main-menu">
|
10
|
-
<%= active_link_to t("menu.dashboard", scope: "decidim.admin"), root_path, active: :exact %>
|
11
|
-
<%= active_link_to t("menu.participatory_processes", scope: "decidim.admin"), participatory_processes_path, active: :inclusive %>
|
10
|
+
<%= active_link_to t("menu.dashboard", scope: "decidim.admin"), decidim_admin.root_path, active: :exact %>
|
11
|
+
<%= active_link_to t("menu.participatory_processes", scope: "decidim.admin"), decidim_admin.participatory_processes_path, active: :inclusive %>
|
12
|
+
<%= active_link_to t("menu.static_pages", scope: "decidim.admin"), decidim_admin.static_pages_path, active: :inclusive if can? :read, Decidim::StaticPage %>
|
13
|
+
<%= active_link_to t("menu.scopes", scope: "decidim.admin"), decidim_admin.scopes_path, active: :inclusive if can? :read, Decidim::Scope %>
|
14
|
+
<%= active_link_to t("menu.settings", scope: "decidim.admin"), decidim_admin.edit_organization_path, active: :inclusive if can? :read, current_organization %>
|
12
15
|
</nav>
|
13
16
|
|
14
17
|
<%= render partial: 'layouts/decidim/admin/login_items' %>
|
@@ -1,40 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
<title>Decidim - admin</title>
|
5
|
-
<%= render partial: 'layouts/decidim/admin/header' %>
|
6
|
-
</head>
|
7
|
-
|
8
|
-
<body>
|
9
|
-
<div class="off-canvas-wrapper">
|
10
|
-
<div class="off-canvas-wrapper-inner" data-off-canvas-wrapper>
|
11
|
-
<div class="off-canvas position-left reveal-for-large" id="my-info" data-off-canvas data-position="left">
|
12
|
-
<div class="sidebar">
|
13
|
-
<%= render partial: 'layouts/decidim/admin/sidebar' %>
|
14
|
-
</div>
|
15
|
-
</div>
|
16
|
-
|
17
|
-
<div class="off-canvas-content" data-off-canvas-content>
|
18
|
-
<div class="title-bar hide-for-large">
|
19
|
-
<div class="title-bar-left">
|
20
|
-
<button class="menu-icon" type="button" data-open="my-info"></button>
|
21
|
-
<span class="title-bar-title"><%= title %></span>
|
22
|
-
</div>
|
23
|
-
</div>
|
24
|
-
<div class="row main-content">
|
25
|
-
<div class="small-12 column">
|
26
|
-
<% if content_for?(:title) %>
|
27
|
-
<section class="page-title">
|
28
|
-
<%= content_for :title %>
|
29
|
-
</section>
|
30
|
-
<% end %>
|
31
|
-
|
32
|
-
<%= display_flash_messages %>
|
33
|
-
<%= yield %>
|
34
|
-
</div>
|
35
|
-
</div>
|
36
|
-
</div>
|
37
|
-
</div>
|
38
|
-
</div>
|
39
|
-
</body>
|
40
|
-
</html>
|
1
|
+
<%= render "layouts/decidim/admin/application" do %>
|
2
|
+
<%= yield %>
|
3
|
+
<% end %>
|
@@ -0,0 +1,54 @@
|
|
1
|
+
<% content_for :title do %>
|
2
|
+
<h2><%= link_to translated_attribute(participatory_process.title), decidim_admin.participatory_process_path(participatory_process) %></h2>
|
3
|
+
<h3 class="subheader"><%= translated_attribute(participatory_process.subtitle) %></h3>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<%= render "layouts/decidim/admin/application" do %>
|
7
|
+
<hr />
|
8
|
+
<div class="row">
|
9
|
+
<div class="medium-3 columns">
|
10
|
+
<ul class="tabs vertical" id="example-vert-tabs">
|
11
|
+
<li class="tabs-title is-active">
|
12
|
+
<%= aria_selected_link_to t("info", scope: "decidim.admin.menu.participatory_processes_submenu"), decidim_admin.participatory_process_path(participatory_process), aria_link_type: :exclusive %>
|
13
|
+
</li>
|
14
|
+
<% if can? :read, Decidim::ParticipatoryProcessStep %>
|
15
|
+
<li class="tabs-title">
|
16
|
+
<%= aria_selected_link_to t("steps", scope: "decidim.admin.menu.participatory_processes_submenu"), decidim_admin.participatory_process_steps_path(participatory_process) %>
|
17
|
+
</li>
|
18
|
+
<% end %>
|
19
|
+
<% if can? :read, Decidim::Feature %>
|
20
|
+
<li class="tabs-title">
|
21
|
+
<%= aria_selected_link_to t("features", scope: "decidim.admin.menu.participatory_processes_submenu"), decidim_admin.participatory_process_features_path(participatory_process) %>
|
22
|
+
</li>
|
23
|
+
<% end %>
|
24
|
+
<% if can? :read, Decidim::Category %>
|
25
|
+
<li class="tabs-title">
|
26
|
+
<%= aria_selected_link_to t("categories", scope: "decidim.admin.menu.participatory_processes_submenu"), decidim_admin.participatory_process_categories_path(participatory_process) %>
|
27
|
+
</li>
|
28
|
+
<% end %>
|
29
|
+
<% if can? :read, Decidim::Admin::ParticipatoryProcessUserRole %>
|
30
|
+
<li class="tabs-title">
|
31
|
+
<%= aria_selected_link_to t("process_admins", scope: "decidim.admin.menu.participatory_processes_submenu"), decidim_admin.participatory_process_user_roles_path(participatory_process) %>
|
32
|
+
</li>
|
33
|
+
<% end %>
|
34
|
+
<% if can? :read, Decidim::ParticipatoryProcessAttachment %>
|
35
|
+
<li class="tabs-title">
|
36
|
+
<%= aria_selected_link_to t("attachments", scope: "decidim.admin.menu.participatory_processes_submenu"), decidim_admin.participatory_process_attachments_path(participatory_process) %>
|
37
|
+
</li>
|
38
|
+
<% end %>
|
39
|
+
<% if can? :update, participatory_process %>
|
40
|
+
<li class="tabs-title">
|
41
|
+
<%= aria_selected_link_to t("settings", scope: "decidim.admin.menu.participatory_processes_submenu"), decidim_admin.edit_participatory_process_path(participatory_process) %>
|
42
|
+
</li>
|
43
|
+
<% end %>
|
44
|
+
</ul>
|
45
|
+
</div>
|
46
|
+
<div class="medium-9 columns">
|
47
|
+
<div class="tabs-content vertical">
|
48
|
+
<div class="tabs-panel is-active">
|
49
|
+
<%= yield %>
|
50
|
+
</div>
|
51
|
+
</div>
|
52
|
+
</div>
|
53
|
+
</div>
|
54
|
+
<% end %>
|
data/config/i18n-tasks.yml
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
# The "main" locale.
|
4
4
|
base_locale: en
|
5
5
|
## All available locales are inferred from the data by default. Alternatively, specify them explicitly:
|
6
|
-
|
6
|
+
locales: [en]
|
7
7
|
## Reporting locale, default: en. Available: en, ru.
|
8
8
|
# internal_locale: en
|
9
9
|
|
@@ -89,7 +89,8 @@ search:
|
|
89
89
|
|
90
90
|
## Consider these keys used:
|
91
91
|
ignore_unused:
|
92
|
-
- activerecord.attributes
|
92
|
+
- activerecord.attributes.*
|
93
|
+
- activemodel.attributes.*
|
93
94
|
# - '{devise,kaminari,will_paginate}.*'
|
94
95
|
# - 'simple_form.{yes,no}'
|
95
96
|
# - 'simple_form.{placeholders,hints,labels}.*'
|