2014-04-19 01:12:02 +00:00
|
|
|
<%= form_for(@issue, html: { class: 'square' }) do |f| %>
|
|
|
|
<%= f.error_messages %>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :title %>
|
|
|
|
<%= f.text_field :title %>
|
|
|
|
</div>
|
2017-06-24 18:43:42 +00:00
|
|
|
<% if cuser and Issue::allowed_categories(cuser).include?(@issue.category_id) %>
|
2014-04-19 01:12:02 +00:00
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :status %>
|
|
|
|
<%= f.select :status, @issue.statuses.invert %>
|
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :assigned %>
|
|
|
|
<%= f.text_field :assigned_name, {:value => User.first(:conditions => {:id => @issue.assigned})} %>
|
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
<% end %>
|
2014-04-19 01:12:02 +00:00
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :category_id %>
|
|
|
|
<%= f.select :category_id, Category.domain(Category::DOMAIN_ISSUES).ordered.collect{|c| [c, c.id]} %>
|
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :text %>
|
|
|
|
<%= f.text_area :text, rows: 7 %>
|
|
|
|
</div>
|
2017-06-24 18:43:42 +00:00
|
|
|
<% if cuser and Issue::allowed_categories(cuser).include?(@issue.category_id) %>
|
2014-04-19 01:12:02 +00:00
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :solution %>
|
|
|
|
<%= f.text_area :solution, rows: 7 %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<div class="controls">
|
|
|
|
<%= f.submit 'Submit' %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|