Merge pull request #627 from Robbt/fix-show-criteria
Smartblock criteria show # of matches fixes #541
This commit is contained in:
commit
5ab35dda18
|
@ -477,15 +477,6 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
|
|||
$limitValue->setValue(1);
|
||||
}
|
||||
|
||||
//getting block content candidate count that meets criteria
|
||||
$bl = new Application_Model_Block($p_blockId);
|
||||
if ($p_isValid) {
|
||||
$files = $bl->getListofFilesMeetCriteria();
|
||||
$showPoolCount = true;
|
||||
} else {
|
||||
$files = null;
|
||||
$showPoolCount = false;
|
||||
}
|
||||
|
||||
$generate = new Zend_Form_Element_Button('generate_button');
|
||||
$generate->setAttrib('class', 'sp-button btn');
|
||||
|
|
|
@ -2,6 +2,23 @@
|
|||
$items = $this->contents;
|
||||
$isSmartBlock = ($this->obj instanceof Application_Model_Block);
|
||||
$isPlaylist = ($this->obj instanceof Application_Model_Playlist);
|
||||
if ($this->showPoolCount) { ?>
|
||||
<div class='sp_text_font sp_text_font_bold'>
|
||||
<span id='sp_pool_count' class='sp_text_font sp_text_font_bold'>
|
||||
<?php
|
||||
echo $this->poolCount;
|
||||
echo ngettext(" track matches your search criteria.", " tracks match your search criteria.", $this->poolCount);
|
||||
?>
|
||||
</span>
|
||||
<?php if ($this->poolCount > 0) { ?>
|
||||
<span class='checked-icon sp-checked-icon' id='sp_pool_count_icon'></span>
|
||||
<?php }
|
||||
else { ?>
|
||||
<span class='sp-warning-icon' id='sp_pool_count_icon'></span>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
if (count($items) && ($isSmartBlock || $isPlaylist)) : ?>
|
||||
<?php $i = 0; ?>
|
||||
<?php if ($isSmartBlock && !($this->obj->isStatic())) {
|
||||
|
@ -148,4 +165,4 @@ if (($i < count($items) -1) && ($items[$i+1]['type'] == 0)) {
|
|||
}
|
||||
?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
Loading…
Reference in New Issue