Esempio n. 1
0
<ul class="nav navbar-nav">
  <?php 
if (!\Yii::$app->user->isGuest) {
    ?>
    
  <!-- Notifications Menu -->
  <li class="dropdown messages-menu">
    <!-- Menu toggle button -->
    <a id="not_toggle_button" href="#" class="dropdown-toggle" data-toggle="dropdown">
      <i class="fa fa-bell-o"></i>
      <span id="not_number" class="label label-warning"></span>
    </a>
    <ul id="not_body" class="dropdown-menu">
      <li class="header"><?php 
    echo Yii::t("notify", "You have {number} notifications", ['number' => Notification::getNumberNotifications()]);
    ?>
</li>
      <li id="not_content_li">
      	<?php 
    echo Html::img('@web' . '/images/ajax-loader.gif', ['id' => "not_loader", 'style' => 'padding: 10px;']);
    ?>
        <!-- Inner Menu: contains the notifications -->
        <ul id="not_content" class="menu">
        </ul>
      </li>
      <!-- <li class="footer"><a href="#">View All</a></li> -->
      <li class="footer"><?php 
    echo Html::a(Yii::t("notify", "View Authorizations") . " (<span id='authN'>" . Notification::getNumberAuthorizations() . "</span>)", array('/circuits/authorization/index'));
    ?>
</li>
Esempio n. 2
0
 public function actionGetCount()
 {
     echo Notification::getNumberNotifications();
 }