Improve search and add form to start a new search
This commit is contained in:
@@ -3,34 +3,64 @@
|
|||||||
<div id="content">
|
<div id="content">
|
||||||
|
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<h2><?=_('Search results');?></h2>
|
<h2><?=_('Search');?></h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<h3>Projects</h3>
|
<form name="search" method="get" action"">
|
||||||
|
<h3><?=_('New search')?></h3>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<?=form_label(_('Keyword'), 'query');?>
|
||||||
|
<div>
|
||||||
|
<input type="text" name="query" id="query" class="medium text" />
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="javascript:void(0);" onclick="$('form[name=search]').submit();" class="button search"><?=_('Search');?></a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$results = count(array_merge($projects, $experiments));
|
||||||
|
?>
|
||||||
|
<div class="box" name="search">
|
||||||
|
<h3><?=sprintf(ngettext('%s Result found', '%s Results found', $results), $results);?> (<?=sprintf(_('%s seconds'), $this->benchmark->elapsed_time());?>)</h3>
|
||||||
|
<?php
|
||||||
|
if ($results > 0):
|
||||||
|
if (count($projects) > 0):
|
||||||
|
?>
|
||||||
|
<h4>Projects</h4>
|
||||||
<?php
|
<?php
|
||||||
foreach($projects as $project):
|
foreach($projects as $project):
|
||||||
?>
|
?>
|
||||||
<p>
|
<p>
|
||||||
<h4 style="margin-bottom: 5px;"><?=anchor('projects/detail/' . $project['id'], $project['name']);?></h4>
|
<strong><?=anchor('projects/detail/' . $project['id'], $project['name']);?></strong><br />
|
||||||
<?=character_limiter($project['description'], 255);?><br />
|
<?=character_limiter($project['description'], 255);?><br />
|
||||||
</p>
|
</p>
|
||||||
<?php
|
<?php
|
||||||
endforeach;
|
endforeach;
|
||||||
|
endif;
|
||||||
|
if (count($experiments)):
|
||||||
?>
|
?>
|
||||||
</div>
|
<h4>Experiments</h4>
|
||||||
|
|
||||||
<div class="box">
|
|
||||||
<h3>Experiments</h3>
|
|
||||||
<?php
|
<?php
|
||||||
foreach($experiments as $experiment):
|
foreach($experiments as $experiment):
|
||||||
?>
|
?>
|
||||||
<p>
|
<p>
|
||||||
<h4 style="margin-bottom: 5px;"><?=anchor('experiments/detail/' . $experiment['id'], $experiment['name']);?></h4>
|
<strong><?=anchor('experiments/detail/' . $experiment['id'], $experiment['name']);?></strong><br />
|
||||||
<?=character_limiter($experiment['description'], 255);?><br />
|
<?=character_limiter($experiment['description'], 255);?><br />
|
||||||
</p>
|
</p>
|
||||||
<?php
|
<?php
|
||||||
endforeach;
|
endforeach;
|
||||||
|
endif;
|
||||||
|
else:
|
||||||
|
?>
|
||||||
|
<p><?=_('No results found.');?></p>
|
||||||
|
<?php
|
||||||
|
endif;
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -582,14 +582,9 @@ a.results {
|
|||||||
padding-left: 30px;
|
padding-left: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.up {
|
a.search {
|
||||||
background: url(../images/button-sprite.png) 13px -131px no-repeat #f3f3f3;
|
background: url(../images/icons/magnifier.png) 10px center no-repeat #f3f3f3;
|
||||||
width: 18px;
|
padding-left: 30px;
|
||||||
}
|
|
||||||
|
|
||||||
a.down {
|
|
||||||
background: url(../images/button-sprite.png) 13px -166px no-repeat #f3f3f3;
|
|
||||||
width: 18px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a.save-big {
|
a.save-big {
|
||||||
|
|||||||
Reference in New Issue
Block a user