Improve search and add form to start a new search
This commit is contained in:
@@ -3,34 +3,64 @@
|
||||
<div id="content">
|
||||
|
||||
<div class="title">
|
||||
<h2><?=_('Search results');?></h2>
|
||||
<h2><?=_('Search');?></h2>
|
||||
</div>
|
||||
|
||||
<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
|
||||
foreach($projects as $project):
|
||||
$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
|
||||
foreach($projects as $project):
|
||||
?>
|
||||
<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 />
|
||||
</p>
|
||||
<?php
|
||||
endforeach;
|
||||
endforeach;
|
||||
endif;
|
||||
if (count($experiments)):
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
<h3>Experiments</h3>
|
||||
<h4>Experiments</h4>
|
||||
<?php
|
||||
foreach($experiments as $experiment):
|
||||
foreach($experiments as $experiment):
|
||||
?>
|
||||
<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 />
|
||||
</p>
|
||||
<?php
|
||||
endforeach;
|
||||
endforeach;
|
||||
endif;
|
||||
else:
|
||||
?>
|
||||
<p><?=_('No results found.');?></p>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -582,14 +582,9 @@ a.results {
|
||||
padding-left: 30px;
|
||||
}
|
||||
|
||||
a.up {
|
||||
background: url(../images/button-sprite.png) 13px -131px no-repeat #f3f3f3;
|
||||
width: 18px;
|
||||
}
|
||||
|
||||
a.down {
|
||||
background: url(../images/button-sprite.png) 13px -166px no-repeat #f3f3f3;
|
||||
width: 18px;
|
||||
a.search {
|
||||
background: url(../images/icons/magnifier.png) 10px center no-repeat #f3f3f3;
|
||||
padding-left: 30px;
|
||||
}
|
||||
|
||||
a.save-big {
|
||||
|
||||
Reference in New Issue
Block a user