##// END OF EJS Templates
Introduce virtual MenuNodes (#15880)....
Introduce virtual MenuNodes (#15880). They are characterized by having a blank url. they will only be rendered if the user is authorized to see at least one of its children. they render as links which do nothing when clicked. Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@15501 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r14961:025e1bf7e13f
r15119:53710d80fc88
Show More
index.html.erb
47 lines | 1.6 KiB | text/plain | TextLexer
<%= custom_field_title @custom_field %>
<% if @custom_field.enumerations.any? %>
<%= form_tag custom_field_enumerations_path(@custom_field), :method => 'put' do %>
<div class="box">
<ul id="custom_field_enumerations" class="flat">
<% @custom_field.enumerations.each_with_index do |value, position| %>
<li>
<span class="sort-handle"></span>
<%= hidden_field_tag "custom_field_enumerations[#{value.id}][position]", position, :class => 'position' %>
<%= text_field_tag "custom_field_enumerations[#{value.id}][name]", value.name, :size => 40 %>
<%= hidden_field_tag "custom_field_enumerations[#{value.id}][active]", 0 %>
<label>
<%= check_box_tag "custom_field_enumerations[#{value.id}][active]", 1, value.active? %>
<%= l(:field_active) %>
</label>
<%= delete_link custom_field_enumeration_path(@custom_field, value) %>
</li>
<% end %>
</ul>
</div>
<p>
<%= submit_tag(l(:button_save)) %> |
<%= link_to l(:button_back), edit_custom_field_path(@custom_field) %>
</p>
<% end %>
<% end %>
<p><%= l(:label_enumeration_new) %></p>
<%= form_tag custom_field_enumerations_path(@custom_field), :method => 'post', :remote => true do %>
<p><%= text_field_tag 'custom_field_enumeration[name]', '', :size => 40 %>
<%= submit_tag(l(:button_add)) %></p>
<% end %>
<%= javascript_tag do %>
$(function() {
$("#custom_field_enumerations").sortable({
handle: ".sort-handle",
update: function(event, ui) {
$("#custom_field_enumerations li").each(function(){
$(this).find("input.position").val($(this).index()+1);
});
}
});
});
<% end %>