Sha256: 380d2f41cb11c80663a641e041df2c96ccf5a18726b93266d93ec72933af87fd

Contents?: true

Size: 1.88 KB

Versions: 21

Compression:

Stored size: 1.88 KB

Contents

<%= decidim_form_for(@form, html: { class: "form edit_consultation" }) do |f| %>
  <%= render partial: "form", object: f %>
  <div class="button--double form-general-submit">
    <%= f.submit t("consultations.edit.update", scope: "decidim.admin"), class: "button" %>

    <% if allowed_to? :publish, :consultation, consultation: current_consultation %>
      <% if current_consultation.published? %>
        <%= link_to t("actions.unpublish", scope: "decidim.admin"),
                    consultation_publish_path(current_consultation),
                    method: :delete,
                    class: "button muted" %>
      <% else %>
        <%= link_to t("actions.publish", scope: "decidim.admin"),
                    consultation_publish_path(current_consultation),
                    method: :post,
                    class: "button hollow" %>
      <% end %>
    <% end %>

    <% if allowed_to? :publish_results, :consultation, consultation: current_consultation %>
      <%= link_to t("actions.publish_results", scope: "decidim.admin"),
                  consultation_publish_results_path(current_consultation),
                  method: :post,
                  class: "button hollow" %>
    <% end %>

    <% if allowed_to? :unpublish_results, :consultation, consultation: current_consultation %>
      <%= link_to t("actions.unpublish_results", scope: "decidim.admin"),
                  consultation_publish_results_path(current_consultation),
                  method: :delete,
                  class: "button muted" %>
    <% end %>

    <% if allowed_to? :destroy, :consultation, consultation: current_consultation %>
      <%= link_to t("decidim.admin.actions.destroy"),
                  current_consultation,
                  method: :delete,
                  class: "alert button",
                  data: { confirm: t("decidim.admin.actions.confirm_destroy") } %>
    <% end %>
  </div>
<% end %>

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
decidim-consultations-0.18.1 app/views/decidim/consultations/admin/consultations/edit.html.erb
decidim-consultations-0.17.2 app/views/decidim/consultations/admin/consultations/edit.html.erb
decidim-consultations-0.18.0 app/views/decidim/consultations/admin/consultations/edit.html.erb
decidim-consultations-0.17.1 app/views/decidim/consultations/admin/consultations/edit.html.erb
decidim-consultations-0.16.1 app/views/decidim/consultations/admin/consultations/edit.html.erb
decidim-consultations-0.17.0 app/views/decidim/consultations/admin/consultations/edit.html.erb
decidim-consultations-0.16.0 app/views/decidim/consultations/admin/consultations/edit.html.erb
decidim-consultations-0.15.2 app/views/decidim/consultations/admin/consultations/edit.html.erb
decidim-consultations-0.15.1 app/views/decidim/consultations/admin/consultations/edit.html.erb
decidim-consultations-0.15.0 app/views/decidim/consultations/admin/consultations/edit.html.erb
decidim-consultations-0.14.4 app/views/decidim/consultations/admin/consultations/edit.html.erb
decidim-consultations-0.14.3 app/views/decidim/consultations/admin/consultations/edit.html.erb
decidim-consultations-0.14.2 app/views/decidim/consultations/admin/consultations/edit.html.erb
decidim-consultations-0.14.1 app/views/decidim/consultations/admin/consultations/edit.html.erb
decidim-consultations-0.13.1 app/views/decidim/consultations/admin/consultations/edit.html.erb
decidim-consultations-0.12.2 app/views/decidim/consultations/admin/consultations/edit.html.erb
decidim-consultations-0.13.0 app/views/decidim/consultations/admin/consultations/edit.html.erb
decidim-consultations-0.12.1 app/views/decidim/consultations/admin/consultations/edit.html.erb
decidim-consultations-0.13.0.pre1 app/views/decidim/consultations/admin/consultations/edit.html.erb
decidim-consultations-0.12.0 app/views/decidim/consultations/admin/consultations/edit.html.erb