Implement simple search
This commit is contained in:
@@ -200,9 +200,9 @@
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
<form id="search-form" method="get" action="#">
|
||||
<input type="text" name="search" id="search-input" class="search-input" />
|
||||
<input type="image" src="<?=asset_url('images', 'button-search.gif');?>" id="search-submit" class="search-submit" />
|
||||
<form id="search-form" method="get" action="<?=site_url('search');?>">
|
||||
<input type="text" name="query" id="search-input" class="search-input" />
|
||||
<input type="submit" id="search-submit" class="search-submit" value="<?=_('Search');?>" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
10
application/views/search/index.html
Executable file
10
application/views/search/index.html
Executable file
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
39
application/views/search/results.php
Normal file
39
application/views/search/results.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php $this->load->view('header');?>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<div class="title">
|
||||
<h2><?=_('Search results');?></h2>
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
<h3>Projects</h3>
|
||||
<?php
|
||||
foreach($projects as $project):
|
||||
?>
|
||||
<p>
|
||||
<h4 style="margin-bottom: 5px;"><?=anchor('projects/detail/' . $project['id'], $project['name']);?></h4>
|
||||
<?=character_limiter($project['description'], 255);?><br />
|
||||
</p>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
<h3>Experiments</h3>
|
||||
<?php
|
||||
foreach($experiments as $experiment):
|
||||
?>
|
||||
<p>
|
||||
<h4 style="margin-bottom: 5px;"><?=anchor('experiments/detail/' . $experiment['id'], $experiment['name']);?></h4>
|
||||
<?=character_limiter($experiment['description'], 255);?><br />
|
||||
</p>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php $this->load->view('footer');?>
|
||||
Reference in New Issue
Block a user