You've already forked joomla_test
first commit
This commit is contained in:
94
components/com_content/views/featured/tmpl/default.php
Normal file
94
components/com_content/views/featured/tmpl/default.php
Normal file
@ -0,0 +1,94 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
|
||||
|
||||
JHtml::_('behavior.caption');
|
||||
|
||||
// If the page class is defined, add to class as suffix.
|
||||
// It will be a separate class if the user starts it with a space
|
||||
?>
|
||||
<div class="blog-featured<?php echo $this->pageclass_sfx;?>">
|
||||
<?php if ($this->params->get('show_page_heading') != 0) : ?>
|
||||
<div class="page-header">
|
||||
<h1>
|
||||
<?php echo $this->escape($this->params->get('page_heading')); ?>
|
||||
</h1>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $leadingcount = 0; ?>
|
||||
<?php if (!empty($this->lead_items)) : ?>
|
||||
<div class="items-leading clearfix">
|
||||
<?php foreach ($this->lead_items as &$item) : ?>
|
||||
<div class="leading-<?php echo $leadingcount; ?><?php echo $item->state == 0 ? ' system-unpublished' : null; ?> clearfix">
|
||||
<?php
|
||||
$this->item = &$item;
|
||||
echo $this->loadTemplate('item');
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
$leadingcount++;
|
||||
?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
$introcount = (count($this->intro_items));
|
||||
$counter = 0;
|
||||
?>
|
||||
<?php if (!empty($this->intro_items)) : ?>
|
||||
<?php foreach ($this->intro_items as $key => &$item) : ?>
|
||||
|
||||
<?php
|
||||
$key = ($key - $leadingcount) + 1;
|
||||
$rowcount = (((int) $key - 1) % (int) $this->columns) + 1;
|
||||
$row = $counter / $this->columns;
|
||||
|
||||
if ($rowcount == 1) : ?>
|
||||
|
||||
<div class="items-row cols-<?php echo (int) $this->columns;?> <?php echo 'row-'.$row; ?> row-fluid">
|
||||
<?php endif; ?>
|
||||
<div class="item column-<?php echo $rowcount;?><?php echo $item->state == 0 ? ' system-unpublished' : null; ?> span<?php echo round((12 / $this->columns));?>">
|
||||
<?php
|
||||
$this->item = &$item;
|
||||
echo $this->loadTemplate('item');
|
||||
?>
|
||||
</div>
|
||||
<?php $counter++; ?>
|
||||
|
||||
<?php if (($rowcount == $this->columns) or ($counter == $introcount)) : ?>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($this->link_items)) : ?>
|
||||
<div class="items-more">
|
||||
<?php echo $this->loadTemplate('links'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->params->def('show_pagination', 2) == 1 || ($this->params->get('show_pagination') == 2 && $this->pagination->pagesTotal > 1)) : ?>
|
||||
<div class="pagination">
|
||||
|
||||
<?php if ($this->params->def('show_pagination_results', 1)) : ?>
|
||||
<p class="counter pull-right">
|
||||
<?php echo $this->pagination->getPagesCounter(); ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<?php echo $this->pagination->getPagesLinks(); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
377
components/com_content/views/featured/tmpl/default.xml
Normal file
377
components/com_content/views/featured/tmpl/default.xml
Normal file
@ -0,0 +1,377 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<metadata>
|
||||
<layout title="COM_CONTENT_FEATURED_VIEW_DEFAULT_TITLE" option="COM_CONTENT_FEATURED_VIEW_DEFAULT_OPTION">
|
||||
<help
|
||||
key = "JHELP_MENUS_MENU_ITEM_ARTICLE_FEATURED"
|
||||
/>
|
||||
<message>
|
||||
<![CDATA[COM_CONTENT_CATEGORY_VIEW_FEATURED_DESC]]>
|
||||
</message>
|
||||
</layout>
|
||||
|
||||
<!-- Add fields to the parameters object for the layout. -->
|
||||
<fields name="params">
|
||||
<fieldset name="advanced" label="COM_MENUS_LAYOUT_FEATURED_OPTIONS">
|
||||
<field
|
||||
name="featured_categories"
|
||||
type="category"
|
||||
extension="com_content"
|
||||
multiple="true"
|
||||
size="10"
|
||||
default=""
|
||||
label="COM_CONTENT_FEATURED_CATEGORIES_LABEL"
|
||||
description="COM_CONTENT_FEATURED_CATEGORIES_DESC" >
|
||||
<option value="">JOPTION_ALL_CATEGORIES</option>
|
||||
</field>
|
||||
|
||||
<field name="layout_type"
|
||||
type="hidden"
|
||||
default="blog"
|
||||
/>
|
||||
<field name="bloglayout" type="spacer" class="text"
|
||||
label="JGLOBAL_SUBSLIDER_BLOG_LAYOUT_LABEL"
|
||||
/>
|
||||
|
||||
<field name="num_leading_articles" type="text"
|
||||
description="JGLOBAL_NUM_LEADING_ARTICLES_DESC"
|
||||
label="JGLOBAL_NUM_LEADING_ARTICLES_LABEL"
|
||||
size="3"
|
||||
/>
|
||||
|
||||
<field name="num_intro_articles" type="text"
|
||||
description="JGLOBAL_NUM_INTRO_ARTICLES_DESC"
|
||||
label="JGLOBAL_NUM_INTRO_ARTICLES_LABEL"
|
||||
size="3"
|
||||
/>
|
||||
|
||||
<field name="num_columns" type="text"
|
||||
description="JGLOBAL_NUM_COLUMNS_DESC"
|
||||
label="JGLOBAL_NUM_COLUMNS_LABEL"
|
||||
size="3"
|
||||
/>
|
||||
|
||||
<field name="num_links" type="text"
|
||||
description="JGLOBAL_NUM_LINKS_DESC"
|
||||
label="JGLOBAL_NUM_LINKS_LABEL"
|
||||
size="3"
|
||||
/>
|
||||
|
||||
<field name="multi_column_order" type="list"
|
||||
description="JGLOBAL_MULTI_COLUMN_ORDER_DESC"
|
||||
label="JGLOBAL_MULTI_COLUMN_ORDER_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JGLOBAL_Down</option>
|
||||
<option value="1">JGLOBAL_Across</option>
|
||||
</field>
|
||||
|
||||
<field name="orderby_pri" type="list"
|
||||
description="JGLOBAL_CATEGORY_ORDER_DESC"
|
||||
label="JGLOBAL_CATEGORY_ORDER_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="none">JGLOBAL_No_Order</option>
|
||||
<option value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
|
||||
<option value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
|
||||
<option value="order">JGLOBAL_CATEGORY_MANAGER_ORDER</option>
|
||||
</field>
|
||||
|
||||
<field name="orderby_sec" type="list"
|
||||
description="JGLOBAL_ARTICLE_ORDER_DESC"
|
||||
label="JGLOBAL_ARTICLE_ORDER_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="front">COM_CONTENT_FEATURED_ORDER</option>
|
||||
<option value="rdate">JGLOBAL_MOST_RECENT_FIRST</option>
|
||||
<option value="date">JGLOBAL_OLDEST_FIRST</option>
|
||||
<option value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
|
||||
<option value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
|
||||
<option value="author">JGLOBAL_AUTHOR_ALPHABETICAL</option>
|
||||
<option value="rauthor">JGLOBAL_AUTHOR_REVERSE_ALPHABETICAL</option>
|
||||
<option value="hits">JGLOBAL_MOST_HITS</option>
|
||||
<option value="rhits">JGLOBAL_LEAST_HITS</option>
|
||||
<option value="order">JGLOBAL_ORDERING</option>
|
||||
</field>
|
||||
|
||||
<field name="order_date" type="list"
|
||||
description="JGLOBAL_ORDERING_DATE_DESC"
|
||||
label="JGLOBAL_ORDERING_DATE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="created">JGLOBAL_CREATED</option>
|
||||
<option value="modified">JGLOBAL_MODIFIED</option>
|
||||
<option value="published">JPUBLISHED</option>
|
||||
</field>
|
||||
|
||||
<field name="show_pagination" type="list"
|
||||
description="JGLOBAL_PAGINATION_DESC"
|
||||
label="JGLOBAL_PAGINATION_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
<option value="2">JGLOBAL_AUTO</option>
|
||||
</field>
|
||||
|
||||
<field name="show_pagination_results" type="list"
|
||||
label="JGLOBAL_PAGINATION_RESULTS_LABEL"
|
||||
description="JGLOBAL_PAGINATION_RESULTS_DESC">
|
||||
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
|
||||
</fieldset>
|
||||
|
||||
<fieldset name="article" label="COM_CONTENT_ATTRIBS_FIELDSET_LABEL">
|
||||
<field name="show_title" type="list"
|
||||
description="JGLOBAL_SHOW_TITLE_DESC"
|
||||
label="JGLOBAL_SHOW_TITLE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="link_titles" type="list"
|
||||
description="JGLOBAL_LINKED_TITLES_DESC"
|
||||
label="JGLOBAL_LINKED_TITLES_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
|
||||
<option value="0">JNo</option>
|
||||
<option value="1">JYes</option>
|
||||
</field>
|
||||
|
||||
<field name="show_intro" type="list"
|
||||
description="JGLOBAL_SHOW_INTRO_DESC"
|
||||
label="JGLOBAL_SHOW_INTRO_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="info_block_position"
|
||||
type="list"
|
||||
default=""
|
||||
label="COM_CONTENT_FIELD_INFOBLOCK_POSITION_LABEL"
|
||||
description="COM_CONTENT_FIELD_INFOBLOCK_POSITION_DESC">
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
|
||||
<option value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option>
|
||||
<option value="1">COM_CONTENT_FIELD_OPTION_BELOW</option>
|
||||
<option value="2">COM_CONTENT_FIELD_OPTION_SPLIT</option>
|
||||
</field>
|
||||
|
||||
<field name="show_category" type="list"
|
||||
description="JGLOBAL_SHOW_CATEGORY_DESC"
|
||||
label="JGLOBAL_SHOW_CATEGORY_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="link_category" type="list"
|
||||
description="JGLOBAL_LINK_CATEGORY_DESC"
|
||||
label="JGLOBAL_LINK_CATEGORY_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
|
||||
<option value="0">JNo</option>
|
||||
<option value="1">JYes</option>
|
||||
</field>
|
||||
|
||||
<field name="show_parent_category" type="list"
|
||||
description="JGLOBAL_SHOW_PARENT_CATEGORY_DESC"
|
||||
label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="link_parent_category" type="list"
|
||||
description="JGLOBAL_LINK_PARENT_CATEGORY_DESC"
|
||||
label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
|
||||
<field name="show_author" type="list"
|
||||
description="JGLOBAL_SHOW_AUTHOR_DESC"
|
||||
label="JGLOBAL_SHOW_AUTHOR_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="link_author" type="list"
|
||||
description="JGLOBAL_LINK_AUTHOR_DESC"
|
||||
label="JGLOBAL_LINK_AUTHOR_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
|
||||
<option value="0">JNo</option>
|
||||
<option value="1">JYes</option>
|
||||
</field>
|
||||
|
||||
<field name="show_create_date" type="list"
|
||||
description="JGLOBAL_SHOW_CREATE_DATE_DESC"
|
||||
label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_modify_date" type="list"
|
||||
description="JGLOBAL_SHOW_MODIFY_DATE_DESC"
|
||||
label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_publish_date" type="list"
|
||||
description="JGLOBAL_SHOW_PUBLISH_DATE_DESC"
|
||||
label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_item_navigation" type="list"
|
||||
description="JGLOBAL_SHOW_NAVIGATION_DESC"
|
||||
label="JGLOBAL_SHOW_NAVIGATION_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="show_vote" type="list"
|
||||
label="JGLOBAL_SHOW_VOTE_LABEL"
|
||||
description="JGLOBAL_SHOW_VOTE_DESC"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="show_readmore"
|
||||
type="list"
|
||||
description="JGLOBAL_SHOW_READMORE_DESC"
|
||||
label="JGLOBAL_SHOW_READMORE_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="show_readmore_title"
|
||||
type="list"
|
||||
label="JGLOBAL_SHOW_READMORE_TITLE_LABEL"
|
||||
description="JGLOBAL_SHOW_READMORE_TITLE_DESC"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_icons" type="list"
|
||||
description="JGLOBAL_SHOW_ICONS_DESC"
|
||||
label="JGLOBAL_SHOW_ICONS_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_print_icon" type="list"
|
||||
description="JGLOBAL_SHOW_PRINT_ICON_DESC"
|
||||
label="JGLOBAL_SHOW_PRINT_ICON_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_email_icon" type="list"
|
||||
description="JGLOBAL_SHOW_EMAIL_ICON_DESC"
|
||||
label="JGLOBAL_SHOW_EMAIL_ICON_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_hits" type="list"
|
||||
description="JGLOBAL_SHOW_HITS_DESC"
|
||||
label="JGLOBAL_SHOW_HITS_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="show_noauth" type="list"
|
||||
description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC"
|
||||
label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
<fieldset name="integration"
|
||||
>
|
||||
|
||||
<field name="show_feed_link" type="list"
|
||||
description="JGLOBAL_SHOW_FEED_LINK_DESC"
|
||||
label="JGLOBAL_SHOW_FEED_LINK_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="feed_summary" type="list"
|
||||
description="JGLOBAL_FEED_SUMMARY_DESC"
|
||||
label="JGLOBAL_FEED_SUMMARY_LABEL"
|
||||
>
|
||||
<option value="">JGLOBAL_USE_GLOBAL</option>
|
||||
<option value="0">JGLOBAL_INTRO_TEXT</option>
|
||||
<option value="1">JGLOBAL_FULL_TEXT</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</metadata>
|
265
components/com_content/views/featured/tmpl/default_item.php
Normal file
265
components/com_content/views/featured/tmpl/default_item.php
Normal file
@ -0,0 +1,265 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
// Create a shortcut for params.
|
||||
$params = &$this->item->params;
|
||||
$images = json_decode($this->item->images);
|
||||
$canEdit = $this->item->params->get('access-edit');
|
||||
$info = $this->item->params->get('info_block_position', 0);
|
||||
|
||||
?>
|
||||
|
||||
<?php if ($this->item->state == 0) : ?>
|
||||
<div class="system-unpublished">
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_title')) : ?>
|
||||
<h2 class="item-title">
|
||||
<?php if ($params->get('link_titles') && $params->get('access-view')) : ?>
|
||||
<a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid)); ?>"> <?php echo $this->escape($this->item->title); ?></a>
|
||||
<?php else : ?>
|
||||
<?php echo $this->escape($this->item->title); ?>
|
||||
<?php endif; ?>
|
||||
</h2>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->item->state == 0) : ?>
|
||||
<span class="label label-warning"><?php echo JText::_('JUNPUBLISHED'); ?></span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_print_icon') || $params->get('show_email_icon') || $canEdit) : ?>
|
||||
<div class="btn-group pull-right"> <a class="btn dropdown-toggle" data-toggle="dropdown" href="#" role="button"> <span class="icon-cog"></span> <span class="caret"></span> </a>
|
||||
<ul class="dropdown-menu">
|
||||
<?php if ($params->get('show_print_icon')) : ?>
|
||||
<li class="print-icon"> <?php echo JHtml::_('icon.print_popup', $this->item, $params); ?> </li>
|
||||
<?php endif; ?>
|
||||
<?php if ($params->get('show_email_icon')) : ?>
|
||||
<li class="email-icon"> <?php echo JHtml::_('icon.email', $this->item, $params); ?> </li>
|
||||
<?php endif; ?>
|
||||
<?php if ($canEdit) : ?>
|
||||
<li class="edit-icon"> <?php echo JHtml::_('icon.edit', $this->item, $params); ?> </li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php // Todo Not that elegant would be nice to group the params ?>
|
||||
<?php $useDefList = ($params->get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date')
|
||||
|| $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category') || $params->get('show_author') ); ?>
|
||||
|
||||
<?php if ($useDefList && ($info == 0 || $info == 2)) : ?>
|
||||
<dl class="article-info muted">
|
||||
<dt class="article-info-term">
|
||||
<?php echo JText::_('COM_CONTENT_ARTICLE_INFO'); ?>
|
||||
</dt>
|
||||
|
||||
<?php if ($params->get('show_author') && !empty($this->item->author )) : ?>
|
||||
<dd class="createdby">
|
||||
<?php $author = $this->item->author; ?>
|
||||
<?php $author = ($this->item->created_by_alias ? $this->item->created_by_alias : $author); ?>
|
||||
<?php if (!empty($this->item->contactid ) && $params->get('link_author') == true) : ?>
|
||||
<?php
|
||||
echo JText::sprintf('COM_CONTENT_WRITTEN_BY',
|
||||
JHtml::_('link', JRoute::_('index.php?option=com_contact&view=contact&id='.$this->item->contactid), $author)
|
||||
); ?>
|
||||
<?php else :?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY', $author); ?>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_parent_category') && !empty($this->item->parent_slug)) : ?>
|
||||
<dd class="parent-category-name">
|
||||
<?php $title = $this->escape($this->item->parent_title);
|
||||
$url = '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->parent_slug)).'">'.$title.'</a>';?>
|
||||
<?php if ($params->get('link_parent_category') && !empty($this->item->parent_slug)) : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_PARENT', $url); ?>
|
||||
<?php else : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_PARENT', $title); ?>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_category')) : ?>
|
||||
<dd class="category-name">
|
||||
<?php $title = $this->escape($this->item->category_title);
|
||||
$url = '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->catslug)).'">'.$title.'</a>';?>
|
||||
<?php if ($params->get('link_category') && $this->item->catslug) : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_CATEGORY', $url); ?>
|
||||
<?php else : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_CATEGORY', $title); ?>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_publish_date')) : ?>
|
||||
<dd class="published">
|
||||
<span class="icon-calendar"></span> <?php echo JText::sprintf('COM_CONTENT_PUBLISHED_DATE_ON', JHtml::_('date', $this->item->publish_up, JText::_('DATE_FORMAT_LC3'))); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($info == 0) : ?>
|
||||
<?php if ($params->get('show_modify_date')) : ?>
|
||||
<dd class="modified">
|
||||
<span class="icon-calendar"></span>
|
||||
<?php echo JText::sprintf('COM_CONTENT_LAST_UPDATED', JHtml::_('date', $this->item->modified, JText::_('DATE_FORMAT_LC3'))); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_create_date')) : ?>
|
||||
<dd class="create">
|
||||
<span class="icon-calendar"></span>
|
||||
<?php echo JText::sprintf('COM_CONTENT_CREATED_DATE_ON', JHtml::_('date', $this->item->created, JText::_('DATE_FORMAT_LC3'))); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_hits')) : ?>
|
||||
<dd class="hits">
|
||||
<span class="icon-eye-open"></span>
|
||||
<?php echo JText::sprintf('COM_CONTENT_ARTICLE_HITS', $this->item->hits); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (isset($images->image_intro) && !empty($images->image_intro)) : ?>
|
||||
<?php $imgfloat = (empty($images->float_intro)) ? $params->get('float_intro') : $images->float_intro; ?>
|
||||
<div class="pull-<?php echo htmlspecialchars($imgfloat); ?> item-image"> <img
|
||||
<?php if ($images->image_intro_caption):
|
||||
echo 'class="caption"'.' title="' .htmlspecialchars($images->image_intro_caption) .'"';
|
||||
endif; ?>
|
||||
src="<?php echo htmlspecialchars($images->image_intro); ?>" alt="<?php echo htmlspecialchars($images->image_intro_alt); ?>"/> </div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!$params->get('show_intro')) : ?>
|
||||
<?php echo $this->item->event->afterDisplayTitle; ?>
|
||||
<?php endif; ?>
|
||||
<?php echo $this->item->event->beforeDisplayContent; ?> <?php echo $this->item->introtext; ?>
|
||||
|
||||
<?php if ($useDefList && ($info == 1 || $info == 2)) : ?>
|
||||
<dl class="article-info muted">
|
||||
<dt class="article-info-term">
|
||||
<?php echo JText::_('COM_CONTENT_ARTICLE_INFO'); ?>
|
||||
</dt>
|
||||
<?php if ($info == 1) : ?>
|
||||
<?php if ($params->get('show_author') && !empty($this->item->author )) : ?>
|
||||
<dd class="createdby">
|
||||
<?php $author = $this->item->author; ?>
|
||||
<?php $author = ($this->item->created_by_alias ? $this->item->created_by_alias : $author); ?>
|
||||
<?php if (!empty($this->item->contactid ) && $params->get('link_author') == true) : ?>
|
||||
<?php
|
||||
echo JText::sprintf('COM_CONTENT_WRITTEN_BY',
|
||||
JHtml::_('link', JRoute::_('index.php?option=com_contact&view=contact&id='.$this->item->contactid), $author)
|
||||
); ?>
|
||||
<?php else : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY', $author); ?>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_parent_category') && !empty($this->item->parent_slug)) : ?>
|
||||
<dd class="parent-category-name">
|
||||
<?php $title = $this->escape($this->item->parent_title);
|
||||
$url = '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->parent_slug)).'">'.$title.'</a>';?>
|
||||
<?php if ($params->get('link_parent_category') && $this->item->parent_slug) : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_PARENT', $url); ?>
|
||||
<?php else : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_PARENT', $title); ?>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_category')) : ?>
|
||||
<dd class="category-name">
|
||||
<?php $title = $this->escape($this->item->category_title);
|
||||
$url = '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->catslug)).'">'.$title.'</a>';?>
|
||||
<?php if ($params->get('link_category') && $this->item->catslug) : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_CATEGORY', $url); ?>
|
||||
<?php else : ?>
|
||||
<?php echo JText::sprintf('COM_CONTENT_CATEGORY', $title); ?>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_publish_date')) : ?>
|
||||
<dd class="published">
|
||||
<span class="icon-calendar"></span> <?php echo JText::sprintf('COM_CONTENT_PUBLISHED_DATE_ON', JHtml::_('date', $this->item->publish_up, JText::_('DATE_FORMAT_LC3'))); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_create_date')) : ?>
|
||||
<dd class="create">
|
||||
<span class="icon-calendar"></span> <?php echo JText::sprintf('COM_CONTENT_CREATED_DATE_ON', JHtml::_('date', $this->item->created, JText::_('DATE_FORMAT_LC3'))); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_modify_date')) : ?>
|
||||
<dd class="modified">
|
||||
<span class="icon-calendar"></span>
|
||||
<?php echo JText::sprintf('COM_CONTENT_LAST_UPDATED', JHtml::_('date', $this->item->modified, JText::_('DATE_FORMAT_LC3'))); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_hits')) : ?>
|
||||
<dd class="hits">
|
||||
<span class="icon-eye-open"></span> <?php echo JText::sprintf('COM_CONTENT_ARTICLE_HITS', $this->item->hits); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
|
||||
<?php if ($this->params->get('show_tags', 1)) : ?>
|
||||
<?php $this->item->tagLayout = new JLayoutFile('joomla.content.tags'); ?>
|
||||
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_readmore') && $this->item->readmore) :
|
||||
if ($params->get('access-view')) :
|
||||
$link = JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid));
|
||||
else :
|
||||
$menu = JFactory::getApplication()->getMenu();
|
||||
$active = $menu->getActive();
|
||||
$itemId = $active->id;
|
||||
$link1 = JRoute::_('index.php?option=com_users&view=login&Itemid=' . $itemId);
|
||||
$returnURL = JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid));
|
||||
$link = new JUri($link1);
|
||||
$link->setVar('return', base64_encode($returnURL));
|
||||
endif; ?>
|
||||
|
||||
<p class="readmore"><a class="btn" href="<?php echo $link; ?>"> <span class="icon-chevron-right"></span>
|
||||
|
||||
<?php if (!$params->get('access-view')) :
|
||||
echo JText::_('COM_CONTENT_REGISTER_TO_READ_MORE');
|
||||
elseif ($readmore = $this->item->alternative_readmore) :
|
||||
echo $readmore;
|
||||
if ($params->get('show_readmore_title', 0) != 0) :
|
||||
echo JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
|
||||
endif;
|
||||
elseif ($params->get('show_readmore_title', 0) == 0) :
|
||||
echo JText::sprintf('COM_CONTENT_READ_MORE_TITLE');
|
||||
else :
|
||||
echo JText::_('COM_CONTENT_READ_MORE');
|
||||
echo JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
|
||||
endif; ?>
|
||||
|
||||
</a></p>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->item->state == 0) : ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php echo $this->item->event->afterDisplayContent; ?>
|
19
components/com_content/views/featured/tmpl/default_links.php
Normal file
19
components/com_content/views/featured/tmpl/default_links.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage com_content
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
?>
|
||||
<ol class="nav nav-tabs nav-stacked">
|
||||
<?php foreach ($this->link_items as &$item) : ?>
|
||||
<li>
|
||||
<a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catslug)); ?>">
|
||||
<?php echo $item->title; ?></a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ol>
|
1
components/com_content/views/featured/tmpl/index.html
Normal file
1
components/com_content/views/featured/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
Reference in New Issue
Block a user