Show only published draft versions to users (and also drafts to admins)

This commit is contained in:
Amaia Castro
2017-01-03 22:08:54 +01:00
parent 3ba6b409aa
commit f040759693
5 changed files with 69 additions and 9 deletions

View File

@@ -11,7 +11,7 @@
<h3><%= t('.seeing_version') %></h3>
<div class="select-box">
<%= form_tag go_to_version_legislation_process_draft_versions_path(@process), method: :get, id: "draft_version_go_to_version" do %>
<%= select_tag "draft_version_id", options_from_collection_for_select(@process.draft_versions, 'id', 'title', @draft_version.id), "aria-label": t('.select_draft_version') %>
<%= select_tag "draft_version_id", options_from_collection_for_select(@process.draft_versions.published, 'id', 'title', @draft_version.id), "aria-label": t('.select_draft_version') %>
<%= submit_tag t('.select_version_submit'), class: "button" %>
<% end %>
<span><%= link_to t('.see_changes'), legislation_process_draft_version_changes_path(@process, @draft_version) %></span>