Sha256: 70c9dfdc6f5153f4e095f5030f394dc9d85ff7251a2848d2377e8def37cd3729

Contents?: true

Size: 1.36 KB

Versions: 42

Compression:

Stored size: 1.36 KB

Contents

<%= decidim_form_for @form,
                     url: question_path(current_question),
                     method: :patch,
                     html: { class: "form edit_question" } do |f| %>
  <%= render partial: "form", object: f %>
  <div class="button--double form-general-submit">
    <%= f.submit t("questions.edit.update", scope: "decidim.admin"),
                 class: "button",
                 data: { disable_with: true } %>

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

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

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
decidim-consultations-0.19.1 app/views/decidim/consultations/admin/questions/edit.html.erb
decidim-consultations-0.19.0 app/views/decidim/consultations/admin/questions/edit.html.erb