mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-27 04:51:14 +00:00
34 lines
1.2 KiB
Text
34 lines
1.2 KiB
Text
<%= form_for(@issue, html: { class: 'square' }) do |f| %>
|
|
<%= f.error_messages %>
|
|
<div class="fields horizontal">
|
|
<%= f.label :title %>
|
|
<%= f.text_field :title %>
|
|
</div>
|
|
<% if cuser and (cuser.admin? or Issue::allowed_categories(cuser).include?(@issue.category_id)) %>
|
|
<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>
|
|
<% end %>
|
|
<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>
|
|
<% if cuser and (cuser.admin? or Issue::allowed_categories(cuser).include?(@issue.category_id)) %>
|
|
<div class="fields horizontal">
|
|
<%= f.label :solution %>
|
|
<%= f.text_area :solution, rows: 7 %>
|
|
</div>
|
|
<% end %>
|
|
<div class="controls">
|
|
<%= f.submit 'Submit' %>
|
|
</div>
|
|
<% end %>
|