fixed update.phtml to simplify code and show properly on 0 case

This commit is contained in:
Robbt 2018-12-03 16:48:16 -05:00
parent 641ba717cf
commit 618ca4a559

View file

@ -2,27 +2,25 @@
$items = $this->contents; $items = $this->contents;
$isSmartBlock = ($this->obj instanceof Application_Model_Block); $isSmartBlock = ($this->obj instanceof Application_Model_Block);
$isPlaylist = ($this->obj instanceof Application_Model_Playlist); $isPlaylist = ($this->obj instanceof Application_Model_Playlist);
if ($this->poolCount) { ?> if ($this->showPoolCount) { ?>
<div class='sp_text_font sp_text_font_bold'> <div class='sp_text_font sp_text_font_bold'>
<span id='sp_pool_count' class='sp_text_font sp_text_font_bold'> <span id='sp_pool_count' class='sp_text_font sp_text_font_bold'>
<?php <?php
if ($this->poolCount > 0) {
echo $this->poolCount; echo $this->poolCount;
echo ngettext(" file meets the criteria", " files meets the criteria", $this->poolCount); echo ngettext(" file meets the criteria", " files meets the criteria", $this->poolCount);
?> ?>
</span> </span>
<span class='checked-icon sp-checked-icon' id='sp_pool_count_icon'></span> <?php if ($this->poolCount > 0) { ?>
<?php <span class='checked-icon sp-checked-icon' id='sp_pool_count_icon'></span>
} else { <?php }
?> else { ?>
0 <?php echo " " . _("files meet the criteria") ?>
</span>
<span class='sp-warning-icon' id='sp_pool_count_icon'></span> <span class='sp-warning-icon' id='sp_pool_count_icon'></span>
<?php <?php } ?>
}
?>
</div> </div>
<?php <?php
}
else {
} }
if (count($items) && ($isSmartBlock || $isPlaylist)) : ?> if (count($items) && ($isSmartBlock || $isPlaylist)) : ?>
<?php $i = 0; ?> <?php $i = 0; ?>
@ -170,4 +168,4 @@ if (($i < count($items) -1) && ($items[$i+1]['type'] == 0)) {
} }
?> ?>
</div> </div>
<?php endif; ?> <?php endif; ?>