Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /components/com_content/views/category/tmpl/default_items.php:
- http://forum.joomla.org/viewtopic.php?p=2604065
- ============================
- <?php // no direct access
- defined('_JEXEC') or die('Restricted access'); ?>
- <script language="javascript" type="text/javascript">
- function tableOrdering( order, dir, task )
- {
- var form = document.adminForm;
- form.filter_order.value = order;
- form.filter_order_Dir.value = dir;
- document.adminForm.submit( task );
- }
- </script>
- <form action="<?php echo $this->action; ?>" method="post" name="adminForm">
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
- <?php if ($this->params->get('filter') || $this->params->get('show_pagination_limit')) : ?>
- <tr>
- <td colspan="5">
- <table width=100% border="0">
- <tr>
- <?php if ($this->params->get('filter')) : ?>
- <td align="left" width="60%" nowrap="nowrap">
- <?php echo JText::_($this->params->get('filter_type') . ' Filter').' '; ?>
- <input type="text" name="filter" value="<?php echo $this->escape($this->lists['filter']);?>" class="inputbox" onchange="document.adminForm.submit();" />
- </td>
- <?php endif; ?>
- <?php if ($this->params->get('show_pagination_limit')) : ?>
- <td align="right" width="40%" nowrap="nowrap">
- <?php
- echo ' '.JText::_('Display Num').' ';
- echo $this->pagination->getLimitBox();
- ?>
- </td>
- <?php endif; ?>
- </tr>
- </table>
- </td>
- </tr>
- <?php endif; ?>
- </table>
- <table width=100%><tr><td valign="top" width=50%>
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
- <?php if ($this->params->get('show_headings')) : ?>
- <tr>
- <td class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" align="right" width="5%">
- <?php echo JText::_('Num'); ?>
- </td>
- <?php if ($this->params->get('show_title')) : ?>
- <td class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" >
- <?php echo JHTML::_('grid.sort', 'Item Title', 'a.title', $this->lists['order_Dir'], $this->lists['order'] ); ?>
- </td>
- <?php endif; ?>
- <?php if ($this->params->get('show_date')) : ?>
- <td class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" width="25%">
- <?php echo JHTML::_('grid.sort', 'Date', 'a.created', $this->lists['order_Dir'], $this->lists['order'] ); ?>
- </td>
- <?php endif; ?>
- <?php if ($this->params->get('show_author')) : ?>
- <td class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" width="20%">
- <?php echo JHTML::_('grid.sort', 'Author', 'author', $this->lists['order_Dir'], $this->lists['order'] ); ?>
- </td>
- <?php endif; ?>
- <?php if ($this->params->get('show_hits')) : ?>
- <td align="center" class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" width="5%" nowrap="nowrap">
- <?php echo JHTML::_('grid.sort', 'Hits', 'a.hits', $this->lists['order_Dir'], $this->lists['order'] ); ?>
- </td>
- <?php endif; ?>
- </tr>
- <?php endif; ?>
- <?php foreach ($this->items as $item) : ?>
- <?php if (!$item->odd) : ?>
- <tr class="sectiontableentry<?php echo ($item->odd +1 ) . $this->escape($this->params->get('pageclass_sfx')); ?>" >
- <td align="right">
- <?php echo $this->pagination->getRowOffset( $item->count ); ?>
- </td>
- <?php if ($this->params->get('show_title')) : ?>
- <?php if ($item->access <= $this->user->get('aid', 0)) : ?>
- <td>
- <a href="<?php echo $item->link; ?>">
- <?php echo $this->escape($item->title); ?></a>
- <?php $this->item = $item; echo JHTML::_('icon.edit', $item, $this->params, $this->access) ?>
- </td>
- <?php else : ?>
- <td>
- <?php
- echo $this->escape($item->title).' : ';
- $link = JRoute::_('index.php?option=com_user&view=login');
- $returnURL = JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catslug, $item->sectionid), false);
- $fullURL = new JURI($link);
- $fullURL->setVar('return', base64_encode($returnURL));
- $link = $fullURL->toString();
- ?>
- <a href="<?php echo $link; ?>">
- <?php echo JText::_( 'Register to read more...' ); ?></a>
- </td>
- <?php endif; ?>
- <?php endif; ?>
- <?php if ($this->params->get('show_date')) : ?>
- <td>
- <?php echo $item->created; ?>
- </td>
- <?php endif; ?>
- <?php if ($this->params->get('show_author')) : ?>
- <td >
- <?php echo $this->escape($item->created_by_alias) ? $this->escape($item->created_by_alias) : $this->escape($item->author); ?>
- </td>
- <?php endif; ?>
- <?php if ($this->params->get('show_hits')) : ?>
- <td align="center">
- <?php echo $this->escape($item->hits) ? $this->escape($item->hits) : '-'; ?>
- </td>
- <?php endif; ?>
- </tr>
- <?php endif; ?>
- <?php endforeach; ?>
- </table>
- </td><td valign="top" width=50%>
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
- <?php if ($this->params->get('show_headings')) : ?>
- <tr>
- <td class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" align="right" width="5%">
- <?php echo JText::_('Num'); ?>
- </td>
- <?php if ($this->params->get('show_title')) : ?>
- <td class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" >
- <?php echo JHTML::_('grid.sort', 'Item Title', 'a.title', $this->lists['order_Dir'], $this->lists['order'] ); ?>
- </td>
- <?php endif; ?>
- <?php if ($this->params->get('show_date')) : ?>
- <td class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" width="25%">
- <?php echo JHTML::_('grid.sort', 'Date', 'a.created', $this->lists['order_Dir'], $this->lists['order'] ); ?>
- </td>
- <?php endif; ?>
- <?php if ($this->params->get('show_author')) : ?>
- <td class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" width="20%">
- <?php echo JHTML::_('grid.sort', 'Author', 'author', $this->lists['order_Dir'], $this->lists['order'] ); ?>
- </td>
- <?php endif; ?>
- <?php if ($this->params->get('show_hits')) : ?>
- <td align="center" class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" width="5%" nowrap="nowrap">
- <?php echo JHTML::_('grid.sort', 'Hits', 'a.hits', $this->lists['order_Dir'], $this->lists['order'] ); ?>
- </td>
- <?php endif; ?>
- </tr>
- <?php endif; ?>
- <?php foreach ($this->items as $item ) : ?>
- <?php if ($item->odd) : ?>
- <tr class="sectiontableentry<?php echo ($item->odd +1 ) . $this->escape($this->params->get('pageclass_sfx')); ?>" >
- <td align="right">
- <?php echo $this->pagination->getRowOffset( $item->count ); ?>
- </td>
- <?php if ($this->params->get('show_title')) : ?>
- <?php if ($item->access <= $this->user->get('aid', 0)) : ?>
- <td>
- <a href="<?php echo $item->link; ?>">
- <?php echo $this->escape($item->title); ?></a>
- <?php $this->item = $item; echo JHTML::_('icon.edit', $item, $this->params, $this->access) ?>
- </td>
- <?php else : ?>
- <td>
- <?php
- echo $this->escape($item->title).' : ';
- $link = JRoute::_('index.php?option=com_user&view=login');
- $returnURL = JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catslug, $item->sectionid), false);
- $fullURL = new JURI($link);
- $fullURL->setVar('return', base64_encode($returnURL));
- $link = $fullURL->toString();
- ?>
- <a href="<?php echo $link; ?>">
- <?php echo JText::_( 'Register to read more...' ); ?></a>
- </td>
- <?php endif; ?>
- <?php endif; ?>
- <?php if ($this->params->get('show_date')) : ?>
- <td>
- <?php echo $item->created; ?>
- </td>
- <?php endif; ?>
- <?php if ($this->params->get('show_author')) : ?>
- <td >
- <?php echo $this->escape($item->created_by_alias) ? $this->escape($item->created_by_alias) : $this->escape($item->author); ?>
- </td>
- <?php endif; ?>
- <?php if ($this->params->get('show_hits')) : ?>
- <td align="center">
- <?php echo $this->escape($item->hits) ? $this->escape($item->hits) : '-'; ?>
- </td>
- <?php endif; ?>
- </tr>
- <?php endif; ?>
- <?php endforeach; ?>
- <?php if (count($this->items) %2) : ?>
- <tr class="sectiontableentry<?php echo ($item->odd +1 ) . $this->escape($this->params->get('pageclass_sfx')); ?>" ><td colspan=10> </td></tr>
- <?php endif; ?>
- </table>
- </td></tr></table>
- <table width=100%>
- <?php if ($this->params->get('show_pagination')) : ?>
- <tr>
- <td colspan="5"> </td>
- </tr>
- <tr>
- <td align="center" colspan="4" class="sectiontablefooter<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
- <?php echo $this->pagination->getPagesLinks(); ?>
- </td>
- </tr>
- <tr>
- <td colspan="5" align="right">
- <?php echo $this->pagination->getPagesCounter(); ?>
- </td>
- <?php endif; ?>
- </tr>
- </table>
- <input type="hidden" name="id" value="<?php echo $this->category->id; ?>" />
- <input type="hidden" name="sectionid" value="<?php echo $this->category->sectionid; ?>" />
- <input type="hidden" name="task" value="<?php echo $this->lists['task']; ?>" />
- <input type="hidden" name="filter_order" value="" />
- <input type="hidden" name="filter_order_Dir" value="" />
- <input type="hidden" name="limitstart" value="0" />
- <input type="hidden" name="viewcache" value="0" />
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement