<?php /* the form must enclose the whole table for the selection table checkbox states */ ?> <?php echo form_tag('corejs/' . (isset($selection) ? 'selectiontable' : 'ajaxtable'), array('method' => 'post')); ?> <?php echo input_hidden_tag('hidden_form_element', 'foobar'); ?> <div class="ajax-table-paging"> <?php echo ui_filter_std('Rows:', array(array('10', '/foo/bar?rows=10&sort=framenum&order=0', array('class' => 'table-page')), array('20', '/foo/bar?rows=20&sort=framenum&order=0', array('class' => 'table-page')), array('50', '/foo/bar?rows=30&sort=framenum&order=0', array('class' => 'table-page'))), array('style' => 'float:left;', 'active' => 1)); ?> <ul class="uiPager" style="margin:0 0 10px"> <li class="prev disabled">« Previous</li> <li class="active">1</li> <li><a href="?rows=20&sort=framenum&order=0&page=2" class="table-page">2</a></li> <li><a href="?rows=20&sort=framenum&order=0&page=3" class="table-page">3</a></li> <li class="next"><a href="?rows=20&sort=framenum&order=0&page=2" class="table-page">Next »</a></li> </ul> <div class="clear"></div> </div> <?php #demonstrate the table column sort in Core.Ui.AjaxTable ?>
'id' => 'filter1', /* options as for tag helper */ 'active' => 1 // index of active option ) ); <?php pre_end(); ?> <p>Using ui_filter_std() helper</p> <?php echo ui_filter_std('Label', array(array('One', '@homepage', array('class' => 'uiFilterStd-one')), array('Two', 'http://www.google.com', array('class' => 'uiFilterStd-two'))), array('id' => 'demo1', 'active' => 1)); ?> <h2>Generated markup:</h2> <?php pre_start('html'); echo ui_filter_std('Label', array(array('One', '@homepage'), array('Two', 'http://www.google.com')), array('id' => 'demo1', 'active' => 1)); pre_end(); ?> <script type="text/javascript"> Core.ready(function(){ var filt = new Core.Widgets.FilterStd('demo1', { onSwitch: function(id) { Core.log("Clicked tab id '%s'", id); } }); }); </script>
<div class="uiPagerDiv"> <?php // build rows per page widget if ($pager->getMaxPerPage()) { $links = array(); foreach ($pager->getMaxPerPageLinks() as $n) { $links[] = $pager->getMaxPerPageUrl($n); } $active = array_search($pager->getMaxPerPage(), $pager->getMaxPerPageLinks()); echo ui_filter_std('Rows:', $links, $active !== false ? array('active' => $active) : array()); } ?> <ul class="uiPager"> <?php if ($p = $pager->getPreviousPage()) { ?> <li class="prev"><?php echo $pager->getPageLink($p, '« Previous'); ?> </li> <?php } else { ?> <li class="prev disabled">« Previous</li> <?php } ?> <?php
$links = array(array('ALL', '#', array('class' => 'uiFilterStd-all')), array('RTK1', '#', array('class' => 'uiFilterStd-rtk1'))); if (ReviewsPeer::getCountRtK3($_user->getUserId()) > 0) { $links[] = array('RTK3', '#', array('class' => 'uiFilterStd-rtk3')); } switch ($filter) { case 'rtk1': $active = 1; break; case 'rtk3': $active = 2; break; default: $active = 0; break; } echo ui_filter_std('Filter:', $links, array('id' => 'rtk-filter', 'active' => $active)); ?> </div> <div class="clear"></div> <div id="view-pane-all" class="rtk-filter-pane" style="<?php ui_display($filter === 'all'); ?> "> <div class="leitner-svg-chart"> <?php if ($filter === 'all') { ?> <?php
<?php echo $me->getReviewLink('<span><strong>' . $untested_cards . '</strong> new cards</span>', array('type' => 'untested'), array('class' => 'uiFBtn uiFBtnBl')); } if ($restudy_cards > 0) { ?> <?php echo link_to('<span><strong>' . $restudy_cards . '</strong> restudy cards</span>', 'study/failedlist', array('class' => 'uiFBtn uiFBtnRe')); } ?> <div class="clear"></div> </div> <div class="filters"> <?php $links = array(array('Simple', '#', array('class' => 'uiFilterStd-s')), array('Full', '#', array('class' => 'uiFilterStd-f'))); echo ui_filter_std('View:', $links, array('class' => 'mode-toggle', 'active' => 0)); ?> </div> <div class="clear"></div> <div class="svg-outer-div"> <div class="svg-inner-div"></div> <div class="mode-toggle mode-simple"> <a href="#" class="mode-simple">Simple</a> </div> </div> <?php use_helper('Form'); echo input_hidden_tag('json', coreJson::encode($chart_data), array('class' => 'json'));