/components/com_content/views/article/tmpl/default.php

https://gitlab.com/endomorphosis/greenrenaissancejoomla · PHP · 133 lines · 125 code · 8 blank · 0 comment · 41 complexity · 4c6ba3a8c266263f0f7b59d788fa27db MD5 · raw file

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