Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/site/app/views/developers/details.thtml
diff options
context:
space:
mode:
Diffstat (limited to 'site/app/views/developers/details.thtml')
-rw-r--r--site/app/views/developers/details.thtml164
1 files changed, 164 insertions, 0 deletions
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>