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.27.3 app/views/decidim/consultations/admin/questions/edit.html.erb
decidim-consultations-0.26.7 app/views/decidim/consultations/admin/questions/edit.html.erb
decidim-consultations-0.26.5 app/views/decidim/consultations/admin/questions/edit.html.erb
decidim-consultations-0.27.2 app/views/decidim/consultations/admin/questions/edit.html.erb
decidim-consultations-0.27.1 app/views/decidim/consultations/admin/questions/edit.html.erb
decidim-consultations-0.26.4 app/views/decidim/consultations/admin/questions/edit.html.erb
decidim-consultations-0.27.0 app/views/decidim/consultations/admin/questions/edit.html.erb
decidim-consultations-0.26.3 app/views/decidim/consultations/admin/questions/edit.html.erb
decidim-consultations-0.27.0.rc2 app/views/decidim/consultations/admin/questions/edit.html.erb
decidim-consultations-0.27.0.rc1 app/views/decidim/consultations/admin/questions/edit.html.erb
decidim-consultations-0.26.2 app/views/decidim/consultations/admin/questions/edit.html.erb
decidim-consultations-0.26.1 app/views/decidim/consultations/admin/questions/edit.html.erb
decidim-consultations-0.26.0 app/views/decidim/consultations/admin/questions/edit.html.erb
decidim-consultations-0.26.0.rc2 app/views/decidim/consultations/admin/questions/edit.html.erb
decidim-consultations-0.26.0.rc1 app/views/decidim/consultations/admin/questions/edit.html.erb
decidim-consultations-0.25.2 app/views/decidim/consultations/admin/questions/edit.html.erb
decidim-consultations-0.25.1 app/views/decidim/consultations/admin/questions/edit.html.erb
decidim-consultations-0.25.0 app/views/decidim/consultations/admin/questions/edit.html.erb
decidim-consultations-0.25.0.rc4 app/views/decidim/consultations/admin/questions/edit.html.erb
decidim-consultations-0.25.0.rc3 app/views/decidim/consultations/admin/questions/edit.html.erb