-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7d35dda
commit c4b84fb
Showing
44 changed files
with
349 additions
and
349 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<%= icon("circle-check", class: "icon--small", aria_label: "#{t("decidim.budgets.project_m.votes_count")}:", role: "img") %> | ||
<%= icon("checkbox-circle-line", class: "icon--small", aria_label: "#{t("decidim.budgets.project_m.votes_count")}:", role: "img") %> | ||
<%= " " %> | ||
<%= votes_count %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,40 @@ | ||
<div class="card"> | ||
<div class="card-divider"> | ||
<h2 class="card-title"><%= title %></h2> | ||
</div> | ||
|
||
<div class="card-section"> | ||
<div class="row column"> | ||
<%= form.translated :text_field, :title, autofocus: true %> | ||
<div class="form__wrapper"> | ||
<div class="card pt-4"> | ||
<div class="card-section"> | ||
<div class="row column"> | ||
<%= form.translated :text_field, :title, autofocus: true, aria: { label: :title } %> | ||
</div> | ||
|
||
<%= form.number_field :weight %> | ||
<div class="row column"> | ||
<%= form.number_field :weight %> | ||
</div> | ||
|
||
<%= form.translated :editor, :description %> | ||
<div class="row column"> | ||
<%= form.translated :editor, :description, toolbar: :content, aria: { label: :description } %> | ||
</div> | ||
|
||
<div class="row column"> | ||
<%= form.upload :list_image %> | ||
<%= form.upload :list_image, button_class: "button button__sm button__transparent-secondary" %> | ||
</div> | ||
|
||
<%= form.number_field :total_budget %> | ||
<div class="row column"> | ||
<%= form.number_field :total_budget %> | ||
</div> | ||
|
||
<% if current_component.settings.geocoding_enabled %> | ||
<%= form.number_field :center_latitude %> | ||
<div class="row column"> | ||
<%= form.number_field :center_latitude %> | ||
|
||
<%= form.number_field :center_longitude %> | ||
<%= form.number_field :center_longitude %> | ||
</div> | ||
<% end %> | ||
|
||
<% if current_component.has_subscopes? %> | ||
<div class="row column"> | ||
<%= scopes_picker_field form, :decidim_scope_id, root: current_component.scope %> | ||
<%= scopes_select_field form, :decidim_scope_id, root: current_component.scope %> | ||
</div> | ||
<% end %> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,69 @@ | ||
<div class="card with-overflow"> | ||
<div class="card-divider"> | ||
<h2 class="card-title flex--sbc"> | ||
<div> | ||
<%= t(".title") %> | ||
</div> | ||
<div class="flex--cc flex-gap--1"> | ||
<% if allowed_to? :export, :budget %> | ||
<%= export_dropdown %> | ||
<% add_decidim_page_title(t(".title")) %> | ||
<div class="card"> | ||
<div class="item_show__header"> | ||
<h1 class="item_show__header-title"> | ||
<%= t(".title") %> | ||
<% if allowed_to? :export, :budget %> | ||
<%= export_dropdown %> | ||
<% end %> | ||
<div id="js-other-actions-wrapper"> | ||
<%= link_to t("actions.new_budget", scope: "decidim.budgets"), new_budget_path, class: "button button__sm button__secondary" if allowed_to? :create, :budget %> | ||
<%= link_to t("decidim.budgets.admin.helps.index.title"), helps_path, class: "button button__sm button__secondary" %> | ||
<% if allowed_to? :export_results, :budgets %> | ||
<%= link_to t("actions.export_results", scope: "decidim.budgets.admin"), new_results_export_path, class: "button button__sm button__secondary" %> | ||
<% end %> | ||
<div id="js-other-actions-wrapper"> | ||
<%= link_to t("actions.new", scope: "decidim.budgets", name: t("models.budget.name", scope: "decidim.budgets.admin")), new_budget_path, class: "button tiny button--title" if allowed_to? :create, :budget %> | ||
<%= link_to t("decidim.budgets.admin.helps.index.title"), helps_path, class: "button tiny button--title" %> | ||
<% if allowed_to? :export_results, :budgets %> | ||
<%= link_to t("actions.export_results", scope: "decidim.budgets.admin"), new_results_export_path, class: "button tiny button--title" %> | ||
<% end %> | ||
</div> | ||
</div> | ||
</h2> | ||
<%= render partial: "decidim/admin/components/resource_action" %> | ||
</h1> | ||
</div> | ||
<div class="table-scroll"> | ||
<table class="table-list"> | ||
<thead> | ||
<tr> | ||
<th><%= t("models.budget.fields.name", scope: "decidim.budgets") %></th> | ||
<th><%= t("models.budget.fields.total_budget", scope: "decidim.budgets") %></th> | ||
<th><%= t("models.budget.fields.projects_count", scope: "decidim.budgets") %></th> | ||
<%= th_resource_scope_label %> | ||
<th class="actions"><%= t("actions.title", scope: "decidim.budgets") %></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<% budgets.each do |budget| %> | ||
<tr data-id="<%= budget.id %>"> | ||
<td> | ||
<% if allowed_to? :update, :budget, budget: budget %> | ||
<%= link_to translated_attribute(budget.title), budget_projects_path(budget) %><br> | ||
<% else %> | ||
<%= translated_attribute(budget.title) %> | ||
<% end %> | ||
</td> | ||
<td> | ||
<%= number_to_currency budget.total_budget, unit: Decidim.currency_unit, precision: 0 %> | ||
</td> | ||
<td> | ||
<%= link_to budget.projects.count, budget_projects_path(budget) %> | ||
</td> | ||
<%= td_resource_scope_for(budget.scope) %> | ||
<td class="table-list__actions"> | ||
<% if allowed_to? :update, :budget, budget: budget %> | ||
<%= icon_link_to "pencil-line", edit_budget_path(budget), t("actions.edit", scope: "decidim.budgets"), class: "action-icon--edit" %> | ||
<% else %> | ||
<%= icon "pencil-line", class: "action-icon action-icon--disabled", role: "img", aria_label: t("actions.edit", scope: "decidim.budgets") %> | ||
<% end %> | ||
|
||
<div class="card-section"> | ||
<div class="table-scroll"> | ||
<table class="table-list"> | ||
<thead> | ||
<tr> | ||
<th><%= t("models.budget.fields.name", scope: "decidim.budgets") %></th> | ||
<th><%= t("models.budget.fields.total_budget", scope: "decidim.budgets") %></th> | ||
<th><%= t("models.budget.fields.projects_count", scope: "decidim.budgets") %></th> | ||
<%= th_resource_scope_label %> | ||
<th class="actions"><%= t("actions.title", scope: "decidim.budgets") %></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<% budgets.each do |budget| %> | ||
<tr data-id="<%= budget.id %>"> | ||
<td> | ||
<%= link_to translated_attribute(budget.title), resource_locator(budget).path %> | ||
</td> | ||
<td> | ||
<%= number_to_currency budget.total_budget, unit: Decidim.currency_unit, precision: 0 %> | ||
</td> | ||
<td> | ||
<%= link_to budget.projects.count, budget_projects_path(budget) %> | ||
</td> | ||
<%= td_resource_scope_for(budget.scope) %> | ||
<td class="table-list__actions"> | ||
<%= icon_link_to "eye", resource_locator(budget).path, t("actions.preview", scope: "decidim.budgets"), class: "action-icon--preview", target: :blank %> | ||
|
||
<%= icon_link_to "list", budget_projects_path(budget), t("actions.edit_projects", scope: "decidim.budgets"), class: "action-icon--edit-projects" %> | ||
<%= icon_link_to "list-check", budget_projects_path(budget), t("actions.edit_projects", scope: "decidim.budgets"), class: "action-icon--edit-projects" %> | ||
|
||
<% if allowed_to? :update, :budget, budget: budget %> | ||
<%= icon_link_to "pencil", edit_budget_path(budget), t("actions.edit", scope: "decidim.budgets"), class: "action-icon--edit" %> | ||
<% else %> | ||
<%= icon "pencil", class: "action-icon action-icon--disabled", role: "img", aria_label: t("actions.edit", scope: "decidim.budgets") %> | ||
<% end %> | ||
<%= icon_link_to "eye-line", resource_locator(budget).path, t("actions.preview", scope: "decidim.budgets"), class: "action-icon--preview", target: :blank, data: { "external-link": false } %> | ||
|
||
<% if allowed_to? :delete, :budget, budget: budget %> | ||
<%= icon_link_to "circle-x", budget_path(budget), t("actions.destroy", scope: "decidim.budgets"), method: :delete, class: "action-icon--remove", data: { confirm: t("actions.confirm_destroy", scope: "decidim.budgets") } %> | ||
<% else %> | ||
<%= icon "circle-x", class: "action-icon action-icon--disabled", role: "img", aria_label: t("actions.destroy", scope: "decidim.budgets") %> | ||
<% end %> | ||
</td> | ||
</tr> | ||
<% end %> | ||
</tbody> | ||
</table> | ||
</div> | ||
<% if allowed_to? :delete, :budget, budget: budget %> | ||
<%= icon_link_to "delete-bin-line", budget_path(budget), t("actions.destroy", scope: "decidim.budgets"), method: :delete, class: "action-icon--remove", data: { confirm: t("actions.confirm_destroy", scope: "decidim.budgets") } %> | ||
<% else %> | ||
<%= icon "delete-bin-line", class: "action-icon action-icon--disabled", role: "img", aria_label: t("actions.destroy", scope: "decidim.budgets") %> | ||
<% end %> | ||
</td> | ||
</tr> | ||
<% end %> | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> |
38 changes: 20 additions & 18 deletions
38
app/views/decidim/budgets/admin/help_sections/_form.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,29 @@ | ||
<div class="card"> | ||
<div class="card-divider"> | ||
<h2 class="card-title"> | ||
<div> | ||
<%= link_to t("decidim.budgets.admin.helps.index.title"), helps_path %> > | ||
<%= link_to container.name, help_sections_path(container.key) %> > | ||
<%= title %> | ||
</div> | ||
</h2> | ||
</div> | ||
<div class="form__wrapper"> | ||
<div class="card pt-4"> | ||
<div class="card-divider"> | ||
<h2 class="card-title"> | ||
<div> | ||
<%= link_to t("decidim.budgets.admin.helps.index.title"), helps_path %> > | ||
<%= link_to container.name, help_sections_path(container.key) %> > | ||
<%= title %> | ||
</div> | ||
</h2> | ||
</div> | ||
|
||
<div class="card-section"> | ||
<div class="row column"> | ||
<%= form.translated :text_field, :title, autofocus: true %> | ||
<div class="card-section"> | ||
<div class="row column"> | ||
<%= form.translated :text_field, :title, autofocus: true %> | ||
|
||
<%= form.number_field :weight %> | ||
<%= form.number_field :weight %> | ||
|
||
<%= form.translated :editor, :description %> | ||
<%= form.translated :editor, :description %> | ||
|
||
<%= form.translated :text_field, :link_text %> | ||
<%= form.translated :text_field, :link_text %> | ||
|
||
<%= form.text_field :link %> | ||
<%= form.text_field :link %> | ||
|
||
<%= form.upload :image %> | ||
<%= form.upload :image, button_class: "button button__sm button__transparent-secondary" %> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
10 changes: 6 additions & 4 deletions
10
app/views/decidim/budgets/admin/help_sections/edit.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
<%= decidim_form_for(@form, url: help_section_path(container.key, @form), html: { class: "form edit_help_section" }) do |f| %> | ||
<%= decidim_form_for(@form, url: help_section_path(container.key, @form), html: { class: "form form-defaults edit_help_section" }) do |f| %> | ||
<%= render partial: "form", object: f, locals: { title: t(".title") } %> | ||
|
||
<div class="button--double form-general-submit"> | ||
<%= f.submit t(".update") %> | ||
</div> | ||
<div class="item__edit-sticky"> | ||
<div class="item__edit-sticky-container"> | ||
<%= f.submit t(".update"), class: "button button__sm button__secondary" %> | ||
</div> | ||
</div> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
<%= decidim_form_for(@form, html: { class: "form new_help_section" }) do |f| %> | ||
<%= decidim_form_for(@form, html: { class: "form form-defaults new_help_section" }) do |f| %> | ||
<%= render partial: "form", object: f, locals: { title: t(".title") } %> | ||
|
||
<div class="button--double form-general-submit"> | ||
<%= f.submit t(".create") %> | ||
</div> | ||
<div class="item__edit-sticky"> | ||
<div class="item__edit-sticky-container"> | ||
<%= f.submit t(".create"), class: "button button__sm button__secondary" %> | ||
</div> | ||
</div> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.