index.html.php 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php //include '../../common/view/header.html.php';?>
  2. <?php include '../../common/view/header.lite.html.php';?>
  3. <header id='header'>
  4. <div id='mainHeader' style='height: 0px;'>
  5. </div>
  6. </header>
  7. <?php
  8. if(!empty($config->sso->redirect))
  9. {
  10. css::import($defaultTheme . 'bindranzhi.css');
  11. js::import($jsRoot . 'bindranzhi.js');
  12. }
  13. ?>
  14. <script>
  15. adjustMenuWidth();
  16. </script>
  17. <main id='main' <?php if(!empty($config->sso->redirect)) echo "class='ranzhiFixedTfootAction'";?> >
  18. <div class='container'>
  19. <div class='row'>
  20. <div class='col-md-12'>
  21. <form method='post' action='<?php echo inlink('index')?>' class='no-stash'>
  22. <div class='input-group col-md-8 col-md-offset-2'>
  23. <span class='input-group-btn w-auto'><?php echo html::input('words', $words, "class='form-control'")?></span>
  24. <span class='input-group-btn select'><?php echo html::select('type[]', $typeList, $type, "class='form-control chosen' multiple")?></span>
  25. <span class='input-group-btn'><?php echo html::submitButton($lang->search->common, '', 'btn btn-primary')?></span>
  26. </div>
  27. </form>
  28. <div class='list list-condensed'>
  29. <header>
  30. <h2><?php echo $lang->search->result;?></h2>
  31. </header>
  32. <section class='items items-hover'>
  33. <?php foreach($results as $object):?>
  34. <div class='item'>
  35. <div class='item-heading'>
  36. <div class="pull-right">
  37. <span><?php echo html::a($object->url . (strpos($object->url, '?') !== false ? '&onlybody=yes' : '?onlybody=yes'), $lang->search->preview, '', "class='iframe' data-width='90%'")?></span>
  38. </div>
  39. <h4>
  40. <?php
  41. $objectType = $object->objectType == 'case' ? 'testcase' : $object->objectType;
  42. echo html::a($object->url, $object->title, '', 'title="' . strip_tags($object->title) . '"');
  43. if(($objectType == 'story' || $objectType == 'requirement' || $objectType == 'execution' || $objectType == 'issue') and !empty($object->extraType))
  44. {
  45. echo "<small class=''>[{$lang->search->objectTypeList[$object->extraType]} #{$object->objectID}]</small> ";
  46. }
  47. else
  48. {
  49. echo "<small class=''>[{$lang->searchObjects[$objectType]} #{$object->objectID}]</small> ";
  50. }
  51. ?>
  52. </h4>
  53. </div>
  54. <div class='item-content'>
  55. <div class='text text-muted'><?php echo $object->summary;?></div>
  56. </div>
  57. </div>
  58. <?php endforeach;?>
  59. </section>
  60. <footer class='table-footer'>
  61. <?php echo str_replace($words, urlencode($words), $pager->get('right', 'short'));?>
  62. <span class='execute-info text-muted'><?php printf($lang->search->executeInfo, $pager->recTotal, $consumed);?></span>
  63. </footer>
  64. </div>
  65. </div>
  66. </div>
  67. <script>
  68. $(function()
  69. {
  70. $('#searchbox #searchInput').val(<?php echo json_encode($words)?>);
  71. })
  72. </script>
  73. <?php include '../../common/view/footer.html.php';?>