Redmine 3.4.4
This commit is contained in:
commit
64924a6376
2112 changed files with 259028 additions and 0 deletions
11
app/views/enumerations/_form.html.erb
Normal file
11
app/views/enumerations/_form.html.erb
Normal file
|
@ -0,0 +1,11 @@
|
|||
<%= error_messages_for 'enumeration' %>
|
||||
|
||||
<div class="box tabular">
|
||||
<p><%= f.text_field :name %></p>
|
||||
<p><%= f.check_box :active %></p>
|
||||
<p><%= f.check_box :is_default %></p>
|
||||
|
||||
<% @enumeration.custom_field_values.each do |value| %>
|
||||
<p><%= custom_field_tag_with_label :enumeration, value %></p>
|
||||
<% end %>
|
||||
</div>
|
12
app/views/enumerations/destroy.html.erb
Normal file
12
app/views/enumerations/destroy.html.erb
Normal file
|
@ -0,0 +1,12 @@
|
|||
<%= title [l(@enumeration.option_name), enumerations_path], @enumeration.name %>
|
||||
|
||||
<%= form_tag({}, :method => :delete) do %>
|
||||
<div class="box">
|
||||
<p><strong><%= l(:text_enumeration_destroy_question, :name => @enumeration.name, :count => @enumeration.objects_count) %></strong></p>
|
||||
<p><label for='reassign_to_id'><%= l(:text_enumeration_category_reassign_to) %></label>
|
||||
<%= select_tag 'reassign_to_id', (content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---", :value => '') + options_from_collection_for_select(@enumerations, 'id', 'name')) %></p>
|
||||
</div>
|
||||
|
||||
<%= submit_tag l(:button_apply) %>
|
||||
<%= link_to l(:button_cancel), enumerations_path %>
|
||||
<% end %>
|
6
app/views/enumerations/edit.html.erb
Normal file
6
app/views/enumerations/edit.html.erb
Normal file
|
@ -0,0 +1,6 @@
|
|||
<%= title [l(@enumeration.option_name), enumerations_path], @enumeration.name %>
|
||||
|
||||
<%= labelled_form_for :enumeration, @enumeration, :url => enumeration_path(@enumeration), :html => {:method => :put, :multipart => true} do |f| %>
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<% end %>
|
10
app/views/enumerations/index.api.rsb
Normal file
10
app/views/enumerations/index.api.rsb
Normal file
|
@ -0,0 +1,10 @@
|
|||
api.array @klass.name.underscore.pluralize do
|
||||
@enumerations.each do |enumeration|
|
||||
api.__send__ @klass.name.underscore do
|
||||
api.id enumeration.id
|
||||
api.name enumeration.name
|
||||
api.is_default enumeration.is_default
|
||||
render_api_custom_values enumeration.visible_custom_field_values, api
|
||||
end
|
||||
end
|
||||
end
|
39
app/views/enumerations/index.html.erb
Normal file
39
app/views/enumerations/index.html.erb
Normal file
|
@ -0,0 +1,39 @@
|
|||
<h2><%=l(:label_enumerations)%></h2>
|
||||
|
||||
<% Enumeration.get_subclasses.each do |klass| %>
|
||||
<h3><%= l(klass::OptionName) %></h3>
|
||||
|
||||
<% enumerations = klass.shared %>
|
||||
|
||||
<p><%= link_to l(:label_enumeration_new), new_enumeration_path(:type => klass.name), :class => 'icon icon-add' %></p>
|
||||
|
||||
<% if enumerations.any? %>
|
||||
<table class="list enumerations"><thead>
|
||||
<tr>
|
||||
<th><%= l(:field_name) %></th>
|
||||
<th><%= l(:field_is_default) %></th>
|
||||
<th><%= l(:field_active) %></th>
|
||||
<th></th>
|
||||
</tr></thead>
|
||||
<% enumerations.each do |enumeration| %>
|
||||
<tr>
|
||||
<td class="name"><%= link_to enumeration, edit_enumeration_path(enumeration) %></td>
|
||||
<td class="tick"><%= checked_image enumeration.is_default? %></td>
|
||||
<td class="tick"><%= checked_image enumeration.active? %></td>
|
||||
<td class="buttons">
|
||||
<%= reorder_handle(enumeration, :url => enumeration_path(enumeration), :param => 'enumeration') %>
|
||||
<%= delete_link enumeration_path(enumeration) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
<% else %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% html_title(l(:label_enumerations)) -%>
|
||||
|
||||
<%= javascript_tag do %>
|
||||
$(function() { $("table.enumerations tbody").positionedItems(); });
|
||||
<% end %>
|
7
app/views/enumerations/new.html.erb
Normal file
7
app/views/enumerations/new.html.erb
Normal file
|
@ -0,0 +1,7 @@
|
|||
<%= title [l(@enumeration.option_name), enumerations_path], l(:label_enumeration_new) %>
|
||||
|
||||
<%= labelled_form_for :enumeration, @enumeration, :url => enumerations_path, :html => {:multipart => true} do |f| %>
|
||||
<%= f.hidden_field :type %>
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
<%= submit_tag l(:button_create) %>
|
||||
<% end %>
|
Loading…
Add table
Add a link
Reference in a new issue