Skip to content

Instantly share code, notes, and snippets.

@razbakov
Last active December 20, 2015 08:59
Show Gist options
  • Save razbakov/6104073 to your computer and use it in GitHub Desktop.
Save razbakov/6104073 to your computer and use it in GitHub Desktop.
<!-- Items list -->
<script type="text/javascript">
$(document).ready(function() {
// Drag-and-drop table with ordering feature
<?php if($table_rules['params']['ordered'] !== FALSE): ?>
$('#list_table').tableDnD({
onDrop: function(table, row) {
<?php if($public_table == 'listings'): ?>
if($(row).attr('class') == 'featured')
{
$(row).effect('highlight', { color: '#339900' }, 2000);
var order = $.tableDnD.serialize();
$.post("<?php echo site_url($this->admin_prefix . $public_table . '/change-order'); ?>", {
table: '<?php echo $table; ?>',
order: order,
});
}
<?php else: ?>
$(row).effect('highlight', { color: '#339900' }, 2000);
var order = $.tableDnD.serialize();
$.post("<?php echo site_url($this->admin_prefix . $public_table . '/change-order'); ?>", {
table: '<?php echo $table; ?>',
order: order,
});
<?php endif; ?>
}
});
<?php if($public_table == 'listings'): ?>
// Change cursor for not featured rows of listings table
$('#list_table tr:not(.featured)').css('cursor', 'default');
<?php endif; ?>
<?php endif; ?>
// Go to reset filters on button click
$('#reset_filters').click(function() {
window.location = "<?php echo site_url($this->admin_prefix . $public_table . '/reset-filters'); ?>";
return false;
});
<?php if($table == 'listings'): ?>
// Category filtering init
$('select#listings_category').change(function() {
window.location = "<?php echo site_url($this->admin_prefix . $public_table . '/category'); ?>/" + $(this).val();
return false;
});
<?php endif; ?>
// Create checkbox range
$("input:checkbox").createCheckboxRange();
});
</script>
<?php if($table == 'homepages'): ?>
<script src="<?php echo site_url('themes/js/plugins/imgareaselect/jquery.imgareaselect.min.js'); ?>"></script>
<script src="<?php echo site_url('themes/js/shared/photos.js'); ?>"></script>
<link rel="stylesheet" href="<?php echo site_url('themes/css/uploader.css'); ?>" type="text/css" media="screen" />
<script type="text/javascript">
temp_image_id = <?php echo ($temp_image_id) ? $temp_image_id : 0; ?>;
upload_place = '<?php echo $upload_place; ?>';
temp_folder = "/uploads/" + upload_place + "/<?php echo $listing_id; ?>/temp";
error_crop_alert = "<?php echo lang_line('photohandler_unable_to_create_crop'); ?>";
listing_id = 1;
base_url = '<?php echo base_url(); ?>';
ask_question = '<?php echo lang_line('general_delete_confirm'); ?>';
ask_yesAnswer = '<?php echo lang_line('general_yes'); ?>';
ask_cancelAnswer = '<?php echo lang_line('general_no'); ?>';
error_cant_upload = "<?php echo lang_line('photohandler_error_cant_upload'); ?>";
uri_string = "<?php echo uri_string(); ?>";
check_script = "<?php echo site_url('themes/plugins/shared/uploadify/check.php'); ?>";
uploader_url = "<?php echo site_url('themes/plugins/shared/uploadify/uploadify.swf'); ?>";
script_url = "<?php echo site_url('themes/plugins/shared/uploadify/uploadify.php'); ?>";
file_desc = "<?php echo lang_line('photohandler_images_only'); ?>";
button_text = "<?php echo lang_line('photohandler_browse_image'); ?>";
cancel_img = "<?php echo site_url('themes/plugins/shared/uploadify/cancel.png'); ?>";
crop_types = [];
<?php foreach($crop_types as $crop_type): ?>
crop_types.push("<?php echo $crop_type;?>");
<?php echo $crop_type; ?>_thumb_w = Number('<?php echo $images_rules[$crop_type . '_thumb.width']; ?>');
<?php echo $crop_type; ?>_thumb_h = Number('<?php echo $images_rules[$crop_type . '_thumb.height']; ?>');
aspect_ratio_<?php echo $crop_type;?> = Math.round((<?php echo $crop_type; ?>_thumb_w/<?php echo $crop_type; ?>_thumb_h)*10)/10;
<?php endforeach; ?>
$(document).ready(function(){
initUploader("#pickcover");
initUploader("#pickbg");
});
</script>
<div class="row clearfix">
<div class="widget clearfix col_6">
<h2><?php echo lang_line('photohandler_cover_picture'); ?></h2>
<div class="widget_inside">
<div class="photominithumb" id="homepages_mini_container" <?php if(!empty($settings['homepages'])): ?>style="display: block;"<?php endif; ?>>
<img src="<?php if(!empty($settings['homepages'])): ?>/uploads/homepages/1/<?php echo $settings['homepages'].'?'.time(); ?><?php endif; ?>" data-type="homepages" id="homepages_mini" />
<a href="javascript:delphotoitem('homepages');" class="ask button black small tooltip">Effacer</a>
</div>
<p><?php echo lang_line('photohandler_title_cover_picture'); ?></p>
<p><?php echo lang_line('photohandler_title_cover_picture_sub'); ?></p>
<p><a id="pickcover" href="#" class="button" data-uploadplace="homepages"><?php echo lang_line('photohandler_browse'); ?></a></p>
<div id="crop_holders_homepages" title="<?php echo lang_line('crud_listings_crop_thumbnail'); ?>" style="padding-top: 20px;display: none;">
<?php foreach($crop_types as $crop_type): ?>
<?php if($crop_type == 'homepages'): ?>
<div data-type="<?php echo $crop_type; ?>" id="<?php echo $crop_type; ?>_crop_holder">
<?php /*<p><?php echo lang_line('crud_listings_please_crop', array($crop_type)); ?>: </p>*/?>
<img src="" data-type="<?php echo $crop_type; ?>" id="<?php echo $crop_type; ?>_cropbox" class="imagestocrop" />
<?php echo form_hidden('listing_id', $listing_id); ?>
<?php echo form_hidden('temp_image_id', $temp_image_id); ?>
<input type="hidden" data-type="<?php echo $crop_type; ?>" id="<?php echo $crop_type; ?>_coords_x" name="<?php echo $crop_type; ?>_coords_x" />
<input type="hidden" data-type="<?php echo $crop_type; ?>" id="<?php echo $crop_type; ?>_coords_y" name="<?php echo $crop_type; ?>_coords_y" />
<input type="hidden" data-type="<?php echo $crop_type; ?>" id="<?php echo $crop_type; ?>_coords_w" name="<?php echo $crop_type; ?>_coords_w" />
<input type="hidden" data-type="<?php echo $crop_type; ?>" id="<?php echo $crop_type; ?>_coords_h" name="<?php echo $crop_type; ?>_coords_h" />
</div>
<?php endif; ?>
<?php endforeach; ?>
<div id="savebuttons_homepages">
<input type="button" name="save" value="Save" id="savecrop_homepages" class="savecrop" data-uploadplace="homepages" />
<input type="button" name="cancel" value="Cancel" id="cancelbtn_homepages" class="cancelcrop" data-uploadplace="homepages" />
<input type="hidden" id="last_upload_type_homepages" name="last_upload_type" value="" />
</div>
</div>
</div>
</div>
<div class="widget clearfix col_6 last">
<h2><?php echo lang_line('photohandler_background_picture'); ?></h2>
<div class="widget_inside">
<div class="photominithumb" id="background_mini_container" <?php if(!empty($settings['background'])): ?>style="display: block;"<?php endif; ?>><img src="<?php if(!empty($settings['background'])): ?>/uploads/background/1/<?php echo $settings['background'].'?'.time();; ?><?php endif; ?>" data-type="background" id="background_mini" /><a href="javascript:delphotoitem('background');" class="ask button black small tooltip">Effacer</a></div>
<p><?php echo lang_line('photohandler_title_bg_picture'); ?></p>
<p><?php echo lang_line('photohandler_title_bg_picture_sub'); ?></p>
<p><a id="pickbg" href="#" class="button" data-uploadplace="background"><?php echo lang_line('photohandler_browse'); ?></a></p>
<div id="crop_holders_background" title="<?php echo lang_line('crud_listings_crop_thumbnail'); ?>" style="padding-top: 20px;display: none;">
<?php foreach($crop_types as $crop_type): ?>
<?php if($crop_type == 'background'): ?>
<div data-type="<?php echo $crop_type; ?>" id="<?php echo $crop_type; ?>_crop_holder">
<?php /*<p><?php echo lang_line('crud_listings_please_crop', array($crop_type)); ?>: </p>*/?>
<img src="" data-type="<?php echo $crop_type; ?>" id="<?php echo $crop_type; ?>_cropbox" class="imagestocrop" />
<?php echo form_hidden('listing_id', $listing_id); ?>
<?php echo form_hidden('temp_image_id', $temp_image_id); ?>
<input type="hidden" data-type="<?php echo $crop_type; ?>" id="<?php echo $crop_type; ?>_coords_x" name="<?php echo $crop_type; ?>_coords_x" />
<input type="hidden" data-type="<?php echo $crop_type; ?>" id="<?php echo $crop_type; ?>_coords_y" name="<?php echo $crop_type; ?>_coords_y" />
<input type="hidden" data-type="<?php echo $crop_type; ?>" id="<?php echo $crop_type; ?>_coords_w" name="<?php echo $crop_type; ?>_coords_w" />
<input type="hidden" data-type="<?php echo $crop_type; ?>" id="<?php echo $crop_type; ?>_coords_h" name="<?php echo $crop_type; ?>_coords_h" />
</div>
<?php endif; ?>
<?php endforeach; ?>
<div id="savebuttons_background">
<input type="button" name="save" value="Save" id="savecrop_background" class="savecrop" data-uploadplace="background" />
<input type="button" name="cancel" value="Cancel" id="cancelbtn_background" class="cancelcrop" data-uploadplace="background" />
<input type="hidden" id="last_upload_type_background" name="last_upload_type" value="" />
</div>
</div>
</div>
</div>
</div>
<?php endif; ?>
<div class="widget clearfix">
<h2><?php echo lang_line('crud_list_of') . ' ' . strtolower(plural($page_title)); ?></h2>
<div class="widget_inside">
<div class="col_4">
<?php if(( ! isset($table_rules['params']['restricted'])) OR ( ! in_array('new', $table_rules['params']['restricted']))): ?>
<!-- Create button -->
<p>
<a href="<?php echo site_url($this->admin_prefix . $public_table . '/create'); ?>" class="button blue create" title="<?php echo lang_line('crud_new_tooltip'); ?>" rel="tooltips">
<?php echo lang_line('crud_new'); ?>
</a>
</p>
<?php else: ?>
<?php if($public_table == 'listings'): ?>
<!-- Create form -->
<?php echo form_open(base_url() . 'admin/' . $public_table . '/create', array('id' => 'create_listing', 'class' => 'form no_borders')); ?>
<?php echo lang_line('crud_listings_title_field'); ?>:
<input type="text" id="title" name="title" value="" class="large" />
<?php if(isset($listings_types) && count($listings_types) > 0 ): ?>
<br />
<select name="type_id">
<?php foreach($listings_types as $t): ?>
<option value="<?php echo $t['type_id'];?>"><?php echo lang_line('crud_listings_type_'.$t['type_name']);?></option>
<?php endforeach; ?>
</select>
<br />
<br />
<?php endif; ?>
<a href="#" class="button blue" rel="create_listing"><?php echo lang_line('crud_create'); ?></a>
<?php echo form_close(); ?>
<?php else: ?>
<p>&nbsp;</p>
<?php endif; ?>
<?php endif; ?>
</div>
<div class="col_8 last align-right">
<?php if($table !== 'categories'): ?>
<!-- Search in the table -->
<?php echo form_open(site_url($this->admin_prefix . $public_table . '/search'), array('id' => 'search_form')); ?>
<?php echo lang_line('crud_search_table'); ?><?php if($total_items > 0): ?> (<em><?php echo lang_line('crud_total_items', array($total_items)); ?></em>)<?php endif; ?>:
<?php echo form_input('search_query', $sort_vars['search_query'], 'class="large"'); ?>
<a href="#" class="button" rel="search_form"><?php echo lang_line('crud_search'); ?></a>
<?php if( ! empty($sort_vars['search_query'])): ?>
<a href="<?php echo site_url($this->admin_prefix . $public_table . '/reset-search'); ?>" class="button">
<?php echo lang_line('crud_reset'); ?>
</a>
<?php endif; ?>
<?php echo form_close(); ?>
<?php endif; ?>
</div>
<div class="clearfix"></div>
<div class="col_12 margin_top_30">
<?php if(( ! is_array($list)) OR (is_array($list) && count($list) == 0)): ?>
<!-- No results in the table -->
<div class="notification warning">
<strong><?php echo lang_line('general_warning'); ?>!</strong>
<?php echo lang_line('crud_no_results'); ?>
</div>
<?php else: ?>
<?php if($public_table == 'listings'): ?>
<div class="notification information">
<strong><?php echo lang_line('general_information'); ?>!</strong>
<?php echo lang_line('crud_' . $table . '_information'); ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if($public_table == 'listings'): ?>
<!-- Categories filter -->
<div class="align-right">
<?php echo lang_line('crud_listings_category'); ?>:
<select id="listings_category" name="listings_category" class="medium">
<option value="0"<?php if($sort_vars['category_id'] == 0): ?> selected="selected"<?php endif; ?>>- <?php echo lang_line('crud_listings_not_selected'); ?> -</option>
<?php foreach($all_categories as $category): ?>
<?php if($category['listings_parent'] > 0): ?>
<option value="<?php echo $category['category_id']; ?>"<?php if($sort_vars['category_id'] == $category['category_id']): ?> selected="selected"<?php endif; ?>><?php echo $category['title']; ?></option>
<?php if(is_array($category['childs']) && count($category['childs']) > 0): ?>
<?php foreach($category['childs'] as $subcategory): ?>
<?php if($subcategory['listings_group'] > 0): ?>
<option value="<?php echo $category['category_id']; ?>-<?php echo $subcategory['category_id']; ?>"<?php if($sort_vars['category_id'] == $category['category_id'] . '-' . $subcategory['category_id']): ?> selected="selected"<?php endif; ?>>&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $subcategory['title']; ?></option>
<?php if(is_array($subcategory['childs']) && count($subcategory['childs']) > 0): ?>
<?php foreach($subcategory['childs'] as $subsubcategory): ?>
<?php if($subsubcategory['listings_category'] > 0): ?>
<option value="<?php echo $category['category_id']; ?>-<?php echo $subcategory['category_id']; ?>-<?php echo $subsubcategory['category_id']; ?>"<?php if($sort_vars['category_id'] == $category['category_id'] . '-' . $subcategory['category_id'] . '-' . $subsubcategory['category_id']): ?> selected="selected"<?php endif; ?>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $subsubcategory['title']; ?></option>
<?php endif; ?>
<?php endforeach; ?>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
</select>
</div>
<?php endif; ?>
<?php if(( ! is_array($list)) OR (is_array($list) && count($list) > 0)): ?>
<!-- The list of table items -->
<?php echo form_open(site_url($this->admin_prefix . $public_table . '/bulk-action'), 'id="bulk_action_form"'); ?>
<table id="list_table" class="listing zebra margin_top_15">
<thead>
<tr>
<th><input type="checkbox" class="checkall" id="toggle-all" /></th>
<!-- Public fields -->
<?php foreach($table_rules['public_fields'] as $field => $field_vars): ?>
<?php if($field_vars['type'] == 'translation'): ?>
<?php foreach($this->i18n_languages as $i18n_language): ?>
<th>
<?php //echo anchor(site_url($this->admin_prefix . $public_table . '/order/' . $field . '/' . (($sort_vars['order_dir'] == 'desc') ? 'asc' : 'desc')), $field_vars['title']); ?>
<?php echo $field_vars['title']; ?>
</th>
<?php endforeach; ?>
<?php else: ?>
<th>
<?php //echo anchor(site_url($this->admin_prefix . $public_table . '/order/' . $field . '/' . (($sort_vars['order_dir'] == 'desc') ? 'asc' : 'desc')), $field_vars['title']); ?>
<?php echo $field_vars['title']; ?>
</th>
<?php endif; ?>
<?php endforeach; ?>
<th><?php echo lang_line('crud_actions'); ?></th>
</tr>
</thead>
<tbody>
<!-- The values -->
<?php
$i = 1;
$list_ids = array();
?>
<?php foreach($list as $item): ?>
<?php
$list_ids[] = $item->$table_rules['pkey'];
?>
<tr id="<?php echo $item->$table_rules['pkey']; ?>"<?php if(isset($item->featured) && $item->featured == 1): ?> class="featured"<?php else: ?><?php if($table == 'listings'): ?> class="nodrop"<?php endif; ?><?php endif; ?>>
<td>
<?php if( ! isset($item->locked) OR $item->locked == 0): ?>
<input type="checkbox" name="item_<?php echo $item->$table_rules['pkey']; ?>" class="checkbox" />
<?php endif; ?>
</td>
<!-- Public fields values -->
<?php foreach($table_rules['public_fields'] as $field => $field_vars): ?>
<?php if($field_vars['type'] == 'translation'): ?>
<!-- Translation value -->
<?php foreach($this->i18n_languages as $i18n_language): ?>
<td>
<?php
switch($field_vars['param1'])
{
case 'string':
$editable_fields = array('title', 'name');
if(in_array($field, $editable_fields))
{
$label = ($table == 'categories') ? $item->title : $item->{$field . '_translated_' . $i18n_language->language_id};
$prefix = '';
$prefix = ($table == 'categories' && $item->level == 1) ? '&nbsp;&nbsp;&nbsp;&nbsp;' : $prefix;
$prefix = ($table == 'categories' && $item->level == 2) ? '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' : $prefix;
echo '<a href="' . site_url($this->admin_prefix . $public_table . '/edit/' . $item->$table_rules['pkey']) . '" class="edit">' . $prefix . $label . '</a>';
}
else
{
echo $item->{$field . '_translated_' . $i18n_language->language_id};
}
break;
}
?>
</td>
<?php endforeach; ?>
<?php else: ?>
<!-- Field value -->
<td>
<?php
$param = ($field == $table_rules['pkey']) ? 'string' : $field_vars['type'];
switch($param)
{
case 'string':
$editable_fields = array('title', 'username');
if(in_array($field, $editable_fields))
{
$value = '<a href="' . site_url($this->admin_prefix . $public_table . '/edit/' . $item->$table_rules['pkey']) . '" class="edit">' . $item->$field . '</a>';
}
else
{
$value = $item->$field;
}
// @EXCEPTION: humanize dates
if($field == 'join_date' OR $field == 'last_visit' OR $field == 'created')
{
$value = humanize_mdate($item->$field);
}
break;
case 'percent':
$value = $item->$field . '%';
break;
case 'wysiwyg':
$value = (strlen($item->$field) > 70) ? substr($item->$field, 0, 70) . '...' : $item->$field;
break;
case 'list':
if($table == 'listings' && $field == 'category_id')
{
// Exception for listings
if($item->$field == 0)
{
$item->$field = $item->group_category;
if($item->$field == 0)
{
$item->$field = $item->parent_category;
}
}
}
$value = (isset($field_vars['param3'][$item->$field])) ? $field_vars['param3'][$item->$field] : $item->$field;
if($field == 'active' && $item->$field == 0)
{
$value = '<a href="' . site_url($this->admin_prefix . $public_table . '/change-status/' . $item->$table_rules['pkey']) . '" class="active red"><span class="red">' . $value . '</span></a>';
}
if($field == 'active' && $item->$field == 1)
{
$value = '<a href="' . site_url($this->admin_prefix . $public_table . '/change-status/' . $item->$table_rules['pkey']) . '" class="active">' . $value . '</a>';
}
break;
case 'translation':
$value = (isset($item->$field)) ? $item->$field : '-';
break;
case 'photo':
if( ! empty($item->$field))
{
$value = '<img src="' . base_url() . 'uploads/' . $table . '/' . $item->$field . '?' . time() . '" class="payment_method" />';
}
else
{
$value = lang_line('crud_none');
}
break;
}
echo $value;
?>
</td>
<?php endif; ?>
<?php endforeach; ?>
<td width="330">
<!-- Actions -->
<?php if($table == 'listings'): ?>
<!-- View item -->
<a href="<?php echo site_url($item->slug); ?>" target="_blank" class="button small tooltip" title="<?php echo lang_line('crud_listings_view_tooltip'); ?>">
<?php echo lang_line('crud_view'); ?>
</a>
<!-- Reset item -->
<a href="<?php echo site_url($this->admin_prefix . $public_table . '/reset/' . $item->$table_rules['pkey']); ?>" class="button small tooltip" title="<?php echo lang_line('crud_listings_reset_tooltip'); ?>">
<?php echo lang_line('crud_listings_reset'); ?>
</a>
<!-- Sticked -->
<a href="<?php echo site_url($this->admin_prefix . $public_table . '/sticked/' . $item->$table_rules['pkey']); ?>" class="button small">
<?php if($item->sticked == 0): ?>
<?php echo lang_line('crud_listings_stick'); ?>
<?php else: ?>
<?php echo lang_line('crud_listings_unstick'); ?>
<?php endif; ?>
</a>
<?php endif; ?>
<?php if(( ! isset($table_rules['params']['restricted'])) OR ( ! in_array('view', $table_rules['params']['restricted']))): ?>
<?php
/*
<!-- View item -->
<a href="<?php echo site_url($this->admin_prefix . $public_table . '/view/' . $item->$table_rules['pkey']); ?>" class="button small tooltip" title="<?php echo lang_line('crud_view_tooltip'); ?>">
<?php echo lang_line('crud_view'); ?>
</a>
*/
?>
<?php endif; ?>
<?php if(( ! isset($table_rules['params']['restricted'])) OR ( ! in_array('edit', $table_rules['params']['restricted']))): ?>
<!-- Edit item -->
<a href="<?php echo site_url($this->admin_prefix . $public_table . '/edit/' . $item->$table_rules['pkey']); ?>" class="button small tooltip" title="<?php echo lang_line('crud_edit_tooltip'); ?>">
<?php echo lang_line('crud_edit'); ?>
</a>
<?php endif; ?>
<?php if(( ! isset($table_rules['params']['restricted'])) OR ( ! in_array('delete', $table_rules['params']['restricted']))): ?>
<!-- Delete item -->
<?php if( ! isset($item->locked) OR $item->locked == 0): ?>
<a href="<?php echo site_url($this->admin_prefix . $public_table . '/delete/' . $item->$table_rules['pkey']) ?>" class="ask button black small tooltip" title="<?php echo lang_line('crud_delete_tooltip'); ?>">
<?php echo lang_line('crud_delete'); ?>
</a>
<?php endif; ?>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<div class="col_12 margin_top_30">
<div class="col_6">
<!-- Bulk actions -->
<?php echo form_hidden('list_ids', json_encode($list_ids)); ?>
<?php echo form_submit('bulk-activate', lang_line('crud_bulk_activate'), 'class="button"'); ?>
<?php echo form_submit('bulk-deactivate', lang_line('crud_bulk_deactivate'), 'class="button"'); ?>
<?php if(( ! isset($table_rules['params']['restricted'])) OR ( ! in_array('delete', $table_rules['params']['restricted']))): ?>
<?php echo form_submit('bulk-delete', lang_line('crud_delete_selected'), 'title="' . lang_line('crud_delete_selected') . '" class="button ask" rel="bulk_action_form"'); ?>
<?php endif; ?>
<?php if($table !== 'categories'): ?>
<?php echo form_submit('reset_filters', lang_line('crud_reset_filters'), 'id="reset_filters" class="button"'); ?>
<?php endif; ?>
</div>
<div class="col_6 last align-right">
<!-- Items per page -->
<script type="text/javascript">
$(document).ready(function() {
// Init per page feature
$('select#per_page').change(function() {
if(parseInt($(this).val()) > 0)
{
window.location = "<?php echo site_url($this->admin_prefix . $public_table . '/per-page/" + $(this).val() + "'); ?>";
return false;
}
});
});
</script>
<?php if($table !== 'categories'): ?>
<?php echo lang_line('crud_per_page'); ?>:
<select id="per_page" name="per_page">
<option value="5"<?php if($sort_vars['per_page'] == 5): ?> selected="selected"<?php endif; ?>>5</option>
<option value="10"<?php if($sort_vars['per_page'] == 10): ?> selected="selected"<?php endif; ?>>10</option>
<option value="15"<?php if($sort_vars['per_page'] == 15): ?> selected="selected"<?php endif; ?>>15</option>
<option value="20"<?php if($sort_vars['per_page'] == 20): ?> selected="selected"<?php endif; ?>>20</option>
<option value="25"<?php if($sort_vars['per_page'] == 25): ?> selected="selected"<?php endif; ?>>25</option>
<option value="35"<?php if($sort_vars['per_page'] == 35): ?> selected="selected"<?php endif; ?>>35</option>
<option value="50"<?php if($sort_vars['per_page'] == 50): ?> selected="selected"<?php endif; ?>>50</option>
<option value="300"<?php if($sort_vars['per_page'] == 300): ?> selected="selected"<?php endif; ?>>300</option>
</select>
<?php endif; ?>
</div>
</div>
<?php echo form_close(); ?>
<?php if( ! empty($pagination_links)): ?>
<!-- Pagination -->
<ul class="pagination hor-list">
<?php echo $pagination_links; ?>
</ul>
<?php endif; ?>
<?php endif; ?>
</div>
<div class="clearfix"></div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment