<?php
/**
 * The side view file of leads module of ZDOO.
 *
 * @copyright   Copyright 2009-2016 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
 * @license     商业软件，非开源软件
 * @author      Gang Liu <liugang@cnezsoft.com>
 * @package     leads 
 * @version     $Id$
 * @link        http://www.zdoo.com
 */
?>
<?php if(commonModel::hasPriv('leads', 'sync') && !empty($config->leads->sites)):?>
<li class='leads dropdown hidden'>
  <a href='#' data-toggle='dropdown'><?php echo $lang->leads->sync;?> <span class='caret'></span></a>
  <ul aria-labelledby='dropdownMenu1' role='menu' class='dropdown-menu'>
    <li><?php commonModel::printLink('leads', 'sync', '', $lang->all);?></li>
    <?php foreach($config->leads->sites as $code => $currentSite):?>
    <?php $currentSite = json_decode($currentSite);?>
    <li><?php commonModel::printLink('leads', 'sync', "origin=$code", $currentSite->name);?></li>
    <?php endforeach;?>
  </ul>
</li>
<?php endif;?>
<li id='bysearchTab' class='hidden'></li>
<div class='side-col'>
  <div class='panel'>
    <div class='panel-body'>
      <nav class='menu leftmenu'>
        <ul class='nav nav-primary'>
          <li class="<?php echo $type == 'site' ? 'active' : '';?>"><?php commonModel::printLink('leads', 'adminSites', '', $lang->leads->sites);?></li>
          <li class="<?php echo $type == 'sync' ? 'active' : '';?>"><?php commonModel::printLink('leads', 'setting', 'type=sync', $lang->leads->syncSetting);?></li>
          <li class="<?php echo $type == 'apply' ? 'active' : '';?>"><?php commonModel::printLink('leads', 'setting', 'type=apply', $lang->leads->applyRule);?></li>
        </ul>
      </nav>
    </div>
  </div>
</div>
