Revision 912:5e80956cc792 app/views/issue_categories

View differences:

app/views/issue_categories/_form.html.erb
1
<%= error_messages_for 'category' %>
2

  
3
<div class="box">
4
<p><%= f.text_field :name, :size => 30, :required => true %></p>
5
<p><%= f.select :assigned_to_id, principals_options_for_select(@project.assignable_users, @category.assigned_to), :include_blank => true %></p>
6
</div>
app/views/issue_categories/_form.rhtml
1
<%= error_messages_for 'category' %>
2

  
3
<div class="box">
4
<p><%= f.text_field :name, :size => 30, :required => true %></p>
5
<p><%= f.select :assigned_to_id, @project.users.sort.collect{|u| [u.name, u.id]}, :include_blank => true %></p>
6
</div>
app/views/issue_categories/destroy.html.erb
1
<h2><%=l(:label_issue_category)%>: <%=h @category.name %></h2>
2

  
3
<% form_tag(issue_category_path(@category), :method => :delete) do %>
4
<div class="box">
5
<p><strong><%= l(:text_issue_category_destroy_question, @issue_count) %></strong></p>
6
<p><label><%= radio_button_tag 'todo', 'nullify', true %> <%= l(:text_issue_category_destroy_assignments) %></label><br />
7
<% if @categories.size > 0 %>
8
<label><%= radio_button_tag 'todo', 'reassign', false %> <%= l(:text_issue_category_reassign_to) %></label>:
9
<%= label_tag "reassign_to_id", l(:description_issue_category_reassign), :class => "hidden-for-sighted" %>
10
<%= select_tag 'reassign_to_id', options_from_collection_for_select(@categories, 'id', 'name') %></p>
11
<% end %>
12
</div>
13

  
14
<%= submit_tag l(:button_apply) %>
15
<%= link_to l(:button_cancel), :controller => 'projects', :action => 'settings', :id => @project, :tab => 'categories' %>
16
<% end %>
app/views/issue_categories/destroy.rhtml
1
<h2><%=l(:label_issue_category)%>: <%=h @category.name %></h2>
2

  
3
<% form_tag({}) do %>
4
<div class="box">
5
<p><strong><%= l(:text_issue_category_destroy_question, @issue_count) %></strong></p>
6
<p><label><%= radio_button_tag 'todo', 'nullify', true %> <%= l(:text_issue_category_destroy_assignments) %></label><br />
7
<% if @categories.size > 0 %>
8
<label><%= radio_button_tag 'todo', 'reassign', false %> <%= l(:text_issue_category_reassign_to) %></label>:
9
<%= select_tag 'reassign_to_id', options_from_collection_for_select(@categories, 'id', 'name') %></p>
10
<% end %>
11
</div>
12

  
13
<%= submit_tag l(:button_apply) %>
14
<%= link_to l(:button_cancel), :controller => 'projects', :action => 'settings', :id => @project, :tab => 'categories' %>
15
<% end %>
app/views/issue_categories/edit.html.erb
1
<h2><%=l(:label_issue_category)%></h2>
2

  
3
<% labelled_tabular_form_for :issue_category, @category, :url => issue_category_path(@category), :html => {:method => :put} do |f| %>
4
<%= render :partial => 'issue_categories/form', :locals => { :f => f } %>
5
<%= submit_tag l(:button_save) %>
6
<% end %>
app/views/issue_categories/edit.rhtml
1
<h2><%=l(:label_issue_category)%></h2>
2

  
3
<% labelled_tabular_form_for :category, @category, :url => { :action => 'edit', :id => @category } do |f| %>
4
<%= render :partial => 'issue_categories/form', :locals => { :f => f } %>
5
<%= submit_tag l(:button_save) %>
6
<% end %>
app/views/issue_categories/index.api.rsb
1
api.array :issue_categories, api_meta(:total_count => @categories.size) do
2
  @categories.each do |category|
3
    api.issue_category do
4
      api.id category.id
5
      api.project(:id => category.project_id, :name => category.project.name) unless category.project.nil?
6
      api.name category.name
7
      api.assigned_to(:id => category.assigned_to_id, :name => category.assigned_to.name) unless category.assigned_to.nil?
8
    end
9
  end
10
end
app/views/issue_categories/new.html.erb
1 1
<h2><%=l(:label_issue_category_new)%></h2>
2 2

  
3
<% labelled_tabular_form_for :category, @category, :url => { :action => 'new' } do |f| %>
3
<% labelled_tabular_form_for :issue_category, @category, :url => project_issue_categories_path(@project) do |f| %>
4 4
<%= render :partial => 'issue_categories/form', :locals => { :f => f } %>
5 5
<%= submit_tag l(:button_create) %>
6 6
<% end %>
app/views/issue_categories/show.api.rsb
1
api.issue_category do
2
  api.id @category.id
3
  api.project(:id => @category.project_id, :name => @category.project.name) unless @category.project.nil?
4
  api.name @category.name
5
  api.assigned_to(:id => @category.assigned_to_id, :name => @category.assigned_to.name) unless @category.assigned_to.nil?
6
end

Also available in: Unified diff