ecoco/magento_profiler

View on GitHub
app/design/frontend/base/default/template/ecocode_profiler/collector/log/menu.phtml

Summary

Maintainability
Test Coverage
<?php
/** @var Ecocode_Profiler_Model_Collector_LogDataCollector $collector */
$collector   = $this->getCollector();
$logCount    = $collector->getLogCount();
$statusColor = $collector->countErrors() ? 'error' : ($collector->countDeprecations() ? 'warning' : '');
?>

<span class="label label-status-<?php echo $statusColor ?>">
    <span class="icon">
        <svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="24" height="24" viewBox="0 0 24 24"
             enable-background="new 0 0 24 24" xml:space="preserve">
            <path fill="#AAAAAA" d="M21,4v13.8c0,2.7-2.5,5.2-5.2,5.2H6c-0.6,0-1-0.4-1-1s0.4-1,1-1h9.8c1.6,0,3.2-1.7,3.2-3.2V4
                c0-0.6,0.4-1,1-1S21,3.4,21,4z M5.5,20C4.1,20,3,18.9,3,17.5V3.5C3,2.1,4.1,1,5.5,1h10.1C16.9,1,18,2.1,18,3.5v14.1
                c0,1.4-1.1,2.5-2.5,2.5H5.5z M9,11.4C9,11.7,9.3,12,9.6,12h1.8c0.3,0,0.6-0.3,0.6-0.6V4.6C12,4.3,11.7,4,11.4,4H9.6
                C9.3,4,9,4.3,9,4.6V11.4z M9,16.4C9,16.7,9.3,17,9.6,17h1.8c0.3,0,0.6-0.3,0.6-0.6v-1.8c0-0.3-0.3-0.6-0.6-0.6H9.6
                C9.3,14,9,14.3,9,14.6V16.4z"></path>
            </svg>
    </span>
    <strong>Log</strong>
    <?php if ($collector->countErrors() || $collector->countDeprecations()): ?>
        <span class="count">
            <span><?php echo $collector->countErrors() ? $collector->countErrors() : $collector->countDeprecations() ?></span>
        </span>
    <?php endif ?>
</span>