diff options
Diffstat (limited to 'site/app/views/addons/browse.thtml')
-rw-r--r-- | site/app/views/addons/browse.thtml | 71 |
1 files changed, 42 insertions, 29 deletions
diff --git a/site/app/views/addons/browse.thtml b/site/app/views/addons/browse.thtml index 7c5f80f..69d6acf 100644 --- a/site/app/views/addons/browse.thtml +++ b/site/app/views/addons/browse.thtml @@ -38,38 +38,51 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ +?> + +<div id="content" class="category"> -$this->viewVars['bodyclass'] = 'inverse'; -$this->layout = 'amo2009'; +<?php +if (!empty($type) && !empty($this_tag) && array_key_exists('Tag', $this_tag)) + echo $this->renderElement('search', array('category' => + array($type, $this_tag['Tag']['id']))); +else + echo $this->renderElement('search'); ?> -<div class="section" id="browse"> - <div class="stand-alone-options"> - <?=$this->renderElement('amo2009/categories')?> - <?php - if (!empty($type) && array_key_exists('Tag', $this_tag)) - echo $this->renderElement('amo2009/search', array('category' => - array($type, $this_tag['Tag']['id']))); - else - echo $this->renderElement('amo2009/search'); - ?> - </div> - <div class="primary full" role="main"> - <h2><?=$subpagetitle?></h2> +<div id="content-main"> - <h3><?=sprintf(ngettext('addon_list_category_totalcount', - 'addon_list_category_totalcount', $paging['total']), - $paging['total'])?></h3> - <div class="featured listing" id="addon-listing"> - <?php - echo $this->renderElement('amo2009/addon_list_options', array('paging' => $paging)); - foreach ($addons as $val) { - echo $this->renderElement('amo2009/homepage_addon', array('addon' => $val)); - } - ?> - </div> +<?=$this->renderElement('addon_list_options', array('paging'=>$paging))?> - <?=$this->renderElement('amo2009/pagination');?> - </div><!-- /primary --> +<ul id="addon-listing"> +<? +foreach ($addons as $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, + )); +} +?> +</ul> -</div><!-- /section --> +<?=$this->renderElement('pagination', array('countstring' => + sprintf(ngettext('addon_list_category_totalcount', + 'addon_list_category_totalcount', $paging['total']), $paging['total'])));?> + +</div><!-- /#content-main --> + +<?php +if (!empty($type) && array_key_exists('Tag', $this_tag)) + echo $this->renderElement('sidebar', array('highlight' => + array($type, $this_tag['Tag']['id']))); +else + echo $this->renderElement('sidebar'); +?> +<?=$this->renderElement('app_chooser')?> +</div><!-- /#content --> |