unless ui.select.filter - ui.select.filter = {filter:{search:{colspan:1}, status : {colspan:1, items:[]}}}; unless ui.select.items - ui.select.items = []; unless ui.select.actions - ui.select.actions = []; thead tr if typeof ui.select.filter === 'string' td(colspan="99") |!{ui.select.htmlFilter} else if ui.select.filter.inputs td(colspan="99") each input in ui.select.filter.inputs include ../input else td(colspan=(ui.select.filter.search.colspan + 1)) .col-sm-12.col-md-12.col-lg-12.input-group if ui.select.filter.fields input#search-list.form-control(type="text" name="search" placeholder=__('Search') ng-model="vulpejs.model.filter.search") span.input-group-btn button.btn.btn-primary(type="submit" tooltip=__('Click to search') tooltip-append-to-body="true") i.fa.fa-search.fa-fw a.btn.btn-primary.slide-down(ng-click="vulpejs.model.search.cancel()" ng-cloak ng-if="vulpejs.model.filter.search" tooltip=__('Click to cancel') tooltip-append-to-body="true") i.fa.fa-times.fa-fw else input#search-list.form-control(type="text" name="search" placeholder=__('Search') ng-model="search") span.input-group-addon i.fa.fa-search.fa-fw td(colspan=ui.select.filter.status.colspan) select#status-list.form-control(name="status" ng-model="vulpejs.model.filter.status" ng-change="vulpejs.model.list()") option(value='')=__('Select a Status') if ui.select.filter.status.items each item in ui.select.filter.status.items option(value=item.value)=__(item.label) tr th.line-number=__('#') each item in ui.select.items - var style = ''; if item.style && typeof item.style === 'string' - style = item.style; unless item.style - item.style = {}; if item.style.width - style = 'width: ' + item.style.width + ';' th(style=style)=__(item.label) tbody tr.slide-down(ng-cloak ng-if="vulpejs.items.length === 0") if typeof ui.select.filter === 'string' || ui.select.filter.inputs - var colspan = 99; else - var colspan = ui.select.filter.search.colspan + 1 + ui.select.filter.status.colspan td(colspan=colspan)=__('Empty') - var query = 'item in vulpejs.items | filter:search | itemsPerPage: vulpejs.ui.pagination.size | orderBy:vulpejs.predicate:reverse'; if ui.select.filter.fields - query = 'item in vulpejs.items | itemsPerPage: vulpejs.ui.pagination.size | orderBy:vulpejs.predicate:reverse'; if ui.select.detail tr.click.slide-down(dir-paginate-start=query total-items="vulpejs.ui.pagination.totalItems" pagination-id="items") include items tr.scale-fade(dir-paginate-end ng-cloak ng-if="vulpejs.now[item._id]") include detail else tr.click.slide-down(dir-paginate=query total-items="vulpejs.ui.pagination.totalItems" pagination-id="items") include items if ui.select.footer tfoot tr each item in ui.select.footer unless item.colspan - item.colspan = ''; unless item.css - item.css = {class: ''} td(colspan=item.colspan class=item.css.class) if item.label =__(item.label) if item.property if item.filter |{{vulpejs.#{item.property}|#{item.filter}}} else if item.i18n |{{vulpejs.#{item.property}|i18n}} else |{{vulpejs.#{item.property}}}