Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/site/app/views/addons/searchengines.thtml
diff options
context:
space:
mode:
Diffstat (limited to 'site/app/views/addons/searchengines.thtml')
-rw-r--r--site/app/views/addons/searchengines.thtml173
1 files changed, 128 insertions, 45 deletions
diff --git a/site/app/views/addons/searchengines.thtml b/site/app/views/addons/searchengines.thtml
index 77d6032..2fa9e18 100644
--- a/site/app/views/addons/searchengines.thtml
+++ b/site/app/views/addons/searchengines.thtml
@@ -37,59 +37,142 @@
*
* ***** END LICENSE BLOCK ***** */
-$this->layout = 'amo2009';
-
?>
- <div class="stand-alone-options">
- <?=$this->renderElement('amo2009/categories', array('clickable_header' => true, 'category' => 'x'))?>
- <?=$this->renderElement('amo2009/search', array('category'=>array(ADDON_SEARCH, 0)))?>
- </div><!-- /.stand-alone-options -->
- <div class="primary" role="main">
+<div id="content" class="landing browse">
+
+<?=$this->renderElement('search', array('category'=>array(ADDON_SEARCH, 0)))?>
+
+<div id="content-main">
- <noscript>
- <?=$this->renderElement('notification', array('type' => 'error', 'description' => _('addons_searchengines_error_nojavascript'))); ?>
- </noscript>
- <div class="featured show-recommended listing" id="featured">
- <div class="featured-inner">
- <div class="listing-header">
- <ul>
- <li class="selected"><a href="?featured=recommended#featured"><?=___('addons_home_browse_recommended', 'Recommended')?></a></li>
- </ul>
- </div>
- <?php foreach ($featureAddons as $id => $addon): ?>
- <?= $this->renderElement('amo2009/homepage_addon', array(
- 'group' => 'recommended', 'addon' => $addon
- )) ?>
- <?php endforeach; ?>
- <div class="recommended listing-footer"> </div>
- </div>
+ <noscript><div class="error-notice">
+ <?=_('addons_searchengines_error_nojavascript'); ?>
+ </div></noscript>
+
+ <?php if (!empty($featureAddons)): ?>
+ <div id="recommended">
+ <h3><?=_('addons_home_feature_head')?></h3>
+ <?php
+ foreach($featureAddons as $id => $addon):
+ ?>
+ <div id="feature<?=$id+1?>" class="addon main">
+ <?=$this->renderElement('feature', array(
+ 'addonIconPath' => $this->controller->Image->getAddonIconURL($addon['Addon']['id']),
+ 'addonThumbPath' => $this->controller->Image->getHighlightedPreviewURL($addon['Addon']['id']),
+ 'addonName' => $addon['Translation']['name']['string'],
+ 'addonSummary' => $addon['Translation']['summary']['string'],
+ 'addonId' => $addon['Addon']['id'],
+ 'addonFiles' => $addon['File'],
+ 'addonEULA' => $addon['Translation']['eula']['string'],
+ 'addonAuthors' => $addon['User'],
+ 'addonWeeklyDownloads' => $addon['Addon']['weeklydownloads'],
+ 'allPlatforms' => $platforms,
+ 'compatible_apps' => $addon['compatible_apps'],
+ 'addonType' => $addon['Addon']['addontype_id'],
+ 'addonRating' => $addon['Addon']['averagerating'],
+ 'addonReviews' => $addon['Addon']['totalreviews'],
+ 'addonVersionCreated' => $addon['Version'][0]['created']
+ ))?>
+ <div class="vex"><span><!-- bottom edge --></span></div>
</div>
+ <?php endforeach; ?>
+ </div><!-- /#recommended -->
+ <?php endif; /* !empty(recommended) */ ?>
-</div><!-- /.primary -->
+ <?php if (!empty($randomAddons)): ?>
+ <div id="secondaries">
+ <?php
+ global $experimental_status;
+
+ foreach($randomAddons as $id => $addon):
+ $idx = count($featureAddons) + $id + 1;
+ if (in_array($addon['Addon']['status'], $experimental_status))
+ $extraclass = ' exp';
+ else
+ $extraclass = '';
+ ?>
+ <div id="feature<?=$idx?>" class="addon sub<?=$extraclass?>">
+ <div class="irk">
+ <?=$this->renderElement('feature', array(
+ 'addonIconPath' => $this->controller->Image->getAddonIconURL($addon['Addon']['id']),
+ 'addonThumbPath' => $this->controller->Image->getHighlightedPreviewURL($addon['Addon']['id']),
+ 'addonName' => $addon['Translation']['name']['string'],
+ 'addonSummary' => $addon['Translation']['summary']['string'],
+ 'addonId' => $addon['Addon']['id'],
+ 'addonEULA' => $addon['Translation']['eula']['string'],
+ 'addonStatus' => $addon['Addon']['status'],
+ 'addonAuthors' => $addon['User'],
+ 'addonWeeklyDownloads' => $addon['Addon']['weeklydownloads'],
+ 'allPlatforms' => $platforms,
+ 'addonType' => $addon['Addon']['addontype_id'],
+ 'addonRating' => $addon['Addon']['averagerating'],
+ 'addonReviews' => $addon['Addon']['totalreviews']
+ ))?>
+ </div>
+ <div class="vex"><span><!-- bottom edge --></span></div>
+ </div>
+ <?php endforeach; ?>
+ </div><!-- /#secondaries -->
+ <?php endif; /* !empty(random) */ ?>
-<div class="secondary" role="complementary">
+ <div id="content-extra">
+ <div class="more-addons">
+ <h3><?=$html->link(_('search_landing_browse_search_engines'),
+ "/browse/type:".ADDON_SEARCH."/cat:all?sort=name",
+ array('class'=>'view'))?></h3>
+ <ol class="browse-list">
+ <li><?=$html->link(_('search_landing_all_search_engines'),
+ "/browse/type:".ADDON_SEARCH."/cat:all?sort=name")?></li>
+ <?php
+ foreach ($subcats as $subcat):
+ ?>
+ <li><?=$html->link($subcat['Translation']['name']['string'],
+ "/browse/type:{$subcat['Tag']['addontype_id']}/cat:{$subcat['Tag']['id']}?sort=name")?></li>
+ <?php endforeach; ?>
+ </ol>
+ </div>
+ <div class="more-addons">
+ <h3><?=$html->link(sprintf(_('category_extra_see_all'), $this_tag['Translation']['name']['string']),
+ "/browse/type:{$this_tag['Tag']['addontype_id']}/cat:{$this_tag['Tag']['id']}?sort=name",
+ array('class'=>'view'))?></h3>
+ </div>
- <h3 class="compact"><?=$html->link(_('search_landing_browse_search_engines'), "/browse/type:".ADDON_SEARCH."/cat:all?sort=name", array('class'=>'view'))?></h3>
+ </div><!-- /#content-extra -->
- <ul class="highlight">
- <li><?=$html->link(_('search_landing_all_search_engines'),
- "/browse/type:".ADDON_SEARCH."/cat:all?sort=name", array('class' => 'category'))?></li>
- <?php foreach ($subcats as $subcat): ?>
- <li class="sub-category"><?=$html->link($subcat['Translation']['name']['string'],
- "/browse/type:{$subcat['Tag']['addontype_id']}/cat:{$subcat['Tag']['id']}?sort=name", array('class' => 'category'))?></li>
- <?php endforeach; ?>
- </ul>
+ <?php
+ /* @partial 5/12/08 bug 426234 */
- <h3 class="clear"><?=___('addons_searchengines_additional_resources')?></h3>
- <div class="article prose compact">
+ // Find out if we're serving msgid's or not. If we are, show the
+ // all-english version for now.
+ if (_('addons_searchengines_additional_resources') == 'addons_searchengines_additional_resources' ||
+ _('addons_searchengines_more') == ' addons_searchengines_more' ||
+ _('addons_searchengines_mycroft_link') == 'addons_searchengines_mycroft_link' ||
+ _('addons_searchengines_learn_howto') == 'addons_searchengines_learn_howto' ||
+ _('addons_searchengines_makeyourown_link') == 'addons_searchengines_makeyourown_link' ||
+ _('addons_searchengines_makeyourown_href') == 'addons_searchengines_makeyourown_href' ||
+ _('addons_searchengines_devmo_link') == 'addons_searchengines_devmo_link' ||
+ _('addons_searchengines_thanks') == 'addons_searchengines_thanks') {
+ ?>
+ <h1 class="clear">Additional Resources</h1>
<ul>
- <li><?=$html->link(sprintf(_('category_extra_see_all'), $this_tag['Translation']['name']['string']), "/browse/type:{$this_tag['Tag']['addontype_id']}/cat:{$this_tag['Tag']['id']}?sort=name", array('class'=>'view'))?></li>
- <li><?=sprintf(___('addons_searchengines_more'), $html->link(___('addons_searchengines_mycroft_link'), 'http://mycroft.mozdev.org/'))?></li>
- <li><?=sprintf(___('addons_searchengines_learn_howto'),
- $html->link(___('addons_searchengines_makeyourown_link'), 'http://developer.mozilla.org'.___('addons_searchengines_makeyourown_href')),
- $html->link(___('addons_searchengines_devmo_link'), 'http://developer.mozilla.org/'))?></li>
+ <li>Browse through more search engines at <a href="http://mycroft.mozdev.org/" >mycroft.mozdev.org</a></li>
+ <li>Learn how to <a href="http://developer.mozilla.org/en/docs/Creating_OpenSearch_plugins_for_Firefox" >make your own</a> at the <a href="http://developer.mozilla.org/" >Mozilla Developer Center</a>.</li>
+
</ul>
- </div>
- <div class="article prose highlight"> <?=_('addons_searchengines_thanks')?> </div>
-</div><!-- /.secondary -->
+ <p>Special thanks to the Mycroft Project for their work on Firefox Search Engines.</p>
+ <?php } else { ?>
+ <h1 class="clear"><?=_('addons_searchengines_additional_resources')?></h1>
+ <ul>
+ <li><?=sprintf(_('addons_searchengines_more'), $html->link(_('addons_searchengines_mycroft_link'), 'http://mycroft.mozdev.org/'))?></li>
+ <li><?=sprintf(_('addons_searchengines_learn_howto'),
+ $html->link(_('addons_searchengines_makeyourown_link'), 'http://developer.mozilla.org'._('addons_searchengines_makeyourown_href')),
+ $html->link(_('addons_searchengines_devmo_link'), 'http://developer.mozilla.org/'))?></li>
+ </ul>
+ <p><?=_('addons_searchengines_thanks')?></p>
+ <?php } ?>
+
+</div><!-- /#content-main -->
+
+<?=$this->renderElement('sidebar', array('highlight' => array(ADDON_SEARCH,0)))?>
+<?=$this->renderElement('app_chooser')?>
+</div><!-- /#content -->