Revision 912:5e80956cc792 app/views/trackers

View differences:

app/views/trackers/_form.html.erb
1
<%= error_messages_for 'tracker' %>
2

  
3
<div class="splitcontentleft">
4
<div class="box tabular">
5
<!--[form:tracker]-->
6
<p><%= f.text_field :name, :required => true %></p>
7
<p><%= f.check_box :is_in_roadmap %></p>
8

  
9
<% if IssueCustomField.all.any? %>
10
<p>
11
  <label><%= l(:label_custom_field_plural) %></label>
12
  <% IssueCustomField.all.each do |field| %>
13
    <label class="block">
14
      <%= check_box_tag 'tracker[custom_field_ids][]',field.id, @tracker.custom_fields.include?(field) %>
15
      <%=h field.name %>
16
    </label>
17
  <% end %>
18
</p>
19
<%= hidden_field_tag 'tracker[custom_field_ids][]', '' %>
20
<% end %>
21

  
22
<% if @tracker.new_record? && @trackers.any? %>
23
<p><label for="copy_workflow_from"><%= l(:label_copy_workflow_from) %></label>
24
<%= select_tag(:copy_workflow_from, content_tag("option") + options_from_collection_for_select(@trackers, :id, :name)) %></p>
25
<% end %>
26
<!--[eoform:tracker]-->
27
</div>
28
<%= submit_tag l(@tracker.new_record? ? :button_create : :button_save) %>
29
</div>
30

  
31
<div class="splitcontentright">
32
<% if @projects.any? %>
33
<fieldset class="box" id="tracker_project_ids"><legend><%= l(:label_project_plural) %></legend>
34
<%= project_nested_ul(@projects) do |p|
35
  content_tag('label', check_box_tag('tracker[project_ids][]', p.id, @tracker.projects.include?(p), :id => nil) + ' ' + h(p))
36
end %>
37
<%= hidden_field_tag('tracker[project_ids][]', '', :id => nil) %>
38
<p><%= check_all_links 'tracker_project_ids' %></p>
39
</fieldset>
40
<% end %>
41
</div>
app/views/trackers/_form.rhtml
1
<%= error_messages_for 'tracker' %>
2

  
3
<div class="splitcontentleft">
4
<div class="box tabular">
5
<!--[form:tracker]-->
6
<p><%= f.text_field :name, :required => true %></p>
7
<p><%= f.check_box :is_in_roadmap %></p>
8

  
9
<% if IssueCustomField.all.any? %>
10
<p>
11
	<label><%= l(:label_custom_field_plural) %></label>
12
	<% IssueCustomField.all.each do |field| %>
13
		<label class="block">
14
			<%= check_box_tag 'tracker[custom_field_ids][]',field.id, @tracker.custom_fields.include?(field) %>
15
			<%=h field.name %>
16
		</label>
17
	<% end %>
18
</p>
19
<%= hidden_field_tag 'tracker[custom_field_ids][]', '' %>
20
<% end %>
21

  
22
<% if @tracker.new_record? && @trackers.any? %>
23
<p><label><%= l(:label_copy_workflow_from) %></label>
24
<%= select_tag(:copy_workflow_from, content_tag("option") + options_from_collection_for_select(@trackers, :id, :name)) %></p>
25
<% end %>
26
<!--[eoform:tracker]-->
27
</div>
28
<%= submit_tag l(@tracker.new_record? ? :button_create : :button_save) %>
29
</div>
30

  
31
<div class="splitcontentright">
32
<% if @projects.any? %>
33
<fieldset class="box" id="tracker_project_ids"><legend><%= l(:label_project_plural) %></legend>
34
<%= project_nested_ul(@projects) do |p|
35
  content_tag('label', check_box_tag('tracker[project_ids][]', p.id, @tracker.projects.include?(p), :id => nil) + ' ' + h(p))
36
end %>
37
<%= hidden_field_tag('tracker[project_ids][]', '', :id => nil) %>
38
<p><%= check_all_links 'tracker_project_ids' %></p>
39
</fieldset>
40
<% end %>
41
</div>
app/views/trackers/edit.html.erb
1
<h2><%= link_to l(:label_tracker_plural), trackers_path %> &#187; <%=h @tracker %></h2>
2

  
3
<% form_for @tracker, :builder => TabularFormBuilder do |f| %>
4
<%= render :partial => 'form', :locals => { :f => f } %>
5
<% end %>
app/views/trackers/edit.rhtml
1
<h2><%= link_to l(:label_tracker_plural), :controller => 'trackers', :action => 'index' %> &#187; <%=h @tracker %></h2>
2

  
3
<% form_for :tracker, @tracker, :url => { :action => 'edit' }, :builder => TabularFormBuilder do |f| %>
4
<%= render :partial => 'form', :locals => { :f => f } %>
5
<% end %>
app/views/trackers/index.api.rsb
1
api.array :trackers do
2
  @trackers.each do |tracker|
3
    api.tracker do
4
      api.id tracker.id
5
      api.name tracker.name
6
    end
7
  end
8
end
app/views/trackers/index.html.erb
1 1
<div class="contextual">
2
<%= link_to l(:label_tracker_new), {:action => 'new'}, :class => 'icon icon-add' %>
2
<%= link_to l(:label_tracker_new), new_tracker_path, :class => 'icon icon-add' %>
3 3
</div>
4 4

  
5 5
<h2><%=l(:label_tracker_plural)%></h2>
......
14 14
  <tbody>
15 15
<% for tracker in @trackers %>
16 16
  <tr class="<%= cycle("odd", "even") %>">
17
  <td><%= link_to tracker.name, :action => 'edit', :id => tracker %></td>
17
  <td><%= link_to h(tracker.name), edit_tracker_path(tracker) %></td>
18 18
  <td align="center"><% unless tracker.workflows.count > 0 %><span class="icon icon-warning"><%= l(:text_tracker_no_workflow) %> (<%= link_to l(:button_edit), {:controller => 'workflows', :action => 'edit', :tracker_id => tracker} %>)</span><% end %></td>
19
  <td align="center" style="width:15%;"><%= reorder_links('tracker', {:action => 'edit', :id => tracker}) %></td>
19
  <td align="center" style="width:15%;"><%= reorder_links('tracker', {:action => 'update', :id => tracker}, :put) %></td>
20 20
  <td class="buttons">
21
    <%= link_to(l(:button_delete), { :action => 'destroy', :id => tracker },
22
    															 :method => :post,
23
    															 :confirm => l(:text_are_you_sure),
24
    															 :class => 'icon icon-del') %>
21
    <%= link_to(l(:button_delete), tracker_path(tracker),
22
                                   :method => :delete,
23
                                   :confirm => l(:text_are_you_sure),
24
                                   :class => 'icon icon-del') %>
25 25
  </td>
26 26
  </tr>
27 27
<% end %>
app/views/trackers/new.html.erb
1
<h2><%= link_to l(:label_tracker_plural), trackers_path %> &#187; <%=l(:label_tracker_new)%></h2>
2

  
3
<% form_for @tracker, :builder => TabularFormBuilder do |f| %>
4
<%= render :partial => 'form', :locals => { :f => f } %>
5
<% end %>
app/views/trackers/new.rhtml
1
<h2><%= link_to l(:label_tracker_plural), :controller => 'trackers', :action => 'index' %> &#187; <%=l(:label_tracker_new)%></h2>
2

  
3
<% form_for :tracker, @tracker, :url => { :action => 'new' }, :builder => TabularFormBuilder do |f| %>
4
<%= render :partial => 'form', :locals => { :f => f } %>
5
<% end %>

Also available in: Unified diff