Do not show inactive document categories where not necessary (#8573).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6071 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -57,7 +57,7 @@ class DocumentsController < ApplicationController
|
||||
end
|
||||
|
||||
def edit
|
||||
@categories = DocumentCategory.all
|
||||
@categories = DocumentCategory.active #TODO: use it in the views
|
||||
if request.post? and @document.update_attributes(params[:document])
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
redirect_to :action => 'show', :id => @document
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="box">
|
||||
<!--[form:document]-->
|
||||
<p><label for="document_category_id"><%=l(:field_category)%></label>
|
||||
<%= select('document', 'category_id', DocumentCategory.all.collect {|c| [c.name, c.id]}) %></p>
|
||||
<%= select('document', 'category_id', DocumentCategory.active.collect {|c| [c.name, c.id]}) %></p>
|
||||
|
||||
<p><label for="document_title"><%=l(:field_title)%> <span class="required">*</span></label>
|
||||
<%= text_field 'document', 'title', :size => 60 %></p>
|
||||
|
||||
Reference in New Issue
Block a user