Initial import from local backup (Documents-Playground/pakerpale)
This commit is contained in:
8
views/search/bootstrap/css/style.css
Normal file
8
views/search/bootstrap/css/style.css
Normal file
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
search skin css
|
||||
*/
|
||||
|
||||
.search_box{background-color: #d9edf7;border: 1px solid #ddd;padding: 15px 0 0 !important;margin: 0 15px;border-radius: 3px;overflow:hidden;}
|
||||
.search form{padding:20px;}
|
||||
.search textarea {padding: 15px;background: #f7f7f7;font-size: 12px;}
|
||||
|
||||
133
views/search/bootstrap/search.php
Normal file
133
views/search/bootstrap/search.php
Normal file
@@ -0,0 +1,133 @@
|
||||
<?php $this->managelayout->add_css(element('view_skin_url', $layout) . '/css/style.css'); ?>
|
||||
|
||||
<h3><?php echo ($this->input->get('skeyword')) ? '검색결과 : ' . html_escape($this->input->get('skeyword')) : '검색페이지' ?></h3>
|
||||
<div class="row">
|
||||
<form action="<?php echo current_url(); ?>" onSubmit="return checkSearch(this);" class="search_box text-center">
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<select class="form-control per100" name="group_id">
|
||||
<option value="">전체그룹</option>
|
||||
<?php
|
||||
if (element('grouplist', $view)) {
|
||||
foreach (element('grouplist', $view) as $key => $value) {
|
||||
?>
|
||||
<option value="<?php echo element('bgr_id', $value); ?>" <?php echo element('bgr_id', $value) === $this->input->get('group_id') ? 'selected="selected"' : ''; ?>><?php echo element('bgr_name', $value); ?></option>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="form-group">
|
||||
<select class="form-control per100" name="sfield">
|
||||
<option value="post_both" <?php echo $this->input->get('sfield') === 'post_both' ? 'selected="selected"' : ''; ?>>제목+내용</option>
|
||||
<option value="post_title" <?php echo $this->input->get('sfield') === 'post_title' ? 'selected="selected"' : ''; ?>>제목</option>
|
||||
<option value="post_content" <?php echo $this->input->get('sfield') === 'post_content' ? 'selected="selected"' : ''; ?>>내용</option>
|
||||
<option value="post_userid" <?php echo $this->input->get('sfield') === 'post_userid' ? 'selected="selected"' : ''; ?>>회원아이디</option>
|
||||
<option value="post_nickname" <?php echo $this->input->get('sfield') === 'post_nickname' ? 'selected="selected"' : ''; ?>>회원닉네임</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control per100" name="skeyword" placeholder="검색어" value="<?php echo html_escape($this->input->get('skeyword')); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> 검색</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="form-group">
|
||||
<select class="form-control" name="sop">
|
||||
<option value="OR" <?php echo strtoupper($this->input->get('sop')) !== 'AND' ? 'selected="selected"' : ''; ?>>OR</option>
|
||||
<option value="AND" <?php echo strtoupper($this->input->get('sop')) === 'AND' ? 'selected="selected"' : ''; ?>>AND</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<ul class="nav nav-tabs mt20">
|
||||
<?php
|
||||
if (element('board_rows', $view)) {
|
||||
?>
|
||||
<li role="presentation" <?php echo ( ! $this->input->get('board_id')) ? 'class="active"' : ''; ?>><a href="<?php echo element('tab_url', $view); ?>">전체게시판 (<?php echo number_format( array_sum(element('board_rows', $view))); ?>)</a></li>
|
||||
<?php
|
||||
foreach (element('board_rows', $view) as $key => $value) {
|
||||
?>
|
||||
<li role="presentation" <?php echo ($this->input->get('board_id') === $key) ? 'class="active"' : ''; ?>><a href="<?php echo element('tab_url', $view) . '&board_id=' . $key; ?>"><?php echo html_escape(element('brd_name', element($key, element('boardlist', $view)))); ?> (<?php echo $value; ?>)</a></li>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<div class="media-box mt20" id="searchresult">
|
||||
<?php
|
||||
if (element('list', element('data', $view))) {
|
||||
foreach (element('list', element('data', $view)) as $result) {
|
||||
?>
|
||||
<div class="media">
|
||||
<?php
|
||||
if (element('images', $result)) {
|
||||
?>
|
||||
<div class="media-left">
|
||||
<a href="<?php echo element('post_url', $result); ?>" title="<?php echo html_escape(element('post_title', $result)); ?>">
|
||||
<img class="media-object" src="<?php echo thumb_url('post', element('pfi_filename', element('images', $result)), 100, 80); ?>" alt="<?php echo html_escape(element('post_title', $result)); ?>" title="<?php echo html_escape(element('post_title', $result)); ?>" style="width:100px;height:80px;" />
|
||||
</a>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading"><a href="<?php echo element('post_url', $result); ?>" title="<?php echo html_escape(element('post_title', $result)); ?>"><?php echo html_escape(element('post_title', $result)); ?></a>
|
||||
<?php if (element('post_comment_count', $result)) { ?><span class="label label-info label-xs"><?php echo element('post_comment_count', $result); ?> comments</span><?php } ?>
|
||||
<a href="<?php echo element('post_url', $result); ?>" target="_blank" title="<?php echo html_escape(element('post_title', $result)); ?>"><span class="label label-default label-xs">새창</span></a>
|
||||
</h4>
|
||||
<p><?php echo element('content', $result); ?></p>
|
||||
<p class="media-info">
|
||||
<span><?php echo element('display_name', $result); ?></span>
|
||||
<span><i class="fa fa-clock-o"></i> <?php echo element('display_datetime', $result); ?></span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
if ( ! element('list', element('data', $view))) {
|
||||
?>
|
||||
<div class="media">
|
||||
<div class="media-body nopost">
|
||||
검색 결과가 없습니다
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<nav><?php echo element('paging', $view); ?></nav>
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function checkSearch(f) {
|
||||
var skeyword = f.skeyword.value.replace(/(^\s*)|(\s*$)/g,'');
|
||||
if (skeyword.length < 2) {
|
||||
alert('2글자 이상으로 검색해 주세요');
|
||||
f.skeyword.focus();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
<?php if (element('highlight_keyword', $view)) {
|
||||
$this->managelayout->add_js(base_url('assets/js/jquery.highlight.js')); ?>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
$('#searchresult').highlight([<?php echo element('highlight_keyword', $view);?>]);
|
||||
//]]>
|
||||
</script>
|
||||
<?php } ?>
|
||||
Reference in New Issue
Block a user