Move Display# by filter
- Josh
- Topic Author
- Visitor
10 Nov 2012 02:45 #2711
by Josh
Move Display# by filter was created by Josh
How can I move the Display# so it is side by side filter to the left? Here is the code I've been working on and I haven't had much luck with it. Thanks.
Code:
<?php
defined('_JEXEC') or die;
JHTML::addIncludePath(JPATH_COMPONENT.'/helpers');
JHTML::_('behavior.tooltip');
JHTML::_('behavior.modal');
$user = JFactory::getUser();
$canEdit = $user->authorise('core.edit', 'com_sermonspeaker');
$canEditOwn = $user->authorise('core.edit.own', 'com_sermonspeaker');
$listOrder = $this->state->get('list.ordering');
$listDirn = $this->state->get('list.direction');
$limit = (int)$this->params->get('limit', '');
$player = new SermonspeakerHelperPlayer($this->items);
?>
<div class="category-list<?php echo $this->pageclass_sfx;?> ss-sermons-container<?php echo $this->pageclass_sfx; ?>">
<?php if ($this->params->get('show_page_heading', 1)) : ?>
<h1><?php echo $this->escape($this->params->get('page_heading')); ?></h1>
<?php endif;
if ($this->params->get('show_category_title', 1) or $this->params->get('page_subheading')) : ?>
<h2>
<?php echo $this->escape($this->params->get('page_subheading'));
if ($this->params->get('show_category_title')) : ?>
<span class="subheading-category"><?php echo $this->category->title;?></span>
<?php endif; ?>
</h2>
<?php endif;
if ($this->params->get('show_description', 1) || $this->params->def('show_description_image', 1)) : ?>
<div class="category-desc">
<?php if ($this->params->get('show_description_image') && $this->category->getParams()->get('image')) : ?>
<img src="<?php echo $this->category->getParams()->get('image'); ?>"/>
<?php endif;
if ($this->params->get('show_description') && $this->category->description) :
echo JHtml::_('content.prepare', $this->category->description);
endif; ?>
<div class="clr"></div>
</div>
<?php endif;
if (in_array('sermons:player', $this->columns) && count($this->items)) : ?>
<div class="ss-sermons-player">
<hr class="ss-sermons-player" />
<?php if ($player->player != 'PixelOut'): ?>
<div id="playing">
<img id="playing-pic" class="picture" src="" />
<span id="playing-duration" class="duration"></span>
<div class="text">
<span id="playing-title" class="title"></span>
<span id="playing-desc" class="desc"></span>
</div>
<span id="playing-error" class="error"></span>
</div>
<?php endif;
echo $player->mspace;
echo $player->script;
?>
<hr class="ss-sermons-player" />
<?php if ($player->toggle): ?>
<div>
<img class="pointer" src="media/com_sermonspeaker/images/Video.png" onclick="Video()" alt="Video" title="<?php echo JText::_('COM_SERMONSPEAKER_SWITCH_VIDEO'); ?>" />
<img class="pointer" src="media/com_sermonspeaker/images/Sound.png" onclick="Audio()" alt="Audio" title="<?php echo JText::_('COM_SERMONSPEAKER_SWITCH_AUDIO'); ?>" />
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<form action="<?php echo JFilterOutput::ampReplace(JFactory::getURI()->toString()); ?>" method="post" id="adminForm" name="adminForm">
<center><?php if ($this->params->get('filter_field')) :?>
<fieldset class="filters">
<div class="filter-search">
<label class="filter-search-lbl" for="filter-search"><?php echo JText::_('JGLOBAL_FILTER_LABEL').' '; ?></label>
<input type="text" name="filter-search" id="filter-search" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" class="inputbox" onchange="document.adminForm.submit();" title="<?php echo JText::_('COM_SERMONSPEAKER_FILTER_SEARCH_DESC'); ?>" />
</div>
<div class="filter-select">
<label class="filter-select-lbl" for="filter-select"><?php echo JText::_('COM_SERMONSPEAKER_FIELD_DATE_LABEL').' '; ?></label>
<select name="book" id="filter_books" class="inputbox" onchange="this.form.submit()">
<?php echo JHtml::_('select.options', $this->books, 'value', 'text', $this->state->get('scripture.book'), true);?>
</select>
<select name="month" id="filter_months" class="inputbox" onchange="this.form.submit()">
<option value="0"><?php echo JText::_('COM_SERMONSPEAKER_SELECT_MONTH'); ?></option>
<?php echo JHtml::_('select.options', $this->months, 'value', 'text', $this->state->get('date.month'), true);?>
</select>
<select name="year" id="filter_years" class="inputbox" onchange="this.form.submit()">
<option value="0"><?php echo JText::_('COM_SERMONSPEAKER_SELECT_YEAR'); ?></option>
<?php echo JHtml::_('select.options', $this->years, 'year', 'year', $this->state->get('date.year'), true);?>
</select>
</div>
<?php endif;
if ($this->params->get('show_pagination_limit')) : ?>
<div class="display-limit">
<?php echo JText::_('JGLOBAL_DISPLAY_NUM'); ?>
<?php echo $this->pagination->getLimitBox(); ?>
</div>
</center>
<?php endif;
if ($this->params->get('filter_field')) : ?>
</fieldset>
<?php endif;
if (!count($this->items)) : ?>
<div class="no_entries"><?php echo JText::sprintf('COM_SERMONSPEAKER_NO_ENTRIES', JText::_('COM_SERMONSPEAKER_SERMONS')); ?></div>
<?php else : ?>
<table class="category">
<!-- Create the headers with sorting links -->
<thead><tr>
<?php if (in_array('sermons:num', $this->columns)) : ?>
<th class="num">
<?php if (!$limit) :
echo JHTML::_('grid.sort', 'COM_SERMONSPEAKER_SERMONNUMBER', 'sermon_number', $listDirn, $listOrder);
else :
echo JText::_('COM_SERMONSPEAKER_SERMONNUMBER');
endif; ?>
</th>
<?php endif; ?>
<th class="ss-title">
<?php if (!$limit) :
echo JHTML::_('grid.sort', 'JGLOBAL_TITLE', 'sermon_title', $listDirn, $listOrder);
else :
echo JText::_('JGLOBAL_TITLE');
endif; ?>
</th>
<?php if (in_array('sermons:scripture', $this->columns)) : ?>
<th class="ss-col ss-scripture">
<?php if (!$limit) :
echo JHTML::_('grid.sort', 'COM_SERMONSPEAKER_FIELD_SCRIPTURE_LABEL', 'book', $listDirn, $listOrder);
else :
echo JText::_('COM_SERMONSPEAKER_FIELD_SCRIPTURE_LABEL');
endif; ?>
</th>
<?php endif;
if (in_array('sermons:speaker', $this->columns)) : ?>
<th class="ss-col ss-speaker">
<?php if (!$limit) :
echo JHTML::_('grid.sort', 'COM_SERMONSPEAKER_SPEAKER', 'name', $listDirn, $listOrder);
else :
echo JText::_('COM_SERMONSPEAKER_SPEAKER');
endif; ?>
</th>
<?php endif;
if (in_array('sermons:date', $this->columns)) : ?>
<th class="ss-col ss-date">
<?php if (!$limit) :
echo JHTML::_('grid.sort', 'COM_SERMONSPEAKER_FIELD_DATE_LABEL', 'sermon_date', $listDirn, $listOrder);
else :
echo JText::_('COM_SERMONSPEAKER_FIELD_DATE_LABEL');
endif; ?>
</th>
<?php endif;
if (in_array('sermons:length', $this->columns)) : ?>
<th class="ss-col ss-length">
<?php if (!$limit) :
echo JHTML::_('grid.sort', 'COM_SERMONSPEAKER_FIELD_LENGTH_LABEL', 'sermon_time', $listDirn, $listOrder);
else :
echo JText::_('COM_SERMONSPEAKER_FIELD_LENGTH_LABEL');
endif; ?>
</th>
<?php endif;
if (in_array('sermons:series', $this->columns)) : ?>
<th class="ss-col ss-series">
<?php if (!$limit) :
echo JHTML::_('grid.sort', 'COM_SERMONSPEAKER_SERIES', 'series_title', $listDirn, $listOrder);
else :
echo JText::_('COM_SERMONSPEAKER_SERIES');
endif; ?>
</th>
<?php endif;
if (in_array('sermons:addfile', $this->columns)) : ?>
<th class="ss-col ss-addfile">
<?php if (!$limit) :
echo JHTML::_('grid.sort', 'COM_SERMONSPEAKER_ADDFILE', 'addfileDesc', $listDirn, $listOrder);
else :
echo JText::_('COM_SERMONSPEAKER_ADDFILE');
endif; ?>
</th>
<?php endif;
if (in_array('sermons:hits', $this->columns)) : ?>
<th class="ss-col ss-hits">
<?php if (!$limit) :
echo JHTML::_('grid.sort', 'JGLOBAL_HITS', 'hits', $listDirn, $listOrder);
else :
echo JText::_('JGLOBAL_HITS');
endif; ?>
</th>
<?php endif;
if (in_array('sermons:download', $this->columns)) :
$prio = $this->params->get('fileprio'); ?>
<th class="ss-col ss-dl"></th>
<?php endif; ?>
</tr></thead>
<!-- Begin Data -->
<tbody>
<?php foreach($this->items as $i => $item) : ?>
<tr id="sermon<?php echo $i; ?>" class="<?php echo ($i % 2) ? "odd" : "even"; ?>">
<?php if (in_array('sermons:num', $this->columns)) : ?>
<td class="num">
<?php echo $item->sermon_number; ?>
</td>
<?php endif; ?>
<td class="ss-title">
<?php echo SermonspeakerHelperSermonspeaker::insertSermonTitle($i, $item, $player);
if ($canEdit || ($canEditOwn && ($user->id == $item->created_by))) : ?>
<ul class="actions">
<li class="edit-icon">
<?php echo JHtml::_('icon.edit', $item, $this->params, array('type' => 'sermon')); ?>
</li>
</ul>
<?php endif; ?>
</td>
<?php if (in_array('sermons:scripture', $this->columns)) : ?>
<td class="ss-col ss-scripture">
<?php $scriptures = SermonspeakerHelperSermonspeaker::insertScriptures($item->scripture, '<br />');
echo JHTML::_('content.prepare', $scriptures); ?>
</td>
<?php endif;
if (in_array('sermons:speaker', $this->columns)) : ?>
<td class="ss-col ss-speaker">
<?php if ($item->speaker_state):
echo SermonspeakerHelperSermonSpeaker::SpeakerTooltip($item->speaker_slug, $item->pic, $item->name);
else :
echo $item->name;
endif; ?>
</td>
<?php endif;
if (in_array('sermons:date', $this->columns)) : ?>
<td class="ss-col ss-date">
<?php if ($item->sermon_date != '0000-00-00 00:00:00'):
echo JHTML::date($item->sermon_date, JText::_($this->params->get('date_format')), true);
endif; ?>
</td>
<?php endif;
if (in_array('sermons:length', $this->columns)) : ?>
<td class="ss-col ss-length">
<?php echo SermonspeakerHelperSermonspeaker::insertTime($item->sermon_time); ?>
</td>
<?php endif;
if (in_array('sermons:series', $this->columns)) : ?>
<td class="ss-col ss-series">
<?php if ($item->series_state): ?>
<a href="<?php echo JRoute::_(SermonspeakerHelperRoute::getSerieRoute($item->series_slug)); ?>">
<?php echo $item->series_title; ?>
</a>
<?php else:
echo $item->series_title;
endif; ?>
</td>
<?php endif;
if (in_array('sermons:addfile', $this->columns)) : ?>
<td class="ss-col ss-addfile">
<?php echo SermonspeakerHelperSermonspeaker::insertAddfile($item->addfile, $item->addfileDesc); ?>
</td>
<?php endif;
if (in_array('sermons:hits', $this->columns)) : ?>
<td class="ss-col ss-hits">
<?php echo $item->hits; ?>
</td>
<?php endif;
if (in_array('sermons:download', $this->columns)) :
$file = ($item->videofile && ($prio || !$item->audiofile)) ? 'video' : 'audio'; ?>
<td class="ss-col ss-dl">
<?php echo SermonspeakerHelperSermonspeaker::insertdlbutton($item->slug, $file, 1); ?>
</td>
<?php endif; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif;
if ($this->params->get('show_pagination') && ($this->pagination->get('pages.total') > 1)) : ?>
<div class="pagination">
<?php if ($this->params->get('show_pagination_results', 1)) : ?>
<p class="counter">
<?php echo $this->pagination->getPagesCounter(); ?>
</p>
<?php endif;
echo $this->pagination->getPagesLinks(); ?>
</div>
<?php endif; ?>
<input type="hidden" name="task" value="" />
<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
</form>
<?php if (!empty($this->children[$this->category->id]) and $this->maxLevel != 0) : ?>
<div class="cat-children">
<h3>
<?php echo JTEXT::_('JGLOBAL_SUBCATEGORIES'); ?>
</h3>
<?php echo $this->loadTemplate('children'); ?>
</div>
<?php endif; ?>
</div>
Please Log in or Create an account to join the conversation.
- Thomas Hunziker
- Offline
- Administrator
Less
More
10 Nov 2012 07:26 #2713
by Thomas Hunziker
Replied by Thomas Hunziker on topic Move Display# by filter
This depends a lot on your template.
The code which does the display# output and the pagination list is this part:
How it is displayed depends on the CSS formattings of your template. Usually it's right floated.
The code which does the display# output and the pagination list is this part:
Code:
if ($this->params->get('show_pagination_limit')) : ?>
<div class="display-limit">
<?php echo JText::_('JGLOBAL_DISPLAY_NUM'); ?>
<?php echo $this->pagination->getLimitBox(); ?>
</div>
<?php endif;
Please Log in or Create an account to join the conversation.
- Josh
- Topic Author
- Visitor
11 Nov 2012 03:40 #2716
by Josh
Replied by Josh on topic Move Display# by filter
Thanks I got it moved now.
Please Log in or Create an account to join the conversation.
Time to create page: 0.109 seconds