Skip to content

Commit

Permalink
Updates for 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
antonydoyle committed Sep 28, 2012
1 parent fa13bfe commit 9cbe328
Show file tree
Hide file tree
Showing 7 changed files with 453 additions and 425 deletions.
165 changes: 78 additions & 87 deletions html/com_content/category/blog.php
@@ -1,112 +1,103 @@
<?php
/* =====================================================================
Template: OneWeb for Joomla 2.5
Author: Seth Warburton - Internet Inspired! - @nternetinspired
Version: 2.0
Created: June 2012
Copyright: Seth Warburton - (C) 2012 - All rights reserved
Licenses: GNU/GPL v2 or later http://www.gnu.org/licenses/gpl-2.0.html
DBAD License http://philsturgeon.co.uk/code/dbad-license
Source: J2.5.1. com_content/views/
/* ===================================================================== */
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

// no direct access
defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT.'/helpers');

?>
<section class="blog <?php echo $this->pageclass_sfx;?>">
<hgroup>
<?php if ($this->params->get('show_page_heading', 1)) : ?>
<header>
<h1>
<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>
</header>
<?php endif; ?>
<?php if ($this->params->get('show_category_title', 1) or $this->params->get('page_subheading')) : ?>
<header>
<h2>
<?php echo $this->escape($this->params->get('page_subheading')); ?>
<div class="blog<?php echo $this->pageclass_sfx;?>">
<?php if ($this->params->get('show_page_heading', 1)) : ?>
<div class="page-header">
<h1> <?php echo $this->escape($this->params->get('page_heading')); ?> </h1>
</div>
<?php endif; ?>
<?php if ($this->params->get('show_category_title', 1) or $this->params->get('page_subheading')) : ?>
<h2> <?php echo $this->escape($this->params->get('page_subheading')); ?>
<?php if ($this->params->get('show_category_title')) : ?>
<span class="subheading-category"><?php echo $this->category->title;?></span>
<span class="subheading-category"><?php echo $this->category->title;?></span>
<?php endif; ?>
</h2>
</header>
<?php endif; ?>
</hgroup>
<?php if ($this->params->get('show_description', 1) || $this->params->def('show_description_image', 1)) : ?>
<section 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'); ?>"/>
</h2>
<?php endif; ?>
<?php if ($this->params->get('show_description') && $this->category->description) : ?>
<?php echo JHtml::_('content.prepare', $this->category->description, '', 'com_content.category'); ?>
<?php 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; ?>
<?php if ($this->params->get('show_description') && $this->category->description) : ?>
<?php echo JHtml::_('content.prepare', $this->category->description, '', 'com_content.category'); ?>
<?php endif; ?>
<div class="clr"></div>
</div>
<?php endif; ?>
</section>
<?php endif; ?>

<?php $leadingcount=0 ; ?>
<?php if (!empty($this->lead_items)) : ?>
<section class="leading-articles">
<?php foreach ($this->lead_items as &$item) : ?>
<article class="article <?php echo $leadingcount; ?><?php echo $item->state == 0 ? ' system-unpublished' : null; ?> clearfix">
<?php $leadingcount = 0; ?>
<?php if (!empty($this->lead_items)) : ?>
<div class="items-leading">
<?php foreach ($this->lead_items as &$item) : ?>
<div class="leading-<?php echo $leadingcount; ?><?php echo $item->state == 0 ? ' system-unpublished' : null; ?>">
<?php
$this->item = &$item;
echo $this->loadTemplate('item');
?>
</article>
</div>
<div class="clearfix"></div>
<?php
$leadingcount++;
?>
<?php endforeach; ?>
</section>
<?php endif; ?>

<?php
$introcount=(count($this->intro_items));
$counter=0;
<?php endforeach; ?>
</div><!-- end items-leading -->
<div class="clearfix"></div>
<?php endif; ?>
<?php
$introcount = (count($this->intro_items));
$counter = 0;
?>
<?php if (!empty($this->intro_items)) : ?>
<section class="intro-articles">
<?php if (!empty($this->intro_items)) : ?>
<?php foreach ($this->intro_items as $key => &$item) : ?>
<article class="article <?php echo $counter; ?> clearfix">
<?php
<?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="span<?php echo round((12 / $this->columns));?>">
<div class="item column-<?php echo $rowcount;?><?php echo $item->state == 0 ? ' system-unpublished' : null; ?>">
<?php
$this->item = &$item;
echo $this->loadTemplate('item');
?>
</article>
<?php $counter++; ?>
?>
</div><!-- end item -->
<?php $counter++; ?>
</div><!-- end spann -->
<?php if (($rowcount == $this->columns) or ($counter == $introcount)): ?>
</div><!-- end row -->
<?php endif; ?>
<?php endforeach; ?>
</section>
<?php endif; ?>

<?php if (!empty($this->link_items)) : ?>
<section class="more-articles">
<?php endif; ?>

<?php if (!empty($this->link_items)) : ?>
<div class="items-more">
<?php echo $this->loadTemplate('links'); ?>
</section>
<?php endif; ?>

<?php if (!empty($this->children[$this->category->id])&& $this->maxLevel != 0) : ?>
<section class="cat-children">
<h3>
<?php echo JTEXT::_('JGLOBAL_SUBCATEGORIES'); ?>
</h3>
<?php echo $this->loadTemplate('children'); ?>
</section>
</div>
<?php endif; ?>

<?php if (($this->params->def('show_pagination', 1) == 1 || ($this->params->get('show_pagination') == 2)) && ($this->pagination->get('pages.total') > 1)) : ?>
<section class="pagination">
<?php if ($this->params->def('show_pagination_results', 1)) : ?>
<p class="counter">
<?php echo $this->pagination->getPagesCounter(); ?>
</p>

<?php endif; ?>
<?php echo $this->pagination->getPagesLinks(); ?>
</section>
<?php endif; ?>

</section>
<?php if (!empty($this->children[$this->category->id])&& $this->maxLevel != 0) : ?>
<div class="cat-children">
<h3> <?php echo JTEXT::_('JGLOBAL_SUBCATEGORIES'); ?> </h3>
<?php echo $this->loadTemplate('children'); ?> </div>
<?php endif; ?>
<?php if (($this->params->def('show_pagination', 1) == 1 || ($this->params->get('show_pagination') == 2)) && ($this->pagination->get('pages.total') > 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>
55 changes: 29 additions & 26 deletions html/com_content/category/blog_children.php
@@ -1,30 +1,40 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @package Joomla.Site
* @subpackage com_content
*
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

// no direct access
defined('_JEXEC') or die;
$class = ' class="first"';
?>

<?php if (count($this->children[$this->category->id]) > 0 && $this->maxLevel != 0) : ?>
<ul>

if (count($this->children[$this->category->id]) > 0 && $this->maxLevel != 0) : ?>

<?php foreach($this->children[$this->category->id] as $id => $child) : ?>
<?php
if ($this->params->get('show_empty_categories') || $child->numitems || count($child->getChildren())) :
if (!isset($this->children[$this->category->id][$id + 1])) :
$class = ' class="last"';
endif;
?>
<li<?php echo $class; ?>>
<div<?php echo $class; ?>>
<?php $class = ''; ?>
<span class="item-title"><a href="<?php echo JRoute::_(ContentHelperRoute::getCategoryRoute($child->id));?>">
<h3 class="page-header item-title"><a href="<?php echo JRoute::_(ContentHelperRoute::getCategoryRoute($child->id));?>">
<?php echo $this->escape($child->title); ?></a>
</span>
<?php if ( $this->params->get('show_cat_num_articles', 1)) : ?>
<span class="badge badge-info tip hasTooltip" title="<?php echo JText::_('COM_CONTENT_NUM_ITEMS'); ?>">
<?php echo $child->getNumItems(true); ?>
</span>
<?php endif; ?>

<?php if (count($child->getChildren()) > 0) : ?>
<a href="#category-<?php echo $child->id;?>" data-toggle="collapse" data-toggle="button" class="btn btn-mini pull-right"><i class="icon-plus"></i></a>
<?php endif;?>

</h3>

<?php if ($this->params->get('show_subcat_desc') == 1) :?>
<?php if ($child->description) : ?>
Expand All @@ -34,18 +44,9 @@
<?php endif; ?>
<?php endif; ?>

<?php if ( $this->params->get('show_cat_num_articles', 1)) : ?>
<dl>
<dt>
<?php echo JText::_('COM_CONTENT_NUM_ITEMS') ; ?>
</dt>
<dd>
<?php echo $child->getNumItems(true); ?>
</dd>
</dl>
<?php endif ; ?>

<?php if (count($child->getChildren()) > 0):
<?php if (count($child->getChildren()) > 0) :?>
<div class="collapse fade" id="category-<?php echo $child->id;?>">
<?php
$this->children[$child->id] = $child->getChildren();
$this->category = $child;
$this->maxLevel--;
Expand All @@ -54,9 +55,11 @@
endif;
$this->category = $child->getParent();
$this->maxLevel++;
endif; ?>
</li>
?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php endforeach; ?>
</ul>

<?php endif;

0 comments on commit 9cbe328

Please sign in to comment.