-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanups, fixes and a bit of optimizations for site/components batch #3 #12292
Changes from all commits
fe3b1cb
5c98de1
13f5fee
c0b68fc
acd28f7
e32aabd
2d966e2
0e94075
876073b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
$class = ' class="first"'; | ||
$lang = JFactory::getLanguage(); | ||
|
||
if (count($this->children[$this->category->id]) > 0 && $this->maxLevel != 0) : ?> | ||
if ($this->maxLevel != 0 && count($this->children[$this->category->id]) > 0) : ?> | ||
|
||
<?php foreach ($this->children[$this->category->id] as $id => $child) : ?> | ||
<?php | ||
|
@@ -35,7 +35,7 @@ | |
<a href="<?php echo JRoute::_(ContentHelperRoute::getCategoryRoute($child->id)); ?>"> | ||
<?php echo $this->escape($child->title); ?></a> | ||
|
||
<?php if (count($child->getChildren()) > 0 && $this->maxLevel > 1) : ?> | ||
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?> | ||
<a href="#category-<?php echo $child->id; ?>" data-toggle="collapse" data-toggle="button" class="btn btn-mini pull-right"><span class="icon-plus"></span></a> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cs: still one here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is there? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you removed the space between |
||
<?php endif; ?> | ||
</h3> | ||
|
@@ -49,7 +49,7 @@ | |
</span> | ||
<?php endif; ?> | ||
|
||
<?php if (count($child->getChildren()) > 0 && $this->maxLevel > 1) : ?> | ||
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?> | ||
<a href="#category-<?php echo $child->id; ?>" data-toggle="collapse" data-toggle="button" class="btn btn-mini pull-right"><span class="icon-plus"></span></a> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cs: still one here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is there? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you removed the space between |
||
<?php endif; ?> | ||
</h3> | ||
|
@@ -63,7 +63,7 @@ | |
<?php endif; ?> | ||
<?php endif; ?> | ||
|
||
<?php if (count($child->getChildren()) > 0 && $this->maxLevel > 1) : ?> | ||
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?> | ||
<div class="collapse fade" id="category-<?php echo $child->id; ?>"> | ||
<?php | ||
$this->children[$child->id] = $child->getChildren(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,12 +42,12 @@ | |
$tableClass = $this->params->get('show_headings') != 1 ? ' table-noheader' : ''; | ||
?> | ||
<form action="<?php echo htmlspecialchars(JUri::getInstance()->toString()); ?>" method="post" name="adminForm" id="adminForm" class="form-inline"> | ||
<?php if ($this->params->get('filter_field') != 'hide' || $this->params->get('show_pagination_limit')) : ?> | ||
<?php if ($this->params->get('filter_field') !== 'hide' || $this->params->get('show_pagination_limit')) : ?> | ||
<fieldset class="filters btn-toolbar clearfix"> | ||
<legend class="hide"><?php echo JText::_('COM_CONTENT_FORM_FILTER_LEGEND'); ?></legend> | ||
<?php if ($this->params->get('filter_field') != 'hide') : ?> | ||
<?php if ($this->params->get('filter_field') !== 'hide') : ?> | ||
<div class="btn-group"> | ||
<?php if ($this->params->get('filter_field') != 'tag') : ?> | ||
<?php if ($this->params->get('filter_field') !== 'tag') : ?> | ||
<label class="filter-search-lbl element-invisible" for="filter-search"> | ||
<?php echo JText::_('COM_CONTENT_' . $this->params->get('filter_field') . '_FILTER_LABEL') . ' '; ?> | ||
</label> | ||
|
@@ -97,11 +97,11 @@ | |
</th> | ||
<?php if ($date = $this->params->get('list_show_date')) : ?> | ||
<th scope="col" id="categorylist_header_date"> | ||
<?php if ($date == 'created') : ?> | ||
<?php if ($date === 'created') : ?> | ||
<?php echo JHtml::_('grid.sort', 'COM_CONTENT_' . $date . '_DATE', 'a.created', $listDirn, $listOrder); ?> | ||
<?php elseif ($date == 'modified') : ?> | ||
<?php elseif ($date === 'modified') : ?> | ||
<?php echo JHtml::_('grid.sort', 'COM_CONTENT_' . $date . '_DATE', 'a.modified', $listDirn, $listOrder); ?> | ||
<?php elseif ($date == 'published') : ?> | ||
<?php elseif ($date === 'published') : ?> | ||
<?php echo JHtml::_('grid.sort', 'COM_CONTENT_' . $date . '_DATE', 'a.publish_up', $listDirn, $listOrder); ?> | ||
<?php endif; ?> | ||
</th> | ||
|
@@ -209,7 +209,7 @@ | |
<td headers="categorylist_header_author" class="list-author"> | ||
<?php if (!empty($article->author) || !empty($article->created_by_alias)) : ?> | ||
<?php $author = $article->author ?> | ||
<?php $author = ($article->created_by_alias ?: $author); ?> | ||
<?php $author = $article->created_by_alias ?: $author; ?> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. looking at this one again ... <?php $author = $article->created_by_alias ?: $article->author; ?> There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Found a bit more to refactor... coming up soon... |
||
<?php if (!empty($article->contact_link) && $this->params->get('link_author') == true) : ?> | ||
<?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY', JHtml::_('link', $article->contact_link, $author)); ?> | ||
<?php else : ?> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cs: can we have an aempty line before the if statement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
of course :)