property.getType()
end
- def by_name(categories)
+ def by_category_name(categories)
Api::Utils.insensitive_sort(categories) { |category| category_name(category) }
end
+ def by_property_name(properties)
+ Api::Utils.insensitive_sort(properties) { |property| property_name(property) }
+ end
+
def input_name(property)
name = "settings[#{h property.key}]"
if property.multi_values
</tr>
</thead>
<tbody>
- <% @definitions.each do |property| -%>
+ <% by_property_name(@definitions).each do |property| -%>
<tr class="property <%= cycle('even', 'odd', :name => 'properties') -%>">
<td style="padding: 10px" id="block_<%= property.key -%>">
<h3>
</tr>
</thead>
<tbody>
- <% by_name(@categories).each do |category| -%>
+ <% by_category_name(@categories).each do |category| -%>
<tr id="select_<%= category -%>" class="select <%= cycle('even', 'odd', :name => 'category') -%> <%= 'selected' if @category==category -%>">
<td><%= link_to category_name(category), :category => category -%></td>
</tr>