Redmine 3.4.4
This commit is contained in:
commit
64924a6376
2112 changed files with 259028 additions and 0 deletions
57
app/views/trackers/_form.html.erb
Normal file
57
app/views/trackers/_form.html.erb
Normal file
|
@ -0,0 +1,57 @@
|
|||
<%= error_messages_for 'tracker' %>
|
||||
|
||||
<div class="splitcontentleft">
|
||||
<div class="box tabular">
|
||||
<!--[form:tracker]-->
|
||||
<p><%= f.text_field :name, :required => true %></p>
|
||||
<p><%= f.select :default_status_id,
|
||||
IssueStatus.sorted.map {|s| [s.name, s.id]},
|
||||
:include_blank => @tracker.default_status.nil?,
|
||||
:required => true %>
|
||||
</p>
|
||||
<p><%= f.check_box :is_in_roadmap %></p>
|
||||
<p>
|
||||
<label><%= l(:field_core_fields) %></label>
|
||||
<% Tracker::CORE_FIELDS.each do |field| %>
|
||||
<label class="block">
|
||||
<%= check_box_tag 'tracker[core_fields][]', field, @tracker.core_fields.include?(field), :id => nil %>
|
||||
<%= l("field_#{field}".sub(/_id$/, '')) %>
|
||||
</label>
|
||||
<% end %>
|
||||
</p>
|
||||
<%= hidden_field_tag 'tracker[core_fields][]', '' %>
|
||||
|
||||
<% if IssueCustomField.all.any? %>
|
||||
<p>
|
||||
<label><%= l(:label_custom_field_plural) %></label>
|
||||
<% IssueCustomField.all.each do |field| %>
|
||||
<label class="block">
|
||||
<%= check_box_tag 'tracker[custom_field_ids][]',field.id, @tracker.custom_fields.to_a.include?(field), :id => nil %>
|
||||
<%= field.name %>
|
||||
</label>
|
||||
<% end %>
|
||||
</p>
|
||||
<%= hidden_field_tag 'tracker[custom_field_ids][]', '' %>
|
||||
<% end %>
|
||||
|
||||
<% if @tracker.new_record? && @trackers.any? %>
|
||||
<p><label for="copy_workflow_from"><%= l(:label_copy_workflow_from) %></label>
|
||||
<%= select_tag(:copy_workflow_from, content_tag("option") + options_from_collection_for_select(@trackers, :id, :name)) %></p>
|
||||
<% end %>
|
||||
<!--[eoform:tracker]-->
|
||||
</div>
|
||||
<%= submit_tag l(@tracker.new_record? ? :button_create : :button_save) %>
|
||||
</div>
|
||||
|
||||
<div class="splitcontentright">
|
||||
<% if @projects.any? %>
|
||||
<fieldset class="box" id="tracker_project_ids"><legend><%= l(:label_project_plural) %></legend>
|
||||
<% project_ids = @tracker.project_ids.to_a %>
|
||||
<%= render_project_nested_lists(@projects) do |p|
|
||||
content_tag('label', check_box_tag('tracker[project_ids][]', p.id, project_ids.include?(p.id), :id => nil) + ' ' + h(p))
|
||||
end %>
|
||||
<%= hidden_field_tag('tracker[project_ids][]', '', :id => nil) %>
|
||||
<p><%= check_all_links 'tracker_project_ids' %></p>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
</div>
|
5
app/views/trackers/edit.html.erb
Normal file
5
app/views/trackers/edit.html.erb
Normal file
|
@ -0,0 +1,5 @@
|
|||
<%= title [l(:label_tracker_plural), trackers_path], @tracker.name %>
|
||||
|
||||
<%= labelled_form_for @tracker do |f| %>
|
||||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
<% end %>
|
79
app/views/trackers/fields.html.erb
Normal file
79
app/views/trackers/fields.html.erb
Normal file
|
@ -0,0 +1,79 @@
|
|||
<%= title [l(:label_tracker_plural), trackers_path], l(:field_summary) %>
|
||||
|
||||
<% if @trackers.any? %>
|
||||
<%= form_tag fields_trackers_path do %>
|
||||
<div class="autoscroll">
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<% @trackers.each do |tracker| %>
|
||||
<th>
|
||||
<%= link_to_function('', "toggleCheckboxesBySelector('input.tracker-#{tracker.id}')",
|
||||
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}",
|
||||
:class => 'icon-only icon-checked') %>
|
||||
<%= tracker.name %>
|
||||
</th>
|
||||
<% end %>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="group open">
|
||||
<td colspan="<%= @trackers.size + 1 %>">
|
||||
<span class="expander" onclick="toggleRowGroup(this);"> </span>
|
||||
<%= l(:field_core_fields) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% Tracker::CORE_FIELDS.each do |field| %>
|
||||
<tr>
|
||||
<% field_name = l("field_#{field}".sub(/_id$/, '')) %>
|
||||
<td class="name">
|
||||
<%= link_to_function('', "toggleCheckboxesBySelector('input.core-field-#{field}')",
|
||||
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}",
|
||||
:class => 'icon-only icon-checked') %>
|
||||
<%= field_name %>
|
||||
</td>
|
||||
<% @trackers.each do |tracker| %>
|
||||
<td title="<%= "#{tracker.name}: #{field_name}" %>">
|
||||
<%= check_box_tag "trackers[#{tracker.id}][core_fields][]", field, tracker.core_fields.include?(field),
|
||||
:class => "tracker-#{tracker.id} core-field-#{field}", :id => nil %>
|
||||
</td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if @custom_fields.any? %>
|
||||
<tr class="group open">
|
||||
<td colspan="<%= @trackers.size + 1 %>">
|
||||
<span class="expander" onclick="toggleRowGroup(this);"> </span>
|
||||
<%= l(:label_custom_field_plural) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% @custom_fields.each do |field| %>
|
||||
<tr>
|
||||
<td class="name">
|
||||
<%= link_to_function('', "toggleCheckboxesBySelector('input.custom-field-#{field.id}')",
|
||||
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}",
|
||||
:class => 'icon-only icon-checked') %>
|
||||
<%= field.name %>
|
||||
</td>
|
||||
<% @trackers.each do |tracker| %>
|
||||
<td title="<%= "#{tracker.name}: #{field.name}" %>">
|
||||
<%= check_box_tag "trackers[#{tracker.id}][custom_field_ids][]", field.id, tracker.custom_fields.include?(field),
|
||||
:class => "tracker-#{tracker.id} custom-field-#{field.id}", :id => nil %>
|
||||
</td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p><%= submit_tag l(:button_save) %></p>
|
||||
<% @trackers.each do |tracker| %>
|
||||
<%= hidden_field_tag "trackers[#{tracker.id}][core_fields][]", '' %>
|
||||
<%= hidden_field_tag "trackers[#{tracker.id}][custom_field_ids][]", '' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% end %>
|
9
app/views/trackers/index.api.rsb
Normal file
9
app/views/trackers/index.api.rsb
Normal file
|
@ -0,0 +1,9 @@
|
|||
api.array :trackers do
|
||||
@trackers.each do |tracker|
|
||||
api.tracker do
|
||||
api.id tracker.id
|
||||
api.name tracker.name
|
||||
api.default_status(:id => tracker.default_status.id, :name => tracker.default_status.name) unless tracker.default_status.nil?
|
||||
end
|
||||
end
|
||||
end
|
38
app/views/trackers/index.html.erb
Normal file
38
app/views/trackers/index.html.erb
Normal file
|
@ -0,0 +1,38 @@
|
|||
<div class="contextual">
|
||||
<%= link_to l(:label_tracker_new), new_tracker_path, :class => 'icon icon-add' %>
|
||||
<%= link_to l(:field_summary), fields_trackers_path, :class => 'icon icon-summary' %>
|
||||
</div>
|
||||
|
||||
<h2><%=l(:label_tracker_plural)%></h2>
|
||||
|
||||
<table class="list trackers">
|
||||
<thead><tr>
|
||||
<th><%=l(:label_tracker)%></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<% for tracker in @trackers %>
|
||||
<tr>
|
||||
<td class="name"><%= link_to tracker.name, edit_tracker_path(tracker) %></td>
|
||||
<td>
|
||||
<% unless tracker.workflow_rules.exists? %>
|
||||
<span class="icon icon-warning">
|
||||
<%= l(:text_tracker_no_workflow) %> (<%= link_to l(:button_edit), workflows_edit_path(:tracker_id => tracker) %>)
|
||||
</span>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="buttons">
|
||||
<%= reorder_handle(tracker) %>
|
||||
<%= delete_link tracker_path(tracker) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<% html_title(l(:label_tracker_plural)) -%>
|
||||
|
||||
<%= javascript_tag do %>
|
||||
$(function() { $("table.trackers tbody").positionedItems(); });
|
||||
<% end %>
|
5
app/views/trackers/new.html.erb
Normal file
5
app/views/trackers/new.html.erb
Normal file
|
@ -0,0 +1,5 @@
|
|||
<%= title [l(:label_tracker_plural), trackers_path], l(:label_tracker_new) %>
|
||||
|
||||
<%= labelled_form_for @tracker do |f| %>
|
||||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
<% end %>
|
Loading…
Add table
Add a link
Reference in a new issue