Sha256: a39f6af18e561a45ac1cde4f0baabbb97c74aeb681beef411f52b4b2468cc3f6

Contents?: true

Size: 1.43 KB

Versions: 9

Compression:

Stored size: 1.43 KB

Contents

<% add_decidim_page_title(translated_attribute(current_question.title)) %>
<%= 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

9 entries across 9 versions & 1 rubygems

Version Path
decidim-consultations-0.27.9 app/views/decidim/consultations/admin/questions/edit.html.erb
decidim-consultations-0.27.8 app/views/decidim/consultations/admin/questions/edit.html.erb
decidim-consultations-0.27.7 app/views/decidim/consultations/admin/questions/edit.html.erb
decidim-consultations-0.27.6 app/views/decidim/consultations/admin/questions/edit.html.erb
decidim-consultations-0.26.10 app/views/decidim/consultations/admin/questions/edit.html.erb
decidim-consultations-0.26.9 app/views/decidim/consultations/admin/questions/edit.html.erb
decidim-consultations-0.27.5 app/views/decidim/consultations/admin/questions/edit.html.erb
decidim-consultations-0.26.8 app/views/decidim/consultations/admin/questions/edit.html.erb
decidim-consultations-0.27.4 app/views/decidim/consultations/admin/questions/edit.html.erb