blocks 1.2.3 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/app/views/blocks/_table.html.erb +3 -1
- metadata +1 -1
@@ -26,7 +26,9 @@
|
|
26
26
|
<% table.columns.each do |column| %>
|
27
27
|
<% header_html = options.merge(column.options)[:header_html] %>
|
28
28
|
<% if options.merge(column.options)[:sortable] %>
|
29
|
-
<%
|
29
|
+
<% order = column.options[:order] ? column.options[:order].to_s : column.name.to_s %>
|
30
|
+
|
31
|
+
<% sort_class = params[:order] != order ? "sorting" : (params[:sort_mode] == "desc" ? "sorting_desc" : "sorting_asc") %>
|
30
32
|
<% header_html = {} if header_html.nil? %>
|
31
33
|
<% header_html[:class] ||= "" %>
|
32
34
|
<% header_html[:class] += " #{sort_class}" %>
|