/components/com_content/views/category/tmpl/blog_item.php

https://github.com/raeldc/nooku-server · PHP · 138 lines · 128 code · 10 blank · 0 comment · 44 complexity · afab2c0724940e6b29f04028cf4c6769 MD5 · raw file

  1. <?php // no direct access
  2. defined('_JEXEC') or die('Restricted access'); ?>
  3. <?php $canEdit = ($this->user->authorize('com_content', 'edit', 'content', 'all') || $this->user->authorize('com_content', 'edit', 'content', 'own')); ?>
  4. <?php if ($this->item->state == 0) : ?>
  5. <div class="system-unpublished">
  6. <?php endif; ?>
  7. <?php if ($this->item->params->get('show_title') || $this->item->params->get('show_print_icon') || $canEdit) : ?>
  8. <table class="contentpaneopen<?php echo $this->escape($this->item->params->get( 'pageclass_sfx' )); ?>">
  9. <tr>
  10. <?php if ($this->item->params->get('show_title')) : ?>
  11. <td class="contentheading<?php echo $this->escape($this->item->params->get( 'pageclass_sfx' )); ?>" width="100%">
  12. <?php if ($this->item->params->get('link_titles') && $this->item->readmore_link != '') : ?>
  13. <a href="<?php echo $this->item->readmore_link; ?>" class="contentpagetitle<?php echo $this->escape($this->item->params->get( 'pageclass_sfx' )); ?>">
  14. <?php echo $this->escape($this->item->title); ?></a>
  15. <?php else : ?>
  16. <?php echo $this->escape($this->item->title); ?>
  17. <?php endif; ?>
  18. </td>
  19. <?php endif; ?>
  20. <?php if ( $this->item->params->get( 'show_print_icon' )) : ?>
  21. <td align="right" width="100%" class="buttonheading">
  22. <?php echo JHTML::_('icon.print_popup', $this->item, $this->item->params, $this->access); ?>
  23. </td>
  24. <?php endif; ?>
  25. <?php if ($canEdit) : ?>
  26. <td align="right" width="100%" class="buttonheading">
  27. <?php echo JHTML::_('icon.edit', $this->item, $this->item->params, $this->access); ?>
  28. </td>
  29. <?php endif; ?>
  30. </tr>
  31. </table>
  32. <?php endif; ?>
  33. <?php if (!$this->item->params->get('show_intro')) :
  34. echo $this->item->event->afterDisplayTitle;
  35. endif; ?>
  36. <?php echo $this->item->event->beforeDisplayContent; ?>
  37. <table class="contentpaneopen<?php echo $this->escape($this->item->params->get( 'pageclass_sfx' )); ?>">
  38. <?php if (($this->item->params->get('show_section') && $this->item->sectionid) || ($this->item->params->get('show_category') && $this->item->catid)) : ?>
  39. <tr>
  40. <td>
  41. <?php if ($this->item->params->get('show_section') && $this->item->sectionid && isset($this->item->section)) : ?>
  42. <span>
  43. <?php if ($this->item->params->get('link_section')) : ?>
  44. <?php echo '<a href="'.JRoute::_(ContentHelperRoute::getSectionRoute($this->item->sectionid)).'">'; ?>
  45. <?php endif; ?>
  46. <?php echo $this->escape($this->item->section); ?>
  47. <?php if ($this->item->params->get('link_section')) : ?>
  48. <?php echo '</a>'; ?>
  49. <?php endif; ?>
  50. <?php if ($this->item->params->get('show_category')) : ?>
  51. <?php echo ' - '; ?>
  52. <?php endif; ?>
  53. </span>
  54. <?php endif; ?>
  55. <?php if ($this->item->params->get('show_category') && $this->item->catid) : ?>
  56. <span>
  57. <?php if ($this->item->params->get('link_category')) : ?>
  58. <?php echo '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->catslug, $this->item->sectionid)).'">'; ?>
  59. <?php endif; ?>
  60. <?php echo $this->escape($this->item->category); ?>
  61. <?php if ($this->item->params->get('link_category')) : ?>
  62. <?php echo '</a>'; ?>
  63. <?php endif; ?>
  64. </span>
  65. <?php endif; ?>
  66. </td>
  67. </tr>
  68. <?php endif; ?>
  69. <?php if (($this->item->params->get('show_author')) && ($this->item->author != "")) : ?>
  70. <tr>
  71. <td width="70%" valign="top" colspan="2">
  72. <span class="small">
  73. <?php JText::printf( 'Written by', ($this->escape($this->item->created_by_alias) ? $this->escape($this->item->created_by_alias) : $this->escape($this->item->author)) ); ?>
  74. </span>
  75. &nbsp;&nbsp;
  76. </td>
  77. </tr>
  78. <?php endif; ?>
  79. <?php if ($this->item->params->get('show_create_date')) : ?>
  80. <tr>
  81. <td valign="top" colspan="2" class="createdate">
  82. <?php echo JHTML::_('date', $this->item->created, JText::_('DATE_FORMAT_LC2')); ?>
  83. </td>
  84. </tr>
  85. <?php endif; ?>
  86. <?php if ($this->item->params->get('show_url') && $this->item->urls) : ?>
  87. <tr>
  88. <td valign="top" colspan="2">
  89. <a href="http://<?php echo $this->escape($this->item->urls) ; ?>" target="_blank">
  90. <?php echo $this->escape($this->item->urls); ?></a>
  91. </td>
  92. </tr>
  93. <?php endif; ?>
  94. <tr>
  95. <td valign="top" colspan="2">
  96. <?php if (isset ($this->item->toc)) : ?>
  97. <?php echo $this->item->toc; ?>
  98. <?php endif; ?>
  99. <?php echo $this->item->text; ?>
  100. </td>
  101. </tr>
  102. <?php if ( intval($this->item->modified) != 0 && $this->item->params->get('show_modify_date')) : ?>
  103. <tr>
  104. <td colspan="2" class="modifydate">
  105. <?php echo JText::sprintf('LAST_UPDATED2', JHTML::_('date', $this->item->modified, JText::_('DATE_FORMAT_LC2'))); ?>
  106. </td>
  107. </tr>
  108. <?php endif; ?>
  109. <?php if ($this->item->params->get('show_readmore') && $this->item->readmore) : ?>
  110. <tr>
  111. <td colspan="2">
  112. <a href="<?php echo $this->item->readmore_link; ?>" class="readon<?php echo $this->escape($this->item->params->get('pageclass_sfx')); ?>">
  113. <?php if ($this->item->readmore_register) :
  114. echo JText::_('Register to read more...');
  115. elseif ($readmore = $this->item->params->get('readmore')) :
  116. echo $readmore;
  117. else :
  118. echo JText::sprintf('Read more...');
  119. endif; ?></a>
  120. </td>
  121. </tr>
  122. <?php endif; ?>
  123. </table>
  124. <?php if ($this->item->state == 0) : ?>
  125. </div>
  126. <?php endif; ?>
  127. <span class="article_separator">&nbsp;</span>
  128. <?php echo $this->item->event->afterDisplayContent; ?>