<div class="videos-summary">
<h1 class="category-title">
- <a href="<?php echo site_url("catalog/category/$category_id") ?>">
+ <a href="<?php echo site_url("catalog/category/$category_name") ?>">
<?php echo $category_title ?>
</a>
</h1>
+
+ <?php
+ if ( isset($ordering))
+ {
+ $ordering_opts = array(
+ 'hottest'=> $this->lang->line('ui_show_hottest'),
+ 'newest'=> $this->lang->line('ui_show_newest'),
+ 'alphabetically'=> $this->lang->line('ui_sort_alphabetically')
+ );
+
+ echo '<p>';
+ echo form_dropdown('ordering', $ordering_opts, $ordering, 'id="ordering"');
+ echo '</p>';
+ }
+ ?>
<?php echo $pagination ?>
$thumb_src = $video['thumbs'][ $video['default_thumb'] ];
?>
<div class="video-icon">
- <div class="video-thumb">
+ <div class="video-thumb ui-widget-content ui-corner-all">
<a href="<?php echo $video['video_url'] ?>">
<img src="<?php echo $thumb_src ?>" />
<div class="video-duration"><?php echo $video['duration'] ?></div>
<div style="clear: both"></div>
-</div>
\ No newline at end of file
+</div>
+
+<script type="text/javascript">
+ $(function() {
+ $('#ordering').change(function(e) {
+ var uri = "<?php echo site_url("catalog/category/$category_name") ?>";
+
+ // Default ordering
+ if ($(this).val() != "hottest")
+ uri += "/" + $(this).val();
+
+ window.location = uri;
+ });
+ });
+
+</script>
\ No newline at end of file