Sha256: a07241b52aa51b4dc7a1bf613ab6ceb727f070f5b3134dcacdf0e86ee2015420
Contents?: true
Size: 1.83 KB
Versions: 3
Compression:
Stored size: 1.83 KB
Contents
<def tag="table-plus" attrs="sort-field, sort-direction, sort-columns" > <% sort_field ||= @sort_field; sort_direction ||= @sort_direction; sort_columns ||= {} %> <div class="table-plus" merge-attrs="&attributes - attrs_for(:with_fields) - attrs_for(:table)"> <div class="header" param="header"> <div class="search"> <form param="search-form" method="get" action=""> <hidden-fields for-query-string skip="page, search_form"/> Search <input class="search-field" type="search" name="search" value="¶ms[:search]"/> <submit label="Go" class="search-button" param="search-submit"/> </form> </div> </div> <table merge-attrs="&attributes & (attrs_for(:table) + attrs_for(:with_fields))" merge-params> <field-heading-row:> <with-field-names merge-attrs="&all_attributes & attrs_for(:with_fields)"> <% col = sort_columns[scope.field_path] || scope.field_path sort = sort_field == col && sort_direction == 'asc' ? "-#{col}" : col sort_url = url_for(params.merge(:sort => sort) - [:page]) %> <th param="#{scope.field-name}-heading"> <a href="&sort_url" class="column-sort" param="#{scope.field-name}-heading-link"><%= scope.field_name.titleize %></a> <if test="&col == sort_field"> <do param="up-arrow" if="&sort_direction == 'desc'">↑</do> <do param="down-arrow" if="&sort_direction == 'asc'">↓</do> </if> </th> </with-field-names> <th if="&all_parameters[:controls]" class="controls"/> </field-heading-row> </table> <else> <do param="empty-message"/> </else> <nav class="page"> <page-nav param/> </nav> </div> </def>
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
hobo-0.7.2 | hobo_files/plugin/taglibs/rapid_plus.dryml |
hobo-0.7.0 | hobo_files/plugin/tags/rapid_plus.dryml |
hobo-0.7.1 | hobo_files/plugin/taglibs/rapid_plus.dryml |