Restore Redmine default table header
This commit is contained in:
parent
b742f39c7d
commit
bd9b5f04f4
@ -15,12 +15,15 @@
|
|||||||
<% header.each_with_index do |row, i| %>
|
<% header.each_with_index do |row, i| %>
|
||||||
<tr class="header">
|
<tr class="header">
|
||||||
<% if i == 0 %>
|
<% if i == 0 %>
|
||||||
<th class="quantity" rowspan="<%= header.length %>"
|
<th rowspan="<%= header.length %>"
|
||||||
style="width:<%= 2 * 100/total_width %>%"><%= l(:field_effective_from) %></th>
|
style="width:<%= 2 * 100/total_width %>%"><%= l(:field_effective_from) %></th>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% row.each do |q, span| %>
|
<% row.each do |q, span| %>
|
||||||
<th class="quantity <%= 'empty' unless span %>"
|
<% row_classes = [] %>
|
||||||
|
<% row_classes << 'quantity' unless i == header.length-1 %>
|
||||||
|
<% row_classes << 'empty' unless span %>
|
||||||
|
<th <%= raw "class=\"#{row_classes.join(' ')}\"" unless row_classes.empty? %>
|
||||||
<%= "colspan=#{span}" if span && span > 0 %>
|
<%= "colspan=#{span}" if span && span > 0 %>
|
||||||
<%= "rowspan=#{-span}" if span && span < 0 %>
|
<%= "rowspan=#{-span}" if span && span < 0 %>
|
||||||
style="width: <%= (span && span > 0 ? span : 1) * 100/total_width %>%;"
|
style="width: <%= (span && span > 0 ? span : 1) * 100/total_width %>%;"
|
||||||
@ -30,8 +33,9 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if i == 0 %>
|
<% if i == 0 %>
|
||||||
<th rowspan="<%= header.length %>"
|
<th rowspan="<%= header.length %>" style="width:<%= 100/total_width %>%;">
|
||||||
style="width:<%= 100/total_width %>%;border:none;"><%= l(:field_action) %></th>
|
<%= l(:field_action) %>
|
||||||
|
</th>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -4,22 +4,12 @@ table.list tr.food.hidden {opacity: 0.4}
|
|||||||
|
|
||||||
table.list .date,
|
table.list .date,
|
||||||
table.list .name,
|
table.list .name,
|
||||||
table.list .quantity {text-align: left;}
|
table.list td.quantity {text-align: left;}
|
||||||
/* TODO: merge with .closable and/or remove .closable */
|
/* TODO: merge with .closable and/or remove .closable */
|
||||||
/* TODO: replace .quantityhead(empty) with th.quantity/.empty */
|
/* TODO: replace .quantityhead(empty) with th.quantity/.empty */
|
||||||
table.list .quantityhead, table.list th.quantity {
|
table.list .quantityhead {border-bottom: none;}
|
||||||
text-align: center;
|
|
||||||
position: relative;
|
|
||||||
padding: 2px 0;
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
table.list .quantityheadempty {border-top: none; border-bottom: none;}
|
table.list .quantityheadempty {border-top: none; border-bottom: none;}
|
||||||
table.list th.quantity {
|
table.list th.quantity {border-bottom: none;}
|
||||||
text-align: center;
|
|
||||||
position: relative;
|
|
||||||
padding: 2px 0;
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
table.list th.empty {border-top: none;}
|
table.list th.empty {border-top: none;}
|
||||||
|
|
||||||
table.list .action,
|
table.list .action,
|
||||||
|
Reference in New Issue
Block a user