Skip to content
This repository was archived by the owner on Jun 26, 2024. It is now read-only.

Com content draconian start #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 17 additions & 43 deletions components/com_content/views/featured/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,84 +16,58 @@
// 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;?>">
<section 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>

<h1 class="page-header">
<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>

<?php endif; ?>

<?php $leadingcount = 0; ?>
<?php if (!empty($this->lead_items)) : ?>
<div class="items-leading">
<section 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; ?>">
<?php
$this->item = &$item;
echo $this->loadTemplate('item');
?>
</div>
<div class="clearfix"></div>
<hr class="divider-vertical" />
<?php
$leadingcount++;
$this->item = &$item;
echo $this->loadTemplate('item');
?>
<?php endforeach; ?>
</div>
<div class="clearfix"></div>
</section>
<?php endif; ?>
<?php
$introcount = (count($this->intro_items));
$counter = 0;
?>
<?php if (!empty($this->intro_items)) : ?>
<section class="items-intro">
<?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>
<hr class="divider-vertical" />
<?php endif; ?>

<?php endforeach; ?>
</section>
<?php endif; ?>

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

<?php if ($this->params->def('show_pagination', 2) == 1 || ($this->params->get('show_pagination') == 2 && $this->pagination->pagesTotal > 1)) : ?>
<div class="pagination">
<nav 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>
</nav>
<?php endif; ?>

</div>
</section>
4 changes: 2 additions & 2 deletions components/com_content/views/featured/tmpl/default_item.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
$canEdit = $this->item->params->get('access-edit');
?>
<?php if ($this->item->state == 0) : ?>
<div class="system-unpublished">
<section class="system-unpublished">
<?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="#"> <i class="icon-cog"></i><span class="caret"></span> </a>
Expand Down Expand Up @@ -142,6 +142,6 @@
</a>
<?php endif; ?>
<?php if ($this->item->state == 0) : ?>
</div>
</section>
<?php endif; ?>
<?php echo $this->item->event->afterDisplayContent; ?>