-
-
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
First batch of module tmpl codestyle #17851
Changes from 3 commits
5f1c83c
4d8f5b0
78bbf40
d7dfb2d
247b813
52a7769
b84d8ac
5217f95
84cd103
73abf7d
9368920
6b5c532
8fc4061
d46f2c1
695741f
6bf4963
9996980
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 |
---|---|---|
|
@@ -9,29 +9,29 @@ | |
|
||
defined('_JEXEC') or die; | ||
|
||
foreach ($list as $item) : ?> | ||
?> | ||
<?php foreach ($list as $item) : ?> | ||
<li <?php if ($_SERVER['REQUEST_URI'] === JRoute::_(ContentHelperRoute::getCategoryRoute($item->id))) echo ' class="active"'; ?>> <?php $levelup = $item->level - $startLevel - 1; ?> | ||
<h<?php echo $params->get('item_heading') + $levelup; ?>> | ||
<a href="<?php echo JRoute::_(ContentHelperRoute::getCategoryRoute($item->id)); ?>"> | ||
<?php echo $item->title; ?> | ||
<?php if ($params->get('numitems')) : ?> | ||
(<?php echo $item->numitems; ?>) | ||
<?php endif; ?> | ||
</a> | ||
</h<?php echo $params->get('item_heading') + $levelup; ?>> | ||
|
||
<a href="<?php echo JRoute::_(ContentHelperRoute::getCategoryRoute($item->id)); ?>"> | ||
<?php echo $item->title; ?> | ||
<?php if ($params->get('numitems')) : ?> | ||
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. Lines 18-20: Remove tab |
||
(<?php echo $item->numitems; ?>) | ||
<?php endif; ?> | ||
</a> | ||
</h<?php echo $params->get('item_heading') + $levelup; ?>> | ||
<?php if ($params->get('show_description', 0)) : ?> | ||
<?php echo JHtml::_('content.prepare', $item->description, $item->getParams(), 'mod_articles_categories.content'); ?> | ||
<?php endif; ?> | ||
<?php if ($params->get('show_children', 0) && (($params->get('maxlevel', 0) == 0) | ||
|| ($params->get('maxlevel') >= ($item->level - $startLevel))) | ||
&& count($item->getChildren())) : ?> | ||
<?php echo '<ul>'; ?> | ||
<?php $temp = $list; ?> | ||
<?php $list = $item->getChildren(); ?> | ||
<?php require JModuleHelper::getLayoutPath('mod_articles_categories', $params->get('layout', 'default') . '_items'); ?> | ||
<?php $list = $temp; ?> | ||
<?php echo '</ul>'; ?> | ||
<ul> | ||
<?php $temp = $list; ?> | ||
<?php $list = $item->getChildren(); ?> | ||
<?php require JModuleHelper::getLayoutPath('mod_articles_categories', $params->get('layout', 'default') . '_items'); ?> | ||
<?php $list = $temp; ?> | ||
</ul> | ||
<?php endif; ?> | ||
</li> | ||
<?php endforeach; ?> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,71 +13,65 @@ | |
<ul class="category-module<?php echo $moduleclass_sfx; ?>"> | ||
<?php if ($grouped) : ?> | ||
<?php foreach ($list as $group_name => $group) : ?> | ||
<li> | ||
<div class="mod-articles-category-group"><?php echo $group_name; ?></div> | ||
<ul> | ||
<?php foreach ($group as $item) : ?> | ||
<li> | ||
<?php if ($params->get('link_titles') == 1) : ?> | ||
<a class="mod-articles-category-title <?php echo $item->active; ?>" href="<?php echo $item->link; ?>"> | ||
<?php echo $item->title; ?> | ||
</a> | ||
<?php else : ?> | ||
<?php echo $item->title; ?> | ||
<?php endif; ?> | ||
|
||
<?php if ($item->displayHits) : ?> | ||
<span class="mod-articles-category-hits"> | ||
(<?php echo $item->displayHits; ?>) | ||
</span> | ||
<?php endif; ?> | ||
|
||
<?php if ($params->get('show_author')) : ?> | ||
<span class="mod-articles-category-writtenby"> | ||
<?php echo $item->displayAuthorName; ?> | ||
</span> | ||
<?php endif; ?> | ||
|
||
<?php if ($item->displayCategoryTitle) : ?> | ||
<span class="mod-articles-category-category"> | ||
(<?php echo $item->displayCategoryTitle; ?>) | ||
</span> | ||
<?php endif; ?> | ||
|
||
<?php if ($item->displayDate) : ?> | ||
<span class="mod-articles-category-date"><?php echo $item->displayDate; ?></span> | ||
<?php endif; ?> | ||
|
||
<?php if ($params->get('show_introtext')) : ?> | ||
<p class="mod-articles-category-introtext"> | ||
<?php echo $item->displayIntrotext; ?> | ||
</p> | ||
<?php endif; ?> | ||
|
||
<?php if ($params->get('show_readmore')) : ?> | ||
<p class="mod-articles-category-readmore"> | ||
<li> | ||
<div class="mod-articles-category-group"><?php echo $group_name; ?></div> | ||
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. Multiple lines? |
||
<ul> | ||
<?php foreach ($group as $item) : ?> | ||
<li> | ||
<?php if ($params->get('link_titles') == 1) : ?> | ||
<a class="mod-articles-category-title <?php echo $item->active; ?>" href="<?php echo $item->link; ?>"> | ||
<?php if ($item->params->get('access-view') == false) : ?> | ||
<?php echo JText::_('MOD_ARTICLES_CATEGORY_REGISTER_TO_READ_MORE'); ?> | ||
<?php elseif ($readmore = $item->alternative_readmore) : ?> | ||
<?php echo $readmore; ?> | ||
<?php echo JHtml::_('string.truncate', $item->title, $params->get('readmore_limit')); ?> | ||
<?php if ($params->get('show_readmore_title', 0) != 0) : ?> | ||
<?php echo JHtml::_('string.truncate', $this->item->title, $params->get('readmore_limit')); ?> | ||
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. Lines 66-68: Don't indent? |
||
<?php endif; ?> | ||
<?php elseif ($params->get('show_readmore_title', 0) == 0) : ?> | ||
<?php echo JText::sprintf('MOD_ARTICLES_CATEGORY_READ_MORE_TITLE'); ?> | ||
<?php else : ?> | ||
<?php echo JText::_('MOD_ARTICLES_CATEGORY_READ_MORE'); ?> | ||
<?php echo JHtml::_('string.truncate', $item->title, $params->get('readmore_limit')); ?> | ||
<?php endif; ?> | ||
<?php echo $item->title; ?> | ||
</a> | ||
</p> | ||
<?php endif; ?> | ||
</li> | ||
<?php endforeach; ?> | ||
</ul> | ||
</li> | ||
<?php else : ?> | ||
<?php echo $item->title; ?> | ||
<?php endif; ?> | ||
<?php if ($item->displayHits) : ?> | ||
<span class="mod-articles-category-hits"> | ||
(<?php echo $item->displayHits; ?>) | ||
</span> | ||
<?php endif; ?> | ||
<?php if ($params->get('show_author')) : ?> | ||
<span class="mod-articles-category-writtenby"> | ||
<?php echo $item->displayAuthorName; ?> | ||
</span> | ||
<?php endif; ?> | ||
<?php if ($item->displayCategoryTitle) : ?> | ||
<span class="mod-articles-category-category"> | ||
(<?php echo $item->displayCategoryTitle; ?>) | ||
</span> | ||
<?php endif; ?> | ||
<?php if ($item->displayDate) : ?> | ||
<span class="mod-articles-category-date"><?php echo $item->displayDate; ?></span> | ||
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. Multiple lines. |
||
<?php endif; ?> | ||
<?php if ($params->get('show_introtext')) : ?> | ||
<p class="mod-articles-category-introtext"> | ||
<?php echo $item->displayIntrotext; ?> | ||
</p> | ||
<?php endif; ?> | ||
<?php if ($params->get('show_readmore')) : ?> | ||
<p class="mod-articles-category-readmore"> | ||
<a class="mod-articles-category-title <?php echo $item->active; ?>" href="<?php echo $item->link; ?>"> | ||
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. Multiple lines 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. hmm can you please doube check that? Looks good to me? |
||
<?php if ($item->params->get('access-view') == false) : ?> | ||
<?php echo JText::_('MOD_ARTICLES_CATEGORY_REGISTER_TO_READ_MORE'); ?> | ||
<?php elseif ($readmore = $item->alternative_readmore) : ?> | ||
<?php echo $readmore; ?> | ||
<?php echo JHtml::_('string.truncate', $item->title, $params->get('readmore_limit')); ?> | ||
<?php if ($params->get('show_readmore_title', 0) != 0) : ?> | ||
<?php echo JHtml::_('string.truncate', $this->item->title, $params->get('readmore_limit')); ?> | ||
<?php endif; ?> | ||
<?php elseif ($params->get('show_readmore_title', 0) == 0) : ?> | ||
<?php echo JText::sprintf('MOD_ARTICLES_CATEGORY_READ_MORE_TITLE'); ?> | ||
<?php else : ?> | ||
<?php echo JText::_('MOD_ARTICLES_CATEGORY_READ_MORE'); ?> | ||
<?php echo JHtml::_('string.truncate', $item->title, $params->get('readmore_limit')); ?> | ||
<?php endif; ?> | ||
</a> | ||
</p> | ||
<?php endif; ?> | ||
</li> | ||
<?php endforeach; ?> | ||
</ul> | ||
</li> | ||
<?php endforeach; ?> | ||
<?php else : ?> | ||
<?php foreach ($list as $item) : ?> | ||
|
@@ -87,37 +81,31 @@ | |
<?php else : ?> | ||
<?php echo $item->title; ?> | ||
<?php endif; ?> | ||
|
||
<?php if ($item->displayHits) : ?> | ||
<span class="mod-articles-category-hits"> | ||
(<?php echo $item->displayHits; ?>) | ||
</span> | ||
<?php endif; ?> | ||
|
||
<?php if ($params->get('show_author')) : ?> | ||
<span class="mod-articles-category-writtenby"> | ||
<?php echo $item->displayAuthorName; ?> | ||
</span> | ||
<?php endif; ?> | ||
|
||
<?php if ($item->displayCategoryTitle) : ?> | ||
<span class="mod-articles-category-category"> | ||
(<?php echo $item->displayCategoryTitle; ?>) | ||
</span> | ||
<?php endif; ?> | ||
|
||
<?php if ($item->displayDate) : ?> | ||
<span class="mod-articles-category-date"> | ||
<?php echo $item->displayDate; ?> | ||
</span> | ||
<?php endif; ?> | ||
|
||
<?php if ($params->get('show_introtext')) : ?> | ||
<p class="mod-articles-category-introtext"> | ||
<?php echo $item->displayIntrotext; ?> | ||
</p> | ||
<?php endif; ?> | ||
|
||
<?php if ($params->get('show_readmore')) : ?> | ||
<p class="mod-articles-category-readmore"> | ||
<a class="mod-articles-category-title <?php echo $item->active; ?>" href="<?php echo $item->link; ?>"> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,13 +10,13 @@ | |
defined('_JEXEC') or die; | ||
?> | ||
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. Add blank line above. Is it possible to add lines when editing a file using Github web interface? |
||
<ul class="latestnews<?php echo $moduleclass_sfx; ?>"> | ||
<?php foreach ($list as $item) : ?> | ||
<li itemscope itemtype="https://schema.org/Article"> | ||
<a href="<?php echo $item->link; ?>" itemprop="url"> | ||
<span itemprop="name"> | ||
<?php echo $item->title; ?> | ||
</span> | ||
</a> | ||
</li> | ||
<?php endforeach; ?> | ||
<?php foreach ($list as $item) : ?> | ||
<li itemscope itemtype="https://schema.org/Article"> | ||
<a href="<?php echo $item->link; ?>" itemprop="url"> | ||
<span itemprop="name"> | ||
<?php echo $item->title; ?> | ||
</span> | ||
</a> | ||
</li> | ||
<?php endforeach; ?> | ||
</ul> |
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.
Remove space after
<li
.Move the second
<?php
next line.