Fix project archiving and restoring edge case [SCI-2787]

This commit is contained in:
Matej Zrimšek 2018-10-24 01:37:57 +02:00
parent 18e52e2c6f
commit 43fdab561f
3 changed files with 3 additions and 3 deletions

View file

@ -5,7 +5,7 @@
data-project-users-tab-url="<%= url_for project_user_projects_path(project_id: project.id, format: :json) %>">
<div class="panel-heading">
<%= render partial: "projects/index/project_actions_dropdown.html.erb", locals: { project: project } %>
<%= render partial: "projects/index/project_actions_dropdown.html.erb", locals: { project: project, view: 'cards' } %>
<div class="pull-right">
<input class="project-card-selector" type="checkbox" name="project-<%= project.id %>">

View file

@ -6,7 +6,7 @@
<span class="caret"></span>
</button>
<% project_form = nil %>
<%= form_for project, format: :json, method: :put, remote: true do |f| %>
<%= form_for project, format: :json, method: :put, remote: true, html: {id: "edit-project-#{view}-form-#{project.id}" } do |f| %>
<% project_form = f %>
<%= f.hidden_field :archived, value: active %>
<% end %>

View file

@ -34,7 +34,7 @@ json.data do
json.set! 'tasks', project.task_count
json.set! 'actions', render(
partial: 'projects/index/project_actions_dropdown.html.erb',
locals: { project: project }
locals: { project: project, view: 'table' }
)
end
end