Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/site/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'site/app/views')
-rw-r--r--site/app/views/addons/browse.thtml71
-rw-r--r--site/app/views/addons/browse_thumbs.thtml166
-rw-r--r--site/app/views/addons/category_landing.thtml299
-rw-r--r--site/app/views/addons/dictionaries.thtml20
-rw-r--r--site/app/views/addons/display.thtml759
-rw-r--r--site/app/views/addons/home.thtml311
-rw-r--r--site/app/views/addons/plugins.thtml153
-rw-r--r--site/app/views/addons/policy.thtml116
-rw-r--r--site/app/views/addons/recommended.thtml50
-rw-r--r--site/app/views/addons/searchengines.thtml173
-rw-r--r--site/app/views/addons/themes_landing.thtml118
-rw-r--r--site/app/views/addons/versions.thtml168
-rw-r--r--site/app/views/admin/addons.thtml14
-rw-r--r--site/app/views/admin/addons_status.thtml2
-rw-r--r--site/app/views/admin/features.thtml14
-rw-r--r--site/app/views/admin/flagged_queue.thtml55
-rw-r--r--site/app/views/admin/groups.thtml12
-rw-r--r--site/app/views/admin/summary.thtml19
-rw-r--r--site/app/views/admin/users_edit.thtml28
-rw-r--r--site/app/views/api/api_addon.thtml2
-rw-r--r--site/app/views/api/collections_feed.thtml2
-rw-r--r--site/app/views/api/email/recommend_email_plain.thtml0
-rw-r--r--site/app/views/api/recommend_email.thtml0
-rw-r--r--site/app/views/collections/display.thtml86
-rw-r--r--site/app/views/collections/index.thtml48
-rw-r--r--site/app/views/compatibility/dashboard.thtml16
-rw-r--r--site/app/views/compatibility/developers.thtml4
-rw-r--r--site/app/views/compatibility/report.thtml6
-rw-r--r--site/app/views/compatibility/users.thtml6
-rw-r--r--site/app/views/developers/add_step0.thtml64
-rw-r--r--site/app/views/developers/add_step1.thtml134
-rw-r--r--site/app/views/developers/add_step2.thtml174
-rw-r--r--site/app/views/developers/add_step3.thtml131
-rw-r--r--site/app/views/developers/add_step4.thtml66
-rw-r--r--site/app/views/developers/add_step5.thtml78
-rw-r--r--site/app/views/developers/addon_edit_authors.thtml6
-rw-r--r--site/app/views/developers/addon_edit_categories.thtml2
-rw-r--r--site/app/views/developers/addon_edit_descriptions.thtml11
-rw-r--r--site/app/views/developers/addon_edit_properties.thtml9
-rw-r--r--site/app/views/developers/addon_status.thtml3
-rw-r--r--site/app/views/developers/author_lookup.thtml48
-rw-r--r--site/app/views/developers/details.thtml164
-rw-r--r--site/app/views/developers/disable.thtml65
-rw-r--r--site/app/views/developers/edit.thtml164
-rw-r--r--site/app/views/developers/editversion.thtml127
-rw-r--r--site/app/views/developers/index.thtml107
-rw-r--r--site/app/views/developers/nominate.thtml58
-rw-r--r--site/app/views/developers/previews.thtml13
-rw-r--r--site/app/views/developers/uploader.thtml54
-rw-r--r--site/app/views/developers/versions.thtml2
-rw-r--r--site/app/views/developers/versions_edit.thtml28
-rw-r--r--site/app/views/editors/email/nominated/public_plain.thtml2
-rw-r--r--site/app/views/editors/queue.thtml142
-rw-r--r--site/app/views/editors/review.thtml34
-rw-r--r--site/app/views/elements/addon_categories.thtml19
-rw-r--r--site/app/views/elements/addon_listitem.thtml24
-rw-r--r--site/app/views/elements/amo2009/install.thtml3
-rw-r--r--site/app/views/elements/amo2009/search.thtml3
-rw-r--r--site/app/views/elements/app_chooser.thtml2
-rw-r--r--site/app/views/elements/app_compatibility.thtml2
-rw-r--r--site/app/views/elements/developers/adminmenu.thtml3
-rw-r--r--site/app/views/elements/developers/editorsmenu.thtml1
-rw-r--r--site/app/views/elements/developers/myaddons.thtml21
-rw-r--r--site/app/views/elements/developers/translationbox.thtml158
-rw-r--r--site/app/views/elements/feature.thtml11
-rw-r--r--site/app/views/elements/fyf_promotion.thtml60
-rw-r--r--site/app/views/elements/install.thtml212
-rw-r--r--site/app/views/elements/pitch.thtml16
-rw-r--r--site/app/views/elements/search.thtml7
-rw-r--r--site/app/views/errors/error404.thtml15
-rw-r--r--site/app/views/helpers/addons_html.php127
-rw-r--r--site/app/views/helpers/link.php22
-rw-r--r--site/app/views/helpers/listing.php2
-rw-r--r--site/app/views/helpers/pagination.php17
-rw-r--r--site/app/views/layouts/amo2009.thtml13
-rw-r--r--site/app/views/layouts/mozilla.thtml3
-rw-r--r--site/app/views/layouts/tests.thtml2
-rw-r--r--site/app/views/pages/about.thtml55
-rw-r--r--site/app/views/pages/appversions.thtml16
-rw-r--r--site/app/views/pages/credits.thtml17
-rw-r--r--site/app/views/pages/faq.thtml18
-rw-r--r--site/app/views/pages/js_constants.js.thtml74
-rw-r--r--site/app/views/pages/policy.thtml18
-rw-r--r--site/app/views/pages/privacy.thtml18
-rw-r--r--site/app/views/pages/review_guide.thtml18
-rw-r--r--site/app/views/pages/sandbox.thtml18
-rw-r--r--site/app/views/pages/submissionhelp.thtml18
-rw-r--r--site/app/views/reviews/add.thtml38
-rw-r--r--site/app/views/reviews/delete.thtml44
-rw-r--r--site/app/views/reviews/display.thtml39
-rw-r--r--site/app/views/reviews/flag.thtml20
-rw-r--r--site/app/views/reviews/review_added.thtml23
-rw-r--r--site/app/views/search/index.thtml71
-rw-r--r--site/app/views/statistics/addon.thtml54
-rw-r--r--site/app/views/statistics/index.thtml35
-rw-r--r--site/app/views/statistics/rss/summary.thtml27
-rw-r--r--site/app/views/statistics/settings.thtml9
-rw-r--r--site/app/views/users/activatefirst.thtml23
-rw-r--r--site/app/views/users/delete.thtml52
-rw-r--r--site/app/views/users/edit.thtml119
-rw-r--r--site/app/views/users/email/emailchange_plain.thtml16
-rw-r--r--site/app/views/users/emailchange.thtml39
-rw-r--r--site/app/views/users/info.thtml58
-rw-r--r--site/app/views/users/login.thtml44
-rw-r--r--site/app/views/users/pwreset.thtml23
-rw-r--r--site/app/views/users/register.thtml42
-rw-r--r--site/app/views/users/register_complete.thtml13
107 files changed, 3879 insertions, 2327 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 -->
diff --git a/site/app/views/addons/browse_thumbs.thtml b/site/app/views/addons/browse_thumbs.thtml
index a5c029e..a405f89 100644
--- a/site/app/views/addons/browse_thumbs.thtml
+++ b/site/app/views/addons/browse_thumbs.thtml
@@ -36,65 +36,19 @@
*
* ***** END LICENSE BLOCK ***** */
-$this->viewVars['bodyclass'] = 'browse_thumbs';
-$this->layout = 'amo2009';
?>
-<div class="stand-alone-options">
- <?=$this->renderElement('amo2009/categories')?>
- <?php
- if (!empty($type) && !empty($this_tag) && 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="secondary">
- <div class="highlight" id="thumb-subcategories">
- <h3><?=___('general_addontype_theme_plural', 'Themes')?></h3>
- <ul class="subcategories">
- <li<?= ($this_tag == FALSE) ? ' class="selected"' : '' ?>><?=$html->link(
- 'All',
- "/browse/type:{$type}/cat:all?sort={$sort_by}"
- )?>
- <span class="items"><?=$all_total?></span>
- </li>
- <?php foreach ($subcats as $subcat): ?>
- <?php
- $params = 'sort=' . $sort_by;
- if ($show_exp)
- $params .= '&exp=on';
- if ($show_limit)
- $params .= '&show=' . $show_limit;
- ?>
- <li class="sub<?= ($this_tag['Tag']['id'] == $subcat['Tag']['id']) ? ' selected' : '' ?>"><?=$html->link(
- $subcat['Translation']['name']['string'],
- "/browse/type:{$subcat['Tag']['addontype_id']}/cat:{$subcat['Tag']['id']}?{$params}"
- )?>
- <span class="items"><?=(isset($subcat_totals[$subcat['Tag']['id']]) ? $subcat_totals[$subcat['Tag']['id']] : 0) ?></span>
- </li>
- <?php endforeach; ?>
- </ul>
- </div>
-</div>
+<div id="content" class="landing browse">
-<div class="primary" role="main">
+ <?=$this->renderElement('search', array('category' => array($type, 0)))?>
- <?php if ( empty($this_tag)): ?>
- <h2><?=___('themes_landing_browse_themes', 'Browse Themes')?></h2>
- <?php else: ?>
- <h2><?=$this_tag['Translation']['name']['string']?></h2>
- <?php endif ?>
+ <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">
- <?= $this->renderElement('amo2009/addon_list_options', array('paging' => $paging)) ?>
+ <div id="thumb-browser">
- <ul class="thumbs clearfix">
+ <?=$this->renderElement('addon_list_options', array('paging'=>$paging))?>
+
+ <ul class="thumbs">
<?php
foreach ($addons as $addon) {
$addonID = $addon['Addon']['id'];
@@ -106,43 +60,93 @@ $this->layout = 'amo2009';
$_alt = sprintf(_('img_preview_of'),$addonName);
$previmg = '<img src="'.$prevPath.'" alt="'.$_alt.'" title="'.$_alt.'"/>';
$previmg = $html->link($previmg, "/addon/{$addonID}");
+
+ // is addon recommended or experimental?
+ global $experimental_status;
+ if (in_array($addon['Addon']['status'], $experimental_status)) {
+ $flag = _('addon_listitem_flag_experimental');
+ $li_extraclass = 'exp';
+ } elseif ($addon['Addon']['recommended']) {
+ $flag = _('addon_listitem_flag_recommended');
+ $li_extraclass = 'rec';
+ } else {
+ $flag = '';
+ $li_extraclass = '';
+ }
+
?>
- <li class="thumb <?=$html->extraClass($addon)?>">
- <div class="thumb_item">
- <div class="img"><?=$previmg?></div>
- <h4 class="name"><?=$html->link("$addonName", "/addon/{$addonID}");?></h4>
- <?=$html->flag($addon)?>
- <p class="meta">
- <?php if ($sort_by == 'updated'): ?>
- <?php
- $_update_string = (_('addon_detail_last_updated') == 'addon_detail_last_updated') ? 'Updated %s' : _('addon_detail_last_updated');
- $_version_date = (isset($addon['Addon']['datestatuschanged']) ? $addon['Addon']['datestatuschanged'] : $addon['Version'][0]['created']);
- echo sprintf($_update_string, strftime(_('date'), strtotime($_version_date)));
- ?>
- <?php elseif ($sort_by == 'popular'): ?>
- <em><?=$html->number_format($addon['Addon']['weeklydownloads'], 0)?></em>
- <?php
- echo ___('addon_downloads_weekly', _('addon_downloads'));
- ?>
- <?php else: ?>
- <?=$this->renderElement('stars',array('rating' => $addon['Addon']['averagerating']))?>
- <?php if ($addon['Addon']['totalreviews'] > 0): ?>
- <a href="<?= $html->url('/addon/'.$addon['Addon']['id'].'#reviews') ?>"><?=
- sprintf(ngettext('feature_reviews','feature_reviews',
- $addon['Addon']['totalreviews']), $addon['Addon']['totalreviews'])
- ?></a>
+ <li class="thumb <?=$li_extraclass?>">
+ <div class="wrapper">
+ <div class="item">
+ <div class="img"><?=$previmg?></div>
+ <h3 class="name"><?=$html->link("$addonName", "/addon/{$addonID}");?></h3>
+ <? if (!empty($flag)) echo '<h5 class="flag">'.$flag.'</h5>'; ?>
+ <p class="meta">
+ <?php if ($sort_by == 'updated'): ?>
+ <?php
+ $_update_string = (_('addon_detail_last_updated') == 'addon_detail_last_updated') ? 'Updated %s' : _('addon_detail_last_updated');
+ $_version_date = (isset($addon['Addon']['datestatuschanged']) ? $addon['Addon']['datestatuschanged'] : $addon['Version'][0]['created']);
+ echo sprintf($_update_string, strftime(_('date'), strtotime($_version_date)));
+ ?>
+ <?php elseif ($sort_by == 'popular'): ?>
+ <em><?=$html->number_format($addon['Addon']['weeklydownloads'], 0)?></em>
+ <?php
+ echo ___('addon_downloads_weekly', _('addon_downloads'));
+ ?>
+ <?php else: ?>
+ <?=$this->renderElement('stars',array('rating' => $addon['Addon']['averagerating']))?>
+ <?php if ($addon['Addon']['totalreviews'] > 0): ?>
+ <a href="<?= $html->url('/addon/'.$addon['Addon']['id'].'#reviews') ?>"><?=
+ sprintf(ngettext('feature_reviews','feature_reviews',
+ $addon['Addon']['totalreviews']), $addon['Addon']['totalreviews'])
+ ?></a>
+ <?php endif ?>
<?php endif ?>
- <?php endif ?>
- </p>
+ </p>
+ </div>
</div>
+ <div class="vex"><span>&nbsp;</span></div>
</li>
<?php
}
?>
</ul>
+ <br style="clear:both" />
+
+ <?=$this->renderElement('pagination', array('countstring' =>
+ sprintf(ngettext('addon_list_category_totalcount',
+ 'addon_list_category_totalcount', $paging['total']), $paging['total'])));?>
+
+ </div> <!-- #thumb-browser -->
+
+
+ </div><!-- /#content-main -->
+
+ <div id="thumb-subcategories">
+ <ul class="subcategories">
+ <li<?= ($this_tag == FALSE) ? ' class="selected"' : '' ?>><?=$html->link(
+ 'All ('.$all_total.')',
+ "/browse/type:{$type}/cat:all?sort={$sort_by}"
+ )?></li>
+ <?php foreach ($subcats as $subcat): ?>
+ <?php
+ $params = 'sort=' . $sort_by;
+ if ($show_exp)
+ $params .= '&exp=on';
+ if ($show_limit)
+ $params .= '&show=' . $show_limit;
+ ?>
+ <li<?= ($this_tag['Tag']['id'] == $subcat['Tag']['id']) ? ' class="selected"' : '' ?>><?=$html->link(
+ $subcat['Translation']['name']['string'] . ' (' . (isset($subcat_totals[$subcat['Tag']['id']]) ? $subcat_totals[$subcat['Tag']['id']] : 0) . ')',
+ "/browse/type:{$subcat['Tag']['addontype_id']}/cat:{$subcat['Tag']['id']}?{$params}"
+ )?></li>
+ <?php endforeach; ?>
+ </ul>
</div>
- <?=$this->renderElement('amo2009/pagination');?>
+ <?=$this->renderElement('sidebar', array('highlight' => array($type, 0)))?>
+
+ <?=$this->renderElement('app_chooser')?>
-</div><!-- /primary -->
+</div><!-- /#content -->
diff --git a/site/app/views/addons/category_landing.thtml b/site/app/views/addons/category_landing.thtml
index db0764c..5cff14d 100644
--- a/site/app/views/addons/category_landing.thtml
+++ b/site/app/views/addons/category_landing.thtml
@@ -37,142 +37,187 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-
-$this->viewVars['bodyclass'] = 'inverse category_landing';
-$this->layout = 'amo2009';
-
-$curr_tag_name = $this_tag['Translation']['name']['string'];
-$curr_tag_desc = $this_tag['Translation']['description']['string'];
-
-$nameLimit = 40;
-$summaryLimit = 70;
?>
-<div class="stand-alone-options">
- <?=$this->renderElement('amo2009/categories')?>
- <?=$this->renderElement('amo2009/search')?>
-</div>
-<div class="primary" role="main">
+<div id="content" class="landing landing-with-slider">
- <h2><?php echo $curr_tag_name ?></h2>
+<?=$this->renderElement('search', array('category' =>
+ array($this_tag['Tag']['addontype_id'], $this_tag['Tag']['id'])))?>
- <div id="featured_addons" class="clearfix">
- <ul>
- <?php foreach ($featured_addons as $addon): ?>
-
- <li class="addon_block_wrapper">
- <div class="addon_block item">
- <h4 class="name"><a href="<?=$html->url("/addon/{$addon['Addon']['id']}")?>"><?php echo $html->truncateChars(28, $addon['Translation']['name']['string'], true) ?></a></h4>
- <p class="authors"><?=_('addons_home_by')?> <?=$html->linkUsersFromModel($addon['User'], 2,"/addon/{$addon['Addon']['id']}#authors" );?></p>
- <p class="summary"><?php echo $html->truncateChars($summaryLimit, $addon['Translation']['summary']['string'], true) ?></p>
- <div class="preview"><a href="<?=$html->url("/addon/{$addon['Addon']['id']}")?>"><img src="<?php echo $this->controller->Image->getHighlightedPreviewURL($addon['Addon']['id']);?>" alt="" /></a></div>
- <p class="rating"><?=$this->renderElement('amo2009/stars',array('rating' => $addon['Addon']['averagerating']))?></p>
- <?php
- $addonIconPath = $this->controller->Image->getAddonIconURL($addon['Addon']['id']);
- $addonID = $addon['Addon']['id'];
- $addonName = $addon['Translation']['name']['string'];
- $hasVersion = (isset($addon['Version']) && !empty($addon['Version']));
- $addonVersion = ($hasVersion ? $addon['Version'][0]['version'] : '');
- $hasFiles = ($hasVersion && !empty($addon['File']));
- if ($hasFiles) {
- $addonFiles = $addon['File'];
- $addonEULA = $addon['Translation']['eula']['string'];
-
-
- $addonCreators = $addon['User'];
- $addonSummary = $addon['Translation']['summary']['string'];
+<div id="content-main">
+
+ <div id="content-extra">
+ <div class="more-addons">
+ <h3><?=$html->link(sprintf(_('category_extra_see_all'), $this_tag['Translation']['name']['string']),
+ "/browse/type:{$type_id}/cat:{$cat_id}?sort=name",
+ array('class'=>'view'))?></h3>
+
+ <ul>
+ <?php
+ $sortorders = array(
+ 'popular' => _('category_extra_mostpopular'),
+ 'rated' => _('category_extra_highestrated'),
+ 'updated' => _('category_extra_lastupdated'),
+ );
+ foreach ($sortorders as $sortkey => $title):
+ ?>
+ <li><?=$html->link($title,
+ "/browse/type:{$type_id}/cat:{$cat_id}?sort={$sortkey}",
+ array('class'=>'view'))?></li>
+ <?php endforeach; ?>
+ <li><?=$html->link(_('category_extra_allrecommended'),
+ "/recommended/cat:{$cat_id}", array('class'=>'view'))?></li>
+ </ul>
+ </div>
+
+ <?=$this->renderElement('pitch'); ?>
+ </div><!-- /#content-extra -->
- // prepare preview image
- if (isset($addonPreviewPath) && !empty($addonPreviewPath)) {
- $_alt = sprintf(_('img_preview_of'),$addonName);
- $previmg = '<img src="'.$addonPreviewPath.'" '
- .'alt="'.$_alt.'" title="'.$_alt.'"/>';
- $previmg = '<p class="preview-img">'
- .$html->link($previmg, "/addon/{$addonID}").'</p>';
- } else
- $previmg = '';
- // prepare icon
- if (isset($addonIconPath) && !empty($addonIconPath))
- $icon = '<img src="'.$addonIconPath.'" class="icon" alt=""/>';
- else
- $icon = '';
+ <?php if (!empty($featureAddons)): ?>
+ <!-- <div> -->
+ <div id="recommended">
+ <h3><?=_('addons_home_feature_head')?></h3>
- // prepare categories
- if (!empty($addon['Tag'])) {
- $categories = $this->renderElement('addon_categories', array('tags' => $addon['Tag']));
- } else
- $categories = '';
+ <div id="slider" class="slider_widget">
+ <div class="inner">
+ <div class="viewport">
+ <ul class="item_set">
+ <?php
+ $idx = 0;
+ $total_features = count( $featureAddons );
+ foreach ( $featureAddons as $feature1 ) {
+ $idx++;
- // prepare summary
- if (!isset($addonSummary) || empty($addonSummary))
- $addonSummary = '&nbsp;';
+ $prev_idx = $idx - 1;
+ if ($prev_idx < 1)
+ $prev_idx = $total_features;
+ $next_idx = $idx + 1;
+ if ($next_idx > $total_features)
+ $next_idx = 1;
- $_install_render_options = array(
- 'addonIconPath' => $addonIconPath,
- 'addonName' => $addonName,
- 'addonId' => $addonID,
- 'addonFiles' => $addonFiles,
- 'addonEULA' => $addonEULA,
- 'addonStatus' => $addon['Addon']['status'],
- 'is_latest' => ($addon['Addon']['status'] == STATUS_PUBLIC),
- 'addonType' => $addon['Addon']['addontype_id'],
- 'compatible_apps' => $addon['compatible_apps'],
- 'allPlatforms' => $platforms,
- 'buttonType' => 'small',
- 'showInstructions' => false
- );
- echo $this->renderElement('amo2009/install', $_install_render_options);
-
- }
- ?>
+ ?>
+ <li id="feature1_<?=$idx?>" class="item addon featured main">
+ <?=$this->renderElement('feature', array(
+ 'addonIconPath' => $this->controller->Image->getAddonIconURL($feature1['Addon']['id']),
+ 'addonThumbPath' => $this->controller->Image->getHighlightedPreviewURL($feature1['Addon']['id']),
+ 'addonName' => $feature1['Translation']['name']['string'],
+ 'addonSummary' => $feature1['Translation']['summary']['string'],
+ 'addonId' => $feature1['Addon']['id'],
+ 'addonFiles' => $feature1['File'],
+ 'addonEULA' => $feature1['Translation']['eula']['string'],
+ 'addonStatus' => $feature1['Addon']['status'],
+ 'addonAuthors' => $feature1['User'],
+ 'addonTags' => $feature1['Tag'],
+ 'addonWeeklyDownloads' => $feature1['Addon']['weeklydownloads'],
+ 'allPlatforms' => $platforms,
+ 'compatible_apps' => $feature1['compatible_apps'],
+ 'addonType' => $feature1['Addon']['addontype_id'],
+ 'addonRating' => $feature1['Addon']['averagerating'],
+ 'addonReviews' => $feature1['Addon']['totalreviews'],
+ 'addonVersionCreated' => $feature1['Version'][0]['created']
+ ))?>
+ </li>
+ <?php
+ } ?>
+ </ul>
+ </div>
+ <div class="controls">
+ <div class="controls_inner">
+ <a href="#slider" title="Previous" class="prev">
+ <img src="<?=$html->urlImage("slider-prev-disabled.gif")?>"
+ width="30" height="30" alt="<?=___('addon_slider_tooltip_previous', 'Previous Add-on')?>"
+ title="<?=___('addon_slider_tooltip_previous', 'Previous Add-on')?>" />
+ </a>
+ <span class="indicator">
+ <span class="index">1</span>
+ /
+ <span class="total"><?=$total_features?></span>
+ </span>
+ <a href="#slider" title="Next" class="next">
+ <img src="<?=$html->urlImage("slider-next.gif")?>"
+ width="30" height="30" alt="<?=___('addon_slider_tooltip_next', 'Next Add-on')?>"
+ title="<?=___('addon_slider_tooltip_next', 'Next Add-on')?>" />
+ </a>
</div>
- </li>
- <?php endforeach ?>
- </ul>
- </div>
-
- <div id="new_addons" class="addons_column clearfix">
- <h3><span><?= ___('addons_recently_added') ?></span></h3>
- <ul>
- <?php foreach ($new_addons as $idx=>$addon): ?>
- <li class="<?= (0 == ($idx % 2)) ? 'odd' : 'even' ?>"><a href="<?=$html->url("/addon/{$addon['id']}")?>">
- <img class="icon" src="<?php echo $addon['icon_url']?>" width="32" height="32" alt="" />
- <span class="name"><?php echo $html->truncateChars($nameLimit, $addon['name'], true) ?></span>
- <span class="meta created">
- added <?php echo strftime('%m/%d/%Y', strtotime($addon['created'])) ?>
- </span>
- </a></li>
- <?php endforeach ?>
- </ul>
- <p class="view-all"><?=$html->link(___('view_recently_added').' »',"/browse/type:{$type_id}/cat:{$cat_id}?sort=newest")?></p>
- </div>
+ </div>
+ </div>
+ <div class="vex"><span><!-- bottom edge --></span></div>
+ </div>
+ </div><!-- /#recommended -->
+ <?php endif; /* !empty(recommended) */ ?>
- <div id="popular_addons" class="addons_column clearfix">
- <h3><span><?=___('addons_top_downloads') ?></span></h3>
- <ul>
- <?php foreach ($popular_addons as $idx=>$addon): ?>
- <li class="<?= (0 == ($idx % 2)) ? 'odd' : 'even' ?>"><a href="<?=$html->url("/addon/{$addon['id']}")?>">
- <img class="icon" src="<?php echo $addon['icon_url']?>" width="32" height="32" alt="" />
- <span class="name"><?php echo $html->truncateChars($nameLimit, $addon['name'], true) ?></span>
- <span class="meta downloads"><?php echo $html->number_format($addon['weeklydownloads']) ?> <?= _('addon_downloads_weekly') ?></span>
- </a></li>
- <?php endforeach ?>
- </ul>
- <p class="view-all"><?=$html->link(___('view_top_downloads').' »',"/browse/type:{$type_id}/cat:{$cat_id}?sort=popular")?></p>
- </div>
+ <?php if (FALSE && !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) */ ?>
+
+ <?php if (!empty($randomAddons)): ?>
+ <div id="secondaries">
+ <?php
+ global $experimental_status;
+ $is_first = TRUE;
+ foreach($randomAddons as $id => $addon):
+ $idx = count($featureAddons) + $id + 1;
+ if (in_array($addon['Addon']['status'], $experimental_status))
+ $extraclass = ' exp';
+ else
+ $extraclass = '';
+ if ($is_first) {
+ $is_first = FALSE; $extraclass = ' first';
+ }
+ ?>
+ <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 id="updated_addons" class="addons_column last clearfix">
- <h3><span><?=___('addons_top_rated') ?></span></h3>
- <ul>
- <?php foreach ($updated_addons as $idx=>$addon): ?>
- <li class="<?= (0 == ($idx % 2)) ? 'odd' : 'even' ?>"><a href="<?=$html->url("/addon/{$addon['id']}")?>">
- <img class="icon" src="<?php echo $addon['icon_url']?>" width="32" height="32" alt="" />
- <span class="name"><?php echo $html->truncateChars($nameLimit, $addon['name'], true) ?></span>
- <span class="meta rating"><?=$this->renderElement('amo2009/stars',array('rating' => $addon['averagerating']))?></span>
- </a></li>
- <?php endforeach ?>
- </ul>
- <p class="view-all"><?=$html->link(___('view_top_rated').' »',"/browse/type:{$type_id}/cat:{$cat_id}?sort=rated")?></p>
- </div>
+</div><!-- /#content-main -->
-</div>
+<?=$this->renderElement('sidebar', array('highlight' =>
+ array($this_tag['Tag']['addontype_id'], $this_tag['Tag']['id'])))?>
+<?=$this->renderElement('app_chooser')?>
+</div><!-- /#content -->
diff --git a/site/app/views/addons/dictionaries.thtml b/site/app/views/addons/dictionaries.thtml
index da197e8..0a0bcd7 100644
--- a/site/app/views/addons/dictionaries.thtml
+++ b/site/app/views/addons/dictionaries.thtml
@@ -47,18 +47,14 @@ if (in_array(APP_ID, $browser_apps)) {
$install_text[ADDON_DICT] = _('langtools_download_dictionary');
$install_text[ADDON_LPAPP] = _('langtools_download_langpack');
}
-
-$this->viewVars['bodyclass'] = 'inverse';
-$this->layout = 'amo2009';
?>
-<div class="section">
- <div class="stand-alone-options">
- <?=$this->renderElement('amo2009/categories')?>
- <?=$this->renderElement('amo2009/search'); ?>
- </div>
+<div id="content" class="landing languages">
+
+<?=$this->renderElement('search', array('category'=>array(ADDON_DICT, 0)))?>
+
+<div id="content-main">
<?php /* list of dictionaries and language packs */ ?>
- <div class="featured"><div class="featured-inner">
<div id="dictionaries">
<h3><?=_('langtools_header_dicts_and_langpacks')?></h3>
@@ -105,7 +101,9 @@ $this->layout = 'amo2009';
</tbody>
</table>
</div><!-- /#dictionaries -->
- </div></div><!-- /featured -->
+</div><!-- /#content-main -->
-</div><!-- /.section -->
+<?=$this->renderElement('sidebar', array('highlight' => array(ADDON_DICT, 0)))?>
+<?=$this->renderElement('app_chooser')?>
+</div><!-- /#content -->
diff --git a/site/app/views/addons/display.thtml b/site/app/views/addons/display.thtml
index 32a81ff..c0825d1 100644
--- a/site/app/views/addons/display.thtml
+++ b/site/app/views/addons/display.thtml
@@ -41,35 +41,32 @@
?>
<?php
+
if (empty($addonIconPath))
$addonIconPath = ($addon['Addon']['addontype_id'] == ADDON_THEME ? $html->urlImage(DEFAULT_THEME_ICON) : $html->urlImage(DEFAULT_ADDON_ICON));
-?>
-<div class="stand-alone-options">
+// is addon experimental?
+global $experimental_status;
+if (in_array($addon['Addon']['status'], $experimental_status)) {
+ $flag = _('addon_listitem_flag_experimental');
+ $box_extraclass = 'exp';
+} else {
+ $flag = '';
+ $box_extraclass = '';
+}
- <?=$this->renderElement('amo2009/categories')?>
+?>
- <?=$this->renderElement('amo2009/search')?>
+ <div id="content" class="detail-page">
- </div>
+<?=$this->renderElement('search')?>
-<div class="primary" role="main">
- <?php
- if (!empty($coll_addon_added)) {
- echo $this->renderElement('notification', array(
- 'type' => 'success',
- 'msg' => sprintf(___('addons_display_collection_publish_success'),
- $addon['Translation']['name']['string'],
- $html->link($coll_addon_added['Translation']['name']['string'],
- "/collection/{$coll_addon_added['Collection']['uuid']}")
- )
- ));
- }
- ?>
- <h2 <?=$addon['Translation']['name']['locale_html']?> class="addon"><img src="<?=$addonIconPath?>" class="icon" alt="" /><span><?=$addon['Translation']['name']['string']?> <?=($hasversion?$addon['Version'][0]['Version']['version']:'')?></span></h2>
+ <div id="content-main">
+
+ <div id="addon-summary" class="addon <?=$box_extraclass?>">
+ <h3 class="name"<?=$addon['Translation']['name']['locale_html']?>><img src="<?=$addonIconPath?>" class="addon-icon" alt="" /><?=$addon['Translation']['name']['string']?> <?=($hasversion?$addon['Version'][0]['Version']['version']:'')?></h3>
<h4 class="author"><?=_('addons_home_by')?> <?= $html->linkUsersFromModel($addon['User'], 0); ?></h4>
- <div id="addon-summary" class="addon <?=$html->extraClass($addon)?>">
-
+ <? if (!empty($flag)) echo '<h5 class="flag">'.$flag.'</h5>'; ?>
<?php if (count($previews) > 0) {
$shown = 0;
@@ -83,7 +80,7 @@
?>
<p class="preview-img">
- <a class="screenshot" rel="jquery-lightbox" href="<?=$full?>" title="<?=$caption?>">
+ <a rel="jquery-lightbox" href="<?=$full?>" title="<?=$caption?>">
<img src="<?=$thumb?>" alt=""/>
</a>
</p>
@@ -92,429 +89,397 @@
<img src="<?=$html->urlImage('no-preview.png')?>" alt="" width="200" height="150" />
</p>
<?php } ?>
-<p class="desc"<?=$addon['Translation']['summary']['locale_html']?>><?=nl2br($addon['Translation']['summary']['string'])?> </p>
-
<h4 class="hidden"><?=_('addons_display_categories')?></h4>
<?=$this->renderElement('addon_categories', array('tags' => $relatedTags)); ?>
+ <p class="desc"<?=$addon['Translation']['summary']['locale_html']?>><?=nl2br($addon['Translation']['summary']['string'])?> </p>
+
+ <p class="rating"><?=$this->renderElement('stars',array('rating' => $addon['Addon']['averagerating']))?> <?php if ($review_count > 0) { ?> <a href="<?=$html->url('/addon/'.$addon['Addon']['id'].'#reviews')?>"><?=sprintf(ngettext('feature_reviews','feature_reviews', $review_count), $review_count)?></a><?php } ?></p>
+
+ <div class="link-sharing rollover-reveal">
+ <div class="badge">
+ <p class="share-button">
+ <a class="activator" href="#"><span><span><span>
+ <strong><?php echo ___('addons_share_button_text', 'Share this') ?></strong>
+ </span></span></span></a>
+ </p>
+ </div>
+ <div class="choices to-reveal"><div>
+ <ul>
+ <?php foreach ($link_sharing_services as $l_name => $l_details) :?>
+ <li class="<?= $l_name ?>"><p>
+ <a class="uniquify" href="<?=$html->url('/addon/share/'.$addon['Addon']['id']) . '?service=' . $l_name ?>"><?php
+ // Escaping here because these details came via set()
+ echo htmlentities($l_details['label'])
+ ?></a>
+ </p></li>
+ <?php endforeach ?>
+ </ul>
+ <br style="clear: both" />
+ </div></div>
+ </div>
+
<? if ($hasversion): ?>
<p class="updated">
<?php
- echo sprintf(___('addon_detail_last_updated'), strftime(_('date'), strtotime($addon['Version'][0]['Version']['created'])));
+ // @partial 5/08/08, bug 425527
+ $_update_string = (_('addon_detail_last_updated') == 'addon_detail_last_updated') ? 'Updated %s' : _('addon_detail_last_updated');
+ echo sprintf($_update_string, strftime(_('date'), strtotime($addon['Version'][0]['Version']['created'])));
?>
</p>
<? endif; ?>
-
- <?php
- if ($hasversion) {
-
- $flags = array($html->byStatus($addon, array('experimental' => 'experimental',
- 'recommended' => 'recommended',
- 'default' => 'default')));
-
- global $experimental_status;
- if (isset($addonStatus) && in_array($addonStatus, $experimental_status)) {
- $flags[] = 'experimental';
- }
-
- $addon['File'] = $addon['Version'][0]['File']; //install.thtml expects this
-
- echo $this->renderElement('amo2009/install', array(
- 'flags' => $flags,
- 'buttonClass' => 'significant',
- 'buttonSize' => '16x16',
- 'addon' => $addon
- ));
-
- if (!empty($addon['Translation']['privacypolicy']['string'])) {
- echo '<div class="privacypolicy">';
- echo $html->link(_('addons_display_has_privacy'), "/addons/policy/0/{$addon['Addon']['id']}");
- echo '</div>';
- }
- }
- ?>
-
-
- <p class="rating">
- <?=$this->renderElement('amo2009/reviews', array('addon' => $addon))?>
- </p>
-
-
<p class="stats">
+ <em><?=$html->number_format($addon['Addon']['weeklydownloads'], 0)?></em>
<?php
- echo '<em>'.$html->number_format($addon['Addon']['weeklydownloads'], 0).'</em> '.___('addon_downloads_weekly');
+ /* @partial 4/25/08
+ Only show total downloads if string has been translated to avoid
+ showing two "downloads" with different numbers */
+ if (_('addon_downloads_weekly') == 'addon_downloads_weekly') {
+ echo _('addon_downloads');
+ }
+ else {
+ echo _('addon_downloads_weekly');
echo '<br /><em>'.$html->number_format($addon['Addon']['totaldownloads'], 0).'</em> '._('addon_downloads_total');
+ }
?>
</p>
+ <?php
+ if ($hasversion) {
+
+ $_install_render_options = array(
+ 'addonIconPath' => $addonIconPath,
+ 'addonName' => $addon['Translation']['name']['string'],
+ 'addonId' => $addon['Addon']['id'],
+ 'addonFiles' => ($hasversion?$addon['Version'][0]['File']:''),
+ 'is_latest' => true,
+ 'addonEULA' => $addon['Translation']['eula']['string'],
+ 'addonStatus' => $addon['Addon']['status'],
+ 'addonType' => $addon['Addon']['addontype_id'],
+ 'allPlatforms' => $platforms,
+ 'compatible_apps'=> $compatible_apps
+ );
+ echo $this->renderElement('install', $_install_render_options);
- <div class="share-this">
- <a class="share button" href="#">
- <?php echo ___('addons_share_button_text', 'Share this') ?>
- </a>
-
- <div class="share-networks">
- <ul>
- <?php foreach ($link_sharing_services as $l_name => $l_details) :?>
- <li class="<?= $l_name ?>"><p>
- <?php $share_url = str_replace('/addon/', '/addon/share/', $_SERVER['REQUEST_URI']) ?>
- <a class="uniquify" target="_blank" href="<?php echo $share_url . '?service=' . $l_name ?>"><?php
- // Escaping here because these details came via set()
- echo htmlentities($l_details['label'], ENT_COMPAT, 'UTF-8')
- ?></a>
- </p></li>
- <?php endforeach ?>
- </ul>
- </div>
+ if (!empty($addon['Translation']['privacypolicy']['string'])) {
+ echo '<div class="privacypolicy">';
+ echo $html->link(_('addons_display_has_privacy'), "/addons/policy/0/{$addon['Addon']['id']}");
+ echo '</div>';
+ }
+ }
+ ?>
+ <div class="vex"><span><!-- bottom edge --></span></div>
</div>
- </div>
- <div id="addon-info" class="featured listing">
- <div class="featured-inner">
-
- <? if (count($previews) > 1): // Only show this if there are 2 or more images. ?>
- <div class="item">
- <h5><?=_('addons_display_more_images')?></h5>
+ <!-- /#addon-summary -->
- <?php
- $shown = 0;
- $_js_string = '';
-
- foreach ($previews as $preview):
-
- // Skip the first one, which is the preview.
- if ($shown < 1) {
- $shown++;
- continue;
- }
-
- $thumb = $this->controller->Image->getPreviewURL($preview['Preview']['id']);
- $full = $this->controller->Image->getPreviewURL($preview['Preview']['id'], 'full');
- $caption = $preview['Translation']['caption']['string'];
- // Lightbox supports HTML in their captions, but we strip it
- // out in the dev cp.
- $_js_string .= empty($_js_string) ? "['{$full}','{$caption}']" : ", ['{$full}','{$caption}']";
- $shown++;
- ?>
+ <div id="addon-info">
- <a class="screenshot thumbnail" rel="jquery-lightbox" href="<?=$full?>" title="<?=$caption?>"><img src="<?=$thumb?>" alt="" /></a>
-
- <? endforeach; ?>
- </div>
- <? endif; ?>
-
-
-
- <div class="item">
- <h5><?=_('addons_display_long_description')?></h5>
- <p<?=$addon['Translation']['description']['locale_html']?>><?=nl2br($addon['Translation']['description']['string'])?></p>
- </div>
- <div class="item">
- <?=$this->renderElement('app_compatibility', array('compatible_apps' => $compatible_apps)) ?>
-
- <div id="addon_app_compatibility" ><?php
- // link to complete version history
- if ($hasversion) {
- echo $html->link(___('addons_display_see_all_versions'),
- "/addons/versions/{$addon['Addon']['id']}", array('class'=>'view'));
- }
- ?></div>
- </div>
-
-
- <?php
- /* Homepage URL link */
- if (!empty($addon['Translation']['homepage']['string'])): ?>
- <div class="item">
- <?php echo '<h5 id="homepage">'.___('addons_display_header_homepage').'</h5>'; ?>
- <p><?=$html->link($addon['Translation']['homepage']['string'])?></p>
- </div>
-
-
- <?php endif; // h4:Homepage ?>
-
- <?php /* License */
- if ($hasversion && isset($addon['Version'][0]['Version']['license_id'])):
- $license_id = $addon['Version'][0]['Version']['license_id'];
- $version_id = $addon['Version'][0]['Version']['id'];
- $license_name = $this->controller->License->getName($license_id);
- $license_link = $html->link($license_name,
- '/versions/license/'.$version_id);
- ?>
- <div class="item">
- <h5 id="license">
- <?=___('addons_display_header_license')?>
- <a href="<?=$html->url('/pages/developer_faq')?>">
- <?=___('addons_display_a_license_what')?>
- </a>
- </h5>
- <p><?=$license_link?></p>
- </div>
- <?php endif; ?>
+ <? if (count($previews) > 1): // Only show this if there are 2 or more images. ?>
+ <h4><?=_('addons_display_more_images')?></h4>
+ <ul class="addon-images">
+ <?php
+ $shown = 0;
+ $_js_string = '';
- <?php
- $has_supportemail = !empty($addon['Translation']['supportemail']['string']);
- $has_supporturl = !empty($addon['Translation']['supporturl']['string']);
- if ($has_supportemail || $has_supporturl): ?>
- <div class="item">
- <?php echo '<h5 id="support">'.___('addons_display_header_support').'</h5>'; ?>
-
- <?php
- /* Support email/URL link */
- if ($has_supportemail && $has_supporturl) {
- // both support email and support URL present
- ?>
- <p>
- <?=sprintf(_('addons_display_paragraph_supportinfoemailurl'),
- $html->link($addon['Translation']['supporturl']['string']),
- $link->email($addon['Translation']['supportemail']['string']));?>
- </p>
- <?php
- } else if ($has_supporturl) {
- // support URL only
- ?>
- <p>
- <?=sprintf(_('addons_display_paragraph_supportinfourl'),
- $html->link($addon['Translation']['supporturl']['string']));?>
- </p>
- <?php
- } else if ($has_supportemail) {
- // support email only
- ?>
- <p>
- <?=sprintf(_('addons_display_paragraph_supportinfoemail'),
- $link->email($addon['Translation']['supportemail']['string']));?>
- </p>
- <?php } ?>
- </div>
- <?php endif; // h4:Support ?>
-
- <div id="addon-advanced" class="item">
- <h5><?=_('addons_display_advanced_details')?></h5>
+ foreach ($previews as $preview):
- <?php if (!empty($addon['Translation']['developercomments']['string'])) { ?>
- <h5><?=_('addons_display_header_developer_comments')?></h5>
- <p<?=$addon['Translation']['developercomments']['locale_html']?>>
- <?=nl2br($addon['Translation']['developercomments']['string'])?>
- </p>
- <?php } ?>
+ // Skip the first one, which is the preview.
+ if ($shown < 1) {
+ $shown++;
+ continue;
+ }
- <?php if ($hasversion):
- $_version_data = array(
- 'addonid' => $addon['Addon']['id'],
- 'version' => $addon['Version'][0]['Version']['version'],
- 'created' => $addon['Version'][0]['Version']['created'],
- 'fileSize' => $addon['Version'][0]['File'][0]['size']
- );
+ $thumb = $this->controller->Image->getPreviewURL($preview['Preview']['id']);
+ $full = $this->controller->Image->getPreviewURL($preview['Preview']['id'], 'full');
+ $caption = $preview['Translation']['caption']['string'];
+ // Lightbox supports HTML in their captions, but we strip it
+ // out in the dev cp.
+ $_js_string .= empty($_js_string) ? "['{$full}','{$caption}']" : ", ['{$full}','{$caption}']";
+ $shown++;
+ ?>
+
+ <li><a rel="jquery-lightbox" href="<?=$full?>" title="<?=$caption?>"><img src="<?=$thumb?>" alt="" /></a></li>
+
+ <? endforeach; ?>
+ </ul>
+ <? endif; ?>
+
+
+ <h4><?=_('addons_display_long_description')?></h4>
+ <p<?=$addon['Translation']['description']['locale_html']?>><?=nl2br($addon['Translation']['description']['string'])?></p>
+
+ <?=$this->renderElement('app_compatibility', array('compatible_apps' => $compatible_apps)) ?>
+
+ <div id="addon_app_compatibility" ><?php
+ // link to complete version history
+ if ($hasversion) {
+ // @partial, 4/9/08
+ $_versionhistory_linktext = (_('addons_display_see_all_versions') ==
+ 'addons_display_see_all_versions' ? _('addons_display_version_history') :
+ _('addons_display_see_all_versions'));
+ echo '<h4 class="version-link">'.$html->link($_versionhistory_linktext,
+ "/addons/versions/{$addon['Addon']['id']}", array('class'=>'view'))."</h4>";
+ }
+ ?></div>
+
+ <?php
+ /* Homepage URL link */
+ if (!empty($addon['Translation']['homepage']['string'])): ?>
+
+ <?php //@partial, 5/12/08, bug 425537
+ if (_('addons_display_header_homepage') == 'addons_display_header_homepage') {
+ echo '<h4 id="homepage">Homepage</h4>';
+ } else {
+ echo '<h4 id="homepage">'._('addons_display_header_homepage').'</h4>';
+ }
+ ?>
+ <p><?=$html->link($addon['Translation']['homepage']['string'])?></p>
+
+ <?php endif; // h4:Homepage ?>
+
+
+ <?php
+ $has_supportemail = !empty($addon['Translation']['supportemail']['string']);
+ $has_supporturl = !empty($addon['Translation']['supporturl']['string']);
+ if ($has_supportemail || $has_supporturl): ?>
+
+ <?php //@partial, 4/25/08, bug 425510
+ if (_('addons_display_header_support') == 'addons_display_header_support') {
+ echo '<h4 id="support">Support</h4>';
+ } else {
+ echo '<h4 id="support">'._('addons_display_header_support').'</h4>';
+ }
?>
- <h5 id="version-detail">
- <?=$this->renderElement('addon_version_detail', $_version_data)?>
- </h5>
- <p id="release-notes" <?=$addon['Version'][0]['Translation']['releasenotes']['locale_html']?>>
- <?=nl2br($addon['Version'][0]['Translation']['releasenotes']['string'])?>
+
+ <?php
+ /* Support email/URL link */
+ if ($has_supportemail && $has_supporturl) {
+ // both support email and support URL present
+ ?>
+ <p>
+ <?=sprintf(_('addons_display_paragraph_supportinfoemailurl'),
+ $html->link($addon['Translation']['supporturl']['string']),
+ $link->email($addon['Translation']['supportemail']['string']));?>
</p>
+ <?php
+ } else if ($has_supporturl) {
+ // support URL only
+ ?>
<p>
+ <?=sprintf(_('addons_display_paragraph_supportinfourl'),
+ $html->link($addon['Translation']['supporturl']['string']));?>
+ </p>
<?php
- $additionalLinks = array();
- if ($addon['Addon']['viewsource'] == 1 && $this->controller->Session->check('User')) {
- $additionalLinks[] = $html->link(_('addons_display_view_source'), "/files/browse/{$addon['Version'][0]['File'][0]['id']}");
- }
- if ($addon['Addon']['publicstats'] == 1) {
- $additionalLinks[] = $html->link(_('addons_display_view_stats'), "/statistics/addon/{$addon['Addon']['id']}");
- }
-
- if (!empty($additionalLinks)) {
- echo implode($additionalLinks, ' | ');
- }
+ } else if ($has_supportemail) {
+ // support email only
?>
+ <p>
+ <?=sprintf(_('addons_display_paragraph_supportinfoemail'),
+ $link->email($addon['Translation']['supportemail']['string']));?>
</p>
- <? endif; ?>
-</div>
- </div></div>
-
- <?php if (!empty($reviews)): ?>
- <h3 id="reviews"><?=_('addons_display_header_reviews')?></h3>
- <div class="article">
-
+ <?php } ?>
+
+ <?php endif; // h4:Support ?>
+
+ <?php if (!empty($reviews)): ?>
+
+ <h4 id="reviews"><?=_('addons_display_header_reviews')?></h4>
+
+ <ul class="addon-reviews">
+
+ <?php
+ foreach ($reviews as $rev_no => $review):
+ $review['Translation'] = (array_key_exists(LANG, $review['Translation']) ?
+ $review['Translation'][LANG] : current($review['Translation']));
+ ?>
+ <li id="review-<?=$rev_no?>">
+ <blockquote>
+ <?php if (!empty($review['Translation']['title']['string'])): ?>
+ <h5><?=$review['Translation']['title']['string']?></h5>
+ <?php endif; ?>
+ <p><?=$review['Translation']['body']['string']?></p>
+ </blockquote>
+ <p class="cite">
+ <?=$this->renderElement('stars',array('rating' => $review['Review']['rating']))?>
+ <cite>
<?php
- foreach ($reviews as $rev_no => $review):
- $review['Translation'] = (array_key_exists(LANG, $review['Translation']) ?
- $review['Translation'][LANG] : current($review['Translation']));
+ // @partial: translation fallback for bug 427376, 04/24/08
+ if (_('addon_reviewed_by_u_on_d') == 'addon_reviewed_by_u_on_d') {
+ echo $html->linkUserFromModel($review['User']).", ".strftime(_('date'), strtotime($review['Review']['created']));
+ } else {
+ echo sprintf(_('addon_reviewed_by_u_on_d'),
+ $html->linkUserFromModel($review['User']),
+ strftime(_('date'), strtotime($review['Review']['created'])));
+ }
?>
+ </cite>
+ </p>
+ </li>
+ <?php
+ endforeach;
+ ?>
- <div id="review-<?=$rev_no?>" class="hreview">
- <?php if (!empty($review['Translation']['title']['string'])): ?>
- <h5><?=$review['Translation']['title']['string']?></h5>
- <?php endif; ?>
- <p class="description"><?=$review['Translation']['body']['string']?></p>
+ </ul>
+
+ <? echo '<p>'.$html->link(sprintf(_('addons_display_see_all_reviews'), $review_count), '/reviews/display/'.$addon['Addon']['id'], array('class'=>'view')).'</p>'; ?>
+
+ <?php endif; ?>
+
+
+
+ </div>
+ <!-- /#addon-info -->
+
+ <div id="addon-advanced">
+ <h4><?=_('addons_display_advanced_details')?></h4>
+
+ <?php if (!empty($addon['Translation']['developercomments']['string'])) { ?>
+ <h5><?=_('addons_display_header_developer_comments')?></h5>
+ <p<?=$addon['Translation']['developercomments']['locale_html']?>>
+ <?=nl2br($addon['Translation']['developercomments']['string'])?>
+ </p>
+ <?php } ?>
+
+ <?php if ($hasversion):
+ $_version_data = array(
+ 'addonid' => $addon['Addon']['id'],
+ 'version' => $addon['Version'][0]['Version']['version'],
+ 'created' => $addon['Version'][0]['Version']['created'],
+ 'fileSize' => $addon['Version'][0]['File'][0]['size']
+ );
+ ?>
+ <h5><?=$this->renderElement('addon_version_detail', $_version_data)?></h5>
+ <p <?=$addon['Version'][0]['Translation']['releasenotes']['locale_html']?>><?=nl2br($addon['Version'][0]['Translation']['releasenotes']['string'])?></p>
+ <p>
+ <?php
+ $additionalLinks = array();
+ if ($addon['Addon']['viewsource'] == 1 && $this->controller->Session->check('User')) {
+ $additionalLinks[] = $html->link(_('addons_display_view_source'), "/files/browse/{$addon['Version'][0]['File'][0]['id']}");
+ }
+ if ($addon['Addon']['publicstats'] == 1) {
+ $additionalLinks[] = $html->link(_('addons_display_view_stats'), "/statistics/addon/{$addon['Addon']['id']}");
+ }
+
+ if (!empty($additionalLinks)) {
+ echo implode($additionalLinks, ' | ');
+ }
+ ?>
+ </p>
+ <? endif; ?>
+
+
+
+ </div>
+ <!-- /#addon-advanced -->
+
+ <div id="content-extra">
+
+ <?php if(empty($isAuthor)) { ?>
+ <form id="form-review" action="<?=$html->url('/reviews/add/'.$addon['Addon']['id'])?>" method="post">
+ <?=$html->hiddenSession() ?>
+ <h3><?=_('addons_display_what_do_you_think')?></h3>
+ <?php if(!$loggedIn) { ?>
+ <p class="login">(<?php echo $html->link(_('header_navlink_login'), $html->login_url());?>)</p>
+ <?php } ?>
+ <p><input type="hidden" name="data[Review][id]" value="" id="ReviewId"/></p>
+ <p><input type="hidden" name="data[Review][title]" value=" " id="ReviewTitle"/></p>
+ <fieldset id="rate-it">
+ <h4><?=_('addons_display_rate_it')?></h4>
+ <div class="stars degrade">
+ <p><input class="star" type="radio" name="data[Review][rating]" value="1" title="<?=_('addons_display_hate_it')?>" /> <?=_('addons_display_hate_it')?></p>
+ <p><input class="star" type="radio" name="data[Review][rating]" value="2" title="<?=_('addons_display_dont_like_it')?>"/> <?=_('addons_display_dont_like_it')?></p>
+ <p><input class="star" type="radio" name="data[Review][rating]" value="3" title="<?=_('addons_display_like_it')?>"/> <?=_('addons_display_like_it')?></p>
+ <p><input class="star" type="radio" name="data[Review][rating]" value="4" title="<?=_('addons_display_really_like_it')?>"/> <?=_('addons_display_really_like_it')?></p>
+ <p><input class="star" type="radio" name="data[Review][rating]" value="5" title="<?=_('addons_display_love_it')?>"/> <?=_('addons_display_love_it')?></p>
+ </div>
+ <?=$html->tagErrorMsg('Review/rating', _('error_review_rating_required')) ?>
+ </fieldset>
+ <p><textarea name="data[Review][body]" cols="30" rows="6" id="short-review" <?php if(!$loggedIn) { ?>disabled="disabled" class="disabled" <?php } ?>></textarea></p>
+ <p id="review-submit">
+ <?php
+ //@partial
+ $_submit_value = (_('addons_display_review_submit') == 'addons_display_review_submit') ? _('forum_save') : _('addons_display_review_submit');
+ ?>
+ <input type='submit' value='<?=$_submit_value?>' class="amo-submit" <?php if(!$loggedIn) { ?>disabled="disabled" <?php } ?> />
+
+ <a href="<?=$html->url('/reviews/add/'.$addon['Addon']['id'])?>"><?=_('addons_display_detailed_review')?></a></p>
+ <div id="addons-display-review-etiquette">
<p>
- <?=$this->renderElement('amo2009/stars',array('rating' => $review['Review']['rating']));?>
- <?php
- echo sprintf(___('addon_reviewed_by_u_on_d'),
- $html->linkUserFromModel($review['User']),
- strftime(_('date'), strtotime($review['Review']['created'])));
- ?>
+ <?php // @partial 5/12/08
+ if (_('addons_display_review_etiquette') == 'addons_display_review_etiquette'): ?>
+ Please do not post bug reports in reviews. We do not make your email address available to add-on developers and they may need to contact you to help resolve your issue.
+ <?php else: ?>
+ <?php echo _('addons_display_review_etiquette'); ?>
+ <?php endif; ?>
</p>
- </div>
-
- <?php
- endforeach;
- ?>
- <? echo '<p>'.$html->link(sprintf(_('addons_display_see_all_reviews'), $review_count), '/reviews/display/'.$addon['Addon']['id'], array('class'=>'more-info')).'</p>'; ?>
-
- </div>
- <?php endif; ?>
-
-</div>
-<div class="secondary" role="secondary">
-
- <?php if(empty($isAuthor)) { ?>
- <div class="highlight">
- <form id="form-review" action="<?=$html->url('/reviews/add/'.$addon['Addon']['id'])?>" method="post">
- <?=$html->hiddenSession() ?>
- <h3><?=_('addons_display_what_do_you_think')?></h3>
- <?php if(!$loggedIn) { ?>
- <p class="login">(<?php echo $html->link(_('header_navlink_login'), $html->login_url());?>)</p>
- <?php } ?>
- <p><input type="hidden" name="data[Review][id]" value="" id="ReviewId"/></p>
- <p><input type="hidden" name="data[Review][title]" value=" " id="ReviewTitle"/></p>
-
- <h4><?=_('addons_display_rate_it')?></h4>
-
- <?php if(!$loggedIn) { ?>
- <p class="stars stars-0">&nbsp;</p>
- <?php } else {?>
-
- <select id="review-rating" name="data[Review][rating]">
- <option></option>
- <option value="1" class="worst">*</option>
- <option value="2" class="bad">**</option>
-
- <option value="3" class="fair">***</option>
- <option value="4" class="good">****</option>
- <option value="5" class="best">*****</option>
- </select>
- <?php } ?>
-
- <?=$html->tagErrorMsg('Review/rating', _('error_review_rating_required')) ?>
- <p><textarea name="data[Review][body]" cols="30" rows="6" id="short-review" <?php if(!$loggedIn) { ?>disabled="disabled" class="disabled" <?php } ?>></textarea></p>
- <p>
- <a href="<?=$html->url('/reviews/add/'.$addon['Addon']['id'])?>"><?=_('addons_display_detailed_review')?></a>
- <button <?php if(!$loggedIn) { ?>disabled="disabled" <?php } ?> ><?=___('addons_display_review_submit')?></button>
- </p>
-
-
- <div id="addons-display-review-etiquette">
- <p>
- <?php echo ___('addons_display_review_etiquette'); ?>
- </p>
+ <?php
+ if ($has_supportemail || $has_supporturl) {
+ // @partial 5/13/08
+ if (_('addons_display_review_see_support') == 'addons_display_review_see_support'): ?>
+ <p>See the <a href="#support">support section</a> to find out where to get assistance for this add-on.</p>
<?php
- if ($has_supportemail || $has_supporturl) {
- echo '<p>'.sprintf(___('addons_display_review_see_support'), '#support').'</p>';
- }
- ?>
- <p><?=sprintf(___('addons_display_review_guidelines_link', '<a href="%s">Review Guidelines</a>'), $html->url('/pages/review_guide')) ?></p>
- </div>
- </form>
- </div>
- <?php } ?>
-
-
+ else:
+ echo '<p>'.sprintf(_('addons_display_review_see_support'),
+ '#support').'</p>';
+ endif;
+ }
+ ?>
+ <p><?=sprintf(___('addons_display_review_guidelines_link', '<a href="%s">Review Guidelines</a>'), $html->url('/pages/review_guide')) /* @partial, 6/25/08 */ ?></p>
+ </div>
+ </form>
+ <?php } ?>
-<div class="highlight">
+ <div class="more-addons">
- <?php
- if (is_array($relatedTags)) {
- foreach ($relatedTags as $tag) {
- echo $html->link(sprintf(_('addons_display_see_all_addons'),$tag['Translation']['name']['string']), '/browse/' . "type:" . $tag['Tag']['addontype_id'] . '/' . "cat:" . $tag['Tag']['id'], array('class' => 'more-info')) . "\n";
+ <?php
+ if (is_array($relatedTags)) {
+ foreach ($relatedTags as $tag) {
+ echo '<h3>'.$html->link(sprintf(_('addons_display_see_all_addons'),$tag['Translation']['name']['string']), '/browse/' . "type:" . $tag['Tag']['addontype_id'] . '/' . "cat:" . $tag['Tag']['id'], array('class'=>'view')) . '</h3>'."\n";
+ }
}
- }
- ?>
-
- <?php if (count($authorAddons) > 1): ?>
- <h4 class="other-author-addons"><?=sprintf(n___('addons_display_other_addons_by', 'addons_display_other_addons_by', count($addon['User'])),
- $html->linkUsersFromModel($addon['User'], 0));?>
- </h4>
- <div class="prose">
- <ul>
- <?php
- if (count($authorAddons) > 3) {
- echo '<form id="addons-author-addons" method="get" action="">';
- echo '<select id="addons-author-addons-select" name="addons-author-addons-select" onchange="this.form.submit()">';
- echo $this->renderElement('addon_author_addons', array('tag' => 'option'));
- echo '</select>';
- echo '<input class="hidden" type="submit" value="'._('addons_author_addons_submit').'"/>';
- echo '</form>';
- } else {
- echo $this->renderElement('addon_author_addons', array('tag' => 'li'));
- }
?>
- </ul>
- </div>
-
- <?php endif; ?>
-</div>
-<!-- /#more-addons-->
+ <?php if (count($authorAddons) > 1): ?>
+ <h4><?=sprintf(n___('addons_display_other_addons_by', 'addons_display_other_addons_by', count($addon['User'])),
+ $html->linkUsersFromModel($addon['User'], 0));?>
+ </h4>
+ <ul>
+ <?php
+ if (count($authorAddons) > 3) {
+ echo '<form id="addons-author-addons" method="get" action="">';
+ echo '<select id="addons-author-addons-select" name="addons-author-addons-select" onchange="this.form.submit()">';
+ echo $this->renderElement('addon_author_addons', array('tag' => 'option'));
+ echo '</select>';
+ echo '<input class="hidden" type="submit" value="'._('addons_author_addons_submit').'"/>';
+ echo '</form>';
+ } else {
+ echo $this->renderElement('addon_author_addons', array('tag' => 'li'));
+ }
+ ?>
+ </ul>
+ <?php endif; ?>
- <div class="highlight collections-add prose">
- <h3><?=___('addons_display_header_collections')?></h3>
+ </div>
+ <!-- /#more-addons-->
- <?php if (empty($pop_collections)): ?>
- <p><?=___('addons_display_nocollections')?></p>
- <?php else: ?>
- <ul>
- <?php foreach($pop_collections as &$_coll): ?>
- <li><?=$link->collection($_coll)?></li>
- <?php endforeach; ?>
- <?php if (($_othercolls = $collection_count - count($pop_collections)) > 0): ?>
- <li>
- <?=sprintf(n___('addons_display_collections_more', 'addons_display_collections_more', $_othercolls), $_othercolls)?>
- </li>
-
- <?php endif; ?>
- </ul>
- <?php endif; ?>
- <?php if ($loggedIn): ?>
- <form action="<?= $html->url('/collections/addtocollection') ?>" method="post" id="coll_publish">
- <div>
- <h3><label for="publish_to"><?=___('addons_display_collection_add')?></label></h3>
- <?=$html->link(___('addons_display_collection_whatsthis'), '/collections/')?>
- <?=$html->hiddenSession() ?>
- <input name="data[addon_id]" type="hidden" value="<?= $addon['Addon']['id'] ?>" />
- <select name="data[collection_uuid]" id="publish_to">
- <option value="" selected="selected"><?=___('addons_display_collection_add_select_one')?></option>
- <?php foreach ($userCollections as $collection): ?>
- <option value="<?=$collection['Collection']['uuid'] ?>"><?=$collection['Translation']['name']['string'] ?></option>
- <?php endforeach; ?>
- <option value="new"><?=___('addons_display_collection_add_new')?></option>
- </select>
- <button><?=___('addons_display_collection_add_submit')?></button>
- </div>
- </form>
- <?php endif; ?>
+
</div>
+ <!-- /#content-extra -->
+ </div>
+ <!-- /#content-main -->
+
+<?=$this->renderElement('sidebar')?>
+
+<?=$this->renderElement('app_chooser')?>
</div>
<script type="text/javascript" charset="utf-8">
- $(function(){
- addons_display.init({
- jsonURL: '<?=$html->url('/collections/json')?>',
- collViewURL: '<?=$html->url('/collection/')?>',
- loggedIn: <?=(int)$loggedIn?>
- });
- $("a[rel=jquery-lightbox]").lightBox({
- overlayOpacity: 0.6,
- imageBlank: "<?= $html->urlImage('jquery-lightbox/lightbox-blank.gif') ?>",
- imageLoading: "<?= $html->urlImage('jquery-lightbox/lightbox-ico-loading.gif')?>",
- imageBtnClose: "<?= $html->urlImage('jquery-lightbox/close.png')?>",
- imageBtnPrev: "<?= $html->urlImage('jquery-lightbox/goleft.png')?>",
- imageBtnNext: "<?= $html->urlImage('jquery-lightbox/goright.png')?>",
- containerResizeSpeed: 350
- });
-
+ $(function(){
+ $('.stars').rating(<?php if(!$loggedIn) { ?> {readOnly:true}<?php } ?>);
+ $('.rollover-reveal').rolloverReveal();
});
</script>
<!-- /#content -->
diff --git a/site/app/views/addons/home.thtml b/site/app/views/addons/home.thtml
index 7d79eb0..0443155 100644
--- a/site/app/views/addons/home.thtml
+++ b/site/app/views/addons/home.thtml
@@ -24,7 +24,6 @@
* Frederic Wenzel <fwenzel@mozilla.com>
* Mike Morgan <morgamic@mozilla.com>
* Wil Clouser <clouserw@mozilla.com>
- * l.m.orchard <lorchard@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
@@ -39,142 +38,198 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-
-// Pass a CSS class for the body tag up to the layout.
-$this->viewVars['bodyclass'] = 'home';
?>
-<?php ob_start() ?>
- <?= $javascript->link('amo2009/home.js') ?>
-<?php $this->viewVars['head_extra'] = ob_get_clean() ?>
-
-<?php /* Display locale-formatted site stats, if available (bug 492998). */ ?>
-<?php ob_start() ?>
- <?php $lc = localeconv(); ?>
- <ul class="stats">
- <?php if (!empty($stats_downloaded)): ?>
- <li><?=sprintf(
- n___('addons_home_stats_downloaded', 'addons_home_stats_downloaded', $stats_downloaded),
- $html->number_format($stats_downloaded, 0)
- )?></li>
- <?php endif ?>
- <?php if (!empty($stats_inuse)): ?>
- <li><?=sprintf(
- n___('addons_home_stats_inuse', 'addons_home_stats_inuse', $stats_inuse),
- $html->number_format($stats_inuse, 0)
- )?></li>
- <?php endif ?>
- </ul>
-<?php $this->viewVars['header_extra'] = ob_get_clean() ?>
-
-<div class="secondary" role="complementary">
- <?=$this->renderElement('amo2009/categories', array('clickable_header'=>FALSE))?>
-
- <?php /*
- TODO: Enable this when there's content for developer center, leaving it for
- the markup example
- */ ?>
- <?php if (false): ?>
- <div class="highlight">
- <h3>Create a Firefox Add-on</h3>
- <p>
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
- eiusmod tempor incididunt ut labore et dolore magna aliqua.
- </p>
- <p><strong><a href="#">Visit the Developer Center</a></strong></p>
- </div>
- <?php endif ?>
-
-</div>
-
-<div class="primary" role="main">
+<div id="content" class="main-page">
- <?=$this->renderElement('amo2009/search')?>
+<?=$this->renderElement('search')?>
- <? if(APP_ID == APP_FIREFOX): ?>
- <?=$this->renderElement('amo2009/teaser_collections', array(
- 'teaser_collection_promos' => $teaser_collection_promos,
- 'promoted_collections' => $promoted_collections
- ))?>
- <? endif; ?>
+<div id="content-main">
+ <?php
+ if (count($featureAddons) != 0) {
+ ?>
+ <h3><?=_('addons_home_feature_head')?></h3>
- <h2><?=___('addons_home_browse_title', 'Browse Add-ons')?></h2>
- <div class="primary">
- <div class="featured show-<?=$featured_type?> listing" id="featured">
- <div class="featured-inner">
- <div class="listing-header">
- <ul>
- <li<?= ('recommended'==$featured_type) ? ' class="selected"' : '' ?>>
- <a href="?featured=recommended#featured"><?=___('addons_home_browse_recommended', 'Recommended')?></a></li>
- <li<?= ('popular'==$featured_type) ? ' class="selected"' : '' ?>>
- <a href="?featured=popular#featured"><?=___('addons_home_browse_popular', 'Popular')?></a></li>
- <li<?= ('added'==$featured_type) ? ' class="selected"' : '' ?>>
- <a href="?featured=added#featured"><?=___('addons_home_browse_new', 'Just Added')?></a></li>
- <li<?= ('updated'==$featured_type) ? ' class="selected"' : '' ?>>
- <a href="?featured=updated#featured"><?=___('addons_home_browse_updated', 'Updated')?></a></li>
+ <div id="slider" class="slider_widget">
+ <div class="inner">
+ <div class="viewport">
+ <ul class="item_set">
+ <?php
+ $fyf_time = gmmktime(16, 00, 00, 11, 18, 2008);
+ $fyf = ($fyf_time < gmmktime() && LANG == 'en-US' && APP_ID == APP_FIREFOX); // is it FYF promo time?
+ $total_features = min(count($featureAddons), ($fyf ? 6 : 5)); // FYF promo
+ for ($idx=1; $idx<=$total_features; $idx++) {
+
+ $prev_idx = $idx - 1;
+ if ($prev_idx < 1) $prev_idx = $total_features;
+ $next_idx = $idx + 1;
+ if ($next_idx > $total_features) $next_idx = 1;
+
+ if (!$fyf || $idx > 1) // FYF promo
+ $feature1 = array_shift($featureAddons);
+ ?>
+ <li id="feature1_<?=$idx?>" class="item addon featured main">
+ <?php
+ if ($fyf && $idx == 1):
+ echo $this->renderElement('fyf_promotion');
+ else:
+ ?>
+ <?=$this->renderElement('feature', array(
+ 'addonIconPath' => $this->controller->Image->getAddonIconURL($feature1['Addon']['id']),
+ 'addonThumbPath' => $this->controller->Image->getHighlightedPreviewURL($feature1['Addon']['id']),
+ 'addonName' => $feature1['Translation']['name']['string'],
+ 'addonSummary' => $feature1['Translation']['summary']['string'],
+ 'addonId' => $feature1['Addon']['id'],
+ 'addonFiles' => $feature1['File'],
+ 'addonEULA' => $feature1['Translation']['eula']['string'],
+ 'addonStatus' => $feature1['Addon']['status'],
+ 'addonAuthors' => $feature1['User'],
+ 'addonTags' => $feature1['Tag'],
+ 'addonWeeklyDownloads' => $feature1['Addon']['weeklydownloads'],
+ 'allPlatforms' => $platforms,
+ 'compatible_apps' => $feature1['compatible_apps'],
+ 'addonType' => $feature1['Addon']['addontype_id'],
+ 'addonRating' => $feature1['Addon']['averagerating'],
+ 'addonReviews' => $feature1['Addon']['totalreviews'],
+ 'addonVersionCreated' => $feature1['Version'][0]['created']
+ ))?>
+ <?php endif; ?>
+ </li>
+ <?php
+ } ?>
</ul>
</div>
- <div class="addon-listing">
- <?=$this->renderElement('amo2009/homepage_addon_listing')?>
+ <div class="controls">
+ <div class="controls_inner">
+ <a href="#slider" title="Previous" class="prev">
+ <img src="<?=$html->urlImage("slider-prev-disabled.gif")?>"
+ width="30" height="30" alt="<?=___('addon_slider_tooltip_previous', 'Previous Add-on')?>"
+ title="<?=___('addon_slider_tooltip_previous', 'Previous Add-on')?>" />
+ </a>
+ <span class="indicator">
+ <span class="index">1</span>
+ /
+ <span class="total"><?=$total_features?></span>
+ </span>
+ <a href="#slider" title="Next" class="next">
+ <img src="<?=$html->urlImage("slider-next.gif")?>"
+ width="30" height="30" alt="<?=___('addon_slider_tooltip_next', 'Next Add-on')?>"
+ title="<?=___('addon_slider_tooltip_next', 'Next Add-on')?>" />
+ </a>
+ </div>
</div>
- <script type="text/javascript">
- $(document).ready(function(){
- $('.listing-header a').click(function(e){
- e.preventDefault();
- var link = $(this);
- link.addClass('loading');
- $('.listing-header .selected').removeClass('selected');
- link.parent().addClass('selected');
- $.get('<?=$html->url('/addons/ajaxy')?>' + link.attr('href'),
- function(content){
- $('.addon-listing').html(content);
- link.removeClass('loading');
- });
- });
- });
- </script>
</div>
+
+ <div class="vex"><span><!-- bottom edge --></span></div>
+ </div>
+ <?php
+ }
+ ?>
+
+ <div id="secondaries">
+ <?php
+ foreach($featureAddons as $id => $addon):
+ $idx = $id + 2;
+ ?>
+ <div id="feature<?=$idx?>" class="addon featured sub">
+ <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>
- </div>
+ <?php endforeach; ?>
+ </div><!-- /#secondaries -->
+
+ <div id="content-extra">
- <div class="secondary">
- <img class="pull-right" src="<?=$html->url('/img/amo2009/illustrations/logo-collections-100x125.png', null, false, false)?>" alt=""/>
- <h3><a href="<?=$html->url('/collections')?>"><?=___('addons_home_collections','Collections')?></a>
- <span class="new indicator"><?=___('addons_home_new_indicator', 'NEW!')?></span></h3>
- <p><?=___('addons_home_collections_intro', '
- Collections are a way for you to categorize, mix, match and mingle
- add-ons. Subscribe to collections created by other users or create your
- own.
- ')?></p>
+<?php
+ /**
+ * Developer tools
+ * Shows links to dev cp and admin stuff depending on user permissions.
+ * If the user is not logged in, they won't see any of this.
+ */
+ if ($this->controller->Session->check('User')) {
+?>
+ <div id="developer" class="extra">
+ <h3><?=(!empty($welcomeName) ? sprintf(_('sidebar_navlink_welcome_name'), $welcomeName) : _('sidebar_navlink_welcome'))?></h3>
+ <ul>
+ <li><?=$html->link(_('sidebar_navlink_developer_tools'), '/developers/dashboard')?></li>
+ <?php if ($this->controller->SimpleAcl->actionAllowed('Editors', '%', $this->controller->Session->read('User'))): ?>
+ <li><?=$html->link(_('sidebar_navlink_editor_tools'), '/editors')?></li>
+ <?php endif;
+ if ($this->controller->SimpleAcl->actionAllowed('Localizers', '%', $this->controller->Session->read('User'))): ?>
+ <li><?=$html->link('Localizer Tools', '/localizers')?></li>
+ <?php endif;
+ if ($this->controller->SimpleAcl->actionAllowed('Admin', '%', $this->controller->Session->read('User'))): ?>
+ <li><?=$html->link(_('sidebar_navlink_admin_tools'), '/admin')?></li>
+ <?php endif; ?>
+ </ul>
+ </div>
+<?php
+ }
+?>
- <?php if (!empty($popular_collections)): ?>
- <h4><?=___('addons_home_collection_popular_title', 'Popular Collections')?></h4>
- <?php foreach ($popular_collections as $c): ?>
- <div class="item">
- <h5>
- <img class="icon" src="<?=$c['icon_url']?>" width="32" height="32" alt="<?=$c['name']?>"/>
- <?=$link->collection(array(
- 'Collection' => array('uuid'=>$c['uuid'], 'nickname'=>$c['nickname']),
- 'Translation' => array('name'=>array('string'=>$c['name']))
- ))?>
- <span><?=_('addons_home_by')?> <?=$html->linkUsersFromModel($c['authors'], null);?></span>
- </h5>
- <blockquote cite="#">
- <p><?=$html->truncateChars(200, $c['description'])?></p>
- </blockquote>
- <div class="meta">
- <span class="addons"><?=sprintf(
- n___('addons_home_collections_addon_count','addons_home_collections_addon_count',$c['addons_count']),
- $c['addons_count']
- )?></span>
- <span class="subscribers"><?=sprintf(
- n___('addons_home_collections_subscribers','addons_home_collections_subscribers',$c['subscribers']),
- $c['subscribers'])
- ?></span>
- </div>
- </div>
- <?php endforeach ?>
- <?php endif ?>
- <p><a class="more-info" href="<?=$html->url('/collections')?>"><?=___('addons_home_collections_all', 'View All Collections')?></a></p>
- </div>
-</div>
+ <div id="recs" class="extra">
+ <h3><?=_('addons_home_recommended_header')?></h3>
+ <ul>
+ <? foreach ($recAddons as $recAddon): ?>
+ <li><?=$html->link($recAddon['Translation']['name']['string'], "/addon/{$recAddon['Addon']['id']}")?><br />
+ <span><?=isset($recAddon['Tag'][0]['Translation']['name']['string']) ? $recAddon['Tag'][0]['Translation']['name']['string'] : ''; ?></span>
+ </li>
+ <? endforeach; ?>
+ </ul>
+ <p class="view-all"><a href="<?=$html->url('/recommended')?>" class="view" title="<?=_('addons_home_view_all_recommended_title')?>"><?=_('addons_home_view_all')?></a></p>
+
+ <h3><?=_('addons_home_popular_header')?></h3>
+ <ul>
+ <? foreach ($popAddons as $popAddon): ?>
+ <li><?=$html->link($popAddon['Translation']['name']['string'], "/addon/{$popAddon['Addon']['id']}")?><br />
+ <span><?=isset($popAddon['Tag'][0]['Translation']['name']['string']) ? $popAddon['Tag'][0]['Translation']['name']['string'] : ''; ?></span>
+ </li>
+ <? endforeach; ?>
+ </ul>
+ <p class="view-all"><a href="<?=$html->url("/browse/type:1/cat:all?sort=popular")?>" class="view" title="<?=_('addons_home_view_all_popular_title')?>"><?=_('addons_home_view_all')?></a></p>
+
+ <h3><?=___('addons_home_newest_header','Newest:')?></h3>
+ <ul>
+ <? foreach ($newAddons as $newAddon): ?>
+ <li><?=$html->link($newAddon['Translation']['name']['string'], "/addon/{$newAddon['Addon']['id']}")?> <br />
+ <span><?= isset($newAddon['Tag'][0]['Translation']['name']['string']) ? $newAddon['Tag'][0]['Translation']['name']['string'] : '' ; ?></span>
+ </li>
+ <? endforeach; ?>
+ </ul>
+ <p class="view-all"><a href="<?=$html->url("/browse/type:1/cat:all?sort=newest")?>" class="view" title="<?=_('addons_home_view_all_newest_title')?>"><?=_('addons_home_view_all')?></a></p>
+
+ <h3><?=___('addons_home_updated_header', 'Recently Updated:')?></h3>
+ <ul>
+ <? foreach ($updAddons as $updAddon): ?>
+ <li><?=$html->link($updAddon['Translation']['name']['string'], "/addon/{$updAddon['Addon']['id']}")?><br />
+ <span><?= $updAddon['Tag'][0]['Translation']['name']['string']; ?></span>
+ </li>
+ <? endforeach; ?>
+ </ul>
+ <p class="view-all"><a href="<?=$html->url("/browse/type:1/cat:all?sort=updated")?>" class="view" title="<?=_('addons_home_view_all_updated_title')?>"><?=_('addons_home_view_all')?></a></p>
+ </div>
+ </div><!-- /#content-extra -->
+
+</div><!-- /#content-main -->
+
+<?=$this->renderElement('sidebar', array('pitch'=>true))?>
+
+<?=$this->renderElement('app_chooser')?>
+
+</div><!-- /#content -->
diff --git a/site/app/views/addons/plugins.thtml b/site/app/views/addons/plugins.thtml
index c6c2a64..e1426c3 100644
--- a/site/app/views/addons/plugins.thtml
+++ b/site/app/views/addons/plugins.thtml
@@ -41,101 +41,120 @@
* We will most likely move to a dynamic version of this page pulling from the database.
*/
-$this->layout='amo2009';
-
?>
-<div class="secondary" role="complementary">
- <?=$this->renderElement('amo2009/categories')?>
-</div>
-<div class="primary" role="main">
- <?=$this->renderElement('amo2009/search')?>
-
- <div class="featured listing">
- <div class="featured-inner">
- <div class="listing-header">
- <p><?=_('addons_plugins_main_description')?></p>
- </div> <!-- listing-header -->
-
-<div class="item">
- <h2><a href="http://www.adobe.com/products/reader/">Adobe Reader</a></h2>
- <p><?=_('addons_plugins_by')?> <a href="http://www.adobe.com/">Adobe</a></p>
- <p>For viewing and printing Adobe Portable Document Format (PDF)</p>
- <div class="install install-container"><p class="install-button">
- <a class="button positive" href="http://www.adobe.com/products/acrobat/readstep2.html"> <img src="/remora/site/img/amo2009/icons/buttons/plus-green-8x9.gif" alt=""><?=sprintf(_('a_download'),'')?></a></p>
- </div>
+<div id="content" class="landing browse">
+
+<?=$this->renderElement('search', array())?>
+
+<div id="content-main">
+
+<p class="first"><?=_('addons_plugins_main_description')?></p>
+
+<div class="addon sub">
+ <div class="irk">
+ <h2 class="first"><a href="http://www.adobe.com/products/reader/">Adobe Reader</a></h2>
+ <p class="first"><?=_('addons_plugins_by')?> <a href="http://www.adobe.com/">Adobe</a></p>
+ <p class="first">For viewing and printing Adobe Portable Document Format (PDF)</p>
+ <div class="install-container"><p class="install-button">
+<a href="http://www.adobe.com/products/acrobat/readstep2.html"><span><span><span><strong><?=sprintf(_('a_download'),'')?></strong></span></span></span></a></p></div>
<div class="baseline"><p><img src="<?=$html->url('/img/plugins/faq_small.png',false,false,false)?>" class="faq" height="16" width="16" alt="" ><?=_('addons_plugins_support_documentation')?> <a href="http://plugindoc.mozdev.org/windows.html#Acrobat">Windows</a>, <a href="http://plugindoc.mozdev.org/linux.html#Acrobat">Linux</a>, <a href="http://plugindoc.mozdev.org/OSX.html#Acrobat">Mac OS X</a> | <a href="http://plugindoc.mozdev.org/faqs/acroread.html">Acrobat Reader FAQ</a></p></div>
+ </div>
+ <div class="vex"><span><!-- bottom edge --></span></div>
</div>
-<div class="item">
- <h2><a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Player</a></h2>
- <p><?=_('addons_plugins_by')?> <a href="http://www.adobe.com/">Adobe</a></p>
- <p>Adobe Flash Player is the universal rich client for delivering effective Adobe Flash experiences across desktops and devices.</p>
- <div class="install install-container"><p class="install-button">
- <a class="button positive" href="http://www.adobe.com/go/getflashplayer"><img src="/remora/site/img/amo2009/icons/buttons/plus-green-8x9.gif" alt=""><?=sprintf(_('a_download'),'')?></a></p>
+<div class="addon sub">
+ <div class="irk">
+ <h2 class="first"><a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Player</a></h2>
+ <p class="first"><?=_('addons_plugins_by')?> <a href="http://www.adobe.com/">Adobe</a></p>
+ <p class="first">Adobe Flash Player is the universal rich client for delivering effective Adobe Flash experiences across desktops and devices.</p>
+ <div class="install-container"><p class="install-button"><a href="http://www.adobe.com/go/getflashplayer"><span><span><span><strong><?=sprintf(_('a_download'),'')?></strong></span></span></span></a></p>
</div>
<div class="baseline"><p><img src="<?=$html->url('/img/plugins/faq_small.png',false,false,false)?>" class="faq" height="16" width="16" alt="" ><?=_('addons_plugins_support_documentation')?> <a href="http://plugindoc.mozdev.org/windows.html#Flash">Windows</a>, <a href="http://plugindoc.mozdev.org/linux.html#Flash">Linux</a>, <a href="http://plugindoc.mozdev.org/OSX.html#Flash">Mac OS X</a> | <a href="http://plugindoc.mozdev.org/faqs/flash.html">Flash Player FAQ</a></p></div>
+ </div>
+ <div class="vex"><span><!-- bottom edge --></span></div>
</div>
-<div class="item">
- <h2><a href="http://www.java.com/en/about/">Java</a></h2>
- <p><?=_('addons_plugins_by')?> <a href="http://www.sun.com/">Sun Microsystems</a></p>
- <p>The Java Runtime Environment enables your computer to run applications and applets that use Java technology.</p>
- <div class="install install-container"><p class="install-button">
- <a class="button positive" href="http://www.java.com/en/download/"><img src="/remora/site/img/amo2009/icons/buttons/plus-green-8x9.gif" alt=""><?=sprintf(_('a_download'),'')?></a></p>
+<div class="addon sub">
+ <div class="irk">
+ <h2 class="first"><a href="http://www.java.com/en/about/">Java</a></h2>
+ <p class="first"><?=_('addons_plugins_by')?> <a href="http://www.sun.com/">Sun Microsystems</a></p>
+ <p class="first">The Java Runtime Environment enables your computer to run applications and applets that use Java technology.</p>
+ <div class="install-container"><p class="install-button"><a href="http://www.java.com/en/download/"><span><span><span><strong><?=sprintf(_('a_download'),'')?></strong></span></span></span></a></p>
</div>
<div class="baseline"><p><img src="<?=$html->url('/img/plugins/faq_small.png',false,false,false)?>" class="faq" height="16" width="16" alt="" ><?=_('addons_plugins_support_documentation')?> <a href="http://plugindoc.mozdev.org/windows.html#Java">Windows</a>, <a href="http://plugindoc.mozdev.org/linux.html#Java">Linux</a>, <a href="http://plugindoc.mozdev.org/OSX.html#Java">Mac OS X</a> | <a href="http://plugindoc.mozdev.org/faqs/java.html">Java Plugin FAQ</a></p></div>
+ </div>
+ <div class="vex"><span><!-- bottom edge --></span></div>
</div>
-<div class="item">
- <h2><a href="http://www.apple.com/quicktime/">QuickTime</a></h2>
- <p><?=_('addons_plugins_by')?> <a href="http://www.apple.com/">Apple</a></p>
- <p>QuickTime Player is an easy-to-use application for playing, interacting with or viewing video, audio, VR or graphics files.</p>
- <div class="install install-container"><p class="install-button">
- <a class="button positive" href="http://www.apple.com/quicktime/download/"><img src="/remora/site/img/amo2009/icons/buttons/plus-green-8x9.gif" alt=""><?=sprintf(_('a_download'),'')?></a></p>
+<div class="addon sub">
+ <div class="irk">
+ <h2 class="first"><a href="http://www.apple.com/quicktime/">QuickTime</a></h2>
+ <p class="first"><?=_('addons_plugins_by')?> <a href="http://www.apple.com/">Apple</a></p>
+ <p class="first">QuickTime Player is an easy-to-use application for playing, interacting with or viewing video, audio, VR or graphics files.</p>
+ <div class="install-container"><p class="install-button"><a href="http://www.apple.com/quicktime/download/"><span><span><span><strong><?=sprintf(_('a_download'),'')?></strong></span></span></span></a></p>
</div>
<div class="baseline"><p><img src="<?=$html->url('/img/plugins/faq_small.png',false,false,false)?>" class="faq" height="16" width="16" alt="" ><?=_('addons_plugins_support_documentation')?> <a href="http://plugindoc.mozdev.org/windows.html#Quicktime">Windows</a>, <a href="http://plugindoc.mozdev.org/OSX.html#Quicktime">Mac OS X</a></p></div>
+ </div>
+ <div class="vex"><span><!-- bottom edge --></span></div>
</div>
-<div class="item">
- <h2><a href="http://www.real.com/player/">RealPlayer</a></h2>
- <p><?=_('addons_plugins_by')?> <a href="http://www.realnetworks.com/">Real Networks</a></p>
- <p>RealPlayer enables your computer to play streaming RealVideo and RealAudio.</p>
- <div class="install install-container">
- <p class="install-button"><a class="button positive" href="http://www.real.com/R/RC.040104freeplayer.def...R/forms.real.com/real/realone/realone.html?type=eva1&amp;rppr=rnwk&amp;src=040104freeplayer"><img src="/remora/site/img/amo2009/icons/buttons/plus-green-8x9.gif" alt=""><?=_('addons_plugins_for_windows')?> Version 11</a></p>
- <p class="install-button"><a class="button positive" href="http://www.real.com/linux/"><img src="/remora/site/img/amo2009/icons/buttons/plus-green-8x9.gif" alt=""><?=_('addons_plugins_for_linux')?> Version 10</a></p>
- <p class="install-button"><a class="button positive" href="http://www.real.com/R/RC.040104freeplayer.def...R/forms.real.com/real/realone/mac.html?rppr=rnwk&amp;src=040104freeplayer"><img src="/remora/site/img/amo2009/icons/buttons/plus-green-8x9.gif" alt=""><?=_('addons_plugins_for_macosx')?> Version 10</a></p>
+<div class="addon sub">
+ <div class="irk">
+ <h2 class="first"><a href="http://www.real.com/player/">RealPlayer</a></h2>
+ <p class="first"><?=_('addons_plugins_by')?> <a href="http://www.realnetworks.com/">Real Networks</a></p>
+ <p class="first">RealPlayer enables your computer to play streaming RealVideo and RealAudio.</p>
+
+ <p class="install-button"><a href="http://www.real.com/R/RC.040104freeplayer.def...R/forms.real.com/real/realone/realone.html?type=eva1&amp;rppr=rnwk&amp;src=040104freeplayer"><span><span><span><strong><img src="<?=$html->url('/img/plugins/windows_icon.png',false,false,false)?>" height="34" width="34" alt="" ><?=_('addons_plugins_for_windows')?> Version 11</strong></span></span></span></a></p>
+
+ <p class="install-button"><a href="http://www.real.com/linux/"><span><span><span><strong><img src="<?=$html->url('/img/plugins/linux_icon.png',false,false,false)?>" height="34" width="34" alt="" ><?=_('addons_plugins_for_linux')?> Version 10</strong></span></span></span></a></p>
+
+ <p class="install-button"><a href="http://www.real.com/R/RC.040104freeplayer.def...R/forms.real.com/real/realone/mac.html?rppr=rnwk&amp;src=040104freeplayer"><span><span><span><strong><img src="<?=$html->url('/img/plugins/macosx_icon.png',false,false,false)?>" height="34" width="34" alt="" ><?=_('addons_plugins_for_macosx')?> Version 10</strong></span></span></span></a></p>
+
+
+ <div class="baseline"><p><img src="<?=$html->url('/img/plugins/faq_small.png',false,false,false)?>" style="float: left; margin:0 4px 0 0" height="16" width="16" alt="" ><?=_('addons_plugins_support_documentation')?> <a href="http://plugindoc.mozdev.org/windows.html#RealOne">Windows</a>, <a href="http://plugindoc.mozdev.org/linux.html#RealPlayer">Linux</a>, <a href="http://plugindoc.mozdev.org/OSX.html#RealOne">Mac OS X</a></p></div>
+
</div>
- <div class="baseline"><p><img src="<?=$html->url('/img/plugins/faq_small.png',false,false,false)?>" class="faq" height="16" width="16" alt="" ><?=_('addons_plugins_support_documentation')?> <a href="http://plugindoc.mozdev.org/windows.html#RealOne">Windows</a>, <a href="http://plugindoc.mozdev.org/linux.html#RealPlayer">Linux</a>, <a href="http://plugindoc.mozdev.org/OSX.html#RealOne">Mac OS X</a></p></div>
+ <div class="vex"><span><!-- bottom edge --></span></div>
</div>
-<div class="item">
- <h2><a href="http://www.adobe.com/products/shockwaveplayer/">Shockwave</a></h2>
- <p><?=_('addons_plugins_by')?> <a href="http://www.adobe.com/">Adobe</a></p>
- <p>Shockwave Player displays Web content that has been created by Adobe Director.</p>
- <div class="install install-container"><p class="install-button">
- <a class="button positive" href="http://www.adobe.com/shockwave/download/"><img src="/remora/site/img/amo2009/icons/buttons/plus-green-8x9.gif" alt=""><?=sprintf(_('a_download'),'')?></a></p>
+<div class="addon sub">
+ <div class="irk">
+ <h2 class="first"><a href="http://www.adobe.com/products/shockwaveplayer/">Shockwave</a></h2>
+ <p class="first"><?=_('addons_plugins_by')?> <a href="http://www.adobe.com/">Adobe</a></p>
+ <p class="first">Shockwave Player displays Web content that has been created by Adobe Director.</p>
+ <div class="install-container"><p class="install-button"><a href="http://www.adobe.com/shockwave/download/"><span><span><span><strong><?=sprintf(_('a_download'),'')?></strong></span></span></span></a></p>
</div>
<div class="baseline"><p><img src="<?=$html->url('/img/plugins/faq_small.png',false,false,false)?>" class="faq" height="16" width="16" alt="" ><?=_('addons_plugins_support_documentation')?> <a href="http://plugindoc.mozdev.org/windows.html#Shockwave">Windows</a>, <a href="http://plugindoc.mozdev.org/OSX.html#Shockwave">Mac OS X</a></p></div>
+ </div>
+ <div class="vex"><span><!-- bottom edge --></span></div>
</div>
-<div class="item">
- <h2><a href="http://www.microsoft.com/windows/windowsmedia/default.aspx">Windows Media Player</a></h2>
- <p><?=_('addons_plugins_by')?> <a href="http://www.microsoft.com/">Microsoft</a></p>
- <p>Windows Media Player lets you play streaming audio, video, animations, and multimedia presentations on the web.</p>
- <div class="install install-container">
- <p class="install-button"><a class="button positive" href="http://port25.technet.com/pages/windows-media-player-firefox-plugin-download.aspx"><img src="/remora/site/img/amo2009/icons/buttons/plus-green-8x9.gif" alt=""><?=_('addons_plugins_for_windows')?> Vers. 11 (XP, Vista)</a></p>
- <p class="install-button"><a class="button positive" href="http://www.microsoft.com/windows/windowsmedia/9series/player.aspx"><img src="/remora/site/img/amo2009/icons/buttons/plus-green-8x9.gif" alt=""><?=_('addons_plugins_for_windows')?> Vers. 9 (98 SE, ME, 2000)</a></p>
- <p class="install-button"><a class="button positive" href="http://www.microsoft.com/windows/windowsmedia/player/mac/default.aspx"><img src="/remora/site/img/amo2009/icons/buttons/plus-green-8x9.gif" alt=""><?=_('addons_plugins_for_macosx')?> Version 9 or QuickTime Components</a></p>
- </div>
+<div class="addon sub">
+ <div class="irk">
+ <h2 class="first"><a href="http://www.microsoft.com/windows/windowsmedia/default.aspx">Windows Media Player</a></h2>
+ <p class="first"><?=_('addons_plugins_by')?> <a href="http://www.microsoft.com/">Microsoft</a></p>
+ <p class="first">Windows Media Player lets you play streaming audio, video, animations, and multimedia presentations on the web.</p>
+
+ <p class="install-button"><a href="http://port25.technet.com/pages/windows-media-player-firefox-plugin-download.aspx"><span><span><span><strong><img src="<?=$html->url('/img/plugins/windows_icon.png',false,false,false)?>" height="34" width="34" alt="" ><?=_('addons_plugins_for_windows')?> Vers. 11 (XP, Vista)</strong></span></span></span></a></p>
+
+ <p class="install-button"><a href="http://www.microsoft.com/windows/windowsmedia/9series/player.aspx"><span><span><span><strong><img src="<?=$html->url('/img/plugins/windows_icon.png',false,false,false)?>" height="34" width="34" alt="" > Vers. 9</strong></span></span></span></a></p>
+
+ <p class="install-button"><a href="http://www.microsoft.com/windows/windowsmedia/player/mac/default.aspx"><span><span><span><strong><img src="<?=$html->url('/img/plugins/macosx_icon.png',false,false,false)?>" height="34" width="34" alt="" ><?=_('addons_plugins_for_macosx')?> Version 9 or QuickTime Components</strong></span></span></span></a></p>
+
<div class="baseline"><p><img src="<?=$html->url('/img/plugins/faq_small.png',false,false,false)?>" class="faq" height="16" width="16" alt="" ><?=_('addons_plugins_support_documentation')?> <a href="http://plugindoc.mozdev.org/windows.html#WMP">Windows</a>, <a href="http://plugindoc.mozdev.org/OSX.html#WMP">Mac OS X</a></p></div>
+ </div>
+ <div class="vex"><span><!-- bottom edge --></span></div>
</div>
- </div> <!-- featured-inner -->
<h2><?=_('addons_plugins_looking_for_plugin')?></h2>
-<p><?=sprintf(_('addons_plugins_looking_for_more'),'<a href="http://plugindoc.mozdev.org">PluginDoc</a>')?></p>
- </div> <!-- featured listing -->
- </div> <!-- primary -->
+<p class="first"><?=sprintf(_('addons_plugins_looking_for_more'),'<a href="http://plugindoc.mozdev.org">PluginDoc</a>')?></p>
+
+</div><!-- /#content-main -->
+
+<?=$this->renderElement('sidebar', array('highlight' => $this_tag))?>
+<?=$this->renderElement('app_chooser')?>
+</div><!-- /#content -->
diff --git a/site/app/views/addons/policy.thtml b/site/app/views/addons/policy.thtml
index b3a136b..46e38df 100644
--- a/site/app/views/addons/policy.thtml
+++ b/site/app/views/addons/policy.thtml
@@ -37,6 +37,8 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
+?>
+<?php
if (empty($policy))
$policy_index = 'eula';
@@ -44,79 +46,69 @@ else
$policy_index = 'privacypolicy';
?>
-<div class="secondary" role="complementary">
- <?=$this->renderElement('amo2009/categories')?>
-</div>
+<div id="content">
-<div id="content" class="primary prose" role="main">
+<?=$this->renderElement('sidebar')?>
- <h2 class="name"<?=$addon['Translation']['name']['locale_html']?>>
+<div id="content-main">
+
+<div id="addon-summary" class="addon addon-policy">
+ <div id="policy-tl"></div>
+
+ <h3 class="name"<?=$addon['Translation']['name']['locale_html']?>>
<?=$addon['Translation']['name']['string']?><?php if (empty($policy)) {?> <?=$addon['Version'][0]['Version']['version']?><? }?>
- </h2>
+ </h3>
+
+ <h4 class="author"> <?=_('addons_home_by')?> <?=$html->linkUsersFromModel($addon['User'], 0);?></h4>
- <h3 class="author"> <?=_('addons_home_by')?> <?=$html->linkUsersFromModel($addon['User'], 0);?></h3>
+ <div id="content-policy">
<?php if (empty($policy)) {?>
- <div class="addon-policy-tagline">
- <p<?=$addon['Translation']['name']['locale_html']?>><?=sprintf(_('addons_policy_eula_require'), $addon['Translation']['name']['string']);?></p>
- </div>
+ <div class="addon-policy-tagline">
+ <p<?=$addon['Translation']['name']['locale_html']?>><?=sprintf(_('addons_policy_eula_require'), $addon['Translation']['name']['string']);?></p>
+ </div>
<?php }?>
- <textarea readonly="readonly" cols="80" rows="20"<?=$addon['Translation'][$policy_index]['locale_html']?>><?=$addon['Translation'][$policy_index]['string']?></textarea>
+ <textarea class="policy-area" readonly="readonly" cols="80" rows="20"<?=$addon['Translation'][$policy_index]['locale_html']?>><?=$addon['Translation'][$policy_index]['string']?></textarea>
- <?php if (empty($policy)): ?>
- <div id="addon-summary" class="condensed <?=$html->extraClass($addon)?>">
- <?
- global $browser_apps;
- if (!in_array(APP_ID, $browser_apps)) {
- $buttonMessage = ___('a_eula_download');
- } else {
+ <?php if (empty($policy)) {
+ global $browser_apps;
+ if (!in_array(APP_ID, $browser_apps)) {
+ // @partial: translation fallback for locale changes from 1/9/08
+ if (_('a_eula_download') != 'a_eula_download')
+ $buttonMessage = _('a_eula_download');
+ else
$buttonMessage = _('a_eula_install');
- }
- if (array_key_exists('collection_id', $_GET) && $this->controller->Collection->isValidUUID($_GET['collection_id'])) {
- $_collection_uuid = $_GET['collection_id'];
- } else {
- $_collection_uuid = '';
- }
-
- $_install_render_options = array(
- 'addon' => $addon,
- 'addonFiles' => $addon['Version'][0]['File'],
- 'compatible_apps' => array(),
- 'collection_uuid' => $_collection_uuid,
- 'addonEULA' => '', // override a EULA if it exists since this page is pulling double duty
- 'is_latest' => $is_latest,
- 'platforms' => $platforms,
- 'buttonMessage' => $buttonMessage,
- 'is_eula_page' => true
- );
- echo $this->renderElement('amo2009/install', $_install_render_options);
- ?>
- </div>
- <!-- /.addon-summary -->
-
- <p class="policy-link"><?=$html->link(_('a_cancel_installation'), "/addon/{$addon['Addon']['id']}");?></p>
- <?php endif;?>
+ } else {
+ $buttonMessage = _('a_eula_install');
+ }
+ $_install_render_options = array(
+ 'addonIconPath' => $addonIconPath,
+ 'addonName' => $addon['Translation']['name']['string'],
+ 'addonId' => $addon['Addon']['id'],
+ 'addonFiles' => $addon['Version'][0]['File'],
+ 'addonEULA' => '',
+ 'addonStatus' => $addon['Addon']['status'],
+ 'is_latest' => ($addon['Addon']['status'] == STATUS_PUBLIC),
+ 'addonType' => $addon['Addon']['addontype_id'],
+ 'allPlatforms' => $platforms,
+ 'buttonMessage' => $buttonMessage
+ );
+ echo $this->renderElement('install', $_install_render_options);
+ ?>
+
+ <?=$html->link(_('a_cancel_installation'), "/addon/{$addon['Addon']['id']}");?>
+ <?php }?>
+ </div>
+ <!-- /#content-policy -->
- <p class="policy-link"><?=$html->link(sprintf(_('addon_review_a_back_to_addon_x'), $addon['Translation']['name']['string']), '/addon/'.$addon['Addon']['id']); ?></p>
+ <div class="vex"><span><!-- bottom edge --></span></div>
</div>
-<!-- /#primary -->
+<!-- /#addon-summary -->
+ <p><?=$html->link(sprintf(_('addon_review_a_back_to_addon_x'), $addon['Translation']['name']['string']), '/addon/'.$addon['Addon']['id']); ?></p>
+</div>
+<!-- /#main-content -->
-<script type="text/javascript">
-$( function() {
- if (window.location.href.match(/confirmed/)) {
- var bt = $("div#content").find('.install-button a');
- var href = $(bt).attr('href');
- if (href)
- if (href.match(/collection_id/)) {
- $(bt).attr('href', href + "&confirmed");
- } else {
- $(bt).attr('href', href + "?confirmed");
- }
+</div>
+<!-- /#content -->
- var onclick = $(bt).attr('onclick');
- if (onclick && onclick.match(/\.xml'\);$/))
- $(bt).attr('onclick', onclick.replace(/\.xml'\);$/, ".xml?confirmed');"));
- }
- });
-</script>
diff --git a/site/app/views/addons/recommended.thtml b/site/app/views/addons/recommended.thtml
index ab27e5a..7d578e9 100644
--- a/site/app/views/addons/recommended.thtml
+++ b/site/app/views/addons/recommended.thtml
@@ -36,29 +36,39 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
+?>
-$this->layout = 'amo2009';
+<div id="content">
+ <?=$this->renderElement('search')?>
+ <?=$this->renderElement('sidebar', array('pitch' => true))?>
+ <?=$this->renderElement('app_chooser')?>
+
+ <div id="content-main">
-?>
+<?=$this->renderElement('extendfirefox')?>
-<div class="secondary" role="complementary">
- <?=$this->renderElement('amo2009/categories')?>
-</div>
+<p><?=_('addons_recommended_introduction')?></p>
-<div class="primary" role="main">
- <?=$this->renderElement('amo2009/search')?>
- <div>
- <?=_('addons_recommended_introduction')?>
- </div>
- <div class="featured listing">
- <div class="featured-inner">
- <div class="listing-header">
- </div> <!-- listing-header -->
+<ul id="addon-listing">
<?php
-foreach ($addons as $addon) {
- echo $this->renderElement('amo2009/homepage_addon', array('group'=>'recommended', 'addon' => $addon));
-}
+foreach ($addons as $addon):
+ // prepare preview image
+ $prevPath = $this->controller->Image->getHighlightedPreviewURL($addon['Addon']['id']);
+ // prepare icon
+ $iconPath = $this->controller->Image->getAddonIconURL($addon['Addon']['id']);
+
+ echo $this->renderElement('addon_listitem', array(
+ 'addon' => $addon,
+ 'addonIconPath' => $iconPath,
+ 'addonPreviewPath' => $prevPath,
+ ));
?>
- </div> <!-- featured-inner -->
- </div> <!-- featured listing -->
-</div> <!-- primary -->
+
+<? endforeach; ?>
+</ul>
+
+ </div>
+ <!-- /#content-main -->
+</div>
+<!-- /#content -->
+
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 -->
diff --git a/site/app/views/addons/themes_landing.thtml b/site/app/views/addons/themes_landing.thtml
index f6af812..431d435 100644
--- a/site/app/views/addons/themes_landing.thtml
+++ b/site/app/views/addons/themes_landing.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
@@ -37,39 +36,98 @@
*
* ***** 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_THEME, 0)))?>
- </div><!-- /.stand-alone-options -->
-<div class="primary" role="main">
+<div id="content" class="landing browse">
+
+<?=$this->renderElement('search', array('category' => array(ADDON_THEME, 0)))?>
+
+<div id="content-main">
+
<?php if (!empty($featureAddons)): ?>
- <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 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) */ ?>
+
+ <?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 endif; /* !empty($featureAddons) */ ?>
-</div><!-- /.primary -->
+ <?php endforeach; ?>
+ </div><!-- /#secondaries -->
+ <?php endif; /* !empty(random) */ ?>
-<div class="secondary" role="navigation">
- <h3 class="compact"><?=$html->link(_('themes_landing_browse_themes'), "/browse/type:".ADDON_THEME."/cat:all?sort=name", array('class'=>'view'))?></h3>
+ <div id="content-extra">
+ <div class="more-addons">
+ <h3><?=$html->link(_('themes_landing_browse_themes'),
+ "/browse/type:".ADDON_THEME."/cat:all?sort=name",
+ array('class'=>'view'))?></h3>
+ <ol class="browse-list">
+ <li><?=$html->link(_('themes_landing_all_themes'), "/browse/type:".ADDON_THEME."/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><!-- /#content-extra -->
+</div><!-- /#content-main -->
- <ul class="highlight">
- <li><?=$html->link(_('themes_landing_all_themes'), "/browse/type:".ADDON_THEME."/cat:all?sort=name")?></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>
-</div><!-- /.secondary -->
+<?=$this->renderElement('sidebar', array('highlight' => array(ADDON_THEME, 0)))?>
+<?=$this->renderElement('app_chooser')?>
+</div><!-- /#content -->
diff --git a/site/app/views/addons/versions.thtml b/site/app/views/addons/versions.thtml
index 231756a..7a0c7ae 100644
--- a/site/app/views/addons/versions.thtml
+++ b/site/app/views/addons/versions.thtml
@@ -35,110 +35,88 @@
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
- * ***** END LICENSE BLOCK ***** */
-
-$this->viewVars['bodyclass'] = 'inverse';
-$this->layout = 'amo2009';
-
-$addonIconPath = $this->controller->Image->getAddonIconURL($addon['Addon']['id']);
+ * ***** END LICENSE BLOCK ***** */
?>
-<div class="section" id="version-history">
- <div class="stand-alone-options">
- <?=$this->renderElement('amo2009/categories')?>
- <?=$this->renderElement('amo2009/search')?>
- </div>
- <div class="primary" role="main">
- <?=$this->renderElement('amo2009/breadcrumbs')?>
-
- <h2><?=$subpagetitle?></h2>
-
- <div id="latest-version-container" class="featured listing"
- style="display:none;">
- </div>
-
- <?php
- echo $this->renderElement('notification', array(
- 'type' => 'warning',
- 'msg' => ___('addons_versions_careful'),
- 'description' => ___('addons_versions_careful_introduction')
- ));
- ?>
-
- <div class="featured listing">
- <?php
- foreach ($versions as $version):
- $_version_data = array(
- 'addonid' => $addon['Addon']['id'],
- 'version' => $version['Version']['version'],
- 'created' => $version['Version']['created'],
- 'fileSize' => $version['File'][0]['size'],
- 'license_id' => $version['Version']['license_id']
- );
-
- $addon['File'] = $version['File'];
- $addon['compatible_apps'] = $version['Compatibility'];
+<div id="content">
+ <?=$this->renderElement('search')?>
+ <?=$this->renderElement('sidebar', array('pitch' => true))?>
+ <?=$this->renderElement('app_chooser')?>
- // determine add-on flags
- global $experimental_status;
- $flags = array();
- if (in_array($version['File'][0]['status'], $experimental_status))
- $flags[] = 'experimental';
- ?>
- <div class="item oldversion <?=implode(' ', $flags)?>" id="version-<?=$_version_data['version']?>">
- <?=$this->renderElement('amo2009/install', array(
- 'flags' => $flags,
- 'addon' => $addon,
- 'is_latest' => false
- ))?>
- <h3><?=$this->renderElement('amo2009/addon_version_detail', $_version_data)?></h3>
+ <div id="content-main">
+ <h3><?=$subpagetitle ?></h3>
+ <div id="latest-version-container">
+ </div>
- <?=$this->renderElement('app_compatibility', array('compatible_apps' => $version['Compatibility'])); ?>
+<h3><?=_('addons_versions_history')?></h3>
+
+<div class="error-notice">
+<h3><?=_('addons_versions_careful')?></h3>
+<p><?=_('addons_versions_careful_introduction')?></p>
+</div>
- <p<?=$version['Translation']['releasenotes']['locale_html']?>>
- <?=nl2br($version['Translation']['releasenotes']['string'])?></p>
- <?php
- $show_license = isset($_version_data['license_id']);
- $show_source = $addon['Addon']['viewsource'] == 1 && $this->controller->Session->check('User');
- if ($show_license || $show_source) {
- echo '<ul class="legal">';
-
- if ($show_license) {
- $license_name = $this->controller->License->getName($_version_data['license_id']);
- $license_link = $html->link($license_name, '/versions/license/'.$version['Version']['id']);
- echo '<li class="license">'
- .___('addons_display_header_license').' '
- .$license_link
- .'</li>';
- }
-
- if ($show_source) {
- echo '<li class="source">'
- .$html->link(_('addons_display_view_source'),
- "/files/browse/{$version['File'][0]['id']}")
- .'</li>';
- }
- echo '</ul>';
- }
+<?php
+foreach ($versions as $version):
+ $_version_data = array(
+ 'addonid' => $addon['Addon']['id'],
+ 'version' => $version['Version']['version'],
+ 'created' => $version['Version']['created'],
+ 'fileSize' => $version['File'][0]['size']
+ );
+
+ // show "experimental" flag for non-public versions
+ if ($version['File'][0]['status'] == STATUS_PUBLIC) {
+ $flag = '';
+ $box_extraclass = '';
+ } else {
+ $flag = _('addon_listitem_flag_experimental');
+ $box_extraclass = 'exp';
+ }
+?>
+<div class="addon oldversion <?=$box_extraclass?>" id="version-<?=$_version_data['version']?>">
+ <? if (!empty($flag)) echo '<h5 class="flag">'.$flag.'</h5>'; ?>
+ <h3><?=$this->renderElement('addon_version_detail', $_version_data)?></h3>
+ <?=$this->renderElement('app_compatibility', array('compatible_apps' => $version['Compatibility'])); ?>
- ?>
+ <p<?=$version['Translation']['releasenotes']['locale_html']?>>
+ <?=nl2br($version['Translation']['releasenotes']['string'])?>
+ </p>
- </div>
- <?php endforeach; ?>
- </div><!-- /listing -->
+ <?php
+ $_install_render_options = array(
+ 'addonIconPath' => $addonIconPath,
+ 'addonName' => $addon['Translation']['name']['string'],
+ 'addonId' => $addon['Addon']['id'],
+ 'addonFiles' => $version['File'],
+ 'addonEULA' => $addon['Translation']['eula']['string'],
+ 'addonStatus' => $addon['Addon']['status'],
+ 'addonType' => $addon['Addon']['addontype_id'],
+ 'allPlatforms' => $platforms,
+ 'compatible_apps'=> $version['Compatibility']
+ );
+ echo $this->renderElement('install', $_install_render_options);
+ ?>
+ <p>
+ <?php
+ if ($addon['Addon']['viewsource'] == 1 && $this->controller->Session->check('User')) {
+ echo '<p>';
+ echo $html->link(_('addons_display_view_source'), "/files/browse/{$version['File'][0]['id']}");
+ echo '</p>';
+ }
+ ?>
+ </p>
- <p><?=$html->link(sprintf(_('addon_review_a_back_to_addon_x'), $addon['Translation']['name']['string']), "/addon/{$addon['Addon']['id']}");?></p>
+ <div class="vex"><span><!-- bottom edge --></span></div>
+</div>
+<?php endforeach; ?>
- </div><!-- primary -->
+<p><?=$html->link(sprintf(_('addon_review_a_back_to_addon_x'), $addon['Translation']['name']['string']), "/addon/{$addon['Addon']['id']}");?></p>
-</div><!-- /section -->
+ </div>
+</div>
<script type="text/javascript">
- $(document).ready(function() {
- if (gIsFirefox) {
- addons_history.init();
- addons_history.createLatestVersionElement("<?php
- echo addslashes(___('addon_versions_getlatestversion'))
- ?>", "<?=addslashes(APP_PRETTYNAME)?>");
- }
- });
+ <?php $latest_text = ___('addon_versions_getlatestversion', 'The most recent version compatible with %1$s (%2$s)'); ?>
+ setTimeout(function() {
+ if(gLatestVersionID != null) createLatestVersionElement("<?=$latest_text ?>", "<?=APP_PRETTYNAME?>");
+ }, 0);
</script>
diff --git a/site/app/views/admin/addons.thtml b/site/app/views/admin/addons.thtml
index c961d8f..b96aed5 100644
--- a/site/app/views/admin/addons.thtml
+++ b/site/app/views/admin/addons.thtml
@@ -50,13 +50,15 @@
<p><i>Enter at least 4 characters of an add-on's name for auto-completion, or enter an add-on ID in brackets (e.g. [2848])</i></p>
<script language="JavaScript" type="text/javascript">
+ function formatItem(row) {
+ return '<b>' + row[0] + '</b><br><i>' + row[1] + '</i>';
+ }
+ function formatValue(row) {
+ return row[2];
+ }
+
$(document).ready(function() {
- $('#addon-name').autocomplete("<?=$html->url('/admin/addonLookup')?>",
- {
- minChars: 4,
- formatItem: function(row) { return '<b>' + row[0] + '</b><br><i>' + row[1] + '</i>'; },
- formatResult: function(row) { return row[2]; }
- });
+ $('#addon-name').autocomplete("<?=$html->url('/admin/addonLookup')?>", { minChars: 4, formatItem: formatItem, formatValue: formatValue });
});
</script>
diff --git a/site/app/views/admin/addons_status.thtml b/site/app/views/admin/addons_status.thtml
index 4c1f122..01ccc45 100644
--- a/site/app/views/admin/addons_status.thtml
+++ b/site/app/views/admin/addons_status.thtml
@@ -58,7 +58,7 @@
if (!empty($version['File'])) {
echo '<ul>';
foreach ($version['File'] as $file) {
- echo "<li> File ".$html->link($file['File']['id'], '/files/browse/'.$file['File']['id']).": {$platforms[$file['Platform']['id']]} - ";
+ echo "<li> File {$file['File']['id']}: {$platforms[$file['Platform']['id']]} - ";
echo $html->hidden('File/id][', array('value' => $file['File']['id']));
echo $html->selectTag('File/status][', $fileStatuses, $file['File']['status'], null, null, false);
echo ' | '.$html->link('Recalc Hash', '/admin/addons/hash/'.$addon['Addon']['id'].'/'.$file['File']['id'], array('title' => $file['File']['hash']));
diff --git a/site/app/views/admin/features.thtml b/site/app/views/admin/features.thtml
index 0eaed0c..351fadf 100644
--- a/site/app/views/admin/features.thtml
+++ b/site/app/views/admin/features.thtml
@@ -112,13 +112,15 @@
<p><i>(yyyy-mm-dd or blank for NOW()+6 months)</i></p>
</div>
<script language="JavaScript" type="text/javascript">
+ function formatItem(row) {
+ return '<b>' + row[0] + '</b><br><i>' + row[1] + '</i>';
+ }
+ function formatValue(row) {
+ return row[2];
+ }
+
$(document).ready(function() {
- $('#addon-name').autocomplete("<?=$html->url('/admin/addonLookup?s=4')?>",
- {
- minChars: 4,
- formatItem: function(row) { return '<b>' + row[0] + '</b><br><i>' + row[1] + '</i>'; },
- formatResult: function(row) { return row[2]; }
- });
+ $('#addon-name').autocomplete("<?=$html->url('/admin/addonLookup?s=4')?>", { minChars: 4, formatItem: formatItem, formatValue: formatValue });
});
</script>
<?=$html->submit('Add', array('name' => 'add'))?>
diff --git a/site/app/views/admin/flagged_queue.thtml b/site/app/views/admin/flagged_queue.thtml
index 7e6a5dc..4cc3941 100644
--- a/site/app/views/admin/flagged_queue.thtml
+++ b/site/app/views/admin/flagged_queue.thtml
@@ -47,50 +47,35 @@
echo '<div class="greenNotice"><b>'.$unflagged.'</b> add-ons unflagged.</div>';
echo $html->formTag('/admin/flagged');
?>
-<table width="100%" id="flagged">
+<table width="100%">
<tr class="queueHeader">
<td>&nbsp;</td>
<td><?=_('editors_th_addon')?></td>
- <td>Review</td>
<td>Flagged on</td>
<td>Flagged by</td>
<td>Comments</td>
</tr>
<?php
-if (!empty($addons)):
- $i = 0;
- foreach ($addons as &$addon):
+ if (!empty($addons)) {
+ $i = 0;
+ foreach ($addons as $addon) {
+ echo '<tr'.($i % 2 == 1 ? ' bgcolor="#eeeeff"' : '').'>';
+ echo '<td><input type="checkbox" name="data[Addon][unflag][]" value="'.$addon['Addon']['id'].'"></td>';
+ echo '<td>'.$html->link($addon['Translation']['name']['string'].' '.$addon['Version']['version'], '/editors/review/'.$addon['Version']['id']).'</td>';
+ echo "<td>{$addon['Approval']['created']}</td>";
+ echo "<td>{$addon['User']['firstname']} {$addon['User']['lastname']}</td>";
+ echo "<td>{$addon['Approval']['comments']}</td>";
+ echo '</tr>';
+ $i++;
+ }
+ echo '</table>';
+ echo '<input type="submit" value="Unflag Selected Add-ons">';
+ }
+ else {
+ echo '<tr><td colspan=8 class="emptyQueue">'._('editors_notice_none_found').'</td></tr>';
+ echo '</table>';
+ }
?>
- <tr<?=(++$i % 2 ? '' : ' class="even"')?>>
- <td><input type="checkbox" name="data[Addon][unflag][]" value="<?=$addon['Addon']['id']?>"/></td>
- <td><?=sprintf('%1$s %2$s', $html->link($addon['Translation']['name']['string'], '/admin/addons/status/'.$addon['Addon']['id'])
- , (!empty($addon['Version'])?' '.$addon['Version']['version']:''))?></td>
-
- <?php if (!empty($addon['Version'])): ?>
- <td><?=$html->link($html->image('developers/admin_review.png', 'width="16" height="16" alt="review version"'),
- '/editors/review/'.$addon['Version']['id'], array('title'=>'review flagged add-on version'))?></td>
- <?php else: ?>
- <td>&nbsp;</td>
- <?php endif; ?>
-
- <?php if (!empty($addon['Approval'])): ?>
- <td><?=$addon['Approval']['created']?></td>
- <td><?=$addon['User']['firstname'].' '.$addon['User']['lastname']?></td>
- <td><?=$addon['Approval']['comments']?></td>
- <?php else: ?>
- <td colspan="3">&nbsp;</td>
- <?php endif; ?>
- </tr>
-<?php endforeach; ?>
-</table>
-<p><input type="submit" value="Unflag Selected Add-ons"/></p>
-
-<?php else: ?>
- <tr><td colspan=8 class="emptyQueue"><?=_('editors_notice_none_found')?></td></tr>
-</table>
-
-<?php endif; ?>
-
</form>
</div> <!-- corner-box -->
</div> <!-- content-right -->
diff --git a/site/app/views/admin/groups.thtml b/site/app/views/admin/groups.thtml
index 5d757c0..82373ac 100644
--- a/site/app/views/admin/groups.thtml
+++ b/site/app/views/admin/groups.thtml
@@ -74,11 +74,7 @@
</div>
<script language="JavaScript" type="text/javascript">
$(document).ready(function() {
- $('#group<?=$gid?>_new').autocomplete("<?=$html->url('/admin/userLookup')?>",
- {
- minChars: 4,
- formatItem: function(row) { return '<b>' + row[0] + '</b><br><i>' + row[1] + '</i>'; }
- });
+ $('#group<?=$gid?>_new').autocomplete("<?=$html->url('/admin/userLookup')?>", { minChars: 4, formatItem: formatItem });
});
</script>
</form>
@@ -91,3 +87,9 @@
<?=$html->link('Create Group', '/admin/groups/create')?>
</div>
</div>
+
+<script language="JavaScript" type="text/javascript">
+ function formatItem(row) {
+ return '<b>' + row[0] + '</b><br><i>' + row[1] + '</i>';
+ }
+</script>
diff --git a/site/app/views/admin/summary.thtml b/site/app/views/admin/summary.thtml
index 30c8c46..f6f9fdd 100644
--- a/site/app/views/admin/summary.thtml
+++ b/site/app/views/admin/summary.thtml
@@ -84,21 +84,10 @@
<tr>
<td class="heading" colspan=2>Total Counts</td>
</tr>
- <tr>
- <td class="title">Extensions</td>
- <td class="value"><?=$count['extensions'][0][0]['COUNT(*)']?></td>
- </tr>
- <tr>
- <td class="title">Themes</td>
- <td class="value"><?=$count['themes'][0][0]['COUNT(*)']?></td>
- </tr>
- <tr>
- <td class="title">Dictionaries</td>
- <td class="value"><?=$count['dictionaries'][0][0]['COUNT(*)']?></td>
- </tr>
- <tr>
- <td class="title">Search Plugins</td>
- <td class="value"><?=$count['searchengines'][0][0]['COUNT(*)']?></td>
+
+ <tr>
+ <td class="title">Activities</td>
+ <td class="value"><?=$count['activities'][0][0]['COUNT(*)']?></td>
</tr>
<tr>
<td class="title">Current Sessions</td>
diff --git a/site/app/views/admin/users_edit.thtml b/site/app/views/admin/users_edit.thtml
index ae76037..fd49a27 100644
--- a/site/app/views/admin/users_edit.thtml
+++ b/site/app/views/admin/users_edit.thtml
@@ -36,21 +36,6 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-
-
-/* Prepare translation box element */
-// Retrieve language arrays from bootstrap.
-global $valid_languages, $native_languages;
-foreach (array_keys($valid_languages) as $key) {
- $languages[$key] = $native_languages[$key]['native'];
-}
-ksort($languages);
-$this->translationBox = array(
- 'defaultLocale' => LANG,
- 'languages' => $languages,
- 'table' => 'User',
- 'loaded' => false
-);
?>
<div id="content">
<?=$this->renderElement('developers/adminmenu');?>
@@ -102,19 +87,6 @@ $this->translationBox = array(
</div>
<div>
- <?php
- echo $this->renderElement('translationbox', array(
- 'field' => 'bio',
- 'translations' => $translations['bio'],
- 'height' => '100',
- 'maxLength' => '500',
- 'displayName' => ___('user_form_bio'),
- 'description' => ___('user_form_bio_description'),
- ));
- ?>
- </div>
-
- <div>
<label for="UserConfirmationCode">Confirmation Code</label>
<?=$html->input('User/confirmationcode', array('value' => $user['User']['confirmationcode'])) ?>
</div>
diff --git a/site/app/views/api/api_addon.thtml b/site/app/views/api/api_addon.thtml
index a1dcf4c..077f91b 100644
--- a/site/app/views/api/api_addon.thtml
+++ b/site/app/views/api/api_addon.thtml
@@ -39,7 +39,7 @@
$addonIconPath = ($addon['Addon']['addontype_id'] == ADDON_THEME ? $html->urlImage(DEFAULT_THEME_ICON) : $html->urlImage(DEFAULT_ADDON_ICON));
}
- $amo = 'https://addons.mozilla.org';
+ $amo = SSITE_URL;
?>
<addon>
<?php
diff --git a/site/app/views/api/collections_feed.thtml b/site/app/views/api/collections_feed.thtml
index 3e856ff..ab31e7d 100644
--- a/site/app/views/api/collections_feed.thtml
+++ b/site/app/views/api/collections_feed.thtml
@@ -54,7 +54,7 @@ if (isset($error)) { ?>
$addonIconPath = ($addon['addontype_id'] == ADDON_THEME ? $html->urlImage(DEFAULT_THEME_ICON) : $html->urlImage(DEFAULT_ADDON_ICON));
}
- $amo = 'https://addons.mozilla.org';
+ $amo = SSITE_URL;
?>
<addon>
<meta>
diff --git a/site/app/views/api/email/recommend_email_plain.thtml b/site/app/views/api/email/recommend_email_plain.thtml
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/site/app/views/api/email/recommend_email_plain.thtml
diff --git a/site/app/views/api/recommend_email.thtml b/site/app/views/api/recommend_email.thtml
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/site/app/views/api/recommend_email.thtml
diff --git a/site/app/views/collections/display.thtml b/site/app/views/collections/display.thtml
new file mode 100644
index 0000000..5c59c14
--- /dev/null
+++ b/site/app/views/collections/display.thtml
@@ -0,0 +1,86 @@
+<?php
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is addons.mozilla.org site.
+ *
+ * The Initial Developer of the Original Code is
+ * The Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Ryan Doherty <rdoherty@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
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+?>
+
+
+
+<div id="content" class="collections">
+<?=$this->renderElement('search');?>
+<div id="content-main" class="full">
+ <ul class="nav">
+ <li><a href="<?=$html->url('/collections/display/'.$collection['Collection']['id'].'?format=rss')?>">Subscribe</a></li>
+ <li><a href="<?=$html->url('/collections')?>">Back to Feeds</a></li>
+ </ul>
+
+ <h3 class="title"><?php echo $collection['Translation']['name']['string']; ?></h3>
+ <h4><?php echo $collection['Translation']['description']['string']; ?></h4>
+
+<form action="<?=$html->url('/collections/install')?>" method="post" id="collectionform">
+
+<ul class="addon-listing collections-web">
+ <?php
+ foreach ($addons as $val) {
+ $prevPath = $this->controller->Image->getHighlightedPreviewURL($val['Addon']['id']);
+ $iconPath = $this->controller->Image->getAddonIconURL($val['Addon']['id']);
+ echo $this->renderElement('collections_interactive_addon', array(
+ 'addon' => $val,
+ 'addonIconPath' => $iconPath,
+ 'addonPreviewPath' => $prevPath,
+ 'showDate' => true
+ ));
+ }
+?>
+
+<div class="installsubmit"><input type="submit" value="Install my Add-ons!"/></div>
+
+</form>
+
+<div id="installdialog" class="jqmWindow" style="display:none">Please wait...</div>
+<script type="text/javascript">
+// <![CDATA[
+ $(document).ready(function() {
+ $('.collections').collection({'installUrl':"<?=$html->url('install/ajax')?>", 'shoppingCart':true});
+ });
+ // ]]>
+ </script>
+
+</div><!-- /#content-main -->
+
+<?=$this->renderElement('sidebar')?>
+<?=$this->renderElement('app_chooser')?>
+</div><!-- /#content --> \ No newline at end of file
diff --git a/site/app/views/collections/index.thtml b/site/app/views/collections/index.thtml
new file mode 100644
index 0000000..f03c23f
--- /dev/null
+++ b/site/app/views/collections/index.thtml
@@ -0,0 +1,48 @@
+<?php
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is addons.mozilla.org site.
+ *
+ * The Initial Developer of the Original Code is
+ * The Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Ryan Doherty <rdoherty@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
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+?>
+<div id="content" class="collections">
+<?=$this->renderElement('search');?>
+<div id="content-main" class="full">
+
+
+</div><!-- /#content-main -->
+
+<?=$this->renderElement('sidebar')?>
+<?=$this->renderElement('app_chooser')?>
+</div><!-- /#content --> \ No newline at end of file
diff --git a/site/app/views/compatibility/dashboard.thtml b/site/app/views/compatibility/dashboard.thtml
index bfc3595..035727c 100644
--- a/site/app/views/compatibility/dashboard.thtml
+++ b/site/app/views/compatibility/dashboard.thtml
@@ -21,7 +21,6 @@
*
* Contributor(s):
* Justin Scott <fligtar@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,11 +35,8 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-
-$this->viewVars['bodyclass'] = 'inverse';
-
?>
-<div id="content" class="primary prose" style="min-height: 400px;">
+<div id="content" style="min-height: 400px;">
<div id="compat-home-nav">
<a href="#" onclick="compatibility.viewHome(); return false;"><?=___('compatibility_dashboard_main_link', 'Back to Main')?></a>
</div>
@@ -57,12 +53,20 @@ $this->viewVars['bodyclass'] = 'inverse';
</div>
<div id="report-intro">
+ <?php
+ $percentages = array(
+ COMPAT_OTHER => (($totals[COMPAT_OTHER]['adu'] / $totals['adu95']) * 100),
+ COMPAT_ALPHA => (($totals[COMPAT_ALPHA]['adu'] / $totals['adu95']) * 100),
+ COMPAT_BETA => (($totals[COMPAT_BETA]['adu'] / $totals['adu95']) * 100),
+ COMPAT_LATEST => (($totals[COMPAT_LATEST]['adu'] / $totals['adu95']) * 100),
+ );
+ ?>
<div class="header">
<div class="title">
<?=$html->image('wordmarks/firefox-'.$version.'_small.png', array('alt' => APP_PRETTYNAME." {$version}"))?><?=___('compatibility_report_title', 'Add-on Compatibility Report')?>
</div>
</div>
- <p class="intro"><?=sprintf(___('compatibility_report_intro', 'Of the %1$s add-ons that make up 95&#37; of add-on usage known to Mozilla, <b>%2$s&#37;</b> are currently considered compatible with the latest builds of %3$s.'), $html->number_format($totals['addons95']), round($percentages[COMPAT_LATEST]), APP_PRETTYNAME." {$version}")?></p>
+ <p class="intro"><?=sprintf(___('compatibility_report_intro', 'Of the %1$s add-ons that make up 95&#37; of add-on usage known to Mozilla, <b>%2$s&#37;</b> are currently considered compatible with the latest builds of %3$s.'), number_format($totals['addons95']), round($percentages[COMPAT_LATEST]), APP_PRETTYNAME." {$version}")?></p>
<div id="overall-compat">
<div id="overall-compat-bar">
<div class="compat-other" style="width: <?=$percentages[COMPAT_OTHER]?>%;"><?=($percentages[COMPAT_OTHER] >= 5 ? round($percentages[COMPAT_OTHER]).'%': '')?></div>
diff --git a/site/app/views/compatibility/developers.thtml b/site/app/views/compatibility/developers.thtml
index 45af4ee..c79e5e1 100644
--- a/site/app/views/compatibility/developers.thtml
+++ b/site/app/views/compatibility/developers.thtml
@@ -21,7 +21,6 @@
*
* Contributor(s):
* Justin Scott <fligtar@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
@@ -37,9 +36,8 @@
*
* ***** END LICENSE BLOCK ***** */
if ($format != 'ajax') {
-$this->viewVars['bodyclass'] = 'inverse';
?>
-<div id="content" class="primary prose" style="min-height: 400px;">
+<div id="content" style="min-height: 400px;">
<h2><?=___('compatibility_developer_info', 'Information for Add-on Developers')?></h2>
<?=$localization->includeLocalPage('compatibility_developer_tips', array(
APP_PRETTYNAME." {$version}",
diff --git a/site/app/views/compatibility/report.thtml b/site/app/views/compatibility/report.thtml
index f84024f..c97f37d 100644
--- a/site/app/views/compatibility/report.thtml
+++ b/site/app/views/compatibility/report.thtml
@@ -21,7 +21,6 @@
*
* Contributor(s):
* Justin Scott <fligtar@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
@@ -37,9 +36,8 @@
*
* ***** END LICENSE BLOCK ***** */
if ($format != 'ajax'):
-$this->viewVars['bodyclass'] = 'inverse';
?>
-<div id="content" class="primary prose" style="min-height: 400px;">
+<div id="content" style="min-height: 400px;">
<h2><?=___('compatibility_dashboard_report', 'Add-on Compatibility Report')?></h2>
<?php endif; ?>
<p class="intro"><?=___('compatibility_report_detail_intro', 'The add-ons below make up 95% of add-on usage known to Mozilla and are ordered by their usage size.')?></p>
@@ -71,4 +69,4 @@ $this->viewVars['bodyclass'] = 'inverse';
</table>
<?php if ($format != 'ajax'): ?>
</div>
-<?php endif; ?>
+<?php endif; ?> \ No newline at end of file
diff --git a/site/app/views/compatibility/users.thtml b/site/app/views/compatibility/users.thtml
index b214dad..0cc8b87 100644
--- a/site/app/views/compatibility/users.thtml
+++ b/site/app/views/compatibility/users.thtml
@@ -21,7 +21,6 @@
*
* Contributor(s):
* Justin Scott <fligtar@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,9 +35,8 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-$this->viewVars['bodyclass'] = 'inverse';
?>
-<div id="content" class="primary prose" style="min-height: 400px;">
+<div id="content" style="min-height: 400px;">
<h2><?=___('compatibility_user_info', 'Information for Add-on Users')?></h2>
<?=$localization->includeLocalPage('compatibility_user_tips', array(
APP_PRETTYNAME." {$version}",
@@ -49,4 +47,4 @@ $this->viewVars['bodyclass'] = 'inverse';
$html->url('/'),
APP_PRETTYNAME
))?>
-</div>
+</div> \ No newline at end of file
diff --git a/site/app/views/developers/add_step0.thtml b/site/app/views/developers/add_step0.thtml
new file mode 100644
index 0000000..d0ea92e
--- /dev/null
+++ b/site/app/views/developers/add_step0.thtml
@@ -0,0 +1,64 @@
+<?php
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is addons.mozilla.org site.
+ *
+ * The Initial Developer of the Original Code is
+ * Justin Scott <fligtar@gmail.com>.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Frederic Wenzel <fwenzel@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
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+?>
+<div id="content">
+ <?=$this->renderElement('developers/additem');?>
+
+ <div id="content-main">
+
+ <h3><?=sprintf(_('devcp_header_developer_agreement'))?></h3>
+
+ <?php
+ echo $html->formTag('/developers/add');
+ echo $html->hidden('Addon/add_step0');
+ ?>
+ <div id="developerAgreement">
+ <p>
+ <?=_('devcp_review_agreement_please')?>
+ </p>
+ <blockquote>
+ <?=$localization->includeLocalPage('developer_agreement')?>
+ </blockquote>
+ <div class="buttonBox" id="agreementButtons">
+ <input type="button" class="cancel" value="<?=_('devcp_submit_decline_dev_agreement')?>" onClick="window.location='<?=$html->url('/developers')?>';">
+ <?=$html->submit(_('devcp_submit_accept_dev_agreement'), array('name' => 'accept'))?>
+ </div>
+ </div>
+ </form>
+ </div>
+</div>
diff --git a/site/app/views/developers/add_step1.thtml b/site/app/views/developers/add_step1.thtml
new file mode 100644
index 0000000..228efb3
--- /dev/null
+++ b/site/app/views/developers/add_step1.thtml
@@ -0,0 +1,134 @@
+<?php
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is addons.mozilla.org site.
+ *
+ * The Initial Developer of the Original Code is
+ * Justin Scott <fligtar@gmail.com>.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Wil Clouser <wclouser@mozilla.com>
+ * Frederic Wenzel <fwenzel@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
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+?>
+<div id="content">
+ <?=$this->renderElement('developers/additem');?>
+
+ <div id="content-main">
+ <h3><?=sprintf('%s &bull; %s', _('devcp_header_step1'), _('devcp_header_step1_upload'))?></h3>
+
+ <?php
+ echo $html->formTag('/developers/add/'.$id, 'post', array('enctype'=>'multipart/form-data'));
+ echo $html->hidden('Addon/add_step1');
+ echo $html->hidden('Addon/newAddon', array('value' => ($newAddon == true ? 'true' : 'false')));
+ if ($newAddon == false) {
+ echo '<div class="addonName">'.$existing['Translation']['name']['string'].'</div>';
+ }
+ if (!empty($errors['main'])) {
+ echo '<div class="error">'.$errors['main'].'</div>';
+ }
+ ?>
+ <div id="developersForm">
+ <div>
+ <label for="AddonAddontypeId"><?=_('devcp_form_label_addontype')?></label>
+ <?php
+ if ($newAddon == true) {
+ echo $html->selectTag('Addon/addontype_id', $allowedAddonTypes, null, array('onChange' => 'selectType(this);'), null, false);
+ echo $html->tagErrorMsg('Addon/addontype_id', _('devcp_form_error_select_addontype'));
+ }
+ else {
+ echo $addonTypes[$existing['Addon']['addontype_id']];
+ echo $html->hidden('Addon/addontype_id', array('value' => $existing['Addon']['addontype_id']));
+ }
+ ?>
+ </div>
+ <div>
+ <label for="FileFile1"><?=_('devcp_form_label_addonfile')?></label>
+ <?=$html->file('File/file1').$html->tagErrorMsg('File/file1', $errors['File/file1'])?>
+ <div class="platforms" <?=(((!empty($existing['Addon']['addontype_id']) && $existing['Addon']['addontype_id'] == ADDON_SEARCH) || (!empty($data['Addon']['addontype_id']) && $data['Addon']['addontype_id'] == ADDON_SEARCH)) ? ' style="display: none;"' : '')?>>
+ <label for="FilePlatformId1"><?=_('devcp_form_label_platforms')?></label>
+ <?=$html->selectTag('File/platform_id1', $platforms, null, array('onChange' => 'selectPlatform(this);'), null, false)?>
+ </div>
+ </div>
+ <div id="file2"<?=(empty($data['File']['file2']['name'])) ? ' style="display: none;"' : ''?>>
+ <label for="FileFile2"><?=_('devcp_form_label_addonfile2')?></label>
+ <?=$html->file('File/file2').$html->tagErrorMsg('File/file2', $errors['File/file2'])?>
+ <div class="platforms">
+ <label for="FilePlatformId2"><?=_('devcp_form_label_platforms')?></label>
+ <?php unset($platforms[1]); ?>
+ <?=$html->selectTag('File/platform_id2', $platforms, $data['File']['platform_id2'])?>
+ </div>
+ </div>
+ <div id="file3"<?=(empty($data['File']['file3']['name'])) ? ' style="display: none;"' : ''?>>
+ <label for="FileFile3"><?=_('devcp_form_label_addonfile3')?></label>
+ <?=$html->file('File/file3').$html->tagErrorMsg('File/file3', $errors['File/file3'])?>
+ <div class="platforms">
+ <label for="FilePlatformId3"><?=_('devcp_form_label_platforms')?></label>
+ <?=$html->selectTag('File/platform_id3', $platforms, $data['File']['platform_id3'])?>
+ </div>
+ </div>
+ <div id="addrow"<?=(!empty($data['File']['platform_id1']) && $data['File']['platform_id1'] > 1 && !empty($data['Addon']['addontype_id']) && $data['Addon']['addontype_id'] != ADDON_SEARCH) ? '' : ' style="display: none;"'?>>
+ <?=$html->link(_('devcp_file_addanother'), 'javascript: void(0);', array('onClick' => 'addFile();'))?>
+ </div>
+ <?php
+ if ($newAddon == true) {
+ echo '<div>';
+ echo '<label for="FileFile4">'._('devcp_form_label_iconfile').'</label>';
+ echo $html->file('File/file4').$html->tagErrorMsg('File/file4', $errors['File/file4']);
+ echo '</div>';
+ }
+ ?>
+ <div>
+ <label for="AddonDefaultlocale"><?=_('devcp_form_label_defaultlocale')?></label>
+ <select id="AddonDefaultlocale" name="data[Addon][defaultlocale]">
+ <?php
+ foreach ($languages as $key => $language) {
+ echo '<option value="'.$key.'" '.($key == $defaultLocale ? 'selected' : '').'>'
+ .$language.'</option>';
+ }
+ ?>
+ </select>
+ </div>
+ <?php
+ if ($newAddon == false) {
+ echo '<div>';
+ $ReviewInfo['class'] = 'vmiddle';
+ echo $html->checkbox('Addon/Review', null, $ReviewInfo);
+ echo '<label for="AddonReview" class="nofloat">'._('devcp_skip_reviewing_addon_info').'</label>';
+ echo '</div>';
+ }
+ ?>
+ <div class="buttonBox">
+ <?=$html->submit(_('devcp_button_next').' &raquo;', array('escape' => false))?>
+ <?=$html->submit(_('devcp_button_cancel'), array('name' => 'cancel', 'class' => 'cancel', 'onClick' => 'return confirm(\''._('devcp_button_cancel_confirm').'\');'))?>
+ </div>
+ </div> <!-- developersForm -->
+ </form>
+ </div>
+</div>
diff --git a/site/app/views/developers/add_step2.thtml b/site/app/views/developers/add_step2.thtml
new file mode 100644
index 0000000..233e6c9
--- /dev/null
+++ b/site/app/views/developers/add_step2.thtml
@@ -0,0 +1,174 @@
+<?php
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is addons.mozilla.org site.
+ *
+ * The Initial Developer of the Original Code is
+ * Justin Scott <fligtar@gmail.com>.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Frederic Wenzel <fwenzel@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
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+?>
+<div id="content">
+ <?=$this->renderElement('developers/additem');?>
+
+ <div id="content-main">
+ <h3><?=sprintf('%s &bull; %s', _('devcp_header_step2'), _('devcp_header_step2_addondetails'))?></h3>
+
+ <?php
+ echo (!empty($mainError) ? '<div class="error_message">'.$mainError.'</div>' : '');
+ echo $html->formTag('/developers/add/'.$id);
+ echo $html->hidden('Addon/add_step2');
+ echo $html->hidden('Version/id', array('value' => $version));
+ echo $html->hidden('Addon/newAddon', array('value' => ($newAddon == true ? 'true' : 'false')));
+ if ($newAddon == false) {
+ echo '<div class="addonName">'.$existing['Translation']['name']['string'].'</div>';
+ }
+ if (!empty($errors['main'])) {
+ echo '<div class="error">'.$errors['main'].'</div>';
+ }
+ if ($defaultLocale != LANG) {
+ echo '<div class="notice"><strong>'._('error_notice').'</strong>: '.sprintf(_('devcp_notice_different_defaultlocale'), $nativeLanguages[$defaultLocale], $defaultLocale, $nativeLanguages[LANG], LANG).'</div>';
+ }
+ if (!empty($autoDetected)) {
+ ?>
+ <div class="greenNotice">
+ <?=sprintf(_('devcp_notice_autodetected_addontype'), '<b>'.$autoDetected.'</b>')?>
+ (<?=$html->link(_('devcp_question_addontype_incorrect'), 'javascript:void(0);', array('onClick' => 'showAddontypes();'))?>)
+ <div id="changeAddontype" style="display: none;">
+ <?=_('devcp_change_addontype').'&nbsp;'.$html->selectTag('Addon/addontype_id', $allowedAddonTypes, $info['Addon']['addontype_id'], array('onChange' => 'changeAddontype(this, '.$info['Addon']['addontype_id'].');'), null, false)?>
+ </div>
+ </div>
+ <?php
+ }
+ ?>
+ <div id="developersForm">
+ <div>
+ <label for="AddonName"><?=_('devcp_form_label_name')?></label>
+ <?=$html->input('Addon/name', array('value'=>$info['Addon']['name'])).
+ $html->tagErrorMsg('Addon/name', _('devcp_form_error_name_required'))?>
+ </div>
+ <div>
+ <label for="addLink"><?=_('devcp_form_label_authors')?></label>
+ <div id="authors" class="spaced">
+ <?php
+ if (!empty($info['authors'])) {
+ foreach ($info['authors'] as $id => $author) {
+ echo '<div>'.$author.' ('.$html->link(_('devcp_form_author_remove'), 'javascript:void(0);', array('onClick' => 'removeAuthor(this);')).')';
+ echo $html->hidden('User/User][', array('value' => $id)).'</div>';
+ }
+ }
+ echo $html->tagErrorMsg('User/User', $errors['User/User']);
+ ?>
+ </div>
+ </div>
+ <div id="addAuthorRow" class="spaced">
+ <?=$html->link(_('devcp_form_author_add'), 'javascript:void(0);', array('id' => 'addLink', 'onClick' => 'showAuthorForm();'))?>
+ </div>
+ <div id="newAuthorRow" style="display: none;">
+ <form>
+ <label for="AddonAuthor"><?=_('devcp_form_label_author_email')?></label>
+ <?=$html->input('Addon/Author', array('size' => 40, 'id' => 'newAuthor'))?>
+ <button type="submit" id="addButton" onClick="addAuthor('<?=$html->url('/developers/authorLookup/')?>');"><?=_('devcp_form_author_add')?></button>
+ </form>
+ </div>
+ <div>
+ <label for="TagTag"><?=_('devcp_form_label_categories')?></label>
+ <?=(!empty($tags) ? $html->selectTag('Tag/Tag', $tags['names'], $info['selectedTags'], array('multiple' => 'multiple', 'size' => 10, 'style' => 'float: left;', 'onChange' => 'updateTagDescription(this);'), null, false).
+ $html->tagErrorMsg('Tag/Tag', $errors['Tag/Tag']) : $html->hidden('Tag/noTags', array('value' => 'true'))._('devcp_form_error_categories_unavailable'))?>
+ <div id="tagDescription"></div>
+ <div id="tagNext" style="display: none;"><?=_('devcp_form_categories_nextstep')?></div>
+ </div>
+ <div id="afterDescription">
+ <label for="AddonHomepage"><?=_('devcp_form_label_homepage')?></label>
+ <?=$html->input('Addon/homepage', array('size' => 40, 'value' => $info['Addon']['homepage'])).
+ $html->tagErrorMsg('Addon/homepage', _('error_invalid_url'))?>
+ </div>
+ <div>
+ <label for="AddonSupportemail"><?=_('devcp_form_label_supportemail')?></label>
+ <?=$html->input('Addon/supportemail', array('size' => 40, 'value' => $info['Addon']['supportemail'])).
+ $html->tagErrorMsg('Addon/supportemail', _('error_email_invalid'))?>
+ </div>
+ <div>
+ <label for="AddonSupporturl"><?=_('devcp_form_label_supporturl')?></label>
+ <?=$html->input('Addon/supporturl', array('size' => 40, 'value' => $info['Addon']['supporturl'])).
+ $html->tagErrorMsg('Addon/supporturl', _('error_invalid_url'))?>
+ </div>
+ <div>
+ <label for="AddonSummary"><?=_('devcp_form_label_summary')?></label>
+ <?=$html->textarea('Addon/summary', array('value' => $info['Addon']['summary'], 'rows' => 3, 'cols' => 55, 'onBlur' => 'checkSummary(this, \''._('devcp_error_addon_field_summary_toolong').'\');')).
+ $html->tagErrorMsg('Addon/summary', _('devcp_form_error_summary_notempty'))?>
+ </div>
+ <div>
+ <label for="AddonDescription"><?=_('devcp_form_label_description')?></label>
+ <?=$html->textarea('Addon/description', array('value' => $info['Addon']['description'], 'rows' => 4, 'cols' => 55)).
+ $html->tagErrorMsg('Addon/description', _('devcp_form_error_description_notempty'))?>
+ </div>
+ <div>
+ <div>
+ <label for="AddonEula"><?=_('devcp_form_label_eula')?></label>
+ <?=$html->textarea('Addon/eula', array('value' => $info['Addon']['eula'], 'rows' => 6, 'cols' => 55))?>
+ </div>
+ <div>
+ <label for="AddonPrivacypolicy"><?=_('devcp_form_label_privacy')?></label>
+ <?=$html->textarea('Addon/privacypolicy', array('value' => $info['Addon']['privacypolicy'], 'rows' => 6, 'cols' => 55))?>
+ </div>
+ <div>
+ <?=$html->checkbox('Addon/viewsource', null, $info['Addon']['viewsource'])?>
+ <label for="AddonViewsource" class="nofloat"><?=_('devcp_form_label_allow_viewsource')?></label>
+ </div>
+ <div>
+ <?=$html->checkbox('Addon/prerelease', null, $info['Addon']['prerelease'])?>
+ <label for="AddonPrerelease" class="nofloat"><?=_('devcp_form_label_prerelease')?></label>
+ </div>
+ <div>
+ <?=$html->checkbox('Addon/sitespecific', null, $info['Addon']['sitespecific'])?>
+ <label for="AddonSitespecific" class="nofloat"><?=_('devcp_form_label_sitespecific')?></label>
+ </div>
+ <div>
+ <?=$html->checkbox('Addon/externalsoftware', null, $info['Addon']['externalsoftware'])?>
+ <label for="AddonExternalsoftware" class="nofloat"><?=_('devcp_form_label_externalsoftware')?></label>
+ </div>
+ <div class="buttonBox">
+ <?=$html->submit(_('devcp_button_next').' &raquo;', array('escape' => false))?>
+ <?=$html->submit(_('devcp_button_cancel'), array('name' => 'cancel', 'class' => 'cancel', 'onClick' => 'return confirm(\''._('devcp_button_cancel_confirm').'\');'))?>
+ </div>
+ </div> <!-- developersForm -->
+ </form>
+</div>
+</div>
+
+<script language="JavaScript" type="text/javascript">
+<?php
+ if (!empty($tags['descriptions'])) {
+ echo 'var tagDescriptions = {'.implode(',', $tags['descriptions']).'};';
+ }
+?>
+</script>
diff --git a/site/app/views/developers/add_step3.thtml b/site/app/views/developers/add_step3.thtml
new file mode 100644
index 0000000..aec591d
--- /dev/null
+++ b/site/app/views/developers/add_step3.thtml
@@ -0,0 +1,131 @@
+<?php
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is addons.mozilla.org site.
+ *
+ * The Initial Developer of the Original Code is
+ * Justin Scott <fligtar@gmail.com>.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Frederic Wenzel <fwenzel@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
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+?>
+<div id="content">
+ <?=$this->renderElement('developers/additem');?>
+
+ <div id="content-main">
+ <h3><?=sprintf('%s &bull; %s', _('devcp_header_step3'), _('devcp_header_step3_versiondetails'))?></h3>
+
+ <?php
+ echo $html->formTag('/developers/add/'.$id);
+ echo $html->hidden('Addon/add_step3');
+ echo $html->hidden('Version/id', array('value' => $version));
+ echo $html->hidden('Addon/newAddon', array('value' => ($newAddon == true ? 'true' : 'false')));
+ if ($newAddon == false) {
+ echo '<div class="addonName">'.$existing['Translation']['name']['string'].'</div>';
+ }
+ if (!empty($errors['main'])) {
+ echo '<div class="error">'.$errors['main'].'</div>';
+ }
+ if ($defaultLocale != LANG) {
+ echo '<div class="notice"><strong>'._('error_notice').'</strong>: '.sprintf(_('devcp_notice_different_defaultlocale'), $nativeLanguages[$defaultLocale], $defaultLocale, $nativeLanguages[LANG], LANG).'</div>';
+ }
+ if (!empty($showFirefoxVersionNotice) && $showFirefoxVersionNotice == true) {
+ echo '<div class="notice">'.sprintf(_('devcp_additem_firefox_notice'), $this->controller->Config->getValue('firefox_notice_version'), $this->controller->Config->getValue('firefox_notice_url')).'</div>';
+ }
+
+ ?>
+ <div id="developersForm">
+ <div>
+ <label><?=_('devcp_form_label_version')?></label>
+ <?=$info['Version']['version']?>
+ </div>
+ <div>
+ <label><?=_('devcp_form_label_files')?></label>
+ <div class="spaced">
+ <?php
+ foreach ($info['files'] as $file) {
+ echo $file['File']['filename'].' ('.sprintf(_('size_kb'), $file['File']['size']).') - '.$platforms[$file['Platform']['id']].'<br>';
+ }
+ ?>
+ </div>
+ </div>
+ <div>
+ <label><?=_('devcp_form_label_target_applications')?></label>
+ <div class="spaced">
+ <?php
+ if (!empty($info['targetapps'])) {
+ foreach ($info['targetapps'] as $app) {
+ echo $app['translations']['localized_string'].' '.$app['min']['version'].' - '.$app['max']['version'].'<br>';
+ }
+ }
+ else {
+ echo _('devcp_form_no_target_apps');
+ }
+ ?>
+ </div>
+ </div>
+ <div>
+ <label for="VersionReleasenotes"><?=_('devcp_form_label_versionnotes')?></label>
+ <?=$html->textarea('Version/releasenotes', array('rows' => 3, 'cols' => 55)).
+ $html->tagErrorMsg('Addon/releasenotes', $errors['Version/releasenotes'])?>
+ </div>
+ <div>
+ <label for="VersionApprovalnotes"><?=_('devcp_form_reviewernotes')?></label>
+ <?=$html->textarea('Version/approvalnotes', array('rows' => 3, 'cols' => 55))?>
+ </div>
+ <?php
+ if (!empty($tags)) {
+ ?>
+ <div>
+ <label for="TagTag"><?=_('devcp_form_label_categories')?></label>
+ <?=$html->selectTag('Tag/Tag', $tags['names'], null, array('multiple' => 'multiple', 'size' => 10, 'style' => 'float: left;'), null, false)?>
+ </div>
+ <?php
+ }
+ if ($existing['Addon']['trusted'] == 1) {
+ echo '<div>';
+ echo _('devcp_form_trustedaddon_destination');
+ ?>
+ <input type="radio" name="data[File][status]" id="FileStatusSandbox" value="sandbox" checked>
+ <label for="FileStatusSandbox" class="normal"><?=_('devcp_form_trustedaddon_destination_sandbox')?></label>
+ <input type="radio" name="data[File][status]" id="FileStatusPublic" value="public">
+ <label for="FileStatusPublic" class="normal"><?=_('devcp_form_trustedaddon_destination_public')?></label>
+ </div>
+ <?
+ }
+ ?>
+ <div id="afterDescription" class="buttonBox">
+ <?=$html->submit(_('devcp_button_next').' &raquo;', array('escape' => false))?>
+ <?=$html->submit(_('devcp_button_cancel'), array('name' => 'cancel', 'class' => 'cancel', 'onClick' => 'return confirm(\''._('devcp_button_cancel_confirm').'\');'))?>
+ </div>
+ </div> <!-- developersForm -->
+ </form>
+ </div>
+</div>
diff --git a/site/app/views/developers/add_step4.thtml b/site/app/views/developers/add_step4.thtml
new file mode 100644
index 0000000..262af8a
--- /dev/null
+++ b/site/app/views/developers/add_step4.thtml
@@ -0,0 +1,66 @@
+<?php
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is addons.mozilla.org site.
+ *
+ * The Initial Developer of the Original Code is
+ * Justin Scott <fligtar@gmail.com>.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Frederic Wenzel <fwenzel@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
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+?>
+<div id="content">
+ <?=$this->renderElement('developers/additem');?>
+
+ <div id="content-main">
+ <h3><?=sprintf('%s &bull; %s', _('devcp_header_step4'), _('devcp_header_step4_localization'))?></h3>
+
+ <?php
+ echo $html->formTag('/developers/add/'.$id);
+ echo $html->hidden('Addon/add_step4');
+ echo $html->hidden('Version/id', array('value' => $version));
+ echo $html->hidden('Addon/newAddon', array('value' => ($newAddon == true ? 'true' : 'false')));
+ if ($newAddon == false) {
+ echo '<div class="addonName">'.$existing['Translation']['name']['string'].'</div>';
+ }
+ if (!empty($errors['main'])) {
+ echo '<div class="error">'.$errors['main'].'</div>';
+ }
+ ?>
+ <div id="developersForm">
+ <?=$this->renderElement('developers/localebox')?>
+ <div class="buttonBox">
+ <?=$html->submit(_('devcp_button_next').' &raquo;', array('escape' => false))?>
+ <?=$html->submit(_('devcp_button_cancel'), array('name' => 'cancel', 'class' => 'cancel', 'onClick' => 'return confirm(\''._('devcp_button_cancel_confirm').'\');'))?>
+ </div>
+ </div> <!-- developersForm -->
+ </form>
+ </div>
+</div>
diff --git a/site/app/views/developers/add_step5.thtml b/site/app/views/developers/add_step5.thtml
new file mode 100644
index 0000000..4fbdf81
--- /dev/null
+++ b/site/app/views/developers/add_step5.thtml
@@ -0,0 +1,78 @@
+<?php
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is addons.mozilla.org site.
+ *
+ * The Initial Developer of the Original Code is
+ * Justin Scott <fligtar@gmail.com>.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Frederic Wenzel <fwenzel@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
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+?>
+<div id="content">
+ <?=$this->renderElement('developers/additem');?>
+
+ <div id="content-main">
+ <h3><?=sprintf('%s &bull; %s', _('devcp_header_step5'), _('devcp_header_step5_success'))?></h3>
+ <?php
+ if ($newAddon == false) {
+ echo '<div class="addonName">'.$existing['Translation']['name']['string'].'</div>';
+ }
+ ?>
+ <p>
+ <?php
+ echo _('devcp_addon_submission_success');
+ echo '</p><p>';
+ if ($fileStatus == STATUS_PUBLIC) {
+ echo _('devcp_addon_submission_trusted_public');
+ }
+ elseif ($fileStatus == STATUS_PENDING) {
+ echo _('devcp_addon_submission_pending');
+ }
+ elseif ($fileStatus == STATUS_SANDBOX) {
+ echo sprintf(_('devcp_addon_submission_sandboxed'), $html->link(_('devcp_addon_submission_sandboxed_nominate_link'), '/developers/nominate/'.$id));
+ }
+
+ echo ' '.sprintf(_('devcp_addon_submission_sandbox_readmore'), $html->link(_('devcp_addon_submission_sandbox_readmore_link'), '/pages/sandbox'));
+
+ if (empty($existing['Preview'])) {
+ echo '</p><p>';
+ if ($existing['Addon']['addontype_id'] == ADDON_THEME) {
+ echo sprintf(_('devcp_theme_upload_preview'), $html->link(_('devcp_theme_upload_preview_link'), '/previews/add/'.$id));
+ }
+ else {
+ echo sprintf(_('devcp_addon_upload_preview'), $html->link(_('devcp_addon_upload_preview_link'), '/previews/add/'.$id));
+ }
+ }
+ ?>
+ </p>
+ <p><?=sprintf(_('devcp_addon_submission_makechanges'), $html->link(_('devcp_addon_submission_makechanges_link'), '/developers/edit/'.$id), $html->link(_('devcp_addon_submission_makechanges_devcp_link'), '/developers'))?></p>
+ </div>
+</div>
diff --git a/site/app/views/developers/addon_edit_authors.thtml b/site/app/views/developers/addon_edit_authors.thtml
index 86dda99..dcfb3f3 100644
--- a/site/app/views/developers/addon_edit_authors.thtml
+++ b/site/app/views/developers/addon_edit_authors.thtml
@@ -21,7 +21,6 @@
*
* Contributor(s):
* Justin Scott <fligtar@mozilla.com> (Original Author)
- * Frederic Wenzel <fwenzel@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
@@ -67,14 +66,13 @@
<tbody></tbody>
</table>
<div class="save-changes rounded">
- <strong><?=___('devcp_notice_unsaved_changes')?></strong> <?=___('devcp_edit_authors_click_save')?>
+ <strong><?=___('devcp_notice_unsaved_changes')?></strong><?=___('devcp_edit_authors_click_save')?>
</div>
<div class="add-button-container"><a href="#add-author" onclick="addon_edit_authors.showAddForm();" class="add-button rounded"><?=___('devcp_edit_authors_add_author')?></a></div>
</div>
</form>
- <div id="empty-authors" class="notice-error rounded" style="display:none"><span><?=___('devcp_error_empty_authors', 'Your add-on must have at least one owner.')?></span></div>
- <div class="action-button-container centered"><a href="#" id="submit" onclick="addon_edit_authors.save(); return false;" class="action-button rounded"><?=___('devcp_edit_authors_update_author')?></a></div>
+ <div class="action-button-container centered"><a href="#" onclick="addon_edit_authors.save(); return false;" class="action-button rounded"><?=___('devcp_edit_authors_update_author')?></a></div>
<br />
<div id="add-author" class="graybox rounded spaced field" style="display: none;">
diff --git a/site/app/views/developers/addon_edit_categories.thtml b/site/app/views/developers/addon_edit_categories.thtml
index c34f6f9..d664d06 100644
--- a/site/app/views/developers/addon_edit_categories.thtml
+++ b/site/app/views/developers/addon_edit_categories.thtml
@@ -88,7 +88,7 @@
echo ___('devcp_edit_categories_does_not_fit');
echo '</label>';
}
- echo '</td><td id="edit-categories-descriptions'.$application_id.'" class="edit-categories-descriptions">'.___('devcp_edit_categories_hover').'</td></tr></table>';
+ echo '</td><td id="edit-categories-descriptions'.$application_id.'" style="border-left: 1px solid #CCCCCC;">'.___('devcp_edit_categories_hover').'</td></tr></table>';
}
else {
echo '<p>'.___('devcp_edit_categories_none_available').'</p>';
diff --git a/site/app/views/developers/addon_edit_descriptions.thtml b/site/app/views/developers/addon_edit_descriptions.thtml
index 2dcbd2e..69ad01d 100644
--- a/site/app/views/developers/addon_edit_descriptions.thtml
+++ b/site/app/views/developers/addon_edit_descriptions.thtml
@@ -21,7 +21,6 @@
*
* Contributor(s):
* Justin Scott <fligtar@mozilla.com> (Original Author)
- * Frederic Wenzel <fwenzel@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
@@ -69,7 +68,7 @@
);
// Summary
- echo $this->renderElement('translationbox', array(
+ echo $this->renderElement('developers/translationbox', array(
'field' => 'summary',
'translations' => $translations['summary'],
'height' => '60',
@@ -79,7 +78,7 @@
));
// Description
- echo $this->renderElement('translationbox', array(
+ echo $this->renderElement('developers/translationbox', array(
'field' => 'description',
'translations' => $translations['description'],
'displayName' => ___('devcp_edit_descriptions_transbox_description_name'),
@@ -87,7 +86,7 @@
));
// Developer Comments
- echo $this->renderElement('translationbox', array(
+ echo $this->renderElement('developers/translationbox', array(
'field' => 'developercomments',
'translations' => $translations['developercomments'],
'displayName' => ___('devcp_edit_descriptions_transbox_comments_name'),
@@ -95,7 +94,7 @@
));
// EULA
- echo $this->renderElement('translationbox', array(
+ echo $this->renderElement('developers/translationbox', array(
'field' => 'eula',
'translations' => $translations['eula'],
'height' => '200',
@@ -104,7 +103,7 @@
));
// Privacy Policy
- echo $this->renderElement('translationbox', array(
+ echo $this->renderElement('developers/translationbox', array(
'field' => 'privacypolicy',
'translations' => $translations['privacypolicy'],
'height' => '200',
diff --git a/site/app/views/developers/addon_edit_properties.thtml b/site/app/views/developers/addon_edit_properties.thtml
index 200a782..0d62a3c 100644
--- a/site/app/views/developers/addon_edit_properties.thtml
+++ b/site/app/views/developers/addon_edit_properties.thtml
@@ -21,7 +21,6 @@
*
* Contributor(s):
* Justin Scott <fligtar@mozilla.com> (Original Author)
- * Frederic Wenzel <fwenzel@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
@@ -71,7 +70,7 @@
);
// Name
- echo $this->renderElement('translationbox', array(
+ echo $this->renderElement('developers/translationbox', array(
'field' => 'name',
'translations' => $translations['name'],
'type' => 'textbox',
@@ -128,7 +127,7 @@
<?php
// Homepage
- echo $this->renderElement('translationbox', array(
+ echo $this->renderElement('developers/translationbox', array(
'field' => 'homepage',
'translations' => $translations['homepage'],
'type' => 'textbox',
@@ -137,7 +136,7 @@
));
// Support Email
- echo $this->renderElement('translationbox', array(
+ echo $this->renderElement('developers/translationbox', array(
'field' => 'supportemail',
'translations' => $translations['supportemail'],
'type' => 'textbox',
@@ -146,7 +145,7 @@
));
// Support URL
- echo $this->renderElement('translationbox', array(
+ echo $this->renderElement('developers/translationbox', array(
'field' => 'supporturl',
'translations' => $translations['supporturl'],
'type' => 'textbox',
diff --git a/site/app/views/developers/addon_status.thtml b/site/app/views/developers/addon_status.thtml
index 5858a28..baa8209 100644
--- a/site/app/views/developers/addon_status.thtml
+++ b/site/app/views/developers/addon_status.thtml
@@ -118,12 +118,12 @@
echo '<h5>'.___('devcp_addon_status_header_nomination').'</h5>';
echo '<ul class="criteria">';
echo '<li class="'.($criteria['previews'] ? 'pass' : 'fail').'">'.___('devcp_addon_status_criteria_preview').'</li>';
+ echo '<li class="'.($criteria['reviews'] ? 'pass' : 'meh').'">'.___('devcp_addon_status_criteria_review').'</li>';
echo '<li class="'.($criteria['prerelease'] ? 'pass' : 'fail').'">'.___('devcp_addon_status_criteria_prerelease').'</li>';
echo '</ul>';
if ((!in_array($addon['Addon']['addontype_id'], array(ADDON_EXTENSION, ADDON_THEME)) || $criteria['previews']) && $criteria['prerelease']) {
$nominationEnabled = true;
- echo '<p>'.___('devcp_addon_status_nominate_enabled').'</p>';
}
else {
echo '<p>'.___('devcp_addon_status_nominate_disabled').'</p>';
@@ -137,6 +137,7 @@
$actions .= '<td class="description">'.___('devcp_addon_status_action_complete_description').'</td></tr>';
}
if ($addon['Addon']['status'] == STATUS_SANDBOX && $nominationEnabled === true) {
+ echo '<p>'.___('devcp_addon_status_nominate_enabled').'</p>';
$actions .= '<tr><td class="action"><a href="'.$html->url("/developers/addon/status/{$addon_id}/nominate").'" class="nominate add-button rounded">'.___('devcp_addon_status_action_nominate').'</a></td>';
$actions .= '<td class="description">'.___('devcp_addon_status_action_nominate_description').'</td></tr>';
}
diff --git a/site/app/views/developers/author_lookup.thtml b/site/app/views/developers/author_lookup.thtml
new file mode 100644
index 0000000..ee4ab11
--- /dev/null
+++ b/site/app/views/developers/author_lookup.thtml
@@ -0,0 +1,48 @@
+<?php
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is addons.mozilla.org site.
+ *
+ * The Initial Developer of the Original Code is
+ * Justin Scott <fligtar@gmail.com>.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Frederic Wenzel <fwenzel@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
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+?>
+<?php
+ if ($author === false) {
+ echo '<strong>'.sprintf(_('devcp_author_lookup_none_found'), $email).'</strong>';
+ }
+ else {
+ echo $author.' ('.$html->link(_('devcp_author_lookup_remove'), 'javascript:void(0);', array('onClick' => 'removeAuthor(this);')).')';
+ //the User/id][ is intentional in order to get cake to let us have an array
+ echo $html->hidden('User/User][', array('value' => $id));
+ }
+?>
diff --git a/site/app/views/developers/details.thtml b/site/app/views/developers/details.thtml
new file mode 100644
index 0000000..b986a6c
--- /dev/null
+++ b/site/app/views/developers/details.thtml
@@ -0,0 +1,164 @@
+<?php
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is addons.mozilla.org site.
+ *
+ * The Initial Developer of the Original Code is
+ * Justin Scott <fligtar@gmail.com>.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Frederic Wenzel <fwenzel@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
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+$addonIconPath = $this->controller->Image->getAddonIconURL($addon['Addon']['id']);
+?>
+<div id="content">
+ <?=$this->renderElement('developers/myaddons', array('addons' => $all_addons));?>
+
+ <div id="content-main">
+<?php
+if (!empty($addon)) {
+ $users = array();
+ if (count($addon['User']) > 0) {
+ foreach($addon['User'] as $user) {
+ $users[] = $html->link($user['firstname'].' '.$user['lastname'], '/user/'.$user['id']);
+ }
+ }
+?>
+ <div class="addon-details">
+ <?=$this->renderElement('developers/actionbar', array(
+ 'addon_id' => $addon['Addon']['id'],
+ 'disabled' => $addon['Addon']['inactive'],
+ 'showNominateLink' => ($addon['Addon']['status'] == STATUS_SANDBOX ? true : false)
+ ));?>
+
+ <h3><img src="<?=$addonIconPath?>"> <?=$addon['Translation']['name']['string']?></h3>
+
+ <h4><?=_('devcp_details_header_details')?></h4>
+ <ul class="mainlist">
+ <li><?=$addontypes[$addon['Addon']['addontype_id']].'; '.$approval[$addon['Addon']['status']].
+ (!empty($addon['Addon']['trusted']) ? '; '._('devcp_details_trusted') : '').
+ (!empty($addon['Addon']['inactive']) ? '; '._('devcp_details_disabled') : '')?></li>
+ <li><?=(count($users) == 1 ? _('devcp_details_author') : _('devcp_details_authors')).': '.(!empty($users) ? implode(', ', $users) : _('devcp_details_authors_none'))?></li>
+ <li><?=_('devcp_details_guid').': '.$addon['Addon']['guid']?></li>
+ <li><?=_('devcp_details_homepage').': '.(!empty($addon['Translation']['homepage']['string']) ? $html->link($addon['Translation']['homepage']['string']) : _('devcp_details_homepage_none'))?></li>
+ <li><?=_('devcp_details_supportemail').': '.(!empty($addon['Translation']['supportemail']['string']) ? $link->email($addon['Translation']['supportemail']['string']) : _('devcp_details_supportemail_none'))?></li>
+ <li><?=_('devcp_details_supporturl').': '.(!empty($addon['Translation']['supporturl']['string']) ? $html->link($addon['Translation']['supporturl']['string']) : _('devcp_details_supporturl_none'))?></li>
+ <li><?=(count($addon['Tags']) == 1 ? _('devcp_details_category') : _('devcp_details_categories')).': '.(!empty($addon['Tags']) ? implode(', ', $addon['Tags']) : 'None')?></li>
+ <li><?=_('devcp_details_description').': '?>
+ <blockquote><?=nl2br($addon['Translation']['description']['string'])?></blockquote>
+ </li>
+ </ul>
+
+ <h4><?=_('devcp_details_header_versions')?></h4>
+ <?php
+ if (count($addon['Version']) > 0) {
+ echo '<ul class="mainlist">';
+ foreach ($addon['Version'] as $version) {
+ echo '<li><strong>'.$html->link(sprintf(_('devcp_details_version'), $version['version']), '/developers/editversion/'.$version['id']).'</strong> - '.$this->controller->Amo->LEGACY_describeVersionStatus($version['File']).'</li>';
+ if (count($version['File']) > 0) {
+ echo '<ul>';
+ foreach ($version['File'] as $file) {
+ echo '<li>';
+ echo sprintf('%s (%s KB) - %s', $file['File']['filename'], $file['File']['size'], $platforms[$file['File']['platform_id']]);
+ echo '</li>';
+ }
+ echo '</ul>';
+ }
+ }
+ echo '</ul>';
+ }
+ else {
+ echo _('devcp_details_versions_none_found');
+ }
+ ?>
+
+ <h4><?=_('devcp_details_header_previews')?></h4>
+ <?php
+ if (count($addon['Preview']) > 0) {
+ for ($i = 0; $i < count($addon['Preview']); $i++) {
+ echo '<div class="preview-entry">';
+ $caption = $addon['Preview'][$i]['Translation']['caption']['string'];
+ if (empty($caption)) {
+ $caption = '<i>'._('devcp_details_preview_nocaption').'</i>';
+ }
+ echo $caption . '<br>';
+ $previewUrl = $this->controller->Image->getPreviewURL($addon['Preview'][$i]['Preview']['id']);
+ echo $html->link('<img src="'.$previewUrl.'" border=0>', '/previews/edit/'.$addon['Preview'][$i]['Preview']['id'], array(), false, false);
+ echo '</div>';
+ }
+ } else {
+ echo _('devcp_details_previews_nonefound').' ';
+ }
+
+ echo $html->link(_('devcp_details_addpreview_link'), '/previews/add/'.$addon['Addon']['id']);
+
+ echo $html->formTag('/developers/details/'.$addon['Addon']['id']);
+ ?>
+
+ <h4><?=_('devcp_details_header_devcomments')?></h4>
+ <div id="translationBox">
+ <div id="locale-box">
+ <?php
+ foreach ($localebox['languages'] as $locale => $language) {
+ echo '<span onClick="showLocale(\''.str_replace('-', '_', $locale).'\', this);" title="'.$language.'"'.
+ (($locale == $localebox['defaultLocale']) ? 'id="defaultLocaleSpan" class="selected"' : '').'>'.$locale.'</span>';
+ }
+ ?>
+ </div>
+
+ <?php
+ foreach ($localebox['languages'] as $locale => $language) {
+ $localeClass = str_replace('-', '_', $locale);
+ ?>
+ <div id="locale_<?=$localeClass?>" <?=($locale != $localebox['defaultLocale']) ? 'style="display: none;"' : ''?>>
+ <input type="hidden" name="data[Locales][]" value="<?=$locale?>">
+ <h5 style="clear:both;"><?=$language.' ['.$locale.']'?></h5>
+ <?=$html->textarea('Addon/developercomments][', array('value' => (!empty($localebox['info'][$locale]['developercomments']) ? $localebox['info'][$locale]['developercomments'] : ''), 'rows' => 4, 'cols' => 70))?>
+ </div>
+ <?php
+ }
+ ?>
+ </div>
+ </div>
+ <div class="buttonBox">
+ <?=$html->submit(_('devcp_details_submit_update'))?>
+ </div>
+ </form>
+ </div>
+<?php
+}
+?>
+ </div>
+</div>
+
+<script language="JavaScript" style="text/javascript">
+ var previousLocale = '<?=str_replace('-', '_', $localebox['defaultLocale'])?>';
+ var previousSpan = document.getElementById('defaultLocaleSpan');
+</script>
diff --git a/site/app/views/developers/disable.thtml b/site/app/views/developers/disable.thtml
new file mode 100644
index 0000000..f77377d
--- /dev/null
+++ b/site/app/views/developers/disable.thtml
@@ -0,0 +1,65 @@
+<?php
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/e
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is addons.mozilla.org site.
+ *
+ * The Initial Developer of the Original Code is
+ * The Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2008
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Justin Scott <fligtar@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
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+?>
+<div id="content">
+ <?=$this->renderElement('developers/myaddons', array('addons' => $all_addons));?>
+
+ <div id="content-main">
+<?php
+echo $html->formTag('/developers/disable/'.$addon['Addon']['id'], 'post');
+
+if ($addon['Addon']['inactive'] == 1) {
+?>
+ <h3><?=sprintf(_('devcp_disable_enable_title'), $addon['Translation']['name']['string'])?></h3>
+ <p><?=_('devcp_disable_enable_description')?></p>
+
+ <p><?=_('devcp_disable_enable_confirm')?></p>
+
+ <input type="submit" name="enable" value="<?=_('devcp_disable_enable_button')?>">
+<?php } else { ?>
+ <h3><?=sprintf(_('devcp_disable_disable_title'), $addon['Translation']['name']['string'])?></h3>
+ <p><?=_('devcp_disable_disable_description')?></p>
+
+ <p><?=_('devcp_disable_disable_confirm')?></p>
+
+ <input type="submit" name="disable" value="<?=_('devcp_disable_disable_button')?>">
+<?php
+}
+?>
+ <p><?=$html->link(_('devcp_disable_cancel'), '/developers/details/'.$addon['Addon']['id'])?></p>
+</form>
diff --git a/site/app/views/developers/edit.thtml b/site/app/views/developers/edit.thtml
new file mode 100644
index 0000000..4f71333
--- /dev/null
+++ b/site/app/views/developers/edit.thtml
@@ -0,0 +1,164 @@
+<?php
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/e
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is addons.mozilla.org site.
+ *
+ * The Initial Developer of the Original Code is
+ * Justin Scott <fligtar@gmail.com>.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Frederic Wenzel <fwenzel@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
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+?>
+<div id="content">
+ <?=$this->renderElement('developers/myaddons', array('addons' => $all_addons));?>
+
+ <div id="content-main">
+
+<?php
+echo $html->formTag('/developers/edit/'.$addon['Addon']['id'], 'post', array('enctype'=>'multipart/form-data'));
+?>
+<h3>Edit <?=$addon['Translation']['name']['string']?></h3>
+<?=!empty($errors['main']) ? '<div class="error">'.$errors['main'].'</div>' : ''?>
+<div id="developersForm">
+ <div>
+ <label for="addLink"><?=_('devcp_edit_header_authors')?></label>
+ <div id="authors" class="spaced">
+ <?php
+ if (!empty($addon['authors'])) {
+ foreach ($addon['authors'] as $id => $author) {
+ echo '<div>'.$author.' ('.$html->link(_('devcp_edit_author_remove'), 'javascript:void(0);', array('onClick' => 'removeAuthor(this);')).')';
+ echo $html->hidden('User/User][', array('value' => $id)).'</div>';
+ }
+ }
+ echo $html->tagErrorMsg('User/User', $errors['User/User']);
+ ?>
+ </div>
+ </div>
+ <div id="addAuthorRow" class="spaced">
+ <?=$html->link(_('devcp_edit_author_add'), 'javascript:void(0);', array('id' => 'addLink', 'onClick' => 'showAuthorForm();'))?>
+ </div>
+ <div id="newAuthorRow" style="display: none; clear: both;">
+ <form>
+ <label for="AddonAuthor"><?=_('devcp_edit_author_email')?></label>
+ <?=$html->input('Addon/Author', array('size' => 40, 'id' => 'newAuthor'))?>
+ <button type="submit" id="addButton" onClick="addAuthor('<?=$html->url('/developers/authorLookup/')?>');return false;"><?=_('devcp_edit_author_add')?></button>
+ </form>
+ </div>
+ <div>
+ <label for="TagTag"><?=_('devcp_edit_label_categories')?></label>
+ <?=(!empty($tags) ? $html->selectTag('Tag/Tag', $tags['names'], $selectedTags, array('multiple' => 'multiple', 'size' => 10, 'style' => 'float: left;', 'onChange' => 'updateTagDescription(this);'), null, false).
+ $html->tagErrorMsg('Tag/Tag', $errors['Tag/Tag']) : $html->hidden('Tag/noTags', array('value' => 'true'))._('devcp_edit_error_categories_unavailable'))?>
+ <div id="tagDescription"></div>
+ </div>
+ <div id="afterDescription">
+ <label for="AddonDefaultlocale"><?=_('devcp_edit_label_defaultlocale')?></label>
+ <select id="AddonDefaultlocale" name="data[Addon][defaultlocale]">
+ <?php
+ foreach ($localebox['languages'] as $key => $language) {
+ echo '<option value="'.$key.'" '.($key == $localebox['defaultLocale'] ? 'selected' : '').'>'
+ .html_entity_decode($language).'</option>';
+ }
+ ?>
+ </select>
+ </div>
+ <div id="iconDiv">
+ <label><?=_('devcp_edit_label_info')?></label>
+ <?php
+ if (!empty($addon['Addon']['icontype'])) {
+ echo '<img src="'.$this->controller->Image->getAddonIconURL($addon['Addon']['id']).'">';
+ echo $html->link(_('devcp_edit_icon_change_link'), 'javascript:void(0);', array('onClick' => 'addIcon(\'edit\');', 'id' => 'iconLink'));
+ }
+ else {
+ echo $html->link(_('devcp_edit_icon_add_link'), 'javascript:void(0);', array('onClick' => 'addIcon(\'new\');', 'id' => 'iconLink'));
+ }
+ ?>
+ </div>
+ <div id="newIcon" style="display: none;">
+ <label><?=_('devcp_edit_label_icon_new')?></label>
+ <?=$html->file('Addon/icon').$html->tagErrorMsg('Addon/icon', $errors['Addon/icon'])?>
+ </div>
+ <div id="deleteIcon" class="spaced" style="display: none;">
+ <?=$html->checkbox('Addon/DeleteIcon', array('class' => 'vmiddle'))?>
+ <label for="AddonDeleteIcon" class="nofloat">
+ <?=_('devcp_edit_label_icon_delete')?></label>
+ </div>
+ <?php
+ if (!empty($errors['Addon/icon'])) {
+ echo '<div class="error_message">'.$errors['Addon/icon'].'</div>';
+ }
+ ?>
+ <?php if (in_array($addon['Addon']['addontype_id'], array(ADDON_DICT, ADDON_LPAPP))): ?>
+ <div>
+ <label for="AddonTargetLocale"><?=_('devcp_edit_label_target_locale')?></label>
+ <?=$html->input('Addon/target_locale', array('value'=>$html->unsanitize($addon['Addon']['target_locale'])))?>
+ <?=_('devcp_edit_target_locale_explanation')?>
+ </div>
+ <div>
+ <label for="AddonLocaleDisambiguation"><?=_('devcp_edit_label_locale_disambiguation')?></label>
+ <?=$html->input('Addon/locale_disambiguation', array('value'=>$html->unsanitize($addon['Addon']['locale_disambiguation'])))?>
+ <?=_('devcp_edit_locale_disambiguation_explanation')?>
+ </div>
+ <?php endif; ?>
+ <div>
+ <?=$html->checkbox('Addon/viewsource', null, $addon['Addon']['viewsource'])?>
+ <label for="AddonViewsource" class="nofloat"><?=_('devcp_edit_label_allow_viewsource')?></label>
+ </div>
+ <div>
+ <?=$html->checkbox('Addon/prerelease', null, $addon['Addon']['prerelease'])?>
+ <label for="AddonPrerelease" class="nofloat"><?=_('devcp_edit_label_prerelease')?></label>
+ </div>
+ <div>
+ <?=$html->checkbox('Addon/sitespecific', null, $addon['Addon']['sitespecific'])?>
+ <label for="AddonSitespecific" class="nofloat"><?=_('devcp_edit_label_sitespecific')?></label>
+ </div>
+ <div>
+ <?=$html->checkbox('Addon/externalsoftware', null, $addon['Addon']['externalsoftware'])?>
+ <label for="AddonExternalsoftware" class="nofloat"><?=_('devcp_edit_label_externalsoftware')?></label>
+ </div>
+ <?php if ($this->controller->SimpleAcl->actionAllowed('*', '*', $this->controller->Session->read('User'))): ?>
+ <div>
+ <?=$html->checkbox('Addon/trusted', null, $addon['Addon']['trusted'])?>
+ <label for="AddonTrusted" class="nofloat">This add-on is trusted [ADMIN]</label>
+ </div>
+ <?php endif; ?>
+ <?=$this->renderElement('developers/localebox')?>
+ <div class="buttonBox">
+ <?=$html->submit(_('devcp_edit_submit_update'), array('name' => 'update'));?>
+ </div>
+</div> <!-- developersForm -->
+</form>
+</div> <!-- corner-box -->
+<script language="JavaScript" type="text/javascript">
+<?php
+ if (!empty($tags['descriptions'])) {
+ echo 'var tagDescriptions = {'.html_entity_decode(implode(',', $tags['descriptions'])).'};';
+ }
+?>
+</script>
diff --git a/site/app/views/developers/editversion.thtml b/site/app/views/developers/editversion.thtml
new file mode 100644
index 0000000..4d3530e
--- /dev/null
+++ b/site/app/views/developers/editversion.thtml
@@ -0,0 +1,127 @@
+<?php
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/e
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is addons.mozilla.org site.
+ *
+ * The Initial Developer of the Original Code is
+ * Justin Scott <fligtar@gmail.com>.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Frederic Wenzel <fwenzel@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
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+?>
+<div id="content">
+ <?=$this->renderElement('developers/myaddons', array('addons' => $all_addons));?>
+
+ <div id="content-main">
+
+ <?=$html->formTag('/developers/editversion/'.$version['Version']['id'])?>
+ <h3>Edit <?=$addon['Translation']['name']['string'].' '.$version['Version']['version']?></h3>
+ <div id="developersForm">
+ <div>
+ <label><?=_('devcp_editversion_label_files')?></label>
+ <div class="spaced">
+ <?php
+ if (!empty($version['File'])) {
+ echo '<table id="fileList">';
+ foreach ($version['File'] as $file) {
+ echo '<tr>';
+ echo $html->hidden('File/id][', array('value' => $file['id']));
+ echo '<td><input type="checkbox" name="data[File][Delete][]" value="1" id="FileId'.$file['id'].'" class="vmiddle" onClick="return confirmDelete(this);"></td>';
+ echo '<td><label class="nofloat" for="FileId'.$file['id'].'">';
+ echo sprintf(_('devcp_editversion_filename_size'), $file['filename'], sprintf(_('size_kb'), $file['size']));
+ echo '</label></td>';
+ echo '<td class="separator">-</td>';
+ echo '<td>';
+ echo $html->selectTag('File/platform_id][', $platforms, $file['platform_id'], null, null, false);
+ echo '</td></tr>';
+ }
+ echo '</table>';
+ echo '<i>'._('devcp_editversion_checkedfiles_delete').'</i>';
+ }
+ else {
+ echo '<i>'._('devcp_editversion_nofiles').'</i>';
+ }
+ ?>
+ </div>
+ </div>
+ <div>
+ <label><?=_('devcp_editversion_label_targetapps')?></label>
+ <div class="spaced">
+ <table id="targetApps">
+ <?php
+ foreach ($version['targetapps'] as $app) {
+ echo '<tr>';
+ echo $html->hidden('targetApps/id][', array('value' => $app['applications']['id']));
+ echo '<td>';
+ if ($app['applications']['supported'] == 1) {
+ echo $html->image('developers/'.strtolower($app['translations']['localized_string']).'.png');
+ }
+ else {
+ echo '&nbsp;';
+ }
+ echo '</td>';
+ echo "<td>{$app['translations']['localized_string']}</td>";
+ echo '<td><select name="data[targetApps][minVersion][]">';
+ foreach ($app['appversions'] as $appVersion) {
+ echo '<option value="'.$appVersion['Appversion']['id'].'"';
+ if ($appVersion['Appversion']['id'] == $app['min']['id']) {
+ echo ' selected';
+ }
+ echo '>'.$appVersion['Appversion']['version'].'</option>';
+ }
+ echo '</select></td>';
+ echo '<td class="separator">-</td>';
+ echo '<td><select name="data[targetApps][maxVersion][]">';
+ foreach ($app['appversions'] as $appVersion) {
+ echo '<option value="'.$appVersion['Appversion']['id'].'"';
+ if ($appVersion['Appversion']['id'] == $app['max']['id']) {
+ echo ' selected';
+ }
+ echo '>'.$appVersion['Appversion']['version'].'</option>';
+ }
+ echo '</select></td>';
+ echo '</tr>';
+ }
+ ?>
+ </table>
+ </div>
+ </div>
+ <div>
+ <label for="VersionApprovalnotes"><?=_('devcp_editversion_reviewernotes')?></label>
+ <?=$html->textarea('Version/approvalnotes', array('rows' => 3, 'cols' => 55, 'value' => $version['Version']['approvalnotes']))?>
+ </div>
+ <?=$this->renderElement('developers/localebox')?>
+ <div class="buttonBox">
+ <?=$html->submit(_('devcp_editversion_submit_update'))?>
+ </div>
+ </div> <!-- developersForm -->
+ </form>
+ </div>
+</div>
diff --git a/site/app/views/developers/index.thtml b/site/app/views/developers/index.thtml
new file mode 100644
index 0000000..0cdab59
--- /dev/null
+++ b/site/app/views/developers/index.thtml
@@ -0,0 +1,107 @@
+<?php
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is addons.mozilla.org site.
+ *
+ * The Initial Developer of the Original Code is
+ * Justin Scott <fligtar@gmail.com>.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Frederic Wenzel <fwenzel@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
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+?>
+<div id="content">
+ <?=$this->renderElement('developers/myaddons', array('addons' => $all_addons));?>
+
+ <div id="content-main">
+ <?php if (LANG == 'en-US'): ?>
+ <div class="graybox rounded spaced"><h4>Try out our new Developer Tools!</h4><p>We're giving the Developer Tools area a new look soon and are interested in hearing what you think about our upcoming changes. Give the new tools a try and <a href="<?=SITE_DEVELOPER_WIKI?>">let us know</a> if you have any problems or suggestions.</p>
+ <div class="action-button-container" style="text-align: right;"><a href="<?=$html->url('/developers/dashboard')?>" class="action-button rounded">Use New Tools</a></div>
+</div>
+ <?php endif; ?>
+ <h3><?=_('devcp_index_header_myaddons')?></h3>
+
+ <div id="summary">
+ <?php
+ if (!empty($data['Addon'])) {
+ foreach ($data['Addon'] as $addon) {
+ $addonIconPath = $this->controller->Image->getAddonIconURL($addon['id']);
+ if (empty($addonIconPath))
+ $addonIconPath = ($addon['addontype_id'] == ADDON_THEME ? $html->urlImage(DEFAULT_THEME_ICON) : $html->urlImage(DEFAULT_ADDON_ICON));
+ ?>
+ <div class="addon sub<?=($addon['inactive'] == 1 || $addon['Addon']['status'] == STATUS_DISABLED) ? ' disabled' : ''?>">
+ <div class="addon-container">
+ <?php if ($addon['Addon']['status'] != STATUS_DISABLED): ?>
+ <?=$this->renderElement('developers/actionbar', array(
+ 'addon_id' => $addon['id'],
+ 'revamp' => false,
+ 'disabled' => $addon['inactive']
+ ));?>
+
+ <h4>
+ <?php
+ echo '<a href="'.$html->url('/developers/details/'.$addon['id']).'">';
+ echo '<img src="'.$addonIconPath.'">';
+ echo $addon['Translation']['name']['string'];
+ echo '</a>';
+ echo ' ('.$addontypes[$addon['addontype_id']].'; '.$approval[$addon['Addon']['status']];
+ echo (!empty($addon['Addon']['trusted']) ? '; '._('devcp_summary_header_trusted') : '');
+ echo (!empty($addon['Addon']['inactive']) ? '; '._('devcp_summary_header_disabled') : '').')';
+ ?>
+ </h4>
+ <p><?=$addon['Translation']['summary']['string']?></p>
+ <?php
+ $latestVersion = !empty($addon['Version'][0]) ? $addon['Version'][0] : 0;
+ if (!empty($latestVersion)) {
+ echo _('devcp_summary_lastversion').' '.$html->link($latestVersion['version'], '/developers/editversion/'.$latestVersion['id']).' ('.$this->controller->Amo->LEGACY_describeVersionStatus($latestVersion['File']).')<br><br>';
+ }
+ echo $this->renderElement('developers/statsbar', array('addon' => $addon));
+ ?>
+ <?php else: ?>
+ <h4>
+ <?='<u>'.$addon['Translation']['name']['string'].
+ '</u> ('.$addontypes[$addon['addontype_id']].'; '.$approval[$addon['Addon']['status']].')'?>
+ </h4>
+ <?=_('devcp_summary_admin_disabled')?>
+ <?php endif; ?>
+ </div>
+ <div class="vex"><span><!-- bottom edge --></span></div>
+ </div>
+ <?php
+ }
+ }
+ else {
+ echo '<br>';
+ echo sprintf(_('devcp_summary_noaddons_submit_one'),
+ $html->link(_('devcp_summary_noaddons_submit_one_link'), '/developers/add'));
+ }
+ ?>
+ </div>
+ </div> <!-- content-main -->
+</div> <!-- content -->
diff --git a/site/app/views/developers/nominate.thtml b/site/app/views/developers/nominate.thtml
new file mode 100644
index 0000000..8461517
--- /dev/null
+++ b/site/app/views/developers/nominate.thtml
@@ -0,0 +1,58 @@
+<?php
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is addons.mozilla.org site.
+ *
+ * The Initial Developer of the Original Code is
+ * Justin Scott <fligtar@gmail.com>.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Frederic Wenzel <fwenzel@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
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+?>
+<div id="content">
+ <?=$this->renderElement('developers/myaddons', array('addons' => $all_addons));?>
+
+ <div id="content-main">
+
+ <h3><?=$addon['Translation']['name']['string']?></h3>
+
+ <?=$localization->includeLocalPage('nomination', array($html->url('/pages/policy')))?>
+
+ <div class="buttonBox" id="agreementButtons">
+ <?php
+ echo $html->formTag('/developers/nominate/'.$addon['Addon']['id']);
+ echo $html->textarea('Addon/nominationmessage', array('value' => $addon['Addon']['nominationmessage'], 'cols' => '70', 'rows' => '5')).'<br>';
+ echo $html->submit(sprintf(_('devcp_nominate_submit_nominate'), $addon['Translation']['name']['string']), array('name' => 'nominate')).'<br>';
+ echo $html->link(_('devcp_nominate_link_returnto_details'), '/developers/details/'.$addon['Addon']['id']);
+ ?>
+ </form>
+ </div>
+ </div>
+</div>
diff --git a/site/app/views/developers/previews.thtml b/site/app/views/developers/previews.thtml
index e229be3..2cbdccf 100644
--- a/site/app/views/developers/previews.thtml
+++ b/site/app/views/developers/previews.thtml
@@ -21,7 +21,6 @@
*
* Contributor(s):
* Justin Scott <fligtar@mozilla.com> (Original Author)
- * Frederic Wenzel <fwenzel@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
@@ -71,15 +70,16 @@
'loaded' => false
);
- foreach ($previews as &$preview) {
+ foreach ($previews as $preview) {
?>
<div class="preview-box graybox rounded spaced field">
<table style="width: 100%;"><tr><td style="width: 200px; text-align: center; vertical-align: top;">
<img src="<?=$this->controller->Image->getPreviewURL($preview['Preview']['id'])?>/0" alt="<?=___('devcp_previews_thumbnail')?>" />
</td><td style="vertical-align: top;">
<h5 style="margin-top: 0; margin-bottom: 2px;"><?=___('devcp_previews_header_caption')?></h5>
+ <div class="translation-box">
<?php
- echo $this->renderElement('translationbox', array(
+ echo $this->renderElement('developers/translationbox', array(
'field' => 'caption',
'id' => $preview['Preview']['id'],
'translations' => !empty($translations[$preview['Preview']['id']]['caption']) ? $translations[$preview['Preview']['id']]['caption'] : array(),
@@ -87,11 +87,12 @@
'graybox' => false
));
?>
+ </div>
<table style="width: 100%; padding-top: 10px;"><tr><td>
<label><input type="radio" name="data[Preview][highlight]" value="<?=$preview['Preview']['id']?>" style="vertical-align: top;"<?=($preview['Preview']['highlight'] == 1 ? ' checked="checked"' : '')?>/>
<?=___('devcp_previews_label_default')?></label>
- </td><td class="preview-buttons">
+ </td><td style="text-align: right;">
<a href="#" onclick="previews.showReplaceBox(this); return false;" class="edit-button rounded"><?=___('devcp_previews_a_replace')?></a>&nbsp;
<a href="#" onclick="previews.deletePreview(this); return false;" class="remove-button rounded"><?=___('devcp_previews_a_delete')?></a>
</td></tr></table>
@@ -118,7 +119,7 @@
<label class="new-preview"><?=___('devcp_previews_label_upload')?><input type="file" name="data[Preview][New][]" size="40" /></label>
</div>
<div class="add-button-container"><a href="#" onclick="previews.addUploadBox(); return false;" class="add-button rounded"><?=___('devcp_previews_a_another')?></a></div>
- <div class="preview-add-button-description"><?=___('devcp_previews_click_below')?></div>
+ <div style="text-align: right;"><?=___('devcp_previews_click_below')?></div>
</div>
<div class="add-button-container" style="<?=(empty($previews) ? 'display: none;' : '')?>"><a href="#add-preview-box" onclick="previews.showAddBox(this);" class="add-button rounded"><?=___('devcp_previews_add_new')?></a></div>
@@ -126,4 +127,4 @@
<div class="action-button-container centered"><a href="#" onclick="previews.save(); return false;" class="action-button rounded"><?=___('devcp_previews_a_update')?></a></div>
</form>
</div>
-</div>
+</div> \ No newline at end of file
diff --git a/site/app/views/developers/uploader.thtml b/site/app/views/developers/uploader.thtml
index ec1976f..d363bfd 100644
--- a/site/app/views/developers/uploader.thtml
+++ b/site/app/views/developers/uploader.thtml
@@ -67,53 +67,19 @@
<?=___('devcp_uploader_how')?>
<div style="text-align: center;"><a href="#" onclick="upload.showAgreement(); return false;" class="action-button rounded"><?=___('devcp_uploader_a_start')?></a></div>
</div> <!-- /#step-intro -->
- <?php endif; ?>
- <?php $showAgreement = ($type == 'new' || !$hasAgreement); ?>
- <?php if ($showAgreement): ?>
- <div id="step-agreement" <?=($type != 'new' ? 'style="display:block"' : '')?>>
+ <div id="step-agreement">
<p><?=_('devcp_review_agreement_please')?></p>
- <?=$localization->includeLocalPage('developer_agreement',array($html->url('/pages/developer_faq')))?>
-
- <?php
- list($licenses, $trans) = $this->controller->Developers->getLicenses();
- echo $this->renderElement('developers/license_picker',
- array('licenses' => $licenses));
- ?>
- <input type="button" value="<?=___('devcp_uploader_button_agree')?>"
- id="accept-agreement" disabled="true" onclick="upload.acceptAgreement()"/>
- <?php
- // Retrieve language arrays from bootstrap.
- global $valid_languages, $native_languages;
- foreach (array_keys($valid_languages) as $key) {
- $languages[$key] = $native_languages[$key]['native'];
- }
- ksort($languages);
-
- $this->translationBox = array(
- 'defaultLocale' => LANG,
- 'languages' => $languages,
- 'table' => 'License',
- 'loaded' => false
- );
- echo $this->renderElement('developers/license_translationbox',
- array('translations' => $trans,
- 'fieldname' => 'text'));
- ?>
- <script type="text/javascript">
- $(document).ready(function($){
- $('#license-name').change(function() {
- if ($('#license-name').val() == 'null')
- $('#accept-agreement').attr('disabled', 'true');
- else
- $('#accept-agreement').removeAttr('disabled');
- });
- $('#license-name').change();
- });
- </script>
+ <div class="agreement-text rounded">
+ <?=$localization->includeLocalPage('developer_agreement')?>
+ <div class="agreement-buttons">
+ <input type="button" value="<?=_('devcp_submit_decline_dev_agreement')?>" onclick="upload.hideAgreement();" />
+ <input type="button" value="<?=_('devcp_submit_accept_dev_agreement')?>" onclick="upload.acceptAgreement();"/>
+ </div>
+ </div>
</div> <!-- /#step-agreement -->
<?php endif; ?>
-
- <div id="file-upload"<?=($showAgreement ? ' style="display: none;"' : '')?>>
+
+ <div id="file-upload"<?=($type == 'new' ? ' style="display: none;"' : '')?>>
<h3><?=___('devcp_uploader_header_upload')?></h3>
<p><?=___('devcp_uploader_p_upload')?>
<br />
diff --git a/site/app/views/developers/versions.thtml b/site/app/views/developers/versions.thtml
index d3bed4a..323ba34 100644
--- a/site/app/views/developers/versions.thtml
+++ b/site/app/views/developers/versions.thtml
@@ -65,7 +65,7 @@
echo '<td><a href="'.$html->url('/developers/versions/edit/'.$version['Version']['id']).'">'.sprintf(_('devcp_details_version'), $version['Version']['version']).'</a></td>';
echo '<td>'.$this->controller->Amo->describeVersionStatus($version['File']).'</td>';
echo '<td>'.strftime(_('date'), strtotime($version['Version']['created'])).'</td>';
- echo '<td class="delete-area version-delete-area">';
+ echo '<td class="delete-area" style="text-align: right;">';
if (empty($version['File'])) {
echo '<div class="inline-delete-button uses-button">';
echo '<a href="#" onclick="versions.deleteVersion(this); return false;" class="remove-button rounded trigger">'.___('devcp_versions_a_remove').'</a>';
diff --git a/site/app/views/developers/versions_edit.thtml b/site/app/views/developers/versions_edit.thtml
index 55e8517..40b0578 100644
--- a/site/app/views/developers/versions_edit.thtml
+++ b/site/app/views/developers/versions_edit.thtml
@@ -21,7 +21,6 @@
*
* Contributor(s):
* Justin Scott <fligtar@mozilla.com> (Original Author)
- * Frederic Wenzel <fwenzel@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
@@ -174,9 +173,9 @@
echo '</span></div>';
echo '</div>';
}
-
+
// Version Notes
- echo $this->renderElement('translationbox', array(
+ echo $this->renderElement('developers/translationbox', array(
'field' => 'releasenotes',
'translations' => $translations['releasenotes'],
'height' => '130',
@@ -184,26 +183,9 @@
'displayName' => ___('devcp_versions_edit_transbox_releasenotes_name'),
'description' => ___('devcp_versions_edit_transbox_releasenotes_description'),
));
- ?>
-
- <!-- Source Code License -->
- <div class="graybox rounded spaced field">
- <h4><?=___('devcp_versions_edit_header_license')?></h4>
- <p><?=___('devcp_versions_edit_license_description')?></p>
- <?php
- list($licenses, $trans) = $this->controller->Developers->getLicenses($version['Version']['id']);
- echo $this->renderElement('developers/license_picker',
- array('licenses' => $licenses));
- echo $this->renderElement('developers/license_translationbox',
- array('translations' => $trans,
- // The transbox wraps fieldname with []
- 'fieldname' => 'License][text'));
- ?>
- </div>
-
- <div class="graybox rounded spaced field">
- <h4><?=___('devcp_versions_edit_header_approval')?></h4>
- <?php
+
+ echo '<div class="graybox rounded spaced field">';
+ echo '<h4>'.___('devcp_versions_edit_header_approval').'</h4>';
if (!empty($version['File'])) {
echo '<ul>';
foreach ($version['File'] as $file) {
diff --git a/site/app/views/editors/email/nominated/public_plain.thtml b/site/app/views/editors/email/nominated/public_plain.thtml
index 00c4d6d..638b432 100644
--- a/site/app/views/editors/email/nominated/public_plain.thtml
+++ b/site/app/views/editors/email/nominated/public_plain.thtml
@@ -1,4 +1,4 @@
-Congratulations! Your nominated, <?=$info['name']?>, has been reviewed by a <?=SITE_NAME?> editor who approved your add-on to be public.
+Congratulations! Your nominated add-on, <?=$info['name']?>, has been reviewed by a <?=SITE_NAME?> editor who approved your add-on to be public.
Your most recent version (<?=$info['version']?>) has also been made public.
diff --git a/site/app/views/editors/queue.thtml b/site/app/views/editors/queue.thtml
index 945ebde..49d2e27 100644
--- a/site/app/views/editors/queue.thtml
+++ b/site/app/views/editors/queue.thtml
@@ -38,116 +38,47 @@
* ***** END LICENSE BLOCK ***** */
?>
<div id="content">
-<?=$this->renderElement('developers/editorsmenu');?>
-<?=$this->renderElement('developers/editorsqueue');?>
+ <?=$this->renderElement('developers/editorsmenu');?>
+ <?=$this->renderElement('developers/editorsqueue');?>
<div id="filterBox">
-<?=$html->formTag("/editors/queue/{$mode}", 'post');?>
- <div id="filterHeader">&darr;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?=_('editors_filter_queue')?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&darr;</div>
- <?php if ($filtered == true) { ?><div id="sessionNotice"><?=_('editors_notice_filter_session')?></div><?php } ?>
- <div id="filterTable" <?=($filterChanged == false ? ' style="display: none;"' : '')?>>
- <div class="group left">
- <div>
- <label for="FilterAddonOrAuthor"><?=___('editors_queue_filter_label_addon', 'Add-on or Author Email')?></label>
- <?=$html->input('Filter/AddonOrAuthor', array('value'=>$addonOrAuthor))?>
- </div>
-
- <div>
- <label for="FilterApplication"><?=___('editors_queue_filter_label_application', 'Application')?></label>
- <?=$html->selectTag('Filter/Application', $applications, $selected['Application'], null, null, true)?>
- </div>
-
- <div>
- <label for="FilterMaxVersion"><?=___('editors_queue_filter_label_maxversion', 'Max. Version')?></label>
- <?=$html->selectTag('Filter/MaxVersion', $maxVersions, $selected['MaxVersion'], null, null, true)?>
- </div>
-
- <div>
- <label for="FilterSubmissionAge"><?=___('editors_queue_filter_label_submissionage', 'Age of Submission (days)')?></label>
- <?=$html->selectTag('Filter/SubmissionAge', $submissionAges, $selected['SubmissionAge'], null, null, true)?>
- </div>
- </div>
- <div class="group">
- <div>
- <label for="FilterAddontype"><?=___('editors_queue_filter_label_addontypes', 'Add-on Types')?></label><br/>
- <?=$html->selectTag('Filter/Addontype', $addontypes, $selected['Addontype'], array('multiple' => 'multiple', 'size' => 5), null, false)?>
- </div>
- </div>
- <div class="group">
- <div>
- <label for="FilterPlatform"><?=___('editors_queue_filter_label_platforms', 'Platforms')?></label><br/>
- <?=$html->selectTag('Filter/Platform', $platforms, $selected['Platform'], array('multiple' => 'multiple', 'size' => 5), null, false)?>
- </div>
- </div>
- <div class="buttons">
- <?=$html->submit(_('editors_queue_submit_filter'), array('name' => 'filter'));?>
- <?=$html->submit(_('editors_queue_submit_clean'), array('name' => 'clear'))?>
- </div>
- </div>
-</form>
-<?php if ($filtered): ?>
- <div>
- <?=sprintf(n___('editors_queue_filter_result_count','editors_queue_filter_result_count', $filteredCount, 'Results of Your Filtered Search: <strong>%d</strong> Add-ons'), $filteredCount)?>
- </div>
-<?php endif; ?>
+<?php
+ echo $html->formTag('/editors/queue', 'post');
+ echo '<div id="filterHeader" onClick="toggleFilters();">&darr;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'._('editors_filter_queue').'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&darr;</div>';
+ if ($filtered == true) {
+ echo '<div id="sessionNotice">'._('editors_notice_filter_session').'</div>';
+ }
+ echo '<table id="filterTable"'.($filtered == false ? ' style="display: none;"' : '').'>';
+ echo '<tr><td colspan=5><b>Filters are not yet functional!</b></td></tr>';
+ echo '<tr id="headerRow">';
+ echo '<td>'._('editors_th_addontypes').'</td>';
+ echo '<td>'._('editors_th_platforms').'</td>';
+ echo '<td>'._('editors_th_applications').'</td>';
+ echo '<td>'._('editors_th_submissiontypes').'</td>';
+ echo '<td>&nbsp;</td>';
+ echo '</tr>';
+ echo '<tr>';
+ echo '<td>'.$html->selectTag('Approval/Addontype', $addontypes, $selected['Addontype'], array('multiple' => 'multiple', 'size' => 5), null, false).'</td>';
+ echo '<td>'.$html->selectTag('Approval/Platform', $platforms, $selected['Platform'], array('multiple' => 'multiple', 'size' => 5), null, false).'</td>';
+ echo '<td>'.$html->selectTag('Approval/Application', $applications, $selected['Application'], array('multiple' => 'multiple', 'size' => 5), null, false).'</td>';
+ echo '<td>'.$html->selectTag('Approval/SubmissionType', $submissionTypes, $selected['SubmissionType'], array('multiple' => 'multiple', 'size' => 5), null, false).'</td>';
+ echo '<td>'.$html->submit(_('editors_queue_submit_filter'), array('name' => 'filter')).'<br><br>'.$html->submit(_('editors_queue_submit_clean'), array('name' => 'clear')).'</td>';
+ echo '</tr>';
+ echo '</table>';
+ echo '</form>';
+?>
</div>
<table width="100%">
<tr class="queueHeader">
- <td><?php
- $sorturl = "/editors/queue/{$mode}?sort=name";
- $sortimg = '';
- if ($sortBy == 'name') {
- if ($sortDir == 'ASC') {
- $sortimg = $html->image('developers/arrow_up.png', array('title' => ___('editors_th_sort_ascending', 'ascending sort')));
- $sorturl .= '&dir=desc';
-
- } else {
- $sortimg = $html->image('developers/arrow_down.png', array('title' => ___('editors_th_sort_descending', 'descending sort')));
- $sorturl .= '&dir=asc';
- }
- }
- echo $html->link(___('editors_th_addon'), $sorturl);
- echo $sortimg;
- ?></td>
- <td><?php
- $sorturl = "/editors/queue/{$mode}?sort=type";
- $sortimg = '';
- if ($sortBy == 'type') {
- if ($sortDir == 'ASC') {
- $sortimg = $html->image('developers/arrow_up.png', array('title' => ___('editors_th_sort_ascending', 'ascending sort')));
- $sorturl .= '&dir=desc';
-
- } else {
- $sortimg = $html->image('developers/arrow_down.png', array('title' => ___('editors_th_sort_descending', 'descending sort')));
- $sorturl .= '&dir=asc';
- }
- }
- echo $html->link(___('editors_th_addontype'), $sorturl);
- echo $sortimg;
- ?></td>
+ <td><?=_('editors_th_addon')?></td>
+ <td><?=_('editors_th_addontype')?></td>
<?php
- $apps = array();
+ $apps = array('Sugar');
foreach ($apps as $app) {
echo '<td>'.$html->image('developers/'.strtolower($app).'.png', array('title' => sprintf(_('editors_queue_app_compatibility'), $app))).'</td>';
}
?>
- <td><?php
- $sorturl = "/editors/queue/{$mode}?sort=age";
- $sortimg = '';
- if ($sortBy == 'age') {
- if ($sortDir == 'ASC') {
- // age sort is actually on a timestamp, so age direction is opposite
- $sortimg = $html->image('developers/arrow_down.png', array('title' => ___('editors_th_sort_descending', 'descending sort')));
- $sorturl .= '&dir=desc';
-
- } else {
- $sortimg = $html->image('developers/arrow_up.png', array('title' => ___('editors_th_sort_ascending', 'ascending sort')));
- $sorturl .= '&dir=asc';
- }
- }
- echo $html->link(___('editors_th_nomination_age'), $sorturl);
- echo $sortimg;
- ?></td>
+ <td><?=_('editors_th_age')?></td>
<td><?=_('editors_th_additional_info')?></td>
</tr>
<?php
@@ -165,7 +96,7 @@
echo '<td>&nbsp;</td>';
}
}
- echo '<td>'.(($mode == 'nominated') ? $addon['nominationage'] : $addon['age']).'</td>';
+ echo '<td>'.$addon['age'].'</td>';
echo '<td>'.(!empty($addon['notes']) ? implode('; ', $addon['notes']) : '').'</td>';
echo '</tr>';
$num++;
@@ -179,13 +110,6 @@
}
?>
<div id="helpfulLinks">
-<?=_('editors_helpful_links').': '.$html->link(_('editors_link_policy'), '/pages/policy').' | '.$html->link(_('editors_link_guide'), SITE_EDITOR_WIKI)?>
+<?=_('editors_helpful_links').': '.$html->link(_('editors_link_policy'), '/pages/policy').' | '.$html->link(_('editors_link_guide'), SITE_EDITOR_WIKI')?>
</div>
</div>
-<script type="text/javascript">
-// <![CDATA[
- var addonAutocompleteUrl = '<?=$html->url("/editors/addonAndAuthorLookup/{$mode}")?>';
- var appversionLookupUrl = '<?=$html->url('/editors/appversionLookup/')?>';
- $(document).ready(function() { editors_queue.init(); });
-// ]]>
-</script>
diff --git a/site/app/views/editors/review.thtml b/site/app/views/editors/review.thtml
index f3cb36f..02c0620 100644
--- a/site/app/views/editors/review.thtml
+++ b/site/app/views/editors/review.thtml
@@ -40,15 +40,9 @@
<?=$this->renderElement('developers/editorsmenu');?>
<?php if ($queueRank): ?>
<div class="reviewnav">
- <?php
- if ($filtered) {
- echo sprintf(___('editors_review_rank_in_queue_filtered', '<strong># %1$s</strong> of %2$s in queue (filtered)'), $queueRank, $filteredCount);
- } else {
- echo sprintf(___('editors_review_rank_in_queue'), $queueRank, $filteredCount);
- }
- ?><br/>
- <?php if ($queueRank > 1) echo $html->link(___('editors_review_previous_link'), "/editors/queue/{$reviewType}?num=".($queueRank-1)); ?>
- <?php if ($queueRank < $count[$reviewType]) echo $html->link(___('editors_review_next_link'), "/editors/queue/{$reviewType}?num=".($queueRank+1)); ?>
+ <?php echo sprintf(___('editors_review_rank_in_queue', '<strong># %1$s</strong> of %2$s in queue'), $queueRank, $count[$reviewType]);?><br/>
+ <?php if ($queueRank > 1) echo $html->link(___('editors_review_previous_link', '&laquo; prev'), "/editors/queue/{$reviewType}?num=".($queueRank-1)); ?>
+ <?php if ($queueRank < $count[$reviewType]) echo $html->link(___('editors_review_next_link', 'next &raquo;'), "/editors/queue/{$reviewType}?num=".($queueRank+1)); ?>
</div>
<?php endif; ?>
@@ -67,7 +61,7 @@
<?php
if (!empty($addon['User'])) {
foreach ($addon['User'] as $user) {
- echo '<li>'.$html->linkUserFromModel($user).'</li>';
+ echo '<li>'.$html->link($user['firstname'].' '.$user['lastname'], '/user/'.$user['id']).'</li>';
}
}
?>
@@ -138,15 +132,15 @@
}
?>
</ul>
- <span id="multipleNotice" style="display: none;"><?=___('editors_review_mulitple_notice')?></span>
+ <span id="multipleNotice" style="display: none;">Notice: Only review more than one file if you have tested EVERY file you select.</span>
</div>
<br class="clear">
<div id="links">
- <span id="overview_link"><?=$html->link(___('editors_review_a_item_overview'), '/addon/'.$addon['Addon']['id'])?></span>
- <span id="history_link"><a href="#history"><?=___('editors_review_a_item_history')?></a></span>
- <span id="previews_link"><a href="#previews"><?=___('editors_review_a_previews')?></a></span>
- <?=(!empty($addon['Addon']['homepage'])) ? '<span id="homepage_link">'.$html->link(___('editors_review_a_item_homepage'), $addon['Addon']['homepage']).'</span>' : ''?>
- <?=($this->controller->SimpleAcl->actionAllowed('Admin', 'EditAnyAddon', $this->controller->Session->read('User'))) ? '<span id="edit_link">'.$html->link(___('editors_review_a_edit_item'), '/developers/edit/'.$addon['Addon']['id']).'</span>' : ''?>
+ <span id="overview_link"><?=$html->link('Item Overview', '/addon/'.$addon['Addon']['id'])?></span>
+ <span id="history_link"><a href="#history">Item History</a></span>
+ <span id="previews_link"><a href="#previews">Previews</a></span>
+ <?=(!empty($addon['Addon']['homepage'])) ? '<span id="homepage_link">'.$html->link('Item Homepage', $addon['Addon']['homepage']).'</span>' : ''?>
+ <?=($this->controller->SimpleAcl->actionAllowed('Admin', 'EditAnyAddon', $this->controller->Session->read('User'))) ? '<span id="edit_link">'.$html->link('Edit Item', '/developers/addon/edit/'.$addon['Addon']['id']).'</span>' : ''?>
</div>
<div id="form">
<?php
@@ -156,7 +150,7 @@
<div id="actionbox">
<span id="public" class="action_color" onClick="selectAction('public');"><?=$html->image('developers/public-bw.png', array('id' => 'publicIcon')).' '._('editors_review_action_public')?></span>
<span id="sandbox" class="action_color" onClick="selectAction('sandbox');"><?=$html->image('developers/sandbox-bw.png', array('id' => 'sandboxIcon')).' '._('editors_review_action_sandbox')?></span>
- <span id="info" class="action_color" onClick="selectAction('info');"><?=$html->image('developers/info-bw.png', array('id' => 'infoIcon')).' '.___('editors_review_action_info')?></span>
+ <span id="info" class="action_color" onClick="selectAction('info');"><?=$html->image('developers/info-bw.png', array('id' => 'infoIcon')).' '.___('editors_review_action_info', 'Request More Information')?></span>
<span id="superreview" class="action_color" onClick="selectAction('superreview');"><?=$html->image('developers/superreview-bw.png', array('id' => 'superreviewIcon')).' '._('editors_review_action_request_superreview')?></span>
</div>
<div id="actiondetails">
@@ -179,7 +173,9 @@
}
?>
<div id="details-info" style="display: none;">
- <?=___('editors_review_details_info_request')?>
+ <?=___('editors_review_details_info_request', 'Use this form to request more information '
+ .'from the author. They will receive an email and be able to answer here. You will be '
+ .'notified by email when they reply.');?>
</div>
<div id="details-superreview" style="display: none;">
<?=_('editors_review_details_superreview');?>
@@ -214,7 +210,7 @@
?>
<div id="subscribe">
<?php
- $_subscribetext = ___('editors_review_update_notify_once');
+ $_subscribetext = ___('editors_review_update_notify_once', 'Notify me the next time this add-on is updated. (Subsequent updates will not generate an email)');
echo $html->checkbox('Approval/subscribe', $_subscribetext);
?>
<label for="ApprovalSubscribe"><?=$_subscribetext?></label>
diff --git a/site/app/views/elements/addon_categories.thtml b/site/app/views/elements/addon_categories.thtml
index 96d0e2b..27b68cd 100644
--- a/site/app/views/elements/addon_categories.thtml
+++ b/site/app/views/elements/addon_categories.thtml
@@ -34,7 +34,7 @@
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
- * ***** END LICENSE BLOCK ***** */
+ * ***** END LICENSE BLOCK ***** */
/**
@@ -46,13 +46,16 @@
<?php
// show top-level category for non-extension add-ons
if (!empty($tags)) {
+ // @partial translation fallback, 5/17/08
switch ($tags[0]['Tag']['addontype_id']) {
case ADDON_DICT:
case ADDON_LPAPP:
- $li = $html->link(___('nav_category_dicts_langpacks'), '/browse/type:'.ADDON_DICT);
+ $li = $html->link((_('nav_category_dicts_langpacks')!='nav_category_dicts_langpacks'?
+ _('nav_category_dicts_langpacks'):_('langtools_header_dicts_and_langpacks')), '/browse/type:'.ADDON_DICT);
break;
case ADDON_THEME:
- $li = $html->link(___('nav_category_themes'), '/browse/type:'.ADDON_THEME);
+ $li = $html->link((_('nav_category_themes')!='nav_category_themes'?
+ _('nav_category_themes'):'Themes'), '/browse/type:'.ADDON_THEME);
break;
default:
$li = '';
@@ -61,15 +64,9 @@ if (!empty($tags)) {
}
// regular category list
-$c = 0;
-foreach ($tags as $_tag) {
- if (0 == $c++)
- echo '<li class="first">';
- else
- echo '<li>';
- echo $html->link($_tag['Translation']['name']['string'],
+foreach ($tags as $_tag)
+ echo '<li>'.$html->link($_tag['Translation']['name']['string'],
"/browse/type:{$_tag['Tag']['addontype_id']}/cat:{$_tag['Tag']['id']}")
."</li>\n";
-}
?>
</ul>
diff --git a/site/app/views/elements/addon_listitem.thtml b/site/app/views/elements/addon_listitem.thtml
index cd68b71..9bcfd94 100644
--- a/site/app/views/elements/addon_listitem.thtml
+++ b/site/app/views/elements/addon_listitem.thtml
@@ -62,6 +62,19 @@ if ($hasFiles) {
$addonCreators = $addon['User'];
$addonSummary = $addon['Translation']['summary']['string'];
+// is addon recommended or experimental?
+global $experimental_status;
+if (in_array($addon['Addon']['status'], $experimental_status)) {
+ $flag = _('addon_listitem_flag_experimental');
+ $li_extraclass = 'exp';
+} elseif ($addon['Addon']['recommended']) {
+ $flag = _('addon_listitem_flag_recommended');
+ $li_extraclass = 'rec';
+} else {
+ $flag = '';
+ $li_extraclass = '';
+}
+
// prepare preview image
if (isset($addonPreviewPath) && !empty($addonPreviewPath)) {
$_alt = sprintf(_('img_preview_of'),$addonName);
@@ -103,23 +116,26 @@ $installbutton = $this->renderElement('install', $_install_render_options);
?>
-<li class="addon <?=$html->extraClass($addon)?>">
+<li class="addon <?=$li_extraclass?>">
<div class="irk">
<h3 class="name"><?=$html->link("$icon $addonName", "/addon/{$addonID}");?></h3>
<h4 class="author"> <?=_('addons_home_by')?> <?=$html->linkUsersFromModel($addonCreators, null, "/addon/{$addonID}#authors")?></h4>
- <?=$html->flag($addon)?>
+ <? if (!empty($flag)) echo '<h5 class="flag">'.$flag.'</h5>'; ?>
<?=$previmg ?>
<p class="rating"><?=$this->renderElement('stars',array('rating' => $addon['Addon']['averagerating']))?><?php if ($addon['Addon']['totalreviews'] > 0) { ?> <a href="<?=$html->url('/addon/'.$addon['Addon']['id'].'#reviews')?>"><?=sprintf(ngettext('feature_reviews','feature_reviews', $addon['Addon']['totalreviews']), $addon['Addon']['totalreviews'])?></a><?php } ?></p>
<span class="stats">
<em><?=$html->number_format($addon['Addon']['weeklydownloads'], 0)?></em>
- <?php echo ___('addon_downloads_weekly'); ?>
+ <?php // @partial 4/25/08
+ echo ___('addon_downloads_weekly', _('addon_downloads'));
+ ?>
</span>
<?=$categories?>
<p class="desc"><?=$addonSummary?></p>
<?=$installbutton?>
<p class="updated">
<?php
- $_update_string = ___('addon_detail_last_updated');
+ // @partial 5/08/08, bug 425527
+ $_update_string = (_('addon_detail_last_updated') == 'addon_detail_last_updated') ? 'Updated %s' : _('addon_detail_last_updated');
$_version_date = (isset($addon['Addon']['datestatuschanged']) ? $addon['Addon']['datestatuschanged'] : $addon['Version'][0]['created']);
echo sprintf($_update_string, strftime(_('date'), strtotime($_version_date)));
?>
diff --git a/site/app/views/elements/amo2009/install.thtml b/site/app/views/elements/amo2009/install.thtml
index e938571..c9aab3e 100644
--- a/site/app/views/elements/amo2009/install.thtml
+++ b/site/app/views/elements/amo2009/install.thtml
@@ -179,6 +179,9 @@ if (count($addonFiles) < 1) {
}
}
+ // we are sugar
+ $_class_platform_string = "platform-ALL";
+
// run the right javascript action for the addon type in question
$installTriggerName = "installTrigger" . $file['id'] . $uniqueId;
diff --git a/site/app/views/elements/amo2009/search.thtml b/site/app/views/elements/amo2009/search.thtml
index 1596895..ba682b8 100644
--- a/site/app/views/elements/amo2009/search.thtml
+++ b/site/app/views/elements/amo2009/search.thtml
@@ -267,12 +267,13 @@ if (!isset($category)) $category = array(0, 0);
echo "versions = new Array();\n";
foreach($versions as $application_id => $ver_array) {
echo "versions[{$application_id}] = {";
+ echo "'".___('advanced_search_form_any_version')."' : 'any',\n";
foreach ($ver_array as $version) {
if($version !="") {
echo "\"{$version}\": \"{$version}\", ";
}
}
- echo "'".___('advanced_search_form_any_version')."' : 'any' };\n";
+ echo "};\n";
}
// to get default version value set up correctly needed to do after $appid, $lver and $hver set-up above in this element
diff --git a/site/app/views/elements/app_chooser.thtml b/site/app/views/elements/app_chooser.thtml
index f1cb175..c20acd6 100644
--- a/site/app/views/elements/app_chooser.thtml
+++ b/site/app/views/elements/app_chooser.thtml
@@ -44,7 +44,7 @@ foreach (array_keys($app_shortnames) as $_app) {
$applist[] = '<li id="app-'.$_app.'"><a href="'.$html->url("/$_app/",false,true,false).'">'.$app_prettynames[$_app].'</a></li>';
}
?>
-<div id="other-apps" class="highlight" title="<?=___('other_apps_tooltip');?>">
+<div id="other-apps" title="<?=___('other_apps_tooltip');?>">
<h3><?=_('addons_home_other_applications')?></h3>
<ul id="nav-apps">
<?php foreach ($applist as $_app): ?>
diff --git a/site/app/views/elements/app_compatibility.thtml b/site/app/views/elements/app_compatibility.thtml
index d47ffd5..a60c07e 100644
--- a/site/app/views/elements/app_compatibility.thtml
+++ b/site/app/views/elements/app_compatibility.thtml
@@ -46,7 +46,7 @@ global $app_prettynames, $app_shortnames;
?>
<div class="app_compat">
- <h5><?=_('addons_display_workswith')?></h5>
+ <h4><?=_('addons_display_workswith')?></h4>
<ul>
<?
foreach($compatible_apps as $app):
diff --git a/site/app/views/elements/developers/adminmenu.thtml b/site/app/views/elements/developers/adminmenu.thtml
index 5208464..ef31dc9 100644
--- a/site/app/views/elements/developers/adminmenu.thtml
+++ b/site/app/views/elements/developers/adminmenu.thtml
@@ -47,9 +47,6 @@
if ($this->controller->SimpleAcl->actionAllowed('Admin', 'applications', $this->controller->Session->read('User'))): ?>
<li<?=($page == 'applications') ? ' class="selected"' : ''?>><?=$html->link('Application Manager', '/admin/applications')?></li>
<?php endif;
- if ($this->controller->SimpleAcl->actionAllowed('Admin', 'collections', $this->controller->Session->read('User'))): ?>
- <li<?=($page == 'collections') ? ' class="selected"' : ''?>><?=$html->link('Collections Manager', '/admin/collections')?></li>
- <?php endif;
if ($this->controller->SimpleAcl->actionAllowed('Editors', '%', $this->controller->Session->read('User'))): ?>
<li><?=$html->link('Editor Tools', '/editors')?></li>
<?php endif;
diff --git a/site/app/views/elements/developers/editorsmenu.thtml b/site/app/views/elements/developers/editorsmenu.thtml
index 472ec1a..68dce06 100644
--- a/site/app/views/elements/developers/editorsmenu.thtml
+++ b/site/app/views/elements/developers/editorsmenu.thtml
@@ -59,7 +59,6 @@ if (empty($mode)) {
<li<?=($mode == 'featured') ? ' class="selected"' : ''?>><?=$html->link(_('devcp_editorsqueue_featured'), '/editors/featured')?></li>
<li<?=($page == 'logs') ? ' class="selected"' : ''?>><?=$html->link(_('editorcp_menu_eventlog_link'), '/editors/logs')?></li>
<li<?=($page == 'reviewlog') ? ' class="selected"' : ''?>><?=$html->link(_('editorcp_menu_reviewlog_link'), '/editors/reviewlog')?></li>
- <li<?=($page == 'performance') ? ' class="selected"' : ''?>><?=$html->link(___('editorcp_menu_performance_link', 'Performance'), '/editors/performance')?></li>
<li><?=$html->link(_('editorcp_menu_mainpage_link'), '/')?></li>
</ul>
</div>
diff --git a/site/app/views/elements/developers/myaddons.thtml b/site/app/views/elements/developers/myaddons.thtml
index 708db07..a2eaacd 100644
--- a/site/app/views/elements/developers/myaddons.thtml
+++ b/site/app/views/elements/developers/myaddons.thtml
@@ -44,28 +44,21 @@
}
?>
- <div id="categories" class="secondary-item-list">
+ <div id="categories">
+ <h3><span><?=_('devcp_myaddons_title')?></span></h3>
- <?php if (!$this->controller->Session->check('User')): ?>
- <h4><?=$html->link(_('header_navlink_login'), $html->login_url())?></h4>
- <?php else: ?>
- <h4><?=$html->link(_('devcp_myaddons_link'), '/developers/index')?></h4>
<ul id="cat-list">
+ <?php if ($this->controller->Session->check('User')): ?>
+ <li><?=$html->link(_('devcp_myaddons_link'), '/developers/index')?></li>
<?php
if (!empty($addons)) {
foreach ($addons as $id => $name) {
echo '<li class="indented">';
- echo $html->link($name, '/developers/details/'.$id, array('class' => 'addons'));
+ echo $html->link($name, '/developers/details/'.$id);
echo '</li>';
}
}
?>
- </ul>
- </div>
-
- <div class="secondary-item-list">
- <h4><span><?=_('devcp_myaddons_title')?></span></h4>
- <ul class="">
<li><?=$html->link(_('devcp_myaddons_submitaddon_link'), '/developers/add')?></li>
<li><?=$html->link(_('devcp_myaddons_statistics_link'), '/statistics')?></li>
<?php if ($this->controller->SimpleAcl->actionAllowed('Editors', '*', $this->controller->Session->read('User'))): ?>
@@ -75,8 +68,10 @@
<li><?=$html->link(_('devcp_myaddons_admincp_link'), '/admin')?></li>
<?php endif; ?>
<li><?=$html->link(_('devcp_myaddons_mainpage_link'), '/')?></li>
- </ul>
+ <?php else: ?>
+ <li><?=$html->link(_('header_navlink_login'), $html->login_url())?></li>
<?php endif; ?>
+ </ul>
</div>
</div>
diff --git a/site/app/views/elements/developers/translationbox.thtml b/site/app/views/elements/developers/translationbox.thtml
new file mode 100644
index 0000000..ff8e4c0
--- /dev/null
+++ b/site/app/views/elements/developers/translationbox.thtml
@@ -0,0 +1,158 @@
+<?php
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is addons.mozilla.org site.
+ *
+ * The Initial Developer of the Original Code is
+ * The Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2008
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Justin Scott <fligtar@mozilla.com> (Original Author)
+ *
+ * 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
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/**
+ * Translation Box
+ * Element for rendering a translation box with tabs for the locales. Requires
+ * $this->translationBox be set with defaultLocale, languages, table, and loaded.
+ *
+ * See app/views/developers/addon_edit_descriptions.thtml for sample usage
+ *
+ * Required parameters:
+ * - $field - name of the field
+ * - $translations - array in form of 'en-US' => 'Translation'
+ *
+ * Optional parameters:
+ * - $id - the db id of the object if multiple will be on the same page
+ * - $type - type of field - textbox or textarea (default)
+ * - $width - width of the field, defaults to 600px
+ * - $height - height of the field, defaults to 20 for textboxes and 100 for textareas
+ * - $maxLength - maximum number of characters for a field
+ * - $displayName - the name of the field for the header
+ * - $description - description of the field
+ * - $graybox - whether to display in a graybox
+ */
+
+if (!isset($graybox) || $graybox === true) {
+ echo '<div class="translation-box graybox rounded spaced" style="width: '.(!empty($width) ? $width : '600px').';">';
+}
+ echo (!empty($displayName) ? '<h4><a href="#" title="'.___('devcp_transbox_a_title_help').'" onclick="translation_box.showHelp(this); return false;">'.$html->image('developers/help.png', array('alt' => ___('devcp_transbox_alt_help'))).'</a>'.$displayName.' </h4>' : '');
+ echo (!empty($description) ? "<p>{$description}</p>" : '');
+ ?>
+ <div class="translation-row">
+ <div class="translation-tabs">
+ <?php
+ // Make sure default locale is present
+ if (!array_key_exists($this->translationBox['defaultLocale'], $translations)) {
+ $translations[$this->translationBox['defaultLocale']] = '';
+ }
+
+ foreach ($translations as $locale => $translation) {
+ echo '<div class="translation-tab'.($this->translationBox['defaultLocale'] == $locale ? ' selected' : '').'" onclick="translation_box.switchLocale(this, \''.$locale.'\');" title="'.$this->translationBox['languages'][$locale].'">';
+ echo $locale.'</div>';
+ }
+ ?>
+ </div>
+ <div class="translation-button"><?=$html->image('developers/tab_add.png', array('onclick' => 'translation_box.addTab(this);', 'alt' => ___('devcp_transbox_img_add_trans'), 'title' => ___('devcp_transbox_img_add_trans')))?></div>
+ <div class="translation-button remove" style="display: none;"><?=$html->image('developers/tab_delete.png', array('onclick' => 'translation_box.confirmRemove(this);', 'alt' => ___('devcp_transbox_img_remove_trans'), 'title' => ___('devcp_transbox_img_remove_trans')))?></div>
+ </div>
+ <div class="translation-area" table="<?=$this->translationBox['table']?>" field="<?=$field?>" defaultLocale="<?=$this->translationBox['defaultLocale']?>"<?=(!empty($id) ? ' itemID="'.$id.'"' : '')?>>
+ <?php
+ foreach ($translations as $locale => $translation) {
+ $fieldName = "data[{$this->translationBox['table']}]".(!empty($id) ? "[{$id}]" : '')."[{$field}][{$locale}]";
+
+ if (empty($type) || $type == 'textarea') {
+ echo '<textarea class="input '.$locale.($this->translationBox['defaultLocale'] == $locale ? ' selected' : '').'" name="'.$fieldName.'" cols="" rows="" style="height: '.(!empty($height) ? $height : '100').'px;"'.(!empty($maxLength) ? ' maxlength="'.$maxLength.'" onkeyup="translation_box.checkLength(this, '.$maxLength.');" onchange="translation_box.checkLength(this, '.$maxLength.');"' : '').'>'.$translation.'</textarea>';
+ }
+ elseif ($type == 'textbox') {
+ echo '<input type="text" class="input '.$locale.($this->translationBox['defaultLocale'] == $locale ? ' selected' : '').'" name="'.$fieldName.'" value="'.$html->entities($translation).'" style="height: '.(!empty($height) ? $height : '20').'px;" '.(!empty($maxLength) ? ' maxlength="'.$maxLength.'"' : '').' />';
+ }
+
+ if (!empty($maxLength)) {
+ echo '<div class="translation-maxlength '.$locale.($this->translationBox['defaultLocale'] == $locale ? ' selected' : '').'">'.$html->image('developers/exclamation.png', array('alt' => '')).sprintf(___('devcp_transbox_chars_used'), '<span>'.strlen($translation).'</span>', $maxLength).'</div>';
+ }
+ }
+ ?>
+ </div>
+
+<?php
+if (!isset($graybox) || $graybox === true) {
+ echo '</div>';
+}
+?>
+
+<?php if (!$this->translationBox['loaded']): ?>
+<div class="translation-newlocale-container">
+ <div class="translation-newlocale new selected">
+ <div class="padded">
+ <?=___('devcp_transbox_select_locale')?>
+ <select>
+ <?php
+ foreach ($this->translationBox['languages'] as $code => $name) {
+ echo '<option value="'.$code.'">'.$name.' ('.$code.')</option>';
+ }
+ ?>
+ </select>
+ <div class="buttons">
+ <input type="button" value="<?=___('devcp_transbox_input_add_locale')?>" onclick="translation_box.addLocale(this, false);" />
+ <input type="button" value="<?=___('devcp_transbox_input_add_all')?>" onclick="translation_box.addLocale(this, true);" />
+ <input type="button" value="<?=___('devcp_transbox_input_cancel')?>" onclick="translation_box.cancelAdd(this);" />
+ </div>
+ </div>
+ </div>
+</div>
+<div class="translation-deletelocale-container">
+ <div class="translation-deletelocale">
+ <div class="padded">
+ <?=___('devcp_transbox_delete_sure')?>
+ <div class="buttons">
+ <input type="button" value="<?=___('devcp_transbox_input_delete')?>" onclick="translation_box.removeLocale(this);" />
+ <input type="button" value="<?=___('devcp_transbox_input_cancel')?>" onclick="translation_box.cancelRemove(this);" />
+ </div>
+ </div>
+ </div>
+</div>
+<div class="translation-help-container">
+ <div class="translation-help bluebox-tr"><div class="bluebox-tl">
+ <div class="padded">
+ <h4><?=sprintf(___('devcp_transbox_help_header_tabs'), $this->translationBox['defaultLocale'])?></h4>
+ <p><?=___('devcp_transbox_help_transbox')?></p>
+ <h4><?=___('devcp_transbox_help_header_what')?></h4>
+ <p><?=___('devcp_transbox_help_if')?>
+ <div style="text-align: right;"><a href="#" onclick="translation_box.hideHelp(this); return false;"><?=___('devcp_transbox_help_hide')?></a></div>
+ </div>
+ <div class="bluebox-br"><div class="bluebox-bl"></div></div>
+ </div></div>
+</div>
+<div class="translation-error-container">
+ <div class="translation-error error-message rounded"></div>
+</div>
+<?php
+ $this->translationBox['loaded'] = true;
+ endif;
+?> \ No newline at end of file
diff --git a/site/app/views/elements/feature.thtml b/site/app/views/elements/feature.thtml
index 2f43bcb..17ac654 100644
--- a/site/app/views/elements/feature.thtml
+++ b/site/app/views/elements/feature.thtml
@@ -98,12 +98,19 @@ else
<p class="desc"><?=$addonSummary?></p>
<p class="rating"><?=$this->renderElement('stars',array('rating' => $addonRating))?><?php if ($addonReviews > 0) { ?> <a href="<?=$html->url('/addon/'.$addonId.'#reviews')?>"><?=sprintf(ngettext('feature_reviews','feature_reviews', $addonReviews), $addonReviews)?></a><?php } ?></p>
<p class="stats"><em><?=$html->number_format($addonWeeklyDownloads, 0)?></em>
-<?php echo ___('addon_downloads_weekly'); ?>
+<?php
+// @partial 4/25/08
+echo (_('addon_downloads_weekly') == 'addon_downloads_weekly') ? _('addon_downloads') : _('addon_downloads_weekly');
+?>
</p>
<?php if (isset($addonFiles)): ?>
<p class="updated">
- <?php echo sprintf(___('addon_detail_last_updated'), strftime(_('date'), strtotime($addonVersionCreated))); ?>
+ <?php
+ // @partial 5/08/08, bug 425527
+ $_update_string = (_('addon_detail_last_updated') == 'addon_detail_last_updated') ? 'Updated %s' : _('addon_detail_last_updated');
+ echo sprintf($_update_string, strftime(_('date'), strtotime($addonVersionCreated)));
+ ?>
</p>
<?=$this->renderElement('install',array(
diff --git a/site/app/views/elements/fyf_promotion.thtml b/site/app/views/elements/fyf_promotion.thtml
new file mode 100644
index 0000000..3d668e8
--- /dev/null
+++ b/site/app/views/elements/fyf_promotion.thtml
@@ -0,0 +1,60 @@
+<?php
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is addons.mozilla.org site.
+ *
+ * The Initial Developer of the Original Code is
+ * The Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Mike Morgan <morgamic@mozilla.com> (Original Author)
+ * Frederic Wenzel <fwenzel@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
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+?>
+<?php
+/**
+ * This element is behaves like the "feature" element but is a promotion for
+ * fashionyourfirefox.com.
+ */
+
+$_alt = sprintf(_('img_preview_of'), 'Fashion Your Firefox');
+$targeturl = '/fashionyourfirefox';
+?>
+
+<h4 class="name" title="<?=___('addons_title_tooltip') ?>"><a href="<?=$html->url($targeturl)?>"><img src="<?=$html->urlImage('fyf/fyf_promo_icon.png')?>" width="40" height="50" alt="" class="icon"/>Fashion Your Firefox</a></h4>
+<h5 class="author" title="<?=___('addons_author_tooltip') ?>"><?=_('addons_home_by')?> <?=$html->link('Mozilla', 'http://mozilla.com');?></h5>
+<p class="preview-img"><a href="<?=$html->url($targeturl)?>"><img src="<?=$html->urlImage('fyf/fyf_promo_preview.jpg')?>" alt="<?=$_alt?>" title="<?=$_alt?>"/></a></p>
+<p class="desc">
+ Why not customize your Firefox for the things you really love to do? Take
+ your browser from simple to spectacular. Add a personal touch to your browser
+ with Fashion Your Firefox, a simple Web application that customizes your Firefox
+ browser based on your interests and online activities. Select multiple add-ons
+ that fit your needs and install them with just one click.
+</p>
+<p class="more-from">Find out how to <?=$html->link('Fashion Your Firefox', $targeturl, array('class'=>'view'))?></p>
diff --git a/site/app/views/elements/install.thtml b/site/app/views/elements/install.thtml
index fb0b6af..60a5055 100644
--- a/site/app/views/elements/install.thtml
+++ b/site/app/views/elements/install.thtml
@@ -50,17 +50,13 @@
* - $addonStatus
* - $allPlatforms - There should only be one platform in the list when this is used on the eula view.
* - $addonType - default ADDON_EXTENSION
- * - $collection_uuid - if this add-on download is collection related, this will set a tracking code in the download ID. default null
* - $buttonMessage - default 'a_install'
- * - $showInstructions - Show install instructions for Thunderbird or Seamonkey, defaults to true
*/
global $browser_apps, $experimental_status, $valid_status;
/* prepare add-on type */
if (!isset($addonType)) $addonType = ADDON_EXTENSION;
-if (!isset($showInstructions)) $showInstructions = true;
-
/* logged in users can install experimental add-ons */
$loggedin = $this->controller->Session->check('User');
@@ -100,13 +96,13 @@ if (count($addonFiles) < 1) {
// If we're looking at thunderbird pages, and there is no EULA, show the TB
// install instructions. Bug 401272 fixed the button so it downloads instead of
// installs, but it doesn't hurt to have these instructions still.
- if (APP_ID == APP_THUNDERBIRD && empty($addonEULA) && $showInstructions) {
+ if (APP_ID == APP_THUNDERBIRD && empty($addonEULA)) {
echo '<div class="app_install">';
echo '<h3>'._('addons_install_in_thunderbird_title').'</h3>';
echo _('addons_install_in_thunderbird');
echo '</div>';
}
- if (APP_ID == APP_SUNBIRD && empty($addonEULA) && $showInstructions) {
+ if (APP_ID == APP_SUNBIRD && empty($addonEULA)) {
echo '<div class="app_install">';
echo '<h3>'._('addons_install_in_sunbird_title').'</h3>';
echo _('addons_install_in_sunbird');
@@ -147,116 +143,94 @@ if (count($addonFiles) < 1) {
if ($addonType != ADDON_SEARCH) {
/* install for search */
if (in_array(APP_ID, $browser_apps)) {
- // prepare link options for browser apps
+ // prepare onclick install for browser apps
$linkOptions = array(
'id' => $installTriggerName,
'title' => sprintf(_('install_button_title'), $addonName, APP_PRETTYNAME),
'addonName' => $addonName,
'addonIcon' => $addonIconPath,
'addonHash' => $file['hash'],
- 'jsInstallMethod' => 'browser_app_addon_install',
+ 'onclick' => "return install(event,"
+ ."document.getElementById('{$installTriggerName}').getAttribute('addonName'), "
+ ."document.getElementById('{$installTriggerName}').getAttribute('addonIcon'), "
+ ."document.getElementById('{$installTriggerName}').getAttribute('addonHash'));"
);
} else {
- // prepare link options for non-browser apps
+ // prepare onclick install for non-browser apps
$linkOptions = array('id' => $installTriggerName,
'title'=>sprintf(_('install_download'),$addonName));
}
} else {
- /* prepare link options for search engines */
+ /* special install javascript for search engines */
$linkOptions = array(
'id' => $installTriggerName,
'title' => sprintf(_('install_button_title'), $addonName, APP_PRETTYNAME),
- 'engineURL' => FULL_BASE_URL . $html->urlFile($file['id'], $file['filename'], @$collection_uuid),
- // search engines use a special install method
- 'jsInstallMethod' => 'search_engine_install',
+ 'onclick' => "return addEngine('".FULL_BASE_URL.$html->urlFile($file['id'], $file['filename'])."');"
);
}
?>
- <?php
- $install_button_html = '';
- if (empty($addonEULA)) {
- // wipe disallowed characters off the displayed filename
- $addon_filename = $html->entities(preg_replace(
- INVALID_FILENAME_CHARS, '_', $html->unsanitize($file['filename'])));
-
- // if this is the latest public version, use perma-URL. Otherwise, link directly to file.
- $linktitle = '<span><span><span><strong>'.sprintf(_('a_download'),$_install_platform_string).'</strong></span></span></span>';
- if ($is_latest && $file['status'] == STATUS_PUBLIC) {
- $latest_permalink = "/downloads/latest/{$addonId}";
- if ($file['platform_id'] != PLATFORM_ALL) $latest_permalink .= "/platform:{$file['platform_id']}";
-
- $file_id = $this->controller->File->getLatestFileByAddonId($addonId);
- $file_data = $this->controller->File->findById($file_id);
- $path_info = pathinfo($file_data['File']['filename']);
-
- $latest_permalink .= "/addon-${addonId}-latest.".$path_info['extension'];
-
- if (!empty($collection_uuid)) $latest_permalink .= "?collection_id={$collection_uuid}";
-
- $install_button_html .= $html->link($linktitle, $latest_permalink, $linkOptions);
- } else {
- $install_button_html .= $html->linkFile($file['id'], $linktitle, null,
- $linkOptions, false, $addon_filename, @$collection_uuid);
- }
- } else {
- $eula_attributes = array('id' => $installTriggerName,
- 'addonName' => $addonName,
- 'title' => sprintf(_('install_button_title'), $addonName, APP_PRETTYNAME),
- 'isEULAPageLink' => 'true');
- $install_button_html .= $html->link('<span><span><span><strong>'
- .sprintf(_('a_download'),$_install_platform_string)
- .'</strong></span></span></span>',
- "/addons/policy/0/{$addonId}/{$file['id']}",
- $eula_attributes, false, false);
- }
- /**
- * For logged-in users or public add-ons, show the standard install button.
- */
- if ($loggedin || !in_array($file['status'], $experimental_status) || (isset($is_eula_page) && isset($_GET['confirmed']))):
- ?>
- <p class="install-button <?=$_class_platform_string?>">
- <?= $install_button_html ?>
- </p>
<?php
/**
- * For sandbox add-ons, show a frozen version of the standard install button.
- * Users unfreeze the button client-side by checking a confirmation box.
- * Non-JS users must unfreeze by logging in.
+ * For logged-in users or public add-ons.
*/
- else:
+ if ($loggedin || !in_array($file['status'], $experimental_status)):
?>
- <div class="exp-loggedout install">
- <div class="exp-confirm-install" style="display: none">
- <input type="checkbox" name="confirm-<?= $addonId ?>" />
- <div class="exp-desc">
- <label for="exp-confirm-install-checkbox-<?=$addonId?>"></label>
- <span><?= sprintf(___('install_button_confirm_exp_install'), $html->url('/pages/faq#experimental-addons')) ?></span>
- </div>
- </div>
-
- <p class="install-button <?=$_class_platform_string?>" style="display: none">
- <?= $install_button_html ?>
- </p>
-
- <noscript>
- <p class="install-button <?=$_class_platform_string?>">
- <?php
- $login_url = $html->login_url('/'.LANG.'/'.APP_SHORTNAME."/addon/{$addonId}", false);
- $attributes = array('id' => $installTriggerName,
+ <p class="install-button <?=$_class_platform_string?>">
+ <?php
+ if (empty($addonEULA)) {
+ // wipe disallowed characters off the displayed filename
+ $addon_filename = $html->entities(preg_replace(
+ INVALID_FILENAME_CHARS, '_', $html->unsanitize($file['filename'])));
+
+ // if this is the latest public version, use perma-URL. Otherwise, link directly to file.
+ $linktitle = '<span><span><span><strong>'.sprintf(_('a_download'),$_install_platform_string).'</strong></span></span></span>';
+ if ($is_latest && $file['status'] == STATUS_PUBLIC) {
+ $latest_permalink = "/downloads/latest/{$addonId}";
+ if ($file['platform_id'] != PLATFORM_ALL) $latest_permalink .= "/platform:{$file['platform_id']}";
+ echo $html->link($linktitle, $latest_permalink, $linkOptions);
+ } else {
+ echo $html->linkFile($file['id'], $linktitle, null,
+ $linkOptions, false, $addon_filename);
+ }
+ } else {
+ $eula_attributes = array('id' => $installTriggerName,
'addonName' => $addonName,
'title' => sprintf(_('install_button_title'), $addonName, APP_PRETTYNAME));
echo $html->link('<span><span><span><strong>'
.sprintf(_('a_download'),$_install_platform_string)
.'</strong></span></span></span>',
- $login_url, $attributes, false, false);
+ "/addons/policy/0/{$addonId}/{$file['id']}",
+ $eula_attributes, false, false);
+ }
+ ?>
+ </p>
- $exp_addon_url = "/pages/faq#experimental-addons";
- ?>
- </p>
- <?= sprintf(___('install_a_login_to_install'), $html->url($login_url), $html->url($exp_addon_url)); ?>
- </noscript>
+
+ <?php
+ /**
+ * For sandbox add-ons.
+ */
+ else: /* don't allow install of experimental add-ons before login */
+ ?>
+ <div class="exp-loggedout install">
+ <p class="install-button <?=$_class_platform_string?>">
+ <?php
+ $login_url = $html->login_url('/'.LANG.'/'.APP_SHORTNAME."/addon/{$addonId}", false);
+ $attributes = array('id' => $installTriggerName,
+ 'addonName' => $addonName,
+ 'title' => sprintf(_('install_button_title'), $addonName, APP_PRETTYNAME));
+ echo $html->link('<span><span><span><strong>'
+ .sprintf(_('a_download'),$_install_platform_string)
+ .'</strong></span></span></span>',
+ $login_url, $attributes, false, false);
+ ?>
+ </p>
+ <?php
+ $exp_addon_url = "/pages/faq#experimental-addons";
+ echo sprintf(___('install_a_login_to_install'), $html->url($login_url), $html->url($exp_addon_url));
+ ?>
</div>
<?php endif; ?>
<script type="text/javascript">
@@ -265,42 +239,44 @@ if (count($addonFiles) < 1) {
<?php
}
echo "</div>";
+ ?>
- // show all add-on versions for all platforms on the
- // "all versions" page
- // This script will detect which install button should show, and hide the rest
- echo '<script type="text/javascript">'.
- 'setTimeout(function() {';
- echo "initExpConfirm('{$versionId}');";
- $versionsPage = false;
- if (!($this->name == 'Addons' && $this->action == 'versions')) {
- echo "fixPlatformLinks('{$versionId}', document.getElementById('{$installTriggerName}').getAttribute('addonName'));";
- } else {
- $versionsPage = true;
- }
+ <?php
+
+ if ($loggedin || !in_array($file['status'], $experimental_status)) {
+ // show all add-on versions for all platforms on the
+ // "all versions" page
+ // This script will detect which install button should show, and hide the rest
+ echo '<script type="text/javascript">'.
+ 'setTimeout(function() {';
+ $versionsPage = false;
+ if (!($this->name == 'Addons' && $this->action == 'versions')) {
+
+ echo "fixPlatformLinks('{$versionId}', document.getElementById('{$installTriggerName}').getAttribute('addonName'));";
+ } else {
+ $versionsPage = true;
+ }
- // show add-on compatibility hints for Firefox
- if (APP_ID == APP_FIREFOX && !empty($compatible_apps)) {
- $fromVer = $toVer = null;
- foreach ($compatible_apps as $app) {
- if ($app['Application']['application_id'] == APP_FIREFOX) {
- $fromVer = $app['Min_Version']['version'];
- $toVer = $app['Max_Version']['version'];
+ // show add-on compatibility hints for Firefox
+ if (APP_ID == APP_FIREFOX && !empty($compatible_apps)) {
+ $fromVer = $toVer = null;
+ foreach ($compatible_apps as $app) {
+ if ($app['Application']['application_id'] == APP_FIREFOX) {
+ $fromVer = $app['Min_Version']['version'];
+ $toVer = $app['Max_Version']['version'];
+ }
+ }
+ if ($fromVer && $toVer) {
+ // show "ignore" link for logged in users only
+ $_loggedin = $this->controller->Session->check('User');
+ echo "addCompatibilityHints('{$addonId}', '{$versionId}', "
+ ."'{$fromVer}', '{$toVer}', '{$_loggedin}', '{$versionsPage}');";
+ }
}
- }
- if ($fromVer && $toVer) {
- // show "ignore" link for logged in users only
- $_loggedin = $this->controller->Session->check('User');
- echo "addCompatibilityHints('{$addonId}', '{$versionId}', "
- ."'{$fromVer}', '{$toVer}', '{$_loggedin}', '{$versionsPage}');";
- }
+ echo "},0);"
+ .'</script>';
+
}
- echo "},0);".
- '</script>';
- ?>
-
-
-<?php
}
?>
diff --git a/site/app/views/elements/pitch.thtml b/site/app/views/elements/pitch.thtml
index b7c96f0..5fdeafd 100644
--- a/site/app/views/elements/pitch.thtml
+++ b/site/app/views/elements/pitch.thtml
@@ -43,6 +43,13 @@
// display appropriate links for browser/non-browser apps
global $browser_apps;
+// we are sugar
+if (true) {
+ $pitch_links = array(
+ '/browse/type:'.ADDON_ACTIVITY.'/cat:all?sort=name' => _('sidebar_pitch_activity'),
+ '/browse/type:'.ADDON_CONTENT.'/cat:all?sort=name' => _('sidebar_pitch_content')
+ );
+} else
if (in_array(APP_ID, $browser_apps)) {
$pitch_links = array(
'/browse/type:'.ADDON_THEME.'/cat:all?sort=name' => _('sidebar_pitch_theme'),
@@ -65,11 +72,12 @@ if (in_array(APP_ID, $browser_apps)) {
<?php endforeach; ?>
</ul>
<?php
+ // @partial - 04-29-08
// RSS links the hard way, bug 426541
- $subscribeHeader = ___('sidebar_pitch_subscribe_to');
- $newestLink = ___('sidebar_pitch_newest_addons');
- $updatedLink = ___('sidebar_pitch_updated_addons');
- $featuredLink = ___('sidebar_pitch_featured_addons');
+ $subscribeHeader = _('sidebar_pitch_subscribe_to') == 'sidebar_pitch_subscribe_to' ? 'Subscribe to' : _('sidebar_pitch_subscribe_to');
+ $newestLink = _('sidebar_pitch_newest_addons') == 'sidebar_pitch_newest_addons' ? 'Newest Add-ons' : _('sidebar_pitch_newest_addons');
+ $updatedLink = _('sidebar_pitch_updated_addons') == 'sidebar_pitch_updated_addons' ? 'Updated Add-ons' : _('sidebar_pitch_updated_addons');
+ $featuredLink = _('sidebar_pitch_featured_addons') == 'sidebar_pitch_featured_addons' ? 'Featured Add-ons' : _('sidebar_pitch_featured_addons');
?>
<br/>
<h3><?=$subscribeHeader?></h3>
diff --git a/site/app/views/elements/search.thtml b/site/app/views/elements/search.thtml
index 60cedc3..ed17837 100644
--- a/site/app/views/elements/search.thtml
+++ b/site/app/views/elements/search.thtml
@@ -67,19 +67,18 @@ $min_display_version_by_app = array( // eventually this information should be ke
$new_versions = array();
foreach ($app_shortnames as $n => $k) {
// AmoVersions is from controller->beforeRender()
- if (!empty($AmoVersions[$k])) foreach ($AmoVersions[$k] as $version) {
+ foreach ($AmoVersions[$k] as $version) {
$versions_parts = explode(".", $version);
$second_part = (isset($versions_parts[1])) ? ".".intval($versions_parts[1]) : "";
if (!isset($min_display_version_by_app[$k])
|| $min_display_version_by_app[$k] <= $versions_parts[0].$second_part ) {
- if ($k != APP_FIREFOX || !in_array($versions_parts[0].$second_part, array('1.4','3.1'))) { // yuck. Baz didn't like FF 1.4. Nick didn't like FF 3.1.
+ if ($k != APP_FIREFOX || $versions_parts[0].$second_part !== '1.4') { // yuck. Baz didn't like FF 1.4
$new_versions[$k][] = $versions_parts[0].$second_part;
}
}
}
- if (!empty($new_versions[$k]))
- $new_versions[$k] = array_unique($new_versions[$k]);
+ $new_versions[$k] = array_unique($new_versions[$k]);
}
$versions = $new_versions;
diff --git a/site/app/views/errors/error404.thtml b/site/app/views/errors/error404.thtml
index 42a3a09..c204a47 100644
--- a/site/app/views/errors/error404.thtml
+++ b/site/app/views/errors/error404.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
@@ -47,14 +46,15 @@ if ($_SERVER['SERVER_NAME'] == 'localhost') {
<?php
} else {
-$this->layout='amo2009'; // use regular layout
+$this->layout='mozilla'; // use regular layout
?>
-<div class="secondary" role="complementary">
- <?=$this->renderElement('amo2009/categories')?>
-</div>
-<div class="primary prose" role="main">
- <?=$this->renderElement('amo2009/search')?>
+<div id="content">
+ <?=$this->renderElement('search')?>
+ <?=$this->renderElement('sidebar', array('pitch' => true))?>
+ <?=$this->renderElement('app_chooser')?>
+
+ <div id="content-main">
<div class="error-notice">
@@ -71,5 +71,6 @@ $this->layout='amo2009'; // use regular layout
?>
</div>
+ </div>
</div>
<?php } ?>
diff --git a/site/app/views/helpers/addons_html.php b/site/app/views/helpers/addons_html.php
index e996a82..b2d90b6 100644
--- a/site/app/views/helpers/addons_html.php
+++ b/site/app/views/helpers/addons_html.php
@@ -123,7 +123,7 @@ class AddonsHtmlHelper extends HtmlHelper
/**
* creates an <a href> link to a file
*/
- function linkFile($fileId, $title, $path, $htmlAttributes = array(), $return = false, $filename = null, $collection_id = null) {
+ function linkFile($fileId, $title, $path, $htmlAttributes = array(), $return = false, $filename = null) {
if (strpos($path, '://')!==false) {
$url = $path;
} else {
@@ -141,17 +141,13 @@ class AddonsHtmlHelper extends HtmlHelper
// optionally add file name for Save As to work correctly
if (!empty($filename))
$url .= "/$filename";
-
- // optionally add a collection stats code to the URL
- if (!empty($collection_id))
- $url .= "?collection_id={$collection_id}";
}
return $this->output(sprintf($this->tags['link'], $url, $this->parseHtmlOptions($htmlAttributes, null, '', ' '), $title), $return);
}
/**
* returns the url to $fileId
*/
- function urlFile($fileId, $filename = null, $collection_id = null) {
+ function urlFile($fileId, $filename = null) {
$url = $this->base . '/';
$url .= LANG;
$url .= '/'.APP_SHORTNAME;
@@ -160,11 +156,7 @@ class AddonsHtmlHelper extends HtmlHelper
//optionally add file name for Save As to work correctly
if (!empty($filename))
$url .= "/$filename";
-
- // optionally add a collection stats code to the URL
- if (!empty($collection_id))
- $url .= "?collection_id={$collection_id}";
-
+
return $url;
}
@@ -215,7 +207,7 @@ class AddonsHtmlHelper extends HtmlHelper
$showOthers = false;
}
- $text = @implode(", ", array_map(array(&$this, 'linkUserFromModel'), $usersModel));
+ $text = implode(", ", array_map(array(&$this, 'linkUserFromModel'), $usersModel));
if ($showOthers) {
$text .= ', ';
@@ -229,23 +221,12 @@ class AddonsHtmlHelper extends HtmlHelper
}
/**
- * Helper for getting a URL without application and locale.
- */
- function rootUrl($url = null) {
- return $this->url($url, false, false, false);
- }
-
- /**
* locale and application aware url generator function
*/
function url($url = null, $return = false, $addLocale = true, $addApplication = true) {
$oldbase = $this->base;
- if (!empty($this->plugin)) {
- $newbase = strip_plugin($this->base, $this->plugin);
- } else {
- $newbase = $this->base;
- }
+ $newbase = strip_plugin($this->base, $this->plugin);
// Rewrite base address to include locale, if applicable
if ($addLocale && $this->addLocale) {
@@ -267,7 +248,7 @@ class AddonsHtmlHelper extends HtmlHelper
$newbase .= '/'.APP_SHORTNAME;
}
- if (!empty($this->plugin)) {
+ if ($this->plugin) {
$newbase .= '/'.$this->plugin;
}
@@ -288,22 +269,18 @@ class AddonsHtmlHelper extends HtmlHelper
// Shouldn't see anything weird here, because it has to be a valid cake url
$_forward_to = empty($this->params['url']['url']) ? '' : $this->params['url']['url'];
}
- $get_params = array();
if ($add_get_parameters) {
// add GET parameters
+ $get_params = array();
foreach($this->params['url'] as $_key => $_param)
if ($_key != 'url') $get_params[] = "{$_key}={$_param}";
if (!empty($get_params)) $_forward_to .= '?'.implode('&',$get_params);
}
- if(!isset($this->params['url']['to'])) {
- $_forward_to = urlencode($_forward_to); // urlencode entities in the parameters
- } else {
- $_forward_to = urlencode($this->params['url']['to']);
- }
-
+ $_forward_to = urlencode($_forward_to); // urlencode entities in the parameters
$_forward_to = '?to='.$_forward_to;
+
return '/users/log'.(!$logout?'in':'out').$_forward_to;
}
@@ -506,95 +483,13 @@ class AddonsHtmlHelper extends HtmlHelper
return $this->output(implode("\n", $select), $return);
}
- function truncateChars($length, $string, $onSpaces = false) {
+ function truncateChars($length, $string) {
if (mb_strlen($string) <= $length) {
return $string;
} else {
- if($onSpaces) {
- $string = mb_substr($string, 0, $length-3);
- $sub = mb_substr($string, 0, mb_strrpos($string, ' '));
- } else {
- $sub = mb_substr($string, 0, $length - 3);
- }
+ $sub = mb_substr($string, 0, $length - 3);
return $sub.'...';
}
}
-
- /**
- * Returns the value of $statusMap according to the status of $addon.
- *
- * @param array $addon Addon object
- * @param array $statusMap assoc array with keys 'experimental',
- * 'recommended', and 'default'
- */
- function byStatus($addon, $statusMap) {
- global $experimental_status;
- if (in_array($addon['Addon']['status'], $experimental_status)) {
- return $statusMap['experimental'];
- } elseif ((isset($addon['Addon']['recommended']) && $addon['Addon']['recommended']) || $this->isFeatured($addon))
- {
- return $statusMap['recommended'];
- } else {
- return $statusMap['default'];
- }
- }
-
- function extraClass($addon, $default='') {
- return $this->byStatus($addon, array('experimental' => 'exp',
- 'recommended' => 'rec',
- 'default' => $default));
- }
-
- /**
- * Returns true or false if the addon is featured
- *
- * @param array $addon Addon object
- * @return boolean True/false if addon is featured
- */
- function isFeatured($addon) {
- $featured = false;
-
- foreach($addon['AddonTag'] as $tag) {
- if($tag['feature'] == 1) {
- $featured = true;
- break;
- }
- }
- return $featured;
- }
-
- function flag($addon, $default='') {
- $flag = $this->byStatus($addon, array(
- 'experimental' => $this->link(___('addon_listitem_flag_experimental'),
- '/pages/faq#experimental-addons'),
- 'recommended' => $this->link(___('addon_listitem_flag_recommended'),
- '/pages/faq#recommended-addons'),
- 'default' => $default
- ));
- if (!empty($flag)) {
- return '<h5 class="flag">'.$flag.'</h5>';
- } else {
- return '';
- }
- }
-
- /**
- * This is copied from cake, but with less fail.
- *
- * If $model->validationErrors[$field] is 1, we'll show $default_text.
- * This is for backwards compat with $model->invalidate.
- *
- * If $model->validationErrors[$field] is a string, we'll use that as
- * the error message.
- */
- function tagErrorMsg($field, $text) {
- $this->setFormTag($field);
- if ($error = $this->tagIsInvalid($this->model, $this->field)) {
- $msg = is_string($error) ? $error : $text;
- return sprintf('<div class="error_message">%s</div>', $msg);
- } else {
- return null;
- }
- }
}
?>
diff --git a/site/app/views/helpers/link.php b/site/app/views/helpers/link.php
index e42d1d6..3c17cc5 100644
--- a/site/app/views/helpers/link.php
+++ b/site/app/views/helpers/link.php
@@ -49,27 +49,5 @@ class LinkHelper extends Helper
return $this->output($o);
}
-
- /**
- * Create a link to a collection.
- * @param array $coll Collection (from collection model)
- * @param string $app (optional) application to link to, defaults to current app
- */
- function collection($coll, $app = null) {
- if (empty($coll)) return false;
-
- $url = '/collection/';
- if (!empty($coll['Collection']['nickname']))
- $url .= $coll['Collection']['nickname'];
- else
- $url .= $coll['Collection']['uuid'];
-
- if (!empty($app)) {
- return $this->Html->linkNoLocaleNoApp($coll['Translation']['name']['string'],
- sprintf('/%s/%s%s', LANG, $app, $url));
- } else {
- return $this->Html->link($coll['Translation']['name']['string'], $url);
- }
- }
}
?>
diff --git a/site/app/views/helpers/listing.php b/site/app/views/helpers/listing.php
index 33bceb1..cb71113 100644
--- a/site/app/views/helpers/listing.php
+++ b/site/app/views/helpers/listing.php
@@ -95,7 +95,7 @@ class ListingHelper extends Helper
elseif ($encode)
echo '"'.urlencode($value).'",'."\n";
else
- echo "'".preg_replace('/\n/', '\n', addslashes($value))."',\n";
+ echo "\"{$value}\",\n";
}
}
echo str_repeat("\t", $tab).'}'.($tab == 0 ? '' : ',')."\n";
diff --git a/site/app/views/helpers/pagination.php b/site/app/views/helpers/pagination.php
index 3bb2243..51b9961 100644
--- a/site/app/views/helpers/pagination.php
+++ b/site/app/views/helpers/pagination.php
@@ -194,8 +194,13 @@ class PaginationHelper extends Helper
$upperLimit = $upperLimit-1;
for ($i = $lowerLimit; $i <= $upperLimit; $i++) {
- $class = ($i == $this->_pageDetails['page']) ? 'class="selected"' : '';
- $text = "<li {$class}>".$this->_generateLink($i,$i,$escapeTitle).'</li>';
+ if($i == $this->_pageDetails['page']) {
+ $text = '<li class="current"><strong title="'
+ .sprintf(_('pagination_page_number_title'),$i,$total)
+ .'">'.$i.'</strong></li>';
+ } else {
+ $text = '<li>'.$this->_generateLink($i,$i,$escapeTitle).'</li>';
+ }
$t[] = $text;
}
if ($dottedUpperLimit) {
@@ -220,7 +225,7 @@ class PaginationHelper extends Helper
if (empty($this->_pageDetails)) { return false; }
if ( !empty($this->_pageDetails['previousPage']) )
{
- return $this->_generateLink($text,$this->_pageDetails['previousPage'],$escapeTitle,'prev');
+ return $this->_generateLink($text,$this->_pageDetails['previousPage'],$escapeTitle);
}
return '';
}
@@ -237,7 +242,7 @@ class PaginationHelper extends Helper
if (empty($this->_pageDetails)) { return false; }
if (!empty($this->_pageDetails['nextPage']))
{
- return $this->_generateLink($text,$this->_pageDetails['nextPage'],$escapeTitle,'next');
+ return $this->_generateLink($text,$this->_pageDetails['nextPage'],$escapeTitle);
}
return '';
}
@@ -396,7 +401,7 @@ class PaginationHelper extends Helper
* @param string the div to be updated by AJAX updates
* @return string html for link
**/
- function _generateLink ($title,$page=NULL,$escapeTitle,$rel=null)
+ function _generateLink ($title,$page=NULL,$escapeTitle)
{
$url = $this->_generateUrl($page);
$AjaxDivUpdate = $this->_pageDetails['ajaxDivUpdate'];
@@ -440,7 +445,7 @@ class PaginationHelper extends Helper
return $this->Html->linkNoLocaleNoApp(
$title,
$url,
- isset($rel) ? array('rel' => $rel) : NULL,
+ NULL,
NULL,
$escapeTitle
);
diff --git a/site/app/views/layouts/amo2009.thtml b/site/app/views/layouts/amo2009.thtml
index c1aa4ce..56773eb 100644
--- a/site/app/views/layouts/amo2009.thtml
+++ b/site/app/views/layouts/amo2009.thtml
@@ -67,7 +67,7 @@ if(defined('SITE_STATE') && (SITE_STATE == 'production' || SITE_STATE == 'stagin
<meta http-equiv="imagetoolbar" content="no"/>
<meta name="Rating" content="General"/>
- <link rel="search" type="application/opensearchdescription+xml" title="Mozilla Add-ons"
+ <link rel="search" type="application/opensearchdescription+xml" title="<?=SITE_NAME?>"
href="<?=$html->url('/AMOSearch.xml', null, false, false)?>" />
<?php if (isset($addon['Addon']['addontype_id']) && ($addon['Addon']['addontype_id'] == ADDON_SEARCH)) : ?>
@@ -82,6 +82,7 @@ if(defined('SITE_STATE') && (SITE_STATE == 'production' || SITE_STATE == 'stagin
<?= $html->css('amo2009/main', 'stylesheet', array('media'=>'screen,projection,tv')) ?>
<?= $html->css('amo2009/slimbox2', 'stylesheet', array('media'=>'screen,projection,tv')) ?>
<?= $html->css('amo2009/main-mozilla', 'stylesheet', array('media'=>'screen,projection,tv')) ?>
+ <?= $html->css('sugar', 'stylesheet', array('media'=>'screen,projection')) ?>
<?= $html->css('amo2009/legacy', 'stylesheet', array('media'=>'screen,projection,tv')) ?>
<?php endif ?>
@@ -196,7 +197,7 @@ if(defined('SITE_STATE') && (SITE_STATE == 'production' || SITE_STATE == 'stagin
<?php endif; ?>
</head>
-<body id="mozilla-com" class="html-<?=TEXTDIR?> <?=APP_SHORTNAME?> <?= ($this->controller->Session->check('User')) ? 'user-login' : 'user-anon' ?><?= isset($bodyclass) ? ' ' . $bodyclass : '' ?>">
+<body id="mozilla-com" class="html-<?=TEXTDIR?> <?=APP_SHORTNAME?> <?= ($this->controller->Session->check('User')) ? 'user-login' : 'user-anon' ?><?= isset($bodyclass) ? ' ' . $bodyclass : '' ?> sugar">
<ul id="nav-access" role="navigation">
<li><a href="#content"><?=___('header_navaccess_main_content', 'Skip to main content')?></a></li>
@@ -343,14 +344,14 @@ if(defined('SITE_STATE') && (SITE_STATE == 'production' || SITE_STATE == 'stagin
</form>
<?php endif; ?>
- <p><strong><?=_('footer_copyright')?> <span title="<?=php_uname('n')?>">&#169;</span> 2005&#8211;<?=date('Y')?> Mozilla.</strong> <?=_('footer_all_rights_reserved')?></p>
+ <p><strong><?=_('footer_copyright')?> <span title="<?=php_uname('n')?>">&#169;</span> 2005&#8211;<?=date('Y')?> Mozilla, <?=date('Y')?> <?=SITE_ORG?>.</strong> <?=_('footer_all_rights_reserved')?></p>
<ul>
<li><?=$html->link(_('footer_privacy_policy'), '/pages/privacy');?></li>
<li><a href="http://www.mozilla.com/<?=LANG?>/about/legal.html"><?=_('footer_legal_notices')?></a></li>
<?php if (!isset($suppressCredits) || !$suppressCredits): ?><li><?=$html->link(_('footer_credits'), '/pages/credits')?></li><?php endif; ?>
- <li><?=$html->link(___('footer_a_about'), '/pages/about')?></li>
- <li><?=$html->link('<abbr title="'.___('footer_abbr_faq').'">'.___('footer_a_faq').'</abbr>', '/pages/faq')?></li>
- <li><a href="http://blog.mozilla.com/addons"><?=___('footer_a_blog')?></a></li>
+ <li><?=$html->link(___('footer_a_about'), SITE_ABOUT)?></li>
+ <li><?=$html->link('<abbr title="'.___('footer_abbr_faq').'">'.___('footer_a_faq').'</abbr>', SITE_FAQ)?></li>
+ <li><?=$html->link(___('footer_a_blog'), SITE_BLOG)?></li>
</ul>
<p class="disclaimer"><?=_('footer_disclaimer')?></p>
diff --git a/site/app/views/layouts/mozilla.thtml b/site/app/views/layouts/mozilla.thtml
index 722ef91..94e923c 100644
--- a/site/app/views/layouts/mozilla.thtml
+++ b/site/app/views/layouts/mozilla.thtml
@@ -152,7 +152,7 @@
// <![CDATA[
$(document).ready(function() {
- $("a[rel*=jquery-lightbox]").lightBox({
+ $("a[@rel*=jquery-lightbox]").lightBox({
overlayOpacity: 0.6,
imageBlank: "'.$html->url('/img/jquery-lightbox/lightbox-blank.gif', null, false, false).'",
imageLoading: "'.$html->url('/img/jquery-lightbox/lightbox-ico-loading.gif', null, false, false).'",
@@ -322,6 +322,7 @@ if (!(isset($suppressHeader) && $suppressHeader))
echo $this->renderElement('header');
?>
+<!-- mozilla.thtml processed for <?=basename(preg_replace("/\?.*/", "", $_SERVER["REQUEST_URI"]));?> -->
<?=$content_for_layout ?>
<?php
diff --git a/site/app/views/layouts/tests.thtml b/site/app/views/layouts/tests.thtml
index d538ad2..cd95736 100644
--- a/site/app/views/layouts/tests.thtml
+++ b/site/app/views/layouts/tests.thtml
@@ -6,7 +6,7 @@
<?=$html->css('tests')?>
<?=$html->css('admin')?>
<?=$javascript->link('jquery-compressed.js')?>
- <?=$javascript->link('jquery.autocomplete.pack.js')?>
+ <?=$javascript->link('jquery.autocomplete.js')?>
<?=$javascript->link('listing')?>
</head>
<body>
diff --git a/site/app/views/pages/about.thtml b/site/app/views/pages/about.thtml
index 4c7befc..548086f 100644
--- a/site/app/views/pages/about.thtml
+++ b/site/app/views/pages/about.thtml
@@ -1,49 +1,14 @@
<?php
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is addons.mozilla.org site.
- *
- * The Initial Developer of the Original Code is
- * The Mozilla Foundation.
- *
- * Contributor(s):
- * Jeff Balogh <jbalogh@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
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-$this->layout = 'amo2009';
+$this->layout = 'mozilla';
?>
-<div class="secondary" role="complementary">
- <?=$this->renderElement('amo2009/categories')?>
-</div>
-
-<div class="primary prose" role="main">
- <?=$this->renderElement('amo2009/search')?>
-
- <?=$localization->includeLocalPage('about')?>
+<div id="content">
+ <?php
+ echo $this->renderElement('search');
+ echo $this->renderElement('sidebar', array('pitch' => true));
+ echo $this->renderElement('app_chooser');
+ ?>
+ <div id="content-main">
+ <?=$localization->includeLocalPage('about')?>
+ </div>
</div>
diff --git a/site/app/views/pages/appversions.thtml b/site/app/views/pages/appversions.thtml
index d719204..66120ae 100644
--- a/site/app/views/pages/appversions.thtml
+++ b/site/app/views/pages/appversions.thtml
@@ -20,7 +20,6 @@
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
- * 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,7 +35,7 @@
*
* ***** END LICENSE BLOCK ***** */
-$this->layout = 'amo2009';
+$this->layout = 'mozilla';
loadModel('Application');
loadComponent('Versioncompare');
@@ -68,12 +67,12 @@ foreach ($applications as $application) {
}
?>
-<div class="secondary" role="complementary">
- <?=$this->renderElement('amo2009/categories')?>
-</div>
-
-<div class="primary prose" role="main">
- <?=$this->renderElement('amo2009/search')?>
+<div id="content">
+ <?=$this->renderElement('search')?>
+ <?=$this->renderElement('sidebar', array('pitch' => true))?>
+ <?=$this->renderElement('app_chooser')?>
+
+ <div id="content-main">
<?php
echo '<h1>'._('pages_appversions_header').'</h1>';
@@ -93,4 +92,5 @@ foreach ($applications as $application) {
echo '<p>'.sprintf(_('pages_appversions_required_files'), $html->link(_('pages_appversions_required_files_link'), 'http://developer.mozilla.org/en/docs/Install_Manifests')).'</p>';
?>
+ </div>
</div>
diff --git a/site/app/views/pages/credits.thtml b/site/app/views/pages/credits.thtml
index 409c3c8..e45fe7d 100644
--- a/site/app/views/pages/credits.thtml
+++ b/site/app/views/pages/credits.thtml
@@ -21,7 +21,6 @@
*
* Contributor(s):
* Justin Scott <fligtar@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
@@ -37,7 +36,7 @@
*
* ***** END LICENSE BLOCK ***** */
-$this->layout = 'amo2009';
+$this->layout = 'mozilla';
loadModel('Group');
$groupModel =& new Group();
@@ -89,13 +88,12 @@ ksort($editors);
ksort($past_developers);
ksort($other_contributors);
?>
-<div class="secondary" role="complementary">
- <?=$this->renderElement('amo2009/categories')?>
-</div>
-
-<div class="primary prose" role="main">
- <?=$this->renderElement('amo2009/search')?>
-
+<div id="content">
+ <?=$this->renderElement('search')?>
+ <?=$this->renderElement('sidebar', array('pitch' => true))?>
+ <?=$this->renderElement('app_chooser')?>
+
+ <div id="content-main">
<?=_('credits_intro')?>
<br/><br/>
<div class="corner-box">
@@ -142,3 +140,4 @@ ksort($other_contributors);
<?=sprintf(_('credits_contributing'), $html->link(_('credits_contributing_wikipage'), SITE_WIKI))?>
</div>
+</div>
diff --git a/site/app/views/pages/faq.thtml b/site/app/views/pages/faq.thtml
index 1133b08..5700c14 100644
--- a/site/app/views/pages/faq.thtml
+++ b/site/app/views/pages/faq.thtml
@@ -21,7 +21,6 @@
*
* Contributor(s):
* Mike Morgan <morgamic@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
@@ -37,16 +36,17 @@
*
* ***** END LICENSE BLOCK ***** */
-$this->layout = 'amo2009';
+$this->layout = 'mozilla';
?>
-<div class="secondary" role="complementary">
- <?=$this->renderElement('amo2009/categories')?>
-</div>
-
-<div class="primary prose" role="main">
- <?=$this->renderElement('amo2009/search')?>
+<div id="content">
+ <?=$this->renderElement('search')?>
+ <?=$this->renderElement('sidebar', array('pitch' => true))?>
+ <?=$this->renderElement('app_chooser')?>
+
+ <div id="content-main">
- <?=$localization->includeLocalPage('faq')?>
+<?=$localization->includeLocalPage('faq')?>
+ </div>
</div>
diff --git a/site/app/views/pages/js_constants.js.thtml b/site/app/views/pages/js_constants.js.thtml
index aca2ea9..bd61078 100644
--- a/site/app/views/pages/js_constants.js.thtml
+++ b/site/app/views/pages/js_constants.js.thtml
@@ -54,55 +54,33 @@ var APP_SHORTNAME = "<?=APP_SHORTNAME?>";
var APP_PRETTYNAME = "<?=APP_PRETTYNAME?>";
var LATEST_FIREFOX_VERSION = '<?=LATEST_FIREFOX_VERSION?>';
var LATEST_FIREFOX_DEVEL_VERSION = '<?=LATEST_FIREFOX_DEVEL_VERSION?>';
-var APP_FIREFOX = '<?=APP_FIREFOX?>';
-var APP_SEAMONKEY = '<?=APP_SEAMONKEY?>';
-var APP_THUNDERBIRD = '<?=APP_THUNDERBIRD?>';
-var APP_SUNBIRD = '<?=APP_SUNBIRD?>';
-var APP_FENNEC = '<?=APP_FENNEC?>';
-<?php /* generic constants */ ?>
-var KEYCODE_ENTER = 13;
-<?php
-$constants = array(
- 'addOnNotAvailableForPlatform' => ___('addon_not_available_for_platform'),
- 'error_opensearch_unsupported' => ___('addons_searchengines_error_mozilla_browser_required'),
-
- /* Fallback from 3/19/08 */
- 'app_compat_update_firefox' => ___('app_compat_update_firefox'),
- 'app_compat_try_old_version' => ___('app_compat_try_old_version'),
- 'app_compat_older_firefox_only' => ___('app_compat_older_firefox_only'),
- 'app_compat_unreleased_version' => ___('app_compat_unreleased_version'),
- 'app_compat_older_version_or_ignore_check' => ___('app_compat_older_version_or_ignore_check'),
-
- /* developers.js */
- 'devcp_js_upload_alert' => ___('devcp_js_upload_alert'),
- 'addons_status_public' => ___('addons_status_public'),
- 'addons_status_sandbox' => ___('addons_status_sandbox'),
- 'addons_status_pending' => ___('addons_status_pending'),
- 'devcp_js_img_move_down' => ___('devcp_js_img_move_down'),
- 'devcp_js_img_move_up' => ___('devcp_js_img_move_up'),
- 'devcp_js_option_owner' => ___('devcp_js_option_owner'),
- 'devcp_js_option_developer' => ___('devcp_js_option_developer'),
- 'devcp_js_option_viewer' => ___('devcp_js_option_viewer'),
- 'devcp_js_input_list_author' => ___('devcp_js_input_list_author'),
- 'devcp_js_sure_remove' => ___('devcp_js_sure_remove'),
- 'devcp_js_remove_author' => ___('devcp_js_remove_author'),
- 'devcp_js_a_cancel' => ___('devcp_js_a_cancel'),
- 'devcp_js_add_email' => ___('devcp_js_add_email'),
- 'devcp_js_img_remove_compat' => ___('devcp_js_img_remove_compat'),
- 'devcp_js_license_select' => ___('devcp_js_license_select'),
- 'devcp_js_license_text' => ___('devcp_js_license_text'),
+var addOnNotAvailableForPlatform = "<?=_('addon_not_available_for_platform')?>";
+var error_opensearch_unsupported = "<?=_('addons_searchengines_error_mozilla_browser_required')?>";
- /* Fallback from 4/14/08 */
- 'app_compat_ignore_check' => ___('app_compat_ignore_check'),
+<?php /* Fallback from 3/19/08 */?>
+var app_compat_update_firefox = '<?=___('app_compat_update_firefox')?>';
+var app_compat_try_old_version = '<?=___('app_compat_try_old_version')?>';
+var app_compat_older_firefox_only = '<?=___('app_compat_older_firefox_only')?>';
+var app_compat_unreleased_version = '<?=___('app_compat_unreleased_version')?>';
+var app_compat_older_version_or_ignore_check = '<?=___('app_compat_older_version_or_ignore_check')?>';
- // collections
- 'collections_edit_submit' => ___('collections_edit_submit'),
- 'collections_edit_submit_deletecollection' => ___('collections_edit_submit_deletecollection'),
+<?php /* developers.js */ ?>
+var devcp_js_upload_alert = '<?=___('devcp_js_upload_alert')?>';
+var addons_status_public = '<?=___('addons_status_public')?>';
+var addons_status_sandbox = '<?=___('addons_status_sandbox')?>';
+var addons_status_pending = '<?=___('addons_status_pending')?>';
+var devcp_js_img_move_down = '<?=___('devcp_js_img_move_down')?>';
+var devcp_js_img_move_up = '<?=___('devcp_js_img_move_up')?>';
+var devcp_js_option_owner = '<?=___('devcp_js_option_owner')?>';
+var devcp_js_option_developer = '<?=___('devcp_js_option_developer')?>';
+var devcp_js_option_viewer = '<?=___('devcp_js_option_viewer')?>';
+var devcp_js_input_list_author = '<?=___('devcp_js_input_list_author')?>';
+var devcp_js_sure_remove = '<?=___('devcp_js_sure_remove')?>';
+var devcp_js_remove_author = '<?=___('devcp_js_remove_author')?>';
+var devcp_js_a_cancel = '<?=___('devcp_js_a_cancel')?>';
+var devcp_js_add_email = '<?=___('devcp_js_add_email')?>';
+var devcp_js_img_remove_compat = '<?=___('devcp_js_img_remove_compat')?>';
- /* addons display page */
- 'addons_display_collection_publish_success' => ___('addons_display_collection_publish_success')
-);
+<?php /* Fallback from 4/14/08 */?>
+var app_compat_ignore_check = '<?=___('app_compat_ignore_check')?>';
-foreach ($constants as $var_name => $l10n_string) {
- echo sprintf('var %s = "%s";'."\n", $var_name, addslashes($l10n_string));
-}
diff --git a/site/app/views/pages/policy.thtml b/site/app/views/pages/policy.thtml
index 23c93ca..de718ec 100644
--- a/site/app/views/pages/policy.thtml
+++ b/site/app/views/pages/policy.thtml
@@ -22,7 +22,6 @@
* Contributor(s):
* Frederic Wenzel <fwenzel@mozilla.com> (Original Author)
* Justin Scott <fligtar@gmail.com>
- * 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
@@ -38,16 +37,17 @@
*
* ***** END LICENSE BLOCK ***** */
-$this->layout = 'amo2009';
+$this->layout = 'mozilla';
?>
-<div class="secondary" role="complementary">
- <?=$this->renderElement('amo2009/categories')?>
-</div>
-
-<div class="primary prose" role="main">
- <?=$this->renderElement('amo2009/search')?>
+<div id="content">
+ <?=$this->renderElement('search')?>
+ <?=$this->renderElement('sidebar', array('pitch' => true))?>
+ <?=$this->renderElement('app_chooser')?>
+
+ <div id="content-main">
- <?=$localization->includeLocalPage('policy', array($html->link(_('pages_policy_sandbox_link'), '/pages/sandbox')))?>
+<?=$localization->includeLocalPage('policy', array($html->link(_('pages_policy_sandbox_link'), '/pages/sandbox')))?>
+ </div>
</div>
diff --git a/site/app/views/pages/privacy.thtml b/site/app/views/pages/privacy.thtml
index 23d072a..cccaa88 100644
--- a/site/app/views/pages/privacy.thtml
+++ b/site/app/views/pages/privacy.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
@@ -37,17 +36,18 @@
*
* ***** END LICENSE BLOCK ***** */
-$this->layout = 'amo2009';
+$this->layout = 'mozilla';
?>
-<div class="secondary" role="complementary">
- <?=$this->renderElement('amo2009/categories')?>
-</div>
-
-<div class="primary prose" role="main">
- <?=$this->renderElement('amo2009/search')?>
+<div id="content">
+ <?=$this->renderElement('search')?>
+ <?=$this->renderElement('sidebar', array('pitch' => true))?>
+ <?=$this->renderElement('app_chooser')?>
+
+ <div id="content-main">
- <?=$localization->includeLocalPage('privacy')?>
+<?=$localization->includeLocalPage('privacy')?>
+ </div>
</div>
diff --git a/site/app/views/pages/review_guide.thtml b/site/app/views/pages/review_guide.thtml
index 8ddd885..d88fd4e 100644
--- a/site/app/views/pages/review_guide.thtml
+++ b/site/app/views/pages/review_guide.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
@@ -37,17 +36,18 @@
*
* ***** END LICENSE BLOCK ***** */
-$this->layout = 'amo2009';
+$this->layout = 'mozilla';
?>
-<div class="secondary" role="complementary">
- <?=$this->renderElement('amo2009/categories')?>
-</div>
-
-<div class="primary prose" role="main">
- <?=$this->renderElement('amo2009/search')?>
+<div id="content">
+ <?=$this->renderElement('search')?>
+ <?=$this->renderElement('sidebar', array('pitch' => true))?>
+ <?=$this->renderElement('app_chooser')?>
+
+ <div id="content-main">
- <?=$localization->includeLocalPage('reviewguide')?>
+<?=$localization->includeLocalPage('reviewguide')?>
+ </div>
</div>
diff --git a/site/app/views/pages/sandbox.thtml b/site/app/views/pages/sandbox.thtml
index 734e8b6..559a4ef 100644
--- a/site/app/views/pages/sandbox.thtml
+++ b/site/app/views/pages/sandbox.thtml
@@ -22,7 +22,6 @@
* Contributor(s):
* Frederic Wenzel <fwenzel@mozilla.com> (Original Author)
* Justin Scott <fligtar@gmail.com>
- * 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
@@ -38,16 +37,17 @@
*
* ***** END LICENSE BLOCK ***** */
-$this->layout = 'amo2009';
+$this->layout = 'mozilla';
?>
-<div class="secondary" role="complementary">
- <?=$this->renderElement('amo2009/categories')?>
-</div>
-
-<div class="primary prose" role="main">
- <?=$this->renderElement('amo2009/search')?>
+<div id="content">
+ <?=$this->renderElement('search')?>
+ <?=$this->renderElement('sidebar', array('pitch' => true))?>
+ <?=$this->renderElement('app_chooser')?>
+
+ <div id="content-main">
- <?=$localization->includeLocalPage('sandbox', array('<img src="'.$html->url('/images/localized_image/sandbox-review.png').'">'))?>
+<?=$localization->includeLocalPage('sandbox', array('<img src="'.$html->url('/images/localized_image/sandbox-review.png').'">'))?>
+ </div>
</div>
diff --git a/site/app/views/pages/submissionhelp.thtml b/site/app/views/pages/submissionhelp.thtml
index e615b0f..91adf6c 100644
--- a/site/app/views/pages/submissionhelp.thtml
+++ b/site/app/views/pages/submissionhelp.thtml
@@ -22,7 +22,6 @@
* Contributor(s):
* Frederic Wenzel <fwenzel@mozilla.com> (Original Author)
* Justin Scott <fligtar@gmail.com>
- * 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
@@ -38,16 +37,17 @@
*
* ***** END LICENSE BLOCK ***** */
-$this->layout = 'amo2009';
+$this->layout = 'mozilla';
?>
-<div class="secondary" role="complementary">
- <?=$this->renderElement('amo2009/categories')?>
-</div>
-
-<div class="primary prose" role="main">
- <?=$this->renderElement('amo2009/search')?>
+<div id="content">
+ <?=$this->renderElement('search')?>
+ <?=$this->renderElement('sidebar', array('pitch' => true))?>
+ <?=$this->renderElement('app_chooser')?>
+
+ <div id="content-main">
- <?=$localization->includeLocalPage('submission_help', array($html->url('/pages/policy')))?>
+<?=$localization->includeLocalPage('submission_help', array($html->url('/pages/policy')))?>
+ </div>
</div>
diff --git a/site/app/views/reviews/add.thtml b/site/app/views/reviews/add.thtml
index 1e20e47..c97731a 100644
--- a/site/app/views/reviews/add.thtml
+++ b/site/app/views/reviews/add.thtml
@@ -35,22 +35,36 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-
-$this->viewVars['bodyclass'] = 'review_add';
-$this->layout = 'amo2009';
?>
-<div class="secondary" role="complementary">
- <?=$this->renderElement('amo2009/categories')?>
-</div>
-
-<div class="primary prose" role="main">
- <?=$this->renderElement('amo2009/search')?>
+<div id="content">
+ <?=$this->renderElement('search')?>
+ <?=$this->renderElement('sidebar', array('pitch' => true))?>
+ <?=$this->renderElement('app_chooser')?>
<div id="content-main">
-<h2><?=sprintf((@$this->data['Review']['id'] > 0) ? _('addon_review_edit_title') : _('addon_review_add_title'), $addon['Translation']['name']['string']); ?></h2>
-<? $reviewRating = @$this->data['Review']['rating']; ?>
-<?php echo sprintf(___('review_guidelines_short'), $html->url("/addon/{$addon['Addon']['id']}#support"), $html->url('/pages/review_guide')); ?>
+<h1><?=sprintf((@$this->data['Review']['id'] > 0) ? _('addon_review_edit_title') : _('addon_review_add_title'), $addon['Translation']['name']['string']); ?></h1>
+
+<?php echo sprintf(___('review_guidelines_short', <<<EOT
+<p>Keep these tips in mind:</p>
+<ul>
+<li>Write like you're telling a friend about your experience with the add-on.
+Give specifics and helpful details, such as what features you liked and/or
+disliked, how easy to use it is, and any disadvantages it has. Avoid generic
+language such as calling it "Great" or "Bad" unless you can give reasons why
+you believe this is so.</li>
+<li>Please do not post bug reports in reviews. We do not make your email address
+available to add-on developers and they may need to contact you to help resolve
+your issue. See the <a href="%1\$s">support section</a> to find out where to get
+assistance for this add-on.</li>
+<li>Please keep reviews clean, avoid the use of improper language and do not
+post any personal information.</li>
+</ul>
+<p>Please read the <a href="%2\$s">Review Guidelines</a> for more detail about
+user add-on reviews.</p>
+EOT
+), $html->url("/addon/{$addon['Addon']['id']}#support"),
+ $html->url('/pages/review_guide')); /* @partial, 6/22/08 */ ?>
<? // if this is a developer reply, show the original review
if (!empty($reply_to)) {
diff --git a/site/app/views/reviews/delete.thtml b/site/app/views/reviews/delete.thtml
index 89a2bf6..f65d302 100644
--- a/site/app/views/reviews/delete.thtml
+++ b/site/app/views/reviews/delete.thtml
@@ -20,7 +20,6 @@
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
- * Wil Clouser <clouserw@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
@@ -35,34 +34,29 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-$this->layout = 'amo2009';
?>
-
-<div class="secondary" role="complementary">
- <?=$this->renderElement('amo2009/categories')?>
-</div>
-
-<div class="primary" role="main">
- <?=$this->renderElement('amo2009/search')?>
+<div id="content">
+ <?=$this->renderElement('search')?>
+ <?=$this->renderElement('sidebar', array('pitch' => true))?>
+ <?=$this->renderElement('app_chooser')?>
+ <div id="content-main">
<h2><?=_('addon_review_delete_header')?></h2><br>
- <div class="article">
- <h3><?=$html->link($review['Addon']['Translation']['name']['string'], '/addons/display/'.$review['Addon']['Addon']['id']).
- ': '.$review['Translation']['title']['string']?></h3>
- <div>
- <?= sprintf(_('addon_reviewed_on_x_rated_y'), $html->linkUserFromModel($review['User']), strftime(_('date'), strtotime($review['Review']['created'])), $review['Review']['rating'])?>
- </div>
- <?=$review['Translation']['body']['string']?>
-
- <?=$html->formTag("/reviews/delete/{$review['Review']['id']}")?>
+ <h3><?=$html->link($review['Addon']['Translation']['name']['string'], '/addons/display/'.$review['Addon']['Addon']['id']).
+ ': '.$review['Translation']['title']['string']?></h3>
+ <div class="reviewed-on">
+ <?= sprintf(_('addon_reviewed_on_x_rated_y'), $html->linkUserFromModel($review['User']), strftime(_('date'), strtotime($review['Review']['created'])), $review['Review']['rating'])?>
</div>
- <div class="item">
- <div align="center">
- <?=_('addon_review_confirm_delete')?><br>
- <input type="submit" name="no" value="<?=_('addon_review_confirm_no')?>">
- <input type="submit" name="yes" value="<?=_('addon_review_confirm_yes')?>">
- </div>
- </form>
+ <?=$review['Translation']['body']['string']?>
+
+ <?=$html->formTag("/reviews/delete/{$review['Review']['id']}")?>
+ <div align="center">
+ <?=_('addon_review_confirm_delete')?><br>
+ <input type="submit" name="no" value="<?=_('addon_review_confirm_no')?>">
+ <input type="submit" name="yes" value="<?=_('addon_review_confirm_yes')?>">
</div>
+ </form>
+
+ </div>
</div>
diff --git a/site/app/views/reviews/display.thtml b/site/app/views/reviews/display.thtml
index 200aac5..a8b0146 100644
--- a/site/app/views/reviews/display.thtml
+++ b/site/app/views/reviews/display.thtml
@@ -21,7 +21,6 @@
*
* Contributor(s):
* Frederic Wenzel <fwenzel@mozilla.com> (Original Author)
- * Wil Clouser <clouserw@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
@@ -37,6 +36,7 @@
*
* ***** END LICENSE BLOCK ***** */
+// @partial translation fallback for review flagging, 5/22/08
if ($loggedin) {
$_review_flag_this = ___('review_flag_this', 'Report this review');
$_review_flag_this_titletip = ___('review_flag_this_titletip', 'Is this review inappropriate, inaccurate or spam? Click here to flag it for editor review.');
@@ -44,34 +44,38 @@ if ($loggedin) {
$bare = isset($_GET['bare']) ? ( $_GET['bare'] == 1 ) : FALSE;
?>
<?php if (!$bare): ?>
-<?php $this->layout = 'amo2009'; ?>
-<div class="secondary" role="complementary">
- <?=$this->renderElement('amo2009/categories')?>
-</div>
+<div id="content">
+ <?=$this->renderElement('search')?>
+ <?=$this->renderElement('sidebar', array('pitch' => true))?>
+ <?=$this->renderElement('app_chooser')?>
-<div id="content-main" class="primary" role="main">
- <?=$this->renderElement('amo2009/search')?>
+ <div id="content-main">
-<h2><?=sprintf(_('reviews_header'), $addon['Translation']['name']['string']);?></h2>
+<h1><?=sprintf(_('reviews_header'), $addon['Translation']['name']['string']);?></h1>
+<p></p>
<?php else: ?>
<div class="other-reviews">
<?php endif ?>
-
<?php
foreach ($reviews as $review):
$review_id = $review['Review']['id'];
$review['Translation'] = (array_key_exists(LANG, $review['Translation']) ?
$review['Translation'][LANG] : current($review['Translation']));
?>
- <div class="item review" id="review-<?=$review['Review']['id']?>">
+ <div class="corner-box review" id="review-<?=$review['Review']['id']?>">
<h3><?=$review['Translation']['title']['string']?></h3>
<div class="reviewed-on">
- <?=$this->renderElement('amo2009/stars',array('rating' => $review['Review']['rating']))?>
+ <?=$this->renderElement('stars',array('rating' => $review['Review']['rating']))?>
<?php
- echo sprintf(___('addon_reviewed_by_u_on_d'),
- $html->linkUserFromModel($review['User']),
- strftime(_('date'), strtotime($review['Review']['created'])));
+ // @partial: translation fallback for bug 427376, 04/24/08
+ if (_('addon_reviewed_by_u_on_d') == 'addon_reviewed_by_u_on_d') {
+ echo $html->linkUserFromModel($review['User']).", ".strftime(_('date'), strtotime($review['Review']['created']));
+ } else {
+ echo sprintf(_('addon_reviewed_by_u_on_d'),
+ $html->linkUserFromModel($review['User']),
+ strftime(_('date'), strtotime($review['Review']['created'])));
+ }
?>
<?=($isAuthor || $isAdmin) ? '['.$html->link(_('addon_review_author_reply_link'), "/reviews/reply/{$review['Review']['id']}").']' : '' ?>
<?=($canDelete) ? '['.$html->link(_('addon_review_admin_delete'), "/reviews/delete/{$review['Review']['id']}").']' : ''?>
@@ -153,7 +157,7 @@ foreach ($reviews as $review):
$reply['Translation'][LANG] : current($reply['Translation']));
$reply_id = $reply['Review']['id'];
?>
- <div class="review review-reply" id="review-<?=$reply['Review']['id']?>">
+ <div class="corner-box review-reply" id="review-<?=$reply['Review']['id']?>">
<h3><?=_('addon_review_reply_prefix') .' '. $reply['Translation']['title']['string']?></h3>
<div class="reviewed-on">
@@ -209,8 +213,9 @@ foreach ($reviews as $review):
<? endforeach; ?>
<?php if (!$bare): ?>
-<? if (!empty($reviews)) echo $this->renderElement('amo2009/pagination');?>
-<div class="clearboth"> <hr /> </div>
+<? if (!empty($reviews)) echo $this->renderElement('pagination');?>
+<p></p>
+<div class="divider"><hr></div>
<ul>
<li><?=$html->link(sprintf(_('addon_review_a_back_to_addon_x'), $addon['Translation']['name']['string']), '/addon/'.$addon['Addon']['id']); ?></li>
diff --git a/site/app/views/reviews/flag.thtml b/site/app/views/reviews/flag.thtml
index 3106ac3..e19665b 100644
--- a/site/app/views/reviews/flag.thtml
+++ b/site/app/views/reviews/flag.thtml
@@ -21,7 +21,6 @@
*
* Contributor(s):
* Frederic Wenzel <fwenzel@mozilla.com> (Original Author)
- * Wil Clouser <clouserw@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
@@ -40,21 +39,20 @@
if (!empty($ajaxreply)):
echo "<strong>{$msg}</strong>";
else:
- $this->layout = 'amo2009';
?>
-<div class="secondary" role="complementary">
- <?=$this->renderElement('amo2009/categories')?>
-</div>
-
-<div class="primary" role="main">
- <?=$this->renderElement('amo2009/search')?>
+<div id="content">
+ <?=$this->renderElement('search')?>
+ <?=$this->renderElement('sidebar', array('pitch' => true))?>
+ <?=$this->renderElement('app_chooser')?>
+
+ <div id="content-main">
<?php if (empty($addon)): ?>
- <?=$this->renderElement('notification', array('msg' => $msg));?>
+ <h1><?=$msg?></h1>
<p><?=$html->link(_('link_return_to_front_page'), '/')?></p>
<?php else: ?>
- <h2><?=sprintf(_('reviews_header'), $addon['Translation']['name']['string']);?></h2>
- <?=$this->renderElement('notification', array('msg' => $msg));?>
+ <h1><?=sprintf(_('reviews_header'), $addon['Translation']['name']['string']);?></h1>
+ <p><?=$msg?></p>
<ul>
<li><?= $html->link(sprintf(_('addon_review_a_back_to_reviews'), $addon['Translation']['name']['string']), '/reviews/display/'.$addon['Addon']['id']); ?></li>
diff --git a/site/app/views/reviews/review_added.thtml b/site/app/views/reviews/review_added.thtml
index 5b2e608..81214bf 100644
--- a/site/app/views/reviews/review_added.thtml
+++ b/site/app/views/reviews/review_added.thtml
@@ -21,7 +21,6 @@
*
* Contributor(s):
* Frederic Wenzel <fwenzel@mozilla.com> (Original Author)
- * Wil Clouser <clouserw@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,25 +35,23 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-
-$this->layout = 'amo2009';
?>
-<div class="secondary" role="complementary">
- <?=$this->renderElement('amo2009/categories')?>
-</div>
-
-<div class="primary" role="main">
- <?=$this->renderElement('amo2009/search')?>
+<div id="content">
+ <?=$this->renderElement('search')?>
+ <?=$this->renderElement('sidebar', array('pitch' => true))?>
+ <?=$this->renderElement('app_chooser')?>
+
+ <div id="content-main">
- <h2><?=sprintf(_('reviews_header'), $addon['Translation']['name']['string']);?></h2>
- <?=$this->renderElement('notification', array('type' => 'success', 'msg' => _('addon_review_saved_successfully')));?>
- <? if (isset($moderated) && $moderated)
- $this->renderElement('notification', array('type' => 'notification', 'msg' => _('addon_review_in_moderation'))); ?>
+<h1><?=sprintf(_('reviews_header'), $addon['Translation']['name']['string']);?></h1>
+<p><?=_('addon_review_saved_successfully')?></p>
+<p><? if (isset($moderated) && $moderated) echo _('addon_review_in_moderation'); ?></p>
<ul>
<li><?= $html->link(sprintf(_('addon_review_a_back_to_reviews'), $addon['Translation']['name']['string']), '/reviews/display/'.$addon['Addon']['id']); ?></li>
<li><?=$html->link(sprintf(_('addon_review_a_back_to_addon_x'), $addon['Translation']['name']['string']), '/addon/'.$addon['Addon']['id']); ?></li>
</ul>
+ </div>
</div>
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 -->
diff --git a/site/app/views/statistics/addon.thtml b/site/app/views/statistics/addon.thtml
index f05abad..b22702d 100644
--- a/site/app/views/statistics/addon.thtml
+++ b/site/app/views/statistics/addon.thtml
@@ -44,25 +44,25 @@ echo '<div id="content">';
echo '<div class="notice-updated">'._('statistics_notice_settings_updated').'</div>';
}
?>
- <div class="article">
+
<div class="bluebox-tr"><div class="bluebox-tl">
- <div id="statistics-header">
- <div id="statistics-controls">
+ <div style="min-height: 32px; padding: 10px;">
+ <div style="text-align: right; float: right;">
<?php
if (!empty($all_addons)) {
echo _('statistics_addon_switch').':';
echo $html->selectTag('Addon/id', $all_addons, $addon_id, array('onChange' => 'changeAddon(this);'), null, false).'<br>';
}
?>
- <span id="statistics-links">
+ <span style="font-size: 10px;">
<?=$html->link(_('statistics_addon_developertools_link'), '/developers')?> |
<?=$html->link(_('statistics_addon_dashboard_link'), '/statistics')?> |
<a href="#" onclick="$('#helpbox').toggle(); return false;"><?=_('statistics_help_link')?></a>
</span>
</div>
<div>
- <img id="addon-icon" src="<?=$addonIcon?>" alt="<?=$addon_name?> Icon">
- <h3 id="addon-title"><?=sprintf(_('statistics_title_addon_stats'), $addon_name)?></h3>
+ <img id="addon-icon" src="<?=$addonIcon?>" alt="<?=$addon_name?> Icon" style="padding-right: 5px; float: left;">
+ <h3 style="line-height: 2;"><?=sprintf(_('statistics_title_addon_stats'), $addon_name)?></h3>
</div>
</div>
@@ -138,9 +138,9 @@ echo '<div id="content">';
<?php endif; ?>
<div class="bluebox-br"><div class="bluebox-bl"></div></div>
- </div></div></div>
+ </div></div>
-<br />
+<br>
<?php if (!$this->controller->Config->getValue('stats_disabled') || $this->controller->SimpleAcl->actionAllowed('*', '*', $this->controller->Session->read('User'))): ?>
<div class="greenbox-tr"><div class="greenbox-tl">
@@ -151,7 +151,7 @@ echo '<div id="content">';
<?=_('statistics_summary_downloads_total')?>
<div class="date"><?=sprintf(_('statistics_summary_downloads_total_sincedate'), strftime(_('statistics_date_shortmonthwithyear'), strtotime($addon['Addon']['created'])))?></div>
</td>
- <td class="bigvalue" style="width: 19%;"><?=$statistics->number_format($stats, 'totaldownloads')?></td>
+ <td class="bigvalue" style="width: 19%;"><?=(!empty($stats['totaldownloads']) ? $html->number_format($stats['totaldownloads'], 0) : 0)?></td>
<td class="spacer" style="width: 2%;"></td>
<td class="biglabel" valign="middle" style="width: 30%;">
<?=_('statistics_summary_updatepings_total')?>
@@ -164,14 +164,14 @@ echo '<div id="content">';
?>
</div>
</td>
- <td class="bigvalue" style="width: 19%;"><?=$statistics->number_format($stats, 'last_updatepings')?></td>
+ <td class="bigvalue" style="width: 19%;"><?=(!empty($stats['last_updatepings']) ? $html->number_format($stats['last_updatepings'], 0) : 0)?></td>
</tr>
<tr>
<td class="label">
<?=_('statistics_summary_downloads_lastcount')?>
<div class="date"><?=(!empty($stats['last_downloads_date']) ? strftime(_('statistics_date_weekdayshortmonth'), strtotime($stats['last_downloads_date'])) : '')?></div>
</td>
- <td class="value"><?=$statistics->number_format($stats, 'last_downloads')?></td>
+ <td class="value"><?=(!empty($stats['last_downloads']) ? $html->number_format($stats['last_downloads'], 0) : 0)?></td>
<td class="spacer"></td>
<td class="label">
<?=_('statistics_summary_updatepings_changefromprevious')?>
@@ -185,31 +185,33 @@ echo '<div id="content">';
</div>
</td>
<td class="value">
- <?=$statistics->colored_percentage($stats, 'updateping_change')?>
+ <?php
+ if (!empty($stats['updateping_change'])) {
+ if ($stats['updateping_change'] > 0)
+ echo '<span style="color: green;">+';
+ elseif ($stats['updateping_change'] < 0)
+ echo '<span style="color: red;">';
+ else
+ echo '<span style="color: blue;">';
+ echo round($stats['updateping_change'], 2).'%</span>';
+ }
+ else
+ echo '0';
+ ?>
</td>
</tr>
<tr>
<td class="label"><?=_('statistics_summary_downloads_average')?></td>
- <td class="value"><?=$statistics->number_format($stats, 'avg_downloads')?></td>
+ <td class="value"><?=(!empty($stats['avg_downloads']) ? $html->number_format($stats['avg_downloads'], 0) : 0)?></td>
<td class="spacer"></td>
<td class="label"><?=_('statistics_summary_updatepings_average')?></td>
- <td class="value"><?=$statistics->number_format($stats, 'avg_updatepings')?></td>
+ <td class="value"><?=(!empty($stats['avg_updatepings']) ? $html->number_format($stats['avg_updatepings'], 0) : 0)?></td>
</tr>
<tr>
<td class="label"><?=_('statistics_summary_downloads_lastweek')?></td>
- <td class="value"><?=$statistics->number_format($stats, 'weeklydownloads')?></td>
+ <td class="value"><?=(!empty($stats['weeklydownloads']) ? $html->number_format($stats['weeklydownloads'], 0) : 0)?></td>
<td class="spacer"></td>
- <td class="label">
- <?=___('statistics_summary_updatepings_weekly_average')?>
- <div class="date">
- <?=sprintf(___('statistics_summary_updatepings_weekly_change'),
- $statistics->colored_percentage($stats, 'weekly_updatepings_change'))
- ?>
- </div>
- </td>
- <td class="value">
- <?=$statistics->number_format($stats, 'weekly_updatepings')?>
- </td>
+ <td colspan="2" style="text-align: right; vertical-align: baseline;"><?=$html->link($html->image('stats/rss16x16.png'), "/statistics/addon/{$addon['Addon']['id']}/format:rss{$key}", array('title' => _('statistics_rss_icon_title')))?></td>
</tr>
</table>
</div>
diff --git a/site/app/views/statistics/index.thtml b/site/app/views/statistics/index.thtml
index 5b40a4d..4fc7aaa 100644
--- a/site/app/views/statistics/index.thtml
+++ b/site/app/views/statistics/index.thtml
@@ -35,38 +35,12 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-
-echo '<h1>'._('statistics_index_title').'</h1>';
-echo '<div class="secondary" role="complementary">';
+echo '<div id="content">';
echo $this->renderElement('developers/myaddons', array('addons' => $addons));
-echo '</div>';
-echo '<div class="primary">';
-
- echo '<div id="content-main" class="article">';
- echo '<h4>Current Review Queue Stats:</h4>';
- echo '<ul>';
- echo '<li>'.$dailyStats['nomination'].' add-ons currently nominated to become public</li>';
- echo '<li>'.$dailyStats['pending'].' files currently pending review</li>';
- echo '<li>'.$dailyStats['flagged'].' add-ons flagged for admin review</li>';
- echo '<li>'.$dailyStats['reviews'].' user reviews currently flagged</li>';
- echo '</ul>';
-
- echo '<h4>Daily Totals for '.$dailyStats['after'].' thru '.$dailyStats['before'].':</h4>';
- echo '<ul>';
- echo '<li>'.$dailyStats['dailyAddons'].' new add-ons ('.$dailyStats['totalAddons'].' total)</li>';
- echo '<li>'.$dailyStats['dailyVersions'].' new add-on versions</li>';
- echo '<li>'.$dailyStats['dailyUsers'].' new user accounts total</li>';
- echo '<li>'.$dailyStats['dailyReviews'].' new user reviews</li>';
- echo '<li>'.$dailyStats['dailyImages'].' new preview images</li>';
- echo '<li>'.$dailyStats['dailyDownloads'].' add-on downloads yesterday</li>';
- echo '</ul>';
- echo '</div>';
-
- echo '<h3>Add-on statistics</h3>';
- echo '<div class="featured prose">';
- echo '<div class="featured-inner article">';
+ echo '<div id="content-main">';
+ echo '<h3>'._('statistics_index_title').'</h3>';
if (!empty($addons)) {
echo '<p>'._('statistics_index_myaddons').':</p>';
echo '<ul>';
@@ -97,7 +71,6 @@ echo '<div class="primary">';
echo '<noscript><input type="submit" value="'._('statistics_index_view_button').'"></noscript>';
echo '</form>';
}
- echo '</div>';
- echo '</div>';
?>
</div>
+</div> \ No newline at end of file
diff --git a/site/app/views/statistics/rss/summary.thtml b/site/app/views/statistics/rss/summary.thtml
index 8412069..25ee7ca 100644
--- a/site/app/views/statistics/rss/summary.thtml
+++ b/site/app/views/statistics/rss/summary.thtml
@@ -37,10 +37,10 @@
* ***** END LICENSE BLOCK ***** */
$summary = '<b>'._('statistics_summary_downloads_heading').'</b><br />';
-$summary .= _('statistics_summary_downloads_total').' ('.sprintf(_('statistics_summary_downloads_total_sincedate'), strftime(_('statistics_date_shortmonthwithyear'), strtotime($addon['Addon']['created']))).'): '.$statistics->number_format($stats, 'totaldownloads').'<br />';
-$summary .= _('statistics_summary_downloads_lastcount').(!empty($stats['last_downloads_date']) ? ' ('.strftime(_('statistics_date_weekdayshortmonth'), strtotime($stats['last_downloads_date'])).')' : '').': '.$statistics->number_format($stats, 'last_downloads').'<br />';
-$summary .= _('statistics_summary_downloads_average').': '.$statistics->number_format($stats, 'avg_downloads').'<br />';
-$summary .= _('statistics_summary_downloads_lastweek').': '.$statistics->number_format($stats, 'weeklydownloads').'<br /><br />';
+$summary .= _('statistics_summary_downloads_total').' ('.sprintf(_('statistics_summary_downloads_total_sincedate'), strftime(_('statistics_date_shortmonthwithyear'), strtotime($addon['Addon']['created']))).'): '.(!empty($stats['totaldownloads']) ? $html->number_format($stats['totaldownloads'], 0) : 0).'<br />';
+$summary .= _('statistics_summary_downloads_lastcount').(!empty($stats['last_downloads_date']) ? ' ('.strftime(_('statistics_date_weekdayshortmonth'), strtotime($stats['last_downloads_date'])).')' : '').': '.(!empty($stats['last_downloads']) ? $html->number_format($stats['last_downloads'], 0) : 0).'<br />';
+$summary .= _('statistics_summary_downloads_average').': '.(!empty($stats['avg_downloads']) ? $html->number_format($stats['avg_downloads'], 0) : 0).'<br />';
+$summary .= _('statistics_summary_downloads_lastweek').': '.(!empty($stats['weeklydownloads']) ? $html->number_format($stats['weeklydownloads'], 0) : 0).'<br /><br />';
$summary .= '<b>'._('statistics_summary_updatepings_heading').'</b><br />';
$summary .= _('statistics_summary_updatepings_total').' (';
@@ -48,19 +48,26 @@ if (!empty($stats['last_updatepings_date']))
$summary .= sprintf(_('statistics_summary_updatepings_total_ondate'), strftime(_('statistics_date_weekdayshortmonth'), strtotime($stats['last_updatepings_date'])));
else
$summary .= _('statistics_summary_nodata');
-$summary .= '): '.$statistics->number_format($stats, 'last_updatepings').'<br />';
+$summary .= '): '.(!empty($stats['last_updatepings']) ? $html->number_format($stats['last_updatepings'], 0) : 0).'<br />';
$summary .= _('statistics_summary_updatepings_changefromprevious').' (';
if (!empty($stats['previous_updatepings']))
$summary .= sprintf(_('statistics_summary_updatepings_changefromprevious_ondate'), $html->number_format($stats['previous_updatepings'], 0), strftime(_('statistics_date_shortmonth'), strtotime($stats['previous_updatepings_date'])));
else
$summary .= _('statistics_summary_nodata');
$summary .= '): ';
-$summary .= $statistics->colored_percentage($stats, 'updateping_change');
+if (!empty($stats['updateping_change'])) {
+ if ($stats['updateping_change'] > 0)
+ $summary .= '<span style="color: green;">+';
+ elseif ($stats['updateping_change'] < 0)
+ $summary .= '<span style="color: red;">';
+ else
+ $summary .= '<span style="color: blue;">';
+ $summary .= round($stats['updateping_change'], 2).'%</span>';
+}
+else
+ $summary .= '0';
$summary .= '<br />';
-$summary .= _('statistics_summary_updatepings_average').': '.$statistics->number_format($stats, 'avg_updatepings').'<br />';
-$summary .= ___('statistics_summary_updatepings_weekly_average').': '.$statistics->number_format($stats, 'weekly_updatepings');
-$summary .= ' ('.sprintf(___('statistics_summary_updatepings_weekly_change'),
- $statistics->colored_percentage($stats, 'weekly_updatepings_change')).')';
+$summary .= _('statistics_summary_updatepings_average').': '.(!empty($stats['avg_updatepings']) ? $html->number_format($stats['avg_updatepings'], 0) : 0).'<br />';
$today = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
diff --git a/site/app/views/statistics/settings.thtml b/site/app/views/statistics/settings.thtml
index 549ad64..a23f8a3 100644
--- a/site/app/views/statistics/settings.thtml
+++ b/site/app/views/statistics/settings.thtml
@@ -36,13 +36,10 @@
*
* ***** END LICENSE BLOCK ***** */
?>
-<div class="secondary" role="complementary">
+<div id="content">
<?=$this->renderElement('developers/myaddons', array('addons' => $all_addons));?>
-</div>
-<div class="primary prose">
-
- <div id="content-main" class="article settings-content">
+ <div id="content-main" class="settings-content">
<h3><?=sprintf(_('statistics_settings_title'), $addon['Translation']['name']['string'])?></h3><br>
<?=$html->formTag('/statistics/settings/'.$addon['Addon']['id'], 'post');?>
<h4><?=_('statistics_settings_access_heading')?></h4>
@@ -58,4 +55,4 @@
</div>
</form>
</div>
-</div>
+</div> \ No newline at end of file
diff --git a/site/app/views/users/activatefirst.thtml b/site/app/views/users/activatefirst.thtml
index ed5a464..8c93eb7 100644
--- a/site/app/views/users/activatefirst.thtml
+++ b/site/app/views/users/activatefirst.thtml
@@ -37,17 +37,18 @@
* ***** END LICENSE BLOCK ***** */
?>
-<div class="secondary" role="complementary">
- <?=$this->renderElement('amo2009/categories')?>
-</div>
-
-<div class="primary" role="main">
- <?=$this->renderElement('amo2009/search')?>
+<div id="content">
+ <?=$this->renderElement('search')?>
+ <?=$this->renderElement('sidebar', array('pitch' => true))?>
+ <?=$this->renderElement('app_chooser')?>
- <?=$this->renderElement('notification', array('type' => 'error', 'msg' => _('error_user_unconfirmed')));?>
- <br/>
- <p><?=sprintf(_('user_register_click_confirm_link'), $email, APP_PRETTYNAME)?></p>
- <br/>
- <p><?=sprintf(_('user_register_resend_confirmation_link'), $html->link(_('user_register_confirmation_link_text'), "/users/verify/{$userid}/resend"))?></p>
+ <div id="content-main">
+
+<h2><?=_('error_user_unconfirmed')?></h2>
+<br/>
+<p><?=sprintf(_('user_register_click_confirm_link'), $email, APP_PRETTYNAME)?></p>
+<br/>
+<p><?=sprintf(_('user_register_resend_confirmation_link'), $html->link(_('user_register_confirmation_link_text'), "/users/verify/{$userid}/resend"))?></p>
+ </div>
</div>
diff --git a/site/app/views/users/delete.thtml b/site/app/views/users/delete.thtml
index dbbfa5b..631a640 100644
--- a/site/app/views/users/delete.thtml
+++ b/site/app/views/users/delete.thtml
@@ -37,65 +37,58 @@
* ***** END LICENSE BLOCK ***** */
?>
-
-<div class="secondary" role="complementary">
- <?=$this->renderElement('amo2009/categories')?>
-</div>
-
-<div class="primary" role="main">
- <?=$this->renderElement('amo2009/search')?>
+<div id="content">
+ <?=$this->renderElement('search')?>
+ <?=$this->renderElement('sidebar', array('pitch' => true))?>
+ <?=$this->renderElement('app_chooser')?>
+
+ <div id="content-main">
<?php if (isset($success) && $success): ?>
-<?=$this->renderElement('notification', array('type' => 'success',
-'msg' => ___('user_del_header_farewell', 'Farewell!'),
-'description' => sprintf(___('user_del_account_deleted', 'Your user account %1$s '
+ <h1><?=___('user_del_header_farewell', 'Farewell!')?></h1>
+ <p><?php echo sprintf(___('user_del_account_deleted', 'Your user account %1$s '
.'has been successfully deleted. If you want to come back some time, '
.'you can re-register on the <a href="%2$s">user registration page</a>.')
- , $useremail, $html->url('/users/register')))); ?>
+ , $useremail, $html->url('/users/register')); ?></p>
<p><?=$html->link(_('link_return_to_front_page'), '/');?></p>
<?php else: ?>
- <?php if (!empty($deleteerror)){
+ <?php if (!empty($deleteerror)): ?>
+ <div class="amo-form-error">
+ <?php
switch ($deleteerror) {
case 'addons':
echo '<p>';
- echo $this->renderElement('notification',
- array('type' => 'error',
- 'description' => sprintf(___('user_del_error_addons', 'You cannot delete your '
+ echo sprintf(___('user_del_error_addons', 'You cannot delete your '
.'account if you are listed as an <a href="%1$s"> author of any '
.'add-ons</a>. To delete your account, please have another person '
.'in your development group delete you from the list of authors '
.'for your add-ons. Afterwards you will be able to delete your account '
- .'here.'), $html->url("/user/{$userid}"))));
+ .'here.'), $html->url("/user/{$userid}"));
echo '</p>';
echo sprintf(___('user_del_error_addons_more_questions', 'If you '
.'have additional questions, please contact %1$s for assistance.'),
$link->email(EDITOR_EMAIL));
break;
case 'checkbox':
- echo $this->renderElement('notification',
- array('type' => 'error',
- 'description' => ___('user_del_error_checkbox', 'You need to check the box "I '
- .'understand..." before we can delete your account.')));
+ echo ___('user_del_error_checkbox', 'You need to check the box "I '
+ .'understand..." before we can delete your account.');
break;
case 'password':
- echo $this->renderElement('notification',
- array('type' => 'error',
- 'description' => ___('user_del_error_password', 'Please enter your password '
- .'correctly in order to perform this step.')));
+ echo ___('user_del_error_password', 'Please enter your password '
+ .'correctly in order to perform this step.');
break;
case 'unknown':
default:
- echo $this->renderElement('notification',
- array('type' => 'error',
- 'description' => sprintf(___('user_del_error_unknown', 'An unknown error occured '
+ echo sprintf(___('user_del_error_unknown', 'An unknown error occured '
.'deleting your account. Please contact %1$s with the issue and '
.'we will delete it for you. We apologize for the inconvenience.'),
$link->email(ADMIN_EMAIL));
break;
}
- }
?>
+ </div>
+ <?php endif; ?>
<h1><?php echo sprintf(___('user_del_header_delete_account', 'Delete User Account %s'), $useremail)?></h1>
@@ -106,7 +99,7 @@
.'now, but contact us at %1$s and we will do our best to assist you in '
.'solving it.'), $link->email(EDITOR_EMAIL))?></p>
- <div class="highlight">
+ <div class="corner-box">
<h2><?=___('user_del_header_confirm_deletion', 'Confirm account deletion')?></h2>
<p><?=___('user_del_permanently_removed_means', 'By clicking "delete" your '
@@ -136,4 +129,5 @@
</div>
<p><?=$html->link(_('link_return_to_front_page'), '/');?></p>
<?php endif; ?>
+ </div>
</div>
diff --git a/site/app/views/users/edit.thtml b/site/app/views/users/edit.thtml
index 36a1176..5be872d 100644
--- a/site/app/views/users/edit.thtml
+++ b/site/app/views/users/edit.thtml
@@ -36,49 +36,52 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-
-
-/* Prepare translation box element */
-// Retrieve language arrays from bootstrap.
-global $valid_languages, $native_languages;
-foreach (array_keys($valid_languages) as $key) {
- $languages[$key] = $native_languages[$key]['native'];
-}
-ksort($languages);
-$this->translationBox = array(
- 'defaultLocale' => LANG,
- 'languages' => $languages,
- 'table' => 'User',
- 'loaded' => false
-);
?>
-<div class="secondary" role="complementary">
- <?=$this->renderElement('amo2009/categories')?>
-</div>
-
-<div class="primary" role="main">
- <?=$this->renderElement('amo2009/search')?>
+<div id="content">
+ <?=$this->renderElement('search')?>
+ <?=$this->renderElement('sidebar', array('pitch' => true))?>
+ <?=$this->renderElement('app_chooser')?>
+
+ <div id="content-main">
<?php
// show confirmation message?
if (isset($confirmation_page) && $confirmation_page):
?>
- <?echo $this->renderElement('notification', array('type' => 'success', 'msg' => $confirmation_message))?>
+ <h1><?=$confirmation_message?></h1>
<?php if (isset($newemail) && $newemail): ?>
- <?echo $this->renderElement('notification', array('type' => 'success', 'description' => sprintf(___('user_edit_confirm_email_sent'), $newemail)));?>
+ <?php
+ // @partial translation fallback, 5/5/08
+ if (_('user_edit_confirm_email_sent') != 'user_edit_confirm_email_sent')
+ $_user_edit_confirm_email_sent = _('user_edit_confirm_email_sent');
+ else
+ $_user_edit_confirm_email_sent = 'An email has been sent to your '
+ .'address %1$s to confirm your new email address. For the '
+ .'change to take effect, you need to click on the link provided '
+ .'in this email. Until then, you can keep logging in with your '
+ .'current email address.';
+ ?>
+ <p><?=sprintf($_user_edit_confirm_email_sent, $newemail)?></p>
<?php endif; ?>
- <p><?=$html->link(___('link_return_to_front_page'), '/')?></p>
+ <?php
+ // @partial translation fallback, 5/5/08
+ if (_('link_return_to_front_page') != 'link_return_to_front_page')
+ $_link_return_to_front_page = _('link_return_to_front_page');
+ else
+ $_link_return_to_front_page = 'Click here to return to the front page.';
+ ?>
+ <p><?=$html->link($_link_return_to_front_page, '/')?></p>
<?php
else:
// show "edit" form
?>
<?php if(isset($errorMessage)): ?>
- <?echo $this->renderElement('notification', array('type' => 'error', 'msg' => _('error_formerrors')));?>
+<div class="amo-form-error"><?php echo _('error_formerrors'); ?></div>
<p></p>
<?php endif; ?>
@@ -90,68 +93,44 @@ else:
<div id="tabbed-editor" class="flora">
<ul class="tabs-nav">
- <li><a href="#profile-user"><span><?=___('user_tab_profile', 'User Profile');?></span></a></li>
- <li><a href="#profile-collections"><span><?=___('user_tab_collections');?></span></a></li>
- <li><a href="#profile-notifications"><span><?=___('user_tab_notifications');?></span></a></li>
- <li><a href="#profile-change-pw-email"><span><?=_('user_change_password_or_email'); ?></span></a></li>
- <li><a href="#profile-other"><span><?=___('user_form_otheractions');?></span></a></li>
+ <li><a href="#profile-user"><span><?=___('user_tab_profile', 'User Profile'); /* @partial: 12/7/08 */ ?></span></a></li>
+ <li><a href="#profile-notifications"><span><?=___('user_tab_notifications', 'Notifications'); /* @partial: 12/7/08 */ ?></span></a></li>
+ <li><a href="#profile-changepw"><span><?=_('user_change_password'); ?></span></a></li>
+ <li><a href="#profile-changeemail"><span><?=___('user_change_email', 'Change Email Address'); /* @partial: translation fallback, 5/5/08 */ ?></span></a></li>
+ <li><a href="#profile-other"><span><?=___('user_form_otheractions', 'Other Actions');?></span></a></li>
</ul>
<div id="profile-user">
- <h3 class="hidden"><?=___('user_tab_profile', 'User Profile');?></h3>
- <div class="line">
+ <h3><?=___('user_tab_profile', 'User Profile'); /* @partial: 12/7/08 */ ?></h3>
+ <div>
<label class="amo-label-large" for="UserFirstname"><?=_('user_form_firstname')?></label>
<?=$html->input('User/firstname') ?>
<?=$html->tagErrorMsg('User/firstname', _('error_field_required'))?>
<?=___('user_required_firstlast_or_nickname', 'A first name, last name or nickname is required.')?>
</div>
- <div class="line">
+ <div>
<label class="amo-label-large" for="UserLastname"><?=_('user_form_lastname')?></label>
<?=$html->input('User/lastname') ?>
<?=$html->tagErrorMsg('User/lastname', _('error_field_required'))?>
</div>
- <div class="line">
+ <div>
<label class="amo-label-large" for="UserNickname"><?=_('user_form_nickname')?></label>
<?=$html->input('User/nickname') ?>
<?=$html->tagErrorMsg('User/nickname', _('error_user_nickname_notunique'))?>
</div>
- <div class="line">
+ <div>
<label class="amo-label-large" for="UserEmailhidden"><?=_('user_form_hideemail')?></label>
<?=$html->checkBox('User/emailhidden') ?>
</div>
- <div class="line">
+ <div>
<label class="amo-label-large" for="UserHomepage"><?=_('user_form_homepage')?></label>
<?=$html->input('User/homepage') ?>
<?=$html->tagErrorMsg('User/homepage', _('error_invalid_url'))?>
</div>
- <div class="line">
- <?php
- echo $this->renderElement('translationbox', array(
- 'field' => 'bio',
- 'translations' => $translations['bio'],
- 'height' => '100',
- 'maxLength' => '500',
- 'displayName' => ___('user_form_bio'),
- 'description' => ___('user_form_bio_description'),
- ));
- ?>
- </div>
</div>
- <div id="profile-collections">
- <h3 class="hidden"><?=___('user_tab_collections');?></h3>
- <div class="line">
- <?=$html->checkbox('User/display_collections') ?>
- <label for="UserDisplayCollections"><?=___('user_form_display_collections')?></label>
- </div>
- <div class="line">
- <?=$html->checkbox('User/display_collections_fav') ?>
- <label for="UserDisplayCollectionsFav"><?=___('user_form_display_collections_fav')?></label>
- </div>
- </div>
-
<div id="profile-notifications">
- <h3 class="hidden"><?=___('user_tab_notifications', 'Notifications');?></h3>
+ <h3><?=___('user_tab_notifications', 'Notifications'); /* @partial: 12/7/08 */ ?></h3>
<?php if (empty($userAddons)): ?>
<p><?=___('user_notifications_none_available', 'There are currently no notifications available for you to configure.')?></p>
<?php else: ?>
@@ -166,25 +145,28 @@ else:
<?php endif; ?>
</div>
- <div id="profile-change-pw-email">
+ <div id="profile-changepw">
<h3><?=_('user_change_password'); ?></h3>
- <div class="line">
+ <div>
<label class="amo-label-large" for="UserPassword"><?=_('user_form_oldpassword')?></label>
<?=$html->password('User/password', array('autocomplete'=>'off')) ?>
<?=$html->tagErrorMsg('User/password', _('error_wrong_password'))?>
</div>
- <div class="line">
+ <div>
<label class="amo-label-large" for="UserNewpassword"><?=_('user_form_newpassword')?></label>
<?=$html->password('User/newpassword', array('autocomplete'=>'off')) ?>
<?=$html->tagErrorMsg('User/newpassword', 'error_field_required')?>
</div>
- <div class="line">
+ <div>
<label class="amo-label-large" for="UserConfirmpw"><?=_('user_form_confirmpassword')?></label>
<?=$html->password('User/confirmpw', array('autocomplete'=>'off')) ?>
<?=$html->tagErrorMsg('User/confirmpw', _('error_user_confirmpw_nomatch'))?>
</div>
- <h3><?=___('user_change_email', 'Change Email Address');?></h3>
- <div class="line">
+ </div>
+
+ <div id="profile-changeemail">
+ <h3><?=___('user_change_email', 'Change Email Address'); /* @partial: translation fallback, 5/5/08 */ ?></h3>
+ <div>
<label class="amo-label-large" for="UserEmail"><?=_('user_form_email')?></label>
<?=$html->input('User/email') ?>
<?php if (isset($error_email_notunique))
@@ -198,7 +180,7 @@ else:
</div>
<div id="profile-other">
- <h3 class="hidden"><?=___('user_form_otheractions', 'Other Actions');?></h3>
+ <h3><?=___('user_form_otheractions', 'Other Actions');?></h3>
<p><?=$html->link(___('user_edit_delete_user', 'Delete user account'), '/users/delete');?></p>
</div>
</div>
@@ -208,6 +190,7 @@ else:
<?php endif; /* end of form vs. confirmation */ ?>
+ </div>
</div>
<script type="text/javascript">
diff --git a/site/app/views/users/email/emailchange_plain.thtml b/site/app/views/users/email/emailchange_plain.thtml
index 4a1a852..7a2ae90 100644
--- a/site/app/views/users/email/emailchange_plain.thtml
+++ b/site/app/views/users/email/emailchange_plain.thtml
@@ -2,6 +2,20 @@
$confirmurl = SITE_URL.$html->url('/users/emailchange/'.$userid.'?code='
.urlencode($changecode), true);
-echo $html->lineBreaks(sprintf(___('user_email_confirm_emailchange'), $confirmurl, APP_PRETTYNAME));
+// @partial: translation fallback, 5/6/08
+if (_('user_email_confirm_emailchange') != 'user_email_confirm_emailchange'):
+echo $html->lineBreaks(sprintf(_('user_email_confirm_emailchange'),
+ $confirmurl, APP_PRETTYNAME));
+
+else:
+echo "You requested a change to your email address at ".APP_PRETTYNAME." Add-ons.\n\n"
+ ."In order to confirm the new address, please click the link below or copy "
+ ."and paste the whole thing into your browser's location bar:\n\n"
+ . $confirmurl . "\n\n"
+ ."You have 48 hours to confirm the new address. If you do not want to change "
+ ."the address anymore, you can just ignore this email.\n\n"
+ ."Thanks!\n"
+ ."-- ".APP_PRETTYNAME." Add-ons Staff";
+endif;
?>
diff --git a/site/app/views/users/emailchange.thtml b/site/app/views/users/emailchange.thtml
index 9f91a53..48dc877 100644
--- a/site/app/views/users/emailchange.thtml
+++ b/site/app/views/users/emailchange.thtml
@@ -37,24 +37,37 @@
* ***** END LICENSE BLOCK ***** */
?>
-<div class="secondary" role="complementary">
- <?=$this->renderElement('amo2009/categories')?>
-</div>
-
-<div class="primary" role="main">
- <?=$this->renderElement('amo2009/search')?>
+<div id="content">
+ <?=$this->renderElement('search')?>
+ <?=$this->renderElement('sidebar', array('pitch' => true))?>
+ <?=$this->renderElement('app_chooser')?>
+
+ <div id="content-main">
<?php
-$_user_emailchange_success = ___('user_emailchange_success');
-$_user_emailchange_successful_description = sprintf(___('user_emailchange_successful_description'), $newemail);
-$_user_emailchange_error = ___('user_emailchange_error');
-$_link_return_to_front_page = ___('link_return_to_front_page');
+// @partial translation fallback, 5/7/08
+if (_('user_emailchange_success') != 'user_emailchange_success') {
+ $_user_emailchange_success = _('user_emailchange_success');
+ $_user_emailchange_successful_description = sprintf(
+ _('user_emailchange_successful_description'), $newemail);
+ $_user_emailchange_error = _('user_emailchange_error');
+ $_link_return_to_front_page = _('link_return_to_front_page');
+} else {
+ $_user_emailchange_success = 'Success!';
+ $_user_emailchange_successful_description = sprintf('Your email address was '
+ .'changed successfully. From now on, please use %1$s to log in.',
+ $newemail);
+ $_user_emailchange_error = 'Error!';
+ $_link_return_to_front_page = 'Click here to return to the front page.';
+}
if (!isset($errormsg)): ?>
-<?=$this->renderElement('notification', array('type' => 'success', 'msg' => $_user_emailchange_success, 'description' => $_user_emailchange_successful_description))?>
+ <h1><?=$_user_emailchange_success?></h1>
+ <p><?=$_user_emailchange_successful_description?></p>
<?php else: ?>
-<?=$this->renderElement('notification', array('type' => 'error', 'msg' => $_user_emailchange_error, 'description' => $errormsg))?>
+ <h1><?=$_user_emailchange_error?></h1>
+ <p><?=$errormsg?></p>
<?php endif; ?>
<p><?=$html->link($_link_return_to_front_page, '/')?></p>
-
+ </div>
</div>
diff --git a/site/app/views/users/info.thtml b/site/app/views/users/info.thtml
index 659abb6..25c1d0d 100644
--- a/site/app/views/users/info.thtml
+++ b/site/app/views/users/info.thtml
@@ -38,12 +38,11 @@
* ***** END LICENSE BLOCK ***** */
?>
-<div class="secondary" role="complementary">
- <?=$this->renderElement('amo2009/categories')?>
-</div>
+<div id="content">
+
+ <?=$this->renderElement('search')?>
-<div class="primary" role="main">
- <?=$this->renderElement('amo2009/search')?>
+ <div id="content-main">
<h3><?=_('users_info_author_profile')?></h3>
<dl>
@@ -66,12 +65,7 @@
<dt><?=_('users_info_email')?></dt>
<dd><?=$link->email($profile['User']['email'])?></dd>
<? endif; ?>
-
- <?php if ($profile['Translation']['bio']['string']): ?>
- <dt><?=___('users_info_aboutme')?></dt>
- <dd><?=nl2br($profile['Translation']['bio']['string'])?></dd>
- <?php endif; ?>
-
+
<dt><?=sprintf(_('user_info_usersince'), APP_PRETTYNAME)?></dt>
<dd><?=strftime(_('date'), strtotime($profile['User']['created']))?></dd>
@@ -132,41 +126,11 @@
</div>
<?php endif; ?>
-<?php if (!empty($coll)): ?>
-<div>
-<h3><?=sprintf(___('users_info_collections_by_user'), $displayName)?></h3>
-<dl>
- <?php
- global $app_shortnames;
- foreach ($coll as &$c):
- ?>
- <dt><?= $html->linkNoLocaleNoApp($c['Translation']['name']['string'],
- sprintf('/%s/%s/collection/%s', LANG, array_search($c['Collection']['application_id'], $app_shortnames),
- empty($c['Collection']['nickname'])?$c['Collection']['uuid']:$c['Collection']['nickname'])); ?>
- </dt>
- <dd><?=$c['Translation']['description']['string']?></dd>
- <? endforeach; ?>
-</dl>
-</div>
-<?php endif; ?>
-
-<?php if (!empty($coll_fav)): ?>
-<div>
-<h3><?=___('users_info_fav_collections_by_user')?></h3>
-<dl>
- <?php
- global $app_shortnames;
- foreach ($coll_fav as &$c):
- ?>
- <dt><?= $html->linkNoLocaleNoApp($c['Translation']['name']['string'],
- sprintf('/%s/%s/collection/%s', LANG, array_search($c['Collection']['application_id'], $app_shortnames),
- empty($c['Collection']['nickname'])?$c['Collection']['uuid']:$c['Collection']['nickname'])); ?>
- </dt>
- <dd><?=$c['Translation']['description']['string']?></dd>
- <? endforeach; ?>
-</dl>
-</div>
-<?php endif; ?>
+ </div>
+ <!-- /#content-main -->
+ <?=$this->renderElement('sidebar', array('pitch' => true))?>
+ <?=$this->renderElement('app_chooser')?>
+
</div>
-<!-- /#.primary -->
+<!-- /#content -->
diff --git a/site/app/views/users/login.thtml b/site/app/views/users/login.thtml
index a3c6e83..106a27e 100644
--- a/site/app/views/users/login.thtml
+++ b/site/app/views/users/login.thtml
@@ -38,13 +38,13 @@
* ***** END LICENSE BLOCK ***** */
?>
-<div class="secondary" role="complementary">
- <?=$this->renderElement('amo2009/categories')?>
-</div>
-
-<div class="primary" role="main">
- <?=$this->renderElement('amo2009/search')?>
+<div id="content">
+ <?=$this->renderElement('search')?>
+ <?=$this->renderElement('sidebar', array('pitch' => true))?>
+ <?=$this->renderElement('app_chooser')?>
+ <div id="content-main">
+
<?php
//banner warning messages for display
if(isset($_GET['m'])) {
@@ -59,37 +59,40 @@
$warn_msg = null;
}
}
- if (!empty($warn_msg))
- echo $this->renderElement('notification', array('type' => 'info', 'description' => $warn_msg));
+ if (!empty($warn_msg)):
?>
+<div class="amo-form-error"><?=$warn_msg?></div>
+<?php endif; ?>
-<?php if ($loginerror)
- echo $this->renderElement('notification', array('type' => 'error', 'description' => _('error_username_or_pw_wrong')));
-?>
+<?php if ($loginerror): ?>
+<div class="amo-form-error"><?php echo _('error_username_or_pw_wrong'); ?></div>
<p></p>
-<form action="<?=$html->entities($html->url())?>" method="post" class="amo-form highlight">
+<?php endif; ?>
+<form action="<?=$html->entities($html->url())?>" method="post" class="amo-form corner-box">
<?=$html->hiddenSession() ?>
<div>
<?
- $redir = (isset($_GET['to'])) ? urldecode($_GET['to']) : urldecode(@$this->data['Login']['referer']);
+ $redir = (isset($_GET['to']) ? urldecode($_GET['to']) : $this->controller->referer('/', true));
$redir = $html->entities($redir);
- $redir = html_entity_decode($redir);
echo $html->hidden('Login/referer', array('value' => $redir));
?>
</div>
- <div class="container">
+ <div>
<label class="amo-label-large" for="LoginEmail"><?=_('user_form_email')?></label>
<?=$html->input('Login/email') ?>
</div>
- <div class="container">
+ <div>
<label class="amo-label-large" for="LoginPassword"><?=_('user_form_password')?></label>
<?=$html->password('Login/password') ?>
</div>
- <div class="container">
+
+ <div>
+
<?=$html->input('Login/remember', array('type' => 'checkbox', 'value' => '1', 'class' => 'amo-remember'))?>
<label for="LoginRemember"><?=___('user_form_remember_me')?></label>
</div>
- <div class="container">
+
+ <div>
<?=$html->submit(_('user_form_submit_login'), array('class'=>'amo-submit')); ?>
</div>
</form>
@@ -98,8 +101,11 @@
$(document).ready(function() { $('#LoginEmail').focus(); });
</script>
+<div class="divider"><hr/></div>
+
<ul>
<li><?= $html->link(_('user_login_register_link'), '/users/register'); ?></li>
<li><?= $html->link(_('user_pwreset_link'), '/users/pwreset',null,null,false); ?></li>
</ul>
-</div><!-- /.primary -->
+ </div>
+</div><!-- /#content -->
diff --git a/site/app/views/users/pwreset.thtml b/site/app/views/users/pwreset.thtml
index b9962c0..ea1e916 100644
--- a/site/app/views/users/pwreset.thtml
+++ b/site/app/views/users/pwreset.thtml
@@ -37,23 +37,23 @@
*
* ***** END LICENSE BLOCK ***** */
?>
-<div class="secondary" role="complementary">
- <?=$this->renderElement('amo2009/categories')?>
-</div>
-
-<div class="primary" role="main">
- <?=$this->renderElement('amo2009/search')?>
+<div id="content">
+ <?=$this->renderElement('search')?>
+ <?=$this->renderElement('sidebar', array('pitch' => true))?>
+ <?=$this->renderElement('app_chooser')?>
+
+ <div id="content-main">
<?php if(!isset($email)): ?>
<form action="<?=$html->entities($html->url())?>" method="post" class="amo-form corner-box">
<?=$html->hiddenSession() ?>
- <div class="container">
+ <div>
<label class="amo-label-large" for="UserEmail"><?=_('user_form_email')?></label>
<?=$html->input('User/email') ?>
<?=$html->tagErrorMsg('User/email', _('error_user_notfound'))?>
</div>
- <div class="container">
+ <div>
<?=$html->submit(_('user_pwreset_submit_sendlink'), array('class'=>'amo-submit')); ?>
</div>
</form>
@@ -68,20 +68,21 @@ else:
<form action="<?=$html->entities($html->url())?>" method="post" class="amo-form corner-box">
<?=$html->hiddenSession() ?>
- <div class="container">
+ <div>
<label class="amo-label-large" for="UserPassword"><?=_('user_form_newpassword')?></label>
<?=$html->password('User/password') ?>
<?=$html->tagErrorMsg('User/password', _('error_field_required'))?>
</div>
- <div class="container">
+ <div>
<label class="amo-label-large" for="UserConfirmpw"><?=_('user_form_confirmpassword')?></label>
<?=$html->password('User/confirmpw') ?>
<?=$html->tagErrorMsg('User/confirmpw', _('error_user_confirmpw_nomatch'))?>
</div>
- <div class="container">
+ <div>
<?=$html->submit(_('user_pwreset_submit_changepw'), array('class'=>'amo-submit'));?>
</div>
</form>
<?php endif; ?>
+ </div>
</div>
diff --git a/site/app/views/users/register.thtml b/site/app/views/users/register.thtml
index 6872360..63f82f8 100644
--- a/site/app/views/users/register.thtml
+++ b/site/app/views/users/register.thtml
@@ -38,69 +38,64 @@
* ***** END LICENSE BLOCK ***** */
?>
-<div class="secondary" role="complementary">
- <?=$this->renderElement('amo2009/categories')?>
-</div>
-
-<div class="primary" role="main">
- <?=$this->renderElement('amo2009/search')?>
+<div id="content">
+ <?=$this->renderElement('search')?>
+ <?=$this->renderElement('sidebar', array('pitch' => true))?>
+ <?=$this->renderElement('app_chooser')?>
+
+ <div id="content-main">
- <div>
- <h1><?= ___('user_register_welcome_header') ?></h1>
- <?= sprintf(___('user_register_details'), 'http://www.mozilla.com/about/legal.html', $html->url('/pages/privacy')) ?>
- </div>
-
<?php if(isset($errorMessage)): ?>
-<?=$this->renderElement('notification', array('type' => 'error', 'msg' => _('error_formerrors')));?>
+<div class="amo-form-error"><?php echo _('error_formerrors'); ?></div>
<p></p>
<?php
endif;
?>
-<form action="<?=$html->entities($html->url())?>" method="post" class="amo-form">
+<form action="<?=$html->entities($html->url())?>" method="post" class="amo-form corner-box">
<?=$html->hiddenSession() ?>
- <div class="container">
+ <div>
<label class="amo-label-large" for="UserEmail"><?=_('user_form_email')?></label>
<?=$html->input('User/email') ?>
<?=(isset($error_email_notunique)) ? '<div class="error_message">'._('error_user_email_notunique').'</div>' : $html->tagErrorMsg('User/email', _('error_email_invalid'))?>
</div>
- <div class="container">
+ <div>
<label class="amo-label-large" for="UserPassword"><?=_('user_form_password')?></label>
<?=$html->password('User/password') ?>
<?=$html->tagErrorMsg('User/password', _('error_field_required'))?>
</div>
- <div class="container">
+ <div>
<label class="amo-label-large" for="UserConfirmpw"><?=_('user_form_confirmpassword')?></label>
<?=$html->password('User/confirmpw') ?>
<?=$html->tagErrorMsg('User/confirmpw', _('error_user_confirmpw_nomatch'))?>
</div>
- <div class="container">
+ <div>
<label class="amo-label-large" for="UserFirstname"><?=_('user_form_firstname')?></label>
<?=$html->input('User/firstname') ?>
<?=$html->tagErrorMsg('User/firstname', _('error_field_required'))?>
<?=___('user_required_firstlast_or_nickname', 'A first name, last name or nickname is required.')?>
</div>
- <div class="container">
+ <div>
<label class="amo-label-large" for="UserLastname"><?=_('user_form_lastname')?></label>
<?=$html->input('User/lastname') ?>
<?=$html->tagErrorMsg('User/lastname', _('error_field_required'))?>
</div>
- <div class="container">
+ <div>
<label class="amo-label-large" for="UserNickname"><?=_('user_form_nickname')?></label>
<?=$html->input('User/nickname') ?>
<?=$html->tagErrorMsg('User/nickname', _('error_user_nickname_notunique'))?>
</div>
- <div class="container">
+ <div>
<label class="amo-label-large" for="UserEmailhidden"><?=_('user_form_hideemail')?></label>
<?=$html->checkBox('User/emailhidden')?>
</div>
- <div class="container">
+ <div>
<label class="amo-label-large" for="UserHomepage"><?=_('user_form_homepage')?></label>
<?=$html->input('User/homepage') ?>
<?=$html->tagErrorMsg('User/homepage', _('error_invalid_url'))?>
</div>
<?php if (isset($this->controller->Recaptcha) && $this->controller->Recaptcha->enabled): ?>
- <div class="container">
+ <div>
<div class="amo-label-large">
<label for="recaptcha_response_field"><?=___('recaptcha_label', 'Are you human?')?></label><br/>
<span id="recaptcha_whatsthis"><a href="javascript:Recaptcha.showhelp()"><?=___('recaptcha_whatsthis', "What's this?")?></a></span>
@@ -109,9 +104,10 @@ endif;
<?=$html->tagErrorMsg('User/captcha', ___('error_invalid_captcha', 'Invalid captcha, please try again!'))?>
</div>
<?php endif; ?>
- <div class="container">
+ <div>
<?=$html->submit(_('user_form_submit_register'), array('class'=>'amo-submit')); ?>
</div>
</form>
+ </div>
</div>
diff --git a/site/app/views/users/register_complete.thtml b/site/app/views/users/register_complete.thtml
index f709972..6be8a9f 100644
--- a/site/app/views/users/register_complete.thtml
+++ b/site/app/views/users/register_complete.thtml
@@ -37,14 +37,15 @@
*
* ***** END LICENSE BLOCK ***** */
?>
-<div class="secondary" role="complementary">
- <?=$this->renderElement('amo2009/categories')?>
-</div>
-<div class="primary" role="main">
- <?=$this->renderElement('amo2009/search')?>
+<div id="content">
+ <?=$this->renderElement('search')?>
+ <?=$this->renderElement('sidebar', array('pitch' => true))?>
+ <?=$this->renderElement('app_chooser')?>
+
+ <div id="content-main">
- <?=$this->renderElement('notification', array('type' => 'success', 'msg' => _('user_register_congratulations')));?>
+ <p><?=_('user_register_congratulations')?></p>
<p><?=sprintf(_('user_register_confirm_email_sent'), $data['User']['email'])?></p>