header.html.php 1.2 KB

123456789101112131415161718192021222324252627
  1. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  2. <?php if(isset($tab)):?>
  3. <script>$('#mainMenu #<?php echo $tab;?>').addClass('btn-active-text')</script>
  4. <?php endif;?>
  5. <?php if($app->rawMethod == 'api'):?>
  6. <style>
  7. .api-tip-icon.icon-help:before {margin-top: 8px; margin-left: -4px;}
  8. [lang^=zh] .api-tip-icon.icon-help:before {margin-left: -10px;}
  9. </style>
  10. <div id='mainMenu' class='clearfix menu-secondary'>
  11. <div class="btn-toolbar pull-left">
  12. <?php
  13. foreach($lang->dev->featureBar['api'] as $key => $label)
  14. {
  15. $active = $selectedModule == $key ? 'btn-active-text' : '';
  16. if($key == 'index' and $selectedModule != 'restapi') $active = 'btn-active-text';
  17. $label = "<span class='text'>$label</span>";
  18. echo html::a(inlink('api', "module=$key"), $label, '', "class='btn btn-link $active'");
  19. if($key == 'index') echo "<icon class='icon icon-help api-tip-icon' data-toggle='popover' data-trigger='focus hover' data-placement='bottom' data-tip-class='text-muted popover-sm' data-content='{$lang->dev->apiTips}'></icon>";
  20. }
  21. ?>
  22. </div>
  23. </div>
  24. <script>$('[data-toggle="popover"]').popover();</script>
  25. <?php endif;?>