<?php

$ul = array(
  array(
    'uri'  => '/index/lpo-content/id/' . $this->content->id,
    'text' => '<img src="/image/graph.png" />&nbsp;今日',
    'ul'   => array(),
    'attr' => (
      $this->chart == 'hourly' && $this->date == date('Y-m-d') ? array(
        'class' => array('selected')
      ) : array(array())
    ),
  ),
  array(
    'uri'  => '/index/lpo-content/chart/hourly/date/' . $this->yesterday . '/id/' . $this->content->id,
    'text' => '<img src="/image/graph.png" />&nbsp;昨日',
    'ul'   => array(),
    'attr' => (
      $this->chart == 'hourly' && $this->date == $this->yesterday ? array(
        'class' => array('selected')
      ) : array(array())
    ),
  ),
  array(
    'uri'  => '/index/lpo-content/chart/daily/id/' . $this->content->id,
    'text' => '<img src="/image/graph.png" />&nbsp;一ヶ月間',
    'ul'   => array(),
    'attr' => (
      $this->chart == 'daily' ? array(
        'class' => array('selected')
      ) : array(array())
    ),
  ),
  array(
    'uri'  => '/index/lpo-content/chart/monthly/id/' . $this->content->id,
    'text' => '<img src="/image/graph.png" />&nbsp;三ヶ月間',
    'ul'   => array(),
    'attr' => (
      $this->chart == 'monthly' ? array(
        'class' => array('selected')
      ) : array(array())
    ),
  ),
  array(
    'uri'  => '/index/lpo-content-update/id/' . $this->content->id,
    'text' => '<img src="/image/preference.png" />&nbsp;設定',
    'ul'   => array(),
    'attr' => (
      $this->action == 'lpo-content-update' ? array(
        'class' => array('selected')
      ) : array(array())
    ),
  ),
  array(
    'uri'  => '/index/lpo-content-delete/id/' . $this->content->id,
    'text' => '<img src="/image/delete.png" />&nbsp;削除',
    'ul'   => array(),
    'attr' => (
      $this->action == 'lpo-content-delete' ? array(
        'class' => array('selected')
      ) : array(array())
    ),
  ),
  array(
    'uri'  => '/index/lpo-content-preview/id/' . $this->content->id,
    'text' => '<img src="/image/preview.png" />&nbsp;プレビュー',
    'ul'   => array(),
    'attr' => array('target' => array('_blank')),
  ),
);

?>
<div id="menu_sub">
  <ul><?php echo $this->partialLoop('index/menu-li.phtml', $ul); ?></ul>
</div>
<?php if($this->content->status != 'active'): ?>
  <div id="inactive"><p>このコンテンツは設定が無効になっているため表示されません。<br />設定を有効にするにはメニューの<a href="/index/lpo-content-update/id/<?php echo $this->content->id ?>">設定</a>から有効をチェックして登録ボタンをクリックして下さい。</p></div>
<?php endif;
