Inheritance: extends AppHelper
 public function test_getItemPosition_with_an_ordered_items()
 {
     $items = array(array('title' => 'test1', 'content' => 'test1'), array('title' => 'test2', 'content' => 'test2', 'position' => 3), array('title' => 'test3', 'content' => 'test3'));
     $helper = new DashboardHelper($items);
     $this->assertEquals(4, $helper->getItemPosition($items[0]));
     $this->assertEquals(3, $helper->getItemPosition($items[1]));
     $this->assertEquals(5, $helper->getItemPosition($items[2]));
 }
Example #2
0
?>
            </div>
            <div class="large-3 column text-right">
                <img class="loader" src="<?php 
echo Yii::app()->assetManager->createUrl('img/ajax-loader.gif');
?>
"
                     alt="loading..." style="margin-right: 10px; display: none;"/>
                <button type="submit" class="primary long">
                    Search
                </button>
            </div>
        </div>

        <?php 
$this->endWidget();
?>

        <div id="dashboard">
            <?php 
$dashboardHelper = new DashboardHelper();
echo $dashboardHelper->render();
?>
        </div>
    </div>
</div>

<script type="text/javascript">
    handleButton($('#search-form button'));
</script>
Example #3
0
<?php

if (!empty($oLogItemNaoCadastrado)) {
    ?>
    <h4>Você possui <?php 
    echo count($oLogItemNaoCadastrado);
    ?>
 itens não cadastrados no sistema:</h4>
    <ul>
        <?php 
    echo DashboardHelper::renderItensNaoCadastrados($oLogItemNaoCadastrado);
    ?>
    </ul>
<?php 
} else {
    ?>
    <h4>Você não possui avisos.</h4>
<?php 
}