You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
3.9 KiB

7 years ago
  1. <header>
  2. <h2 class="hide">[<?=$query?>] <?=langs("공통/search/search_result")?></h2>
  3. </header>
  4. <div class="row" id="page-search">
  5. <article class="search-header">
  6. <div class="container">
  7. <header>
  8. <h3 class="search-header-title">[<?=$query?>] <?=langs("공통/search/search_result")?></h3>
  9. </header>
  10. <?=form_open("", array("method"=>"get"), array("board_key"=> $board_key))?>
  11. <div class="form-control-search">
  12. <div class="input-group">
  13. <input class="form-control" maxlength="255" name="query" placeholder="<?=langs('공통/search/search_placeholder')?>" value="<?=$query?>">
  14. <span class="input-group-btn">
  15. <button class="btn btn-default"><i class="far fa-search"></i> <?=langs('공통/search/search_submit')?></button>
  16. </span>
  17. </div>
  18. </div>
  19. <?=form_close()?>
  20. <div class="H20"></div>
  21. <ul class="nav nav-tabs" role="tablist">
  22. <?php foreach($search_result['title'] as $key=>$row) :?>
  23. <li <?=$board_key==$key?'class="active"':''?>><a href="<?=base_url("search?board_key={$key}&query=".urlencode($query))?>"><?=$search_result['title'][$key]?> <small>(<?=number_format($search_result['count'][$key])?>)</small></a></li>
  24. <?php endforeach;?>
  25. </ul>
  26. </div>
  27. </article>
  28. <div class="container">
  29. <?php
  30. // 통합검색에서 개별 카테고리 검색결과를 최대 4개씩 보여준다.
  31. foreach($search_result['list'] as $type=>$rows) :
  32. ?>
  33. <article class="search-result">
  34. <header>
  35. <h2><?=$search_result['title'][$type]?> <?=langs("공통/search/search_result")?> (<span class="point-color"><?=$search_result['count'][$type]?></span>)</h2>
  36. <span class="blue-line">&nbsp;</span>
  37. </header>
  38. <ul class="search-list media-list">
  39. <?php foreach($search_result['list'][$type] as $row ):?>
  40. <li class="media">
  41. <?php if($row['post_thumbnail']):?>
  42. <div class="media-left">
  43. <img src="<?=base_url($row['post_thumbnail'])?>">
  44. </div>
  45. <?php endif;?>
  46. <div class="media-body">
  47. <h4><a class="text-primary" href="<?=$row['link']?>"><?=$row['post_title']?></a></h4>
  48. <h5><a class="text-success" href="<?=$row['link']?>"><?=$row['link']?></a></h5>
  49. <p><?=cut_str(get_summary($row['post_content']),300)?></p>
  50. </div>
  51. </li>
  52. <?php endforeach;?>
  53. </ul>
  54. <?php if($type != $board_key && $search_result['count'][$type] > 4 ):?>
  55. <a class="more-btn" href="<?=base_url("search?board_key={$type}&query=".urlencode($query))?>"><?=langs('공통/search/search_more')?> <i class="far fa-angle-double-right" aria-hidden="true"></i></a>
  56. <?php endif;?>
  57. </article>
  58. <?php
  59. endforeach;
  60. ?>
  61. <?php if($pagination) :?>
  62. <div class="text-center">
  63. <?php
  64. $param['first_link'] = '<i class="fa fa-caret-left"></i><i class="fa fa-caret-left "></i>';
  65. $param['prev_link'] = '<i class="fa fa-caret-left"></i>';
  66. $param['next_link'] = '<i class="fa fa-caret-right"></i>';
  67. $param['last_link'] = '<i class="fa fa-caret-right"></i><i class="fa fa-caret-right"></i>';
  68. echo $this->paging->create($param);
  69. ?>
  70. </div>
  71. <?php endif;?>
  72. </div>
  73. </div>