<%= form_for(@issue) do |f| %> <%= f.error_messages %>

<%= f.label :title %>
<%= f.text_field :title %>

<% if cuser and cuser.admin? %>

<%= f.label :status %>
<%= f.select :status, @issue.statuses.invert %>

<%= link_to_function 'Assigned', "findUser('assigned')" %>
<%= f.text_field :assigned_name, {:value => User.first(:conditions => {:id => @issue.assigned})} %>

<% end %>

<%= f.label :category_id %>
<%= f.select :category_id, Category.domain(Category::DOMAIN_ISSUES).ordered.collect{|c| [c, c.id]} %>

<%= f.label :text %>
<%= f.text_area :text %>

<% if cuser and cuser.admin? %>

<%= f.label :solution %>
<%= f.text_area :solution %>

<% end %>

<%= f.submit 'Save' %>

<% end %>