Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/site/app/views/search/index.thtml
diff options
context:
space:
mode:
Diffstat (limited to 'site/app/views/search/index.thtml')
-rw-r--r--site/app/views/search/index.thtml71
1 files changed, 37 insertions, 34 deletions
diff --git a/site/app/views/search/index.thtml b/site/app/views/search/index.thtml
index 619790d..6bc1ea4 100644
--- a/site/app/views/search/index.thtml
+++ b/site/app/views/search/index.thtml
@@ -21,7 +21,6 @@
*
* Contributor(s):
* Frederic Wenzel <fwenzel@mozilla.com> (Original Author)
- * Wil Clouser <wclouser@mozilla.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -36,40 +35,44 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
+?>
+
+<div id="content" class="search">
-$this->viewVars['bodyclass'] = 'inverse';
-$this->layout = 'amo2009';
+<?=$this->renderElement('search', array('query'=>$search_terms,
+ 'category'=>$category, 'appid'=>$appid, 'atype'=>$atype, 'lup'=>"$lup",
+ 'pid'=>$pid, 'sort'=>$sort, 'hver'=>$hver, 'lver'=>$lver, 'vfuz'=>$vfuz, 'pp'=>$pp))?>
+<div id="content-main">
+
+<?php if (empty($search_results)): ?>
+<p class="addon-search-message"><?=_('search_nothing_found')?></p>
+<?php else: ?>
+ <ul id="addon-listing">
+<?php
+ foreach ($search_results as $var => $val) {
+ // prepare preview image
+ $prevPath = $this->controller->Image->getHighlightedPreviewURL($val['Addon']['id']);
+ // prepare icon
+ $iconPath = $this->controller->Image->getAddonIconURL($val['Addon']['id']);
+
+ echo $this->renderElement('addon_listitem', array(
+ 'addon' => $val,
+ 'addonIconPath' => $iconPath,
+ 'addonPreviewPath' => $prevPath
+ ));
+ }
?>
-<div class="section">
- <div class="stand-alone-options">
- <?=$this->renderElement('amo2009/categories')?>
- <?=$this->renderElement('amo2009/search', array('query'=>$search_terms,
- 'category'=>$category, 'appid'=>$appid, 'atype'=>$atype, 'lup'=>"$lup",
- 'pid'=>$pid, 'sort'=>$sort, 'hver'=>$hver, 'lver'=>$lver, 'vfuz'=>$vfuz, 'pp'=>$pp))?>
- </div>
- <?php // TODO Remove style when new search design is implemented; bug 482857 ?>
- <div class="primary" style="width:100%;">
- <?=$this->renderElement('amo2009/breadcrumbs')?>
- <div class="featured listing">
- <div class="featured-inner">
- <div class="listing-header">
- <?php if (empty($search_results)): ?>
- <p class="addon-search-message"><?=_('search_nothing_found')?></p>
- <?php endif; ?>
- </div> <!-- listing-header -->
- <?php
- foreach ($search_results as $var => $val) {
- echo $this->renderElement('amo2009/homepage_addon', array('addon' => $val));
- }
- ?>
- </div> <!-- featured-inner -->
- <?php if (count($search_results) > 0): ?>
- <div class="listing-footer">
- <?=$this->renderElement('amo2009/pagination');?>
- </div>
- <?php endif; ?>
- </div> <!-- featured listing -->
- </div> <!-- primary -->
-</div><!-- /#section -->
+ </ul>
+
+<?=$this->renderElement('pagination',
+ array('countstring' => sprintf(ngettext('search_matching_addons_number',
+ 'search_matching_addons_number', $paging['total']), $paging['total'])));?>
+
+<?php endif; ?>
+</div><!-- /#content-main -->
+
+<?=$this->renderElement('sidebar')?>
+<?=$this->renderElement('app_chooser')?>
+</div><!-- /#content -->