<?php
/**
 * The view file of blog view method of ZDOO.
 *
 * @copyright   Copyright 2009-2018 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
 * @license     ZPL (http://zpl.pub/page/zplv12.html)
 * @author      Xiying Guan <guanxiying@xirangit.com>
 * @package     blog
 * @version     $Id: view.html.php 4029 2016-08-26 06:50:41Z liugang $
 * @link        http://www.zdoo.com
 */
?>
<?php include '../../common/view/header.html.php';?>
<?php css::import($themeRoot . 'default/blog.css');?>
<div id='mainTitle' class='clearfix'>
  <div class='btn-toolbar pull-left'>
    <?php echo html::a(inlink('index'), '<i class="icon icon-back icon-sm"></i> ' . $lang->goback, "class='btn btn-back'");?>
  </div>
  <div class='btn-toolbar pull-right'>
    <?php extract($prevAndNext);?>
    <?php if($prev): ?>
    <span class='previous'><?php echo $lang->blog->previous . $lang->colon . html::a(inlink('view', "id=$prev->id"), $prev->title, 'id="pre"'); ?></span>
    <?php endif; ?>
    <?php if($next):?>
    <span class='next'><?php echo $lang->blog->next . $lang->colon . html::a(inlink('view', "id=$next->id"), $next->title, 'id="next"'); ?></span>
    <?php endif; ?>
  </div>
</div>
<div class='article'>
  <header>
    <h1><?php echo $article->title;?></h1>
    <dl class='dl-inline'>
      <dd data-toggle='tooltip' data-placement='top' data-original-title='<?php printf($lang->article->lblAddedDate, $article->createdDate);?>'><i class="icon-clock icon-large"></i> <?php echo $article->createdDate;?></dd>
      <dd data-toggle='tooltip' data-placement='top' data-original-title='<?php printf($lang->article->lblAuthor, $users[$article->author]);?>'><i class='icon-user icon-large'></i> <?php echo $users[$article->author]; ?></dd>
      <dd class='pull-right'>
        <span class='label label-warning' data-toggle='tooltip' data-placement='top' data-original-title='<?php printf($lang->article->lblViews, $article->views);?>'><i class='icon-eye'></i> <?php echo $article->views; ?></span>
      </dd>
    </dl>
    <?php if($article->summary):?>
    <section class='abstract'><strong><?php echo $lang->article->summary;?></strong><?php echo $lang->colon . $article->summary;?></section>
    <?php endif; ?>
  </header>
  <section class='article-content'>
    <?php echo $article->content;?>
  </section>
  <footer>
    <?php if($article->keywords):?>
    <p class='small'><strong class='text-muted'><?php echo $lang->article->keywords;?></strong><span class='article-keywords'><?php echo $lang->colon . $article->keywords;?></span></p>
    <?php endif; ?>
  </footer>
</div>

<div id='commentBox'><?php echo $this->fetch('message', 'comment', "objectType=blog&objectID={$article->id}");?></div>
<?php echo html::a('', '', "name='comment'");?>
<?php js::set('articleID', $article->id);?>
<?php js::set('categoryID', $category->id);?>
<?php include './footer.html.php';?>
