Commit 7e2853fcea820505bf1682c509fd42af7b907775
1 parent
2664a61a
Exists in
master
and in
7 other branches
Limit parent folder
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
views/proposals_discussion_plugin_tasks/_task_accept_details.html.erb
1 | <% unless @view_only %> | 1 | <% unless @view_only %> |
2 | <%= task_email_template(_('Select an acceptance email template:'), @acceptance_email_templates, task, false) %> | 2 | <%= task_email_template(_('Select an acceptance email template:'), @acceptance_email_templates, task, false) %> |
3 | <%= f.fields_for 'article', OpenStruct.new(task.article) do |a| %> | 3 | <%= f.fields_for 'article', OpenStruct.new(task.article) do |a| %> |
4 | - <%= select_profile_folder(_('Select the folder where the article must be published'), "tasks[#{task.id}][task][article_parent_id]", task.target, task.article_parent_id) %> | 4 | + <% parent_filter = task.article_parent.present? && task.article_parent.parent.present? && task.article_parent.parent.kind_of?(ProposalsDiscussionPlugin::Discussion) ? {:parent_id => task.article_parent.parent.id} : {} %> |
5 | + <%= select_profile_folder(_('Select the folder where the article must be published'), "tasks[#{task.id}][task][article_parent_id]", task.target, task.article_parent_id, {}, {}, {:type => ["ProposalsDiscussionPlugin::Topic", "ProposalsDiscussionPlugin::Discussion"]}.merge(parent_filter)) %> | ||
5 | <% end %> | 6 | <% end %> |
6 | <% end %> | 7 | <% end %> |