Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfligtar@gmail.com <fligtar@gmail.com@4eb1ac78-321c-0410-a911-ec516a8615a5>2007-07-04 04:46:09 (GMT)
committer fligtar@gmail.com <fligtar@gmail.com@4eb1ac78-321c-0410-a911-ec516a8615a5>2007-07-04 04:46:09 (GMT)
commit5d992dd8c42ff101a8dedc8d6fb9f66f20c7926d (patch)
tree85007efc5d844d9de55a2deecb5ec38b938d179c
parent7cf63ed536b207567c7216d44adf8abcebceb552 (diff)
adding nomination message, bug 382323, r=shaver
git-svn-id: http://svn.mozilla.org/addons/trunk@4808 4eb1ac78-321c-0410-a911-ec516a8615a5
-rw-r--r--site/app/controllers/developers_controller.php13
-rw-r--r--site/app/locale/en_US/LC_MESSAGES/messages.po8
-rw-r--r--site/app/locale/en_US/pages/nomination.thtml12
-rw-r--r--site/app/models/addon.php2
-rw-r--r--site/app/views/developers/add_step5.thtml2
-rw-r--r--site/app/views/developers/nominate.thtml1
-rw-r--r--site/app/views/editors/review.thtml8
-rw-r--r--site/app/webroot/css/editors.css6
8 files changed, 44 insertions, 8 deletions
diff --git a/site/app/controllers/developers_controller.php b/site/app/controllers/developers_controller.php
index 65fc9bf..4504822 100644
--- a/site/app/controllers/developers_controller.php
+++ b/site/app/controllers/developers_controller.php
@@ -1396,7 +1396,18 @@ class DevelopersController extends AppController
return;
}
- $addonData = array('status' => STATUS_NOMINATED);
+ //Make sure nomination message not empty
+ if (empty($this->data['Addon']['nominationmessage'])) {
+ $this->flash(_('devcp_error_nominate_message'), '/developers/nominate/'.$id, 3);
+ return;
+ }
+
+ //Amo->clean is being stupid. Yes, that's right. I said STUPID
+ $nominationMessage = str_replace('\n', "\n", $this->data['Addon']['nominationmessage']);
+ $nominationMessage = str_replace('\r', "\r", $nominationMessage);
+
+ $addonData = array('status' => STATUS_NOMINATED, 'nominationmessage' => $nominationMessage);
+
$this->Addon->save($addonData);
$this->flash(_('devcp_addon_nominated_successfully'), '/developers/details/'.$id, 3);
return;
diff --git a/site/app/locale/en_US/LC_MESSAGES/messages.po b/site/app/locale/en_US/LC_MESSAGES/messages.po
index 1ab0ce7..c031744 100644
--- a/site/app/locale/en_US/LC_MESSAGES/messages.po
+++ b/site/app/locale/en_US/LC_MESSAGES/messages.po
@@ -1436,6 +1436,10 @@ msgstr "No install.rdf present."
msgid "devcp_error_invalid_addontype"
msgstr "Please select a valid add-on type."
+#: controllers/developers_controller.php
+msgid "devcp_error_nominate_message"
+msgstr "You must supply the requested details for nomination."
+
#: controllers/developers_controller.php:1374
msgid "devcp_error_nominate_no_prerelease"
msgstr "You cannot nominate a pre-release add-on."
@@ -2110,6 +2114,10 @@ msgstr "Files:"
msgid "editors_review_header_itemhistory"
msgstr "Item History"
+#: views/editors/review.thtml
+msgid "editors_review_header_nominationmessage"
+msgstr "Nomination Message"
+
#: views/editors/review.thtml:303
msgid "editors_review_header_previews"
msgstr "Previews"
diff --git a/site/app/locale/en_US/pages/nomination.thtml b/site/app/locale/en_US/pages/nomination.thtml
index 3f4af4d..dfa566f 100644
--- a/site/app/locale/en_US/pages/nomination.thtml
+++ b/site/app/locale/en_US/pages/nomination.thtml
@@ -1,8 +1,10 @@
<p>An add-on currently in the sandbox may be nominated to be a part of the public site and available to all users after undergoing review by an editor. For best results, please note the following:</p>
<ul>
- <li>Preview images are required for themes and highly recommended for all other add-on types</li>
- <li>The add-on should have spent enough time in the sandbox to accumulate reviews and feedback from users</li>
- <li>Public add-ons have a higher quality bar than sandbox add-ons and should enhance the web</li>
- <li>Full nomination criteria is available in our <a href="%s">Add-on Policy</a></li>
+ <li>Preview images are required for themes and highly recommended for all other add-on types.</li>
+ <li>The add-on should have spent enough time in the sandbox to accumulate reviews and feedback from users. <b>Reviews are required to become public.</b></li>
+ <li>Public add-ons have a higher quality bar than sandbox add-ons and should enhance the web.</li>
+ <li>Full nomination criteria is available in the <a href="%s">Add-on Policy</a>.</li>
</ul>
-<p>If your add-on meets the above criteria, you can nominate it by clicking the button below. You will be notified via e-mail about the status of your nomination.</p>
+<p>If your add-on meets the above criteria, you can nominate it by completing the field below. You will be notified via e-mail about the status of your nomination.</p>
+
+<p>To nominate your add-on, please describe how it has been tested (including that it is free of errors and warnings) and how it is useful to to the wider web. You may also include links to external reviews of your add-on.</p>
diff --git a/site/app/models/addon.php b/site/app/models/addon.php
index 4e8cbe9..ed5dd49 100644
--- a/site/app/models/addon.php
+++ b/site/app/models/addon.php
@@ -128,7 +128,7 @@ class Addon extends AppModel
'averagerating', 'weeklydownloads', 'totaldownloads',
'developercomments', 'inactive', 'trusted', 'viewsource',
'prerelease', 'adminreview', 'sitespecific', 'externalsoftware',
- 'eula', 'privacypolicy', 'created', 'modified');
+ 'eula', 'privacypolicy', 'nominationmessage', 'created', 'modified');
/**
* Return add-ons with latest version information.
diff --git a/site/app/views/developers/add_step5.thtml b/site/app/views/developers/add_step5.thtml
index 73d00c4..ca57c90 100644
--- a/site/app/views/developers/add_step5.thtml
+++ b/site/app/views/developers/add_step5.thtml
@@ -58,7 +58,7 @@ if ($newAddon == false) {
echo _('devcp_addon_submission_pending');
}
elseif ($fileStatus == STATUS_SANDBOX) {
- echo sprintf(_('devcp_addon_submission_sandboxed'), $html->link(_('devcp_addon_submission_sandboxed_nominate_link'), '/developers/index/'.$id.'/nominate'));
+ 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'));
diff --git a/site/app/views/developers/nominate.thtml b/site/app/views/developers/nominate.thtml
index 71f4342..dc3bf14 100644
--- a/site/app/views/developers/nominate.thtml
+++ b/site/app/views/developers/nominate.thtml
@@ -44,6 +44,7 @@ echo $this->renderElement('developers/myaddons');
<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']);
?>
diff --git a/site/app/views/editors/review.thtml b/site/app/views/editors/review.thtml
index a79741a..87f6dbb 100644
--- a/site/app/views/editors/review.thtml
+++ b/site/app/views/editors/review.thtml
@@ -197,6 +197,14 @@ echo $this->renderElement('developers/editorsmenu', array('collapsed' => true));
</form>
<div id="notes">
<?php
+if (!empty($addon['Addon']['nominationmessage'])) {
+ echo '<div class="highlighted">';
+ echo '<h3>'._('editors_review_header_nominationmessage').'</h3>';
+ echo '<div id="nominationMessage">';
+ echo nl2br($addon['Addon']['nominationmessage']);
+ echo '</div>';
+ echo '</div>';
+}
if (!empty($version['Version']['approvalnotes'])) {
echo '<h3>'._('editors_review_header_reviewernotes').'</h3>';
echo '<div id="reviewNotes">';
diff --git a/site/app/webroot/css/editors.css b/site/app/webroot/css/editors.css
index b54fbfd..47ffff8 100644
--- a/site/app/webroot/css/editors.css
+++ b/site/app/webroot/css/editors.css
@@ -120,6 +120,12 @@ div.error_message {
#notes div {
margin: 10px;
}
+#notes .highlighted {
+ margin: 0;
+ margin-bottom: 10px;
+ padding: 10px;
+ border: 1px solid gray;
+}
.fileCheckbox {
vertical-align: middle;
}