← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~thumper/launchpad/recipe-inline-edit-description into lp:launchpad

 

Tim Penhey has proposed merging lp:~thumper/launchpad/recipe-inline-edit-description into lp:launchpad with lp:~thumper/launchpad/recipe-inline-edit-recipe-text as a prerequisite.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~thumper/launchpad/recipe-inline-edit-description/+merge/49757

This branch enables the inline editing of the recipe description.

I talked with Deryck about the need to have the same widget tested
in all the places it is used and he reckons that it is a bit of
overkill.  Hence no specific test here for the adding of the widget.
-- 
https://code.launchpad.net/~thumper/launchpad/recipe-inline-edit-description/+merge/49757
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~thumper/launchpad/recipe-inline-edit-description into lp:launchpad.
=== modified file 'lib/lp/code/browser/sourcepackagerecipe.py'
--- lib/lp/code/browser/sourcepackagerecipe.py	2011-02-15 02:37:05 +0000
+++ lib/lp/code/browser/sourcepackagerecipe.py	2011-02-15 02:37:06 +0000
@@ -279,6 +279,13 @@
             true_text='Built daily',
             header='Change build schedule')
 
+    @property
+    def description_widget(self):
+        """The description as a widget."""
+        description = ISourcePackageRecipe['description']
+        return TextAreaEditorWidget(
+            self.context, description, title="")
+
 
 class SourcePackageRecipeRequestBuildsView(LaunchpadFormView):
     """A view for requesting builds of a SourcePackageRecipe."""

=== modified file 'lib/lp/code/interfaces/sourcepackagerecipe.py'
--- lib/lp/code/interfaces/sourcepackagerecipe.py	2011-02-15 02:37:05 +0000
+++ lib/lp/code/interfaces/sourcepackagerecipe.py	2011-02-15 02:37:06 +0000
@@ -190,11 +190,12 @@
             constraint=name_validator,
             description=_("The name of this recipe.")))
 
-    description = Description(
+    description = exported(Description(
         title=_('Description'), required=True,
-        description=_('A short description of the recipe.'))
+        description=_('A short description of the recipe.')))
 
-    date_last_modified = Datetime(required=True, readonly=True)
+    date_last_modified = exported(
+        Datetime(required=True, readonly=True))
 
     is_stale = Bool(title=_('Recipe is stale.'))
 

=== modified file 'lib/lp/code/templates/sourcepackagerecipe-index.pt'
--- lib/lp/code/templates/sourcepackagerecipe-index.pt	2011-02-15 02:37:05 +0000
+++ lib/lp/code/templates/sourcepackagerecipe-index.pt	2011-02-15 02:37:06 +0000
@@ -12,7 +12,7 @@
     .binary-build .indent {
       padding-left: 2em;
     }
-    #edit-recipe_text {
+    div#edit-recipe_text, div#edit-description {
       font-family: "UbuntuBeta Mono","Ubuntu Mono",monospace;
       margin-top: -15px;
     }
@@ -39,8 +39,8 @@
   <div class="yui-g first">
     <div class="yui-u first">
       <div class="portlet">
-        <h2>Description</h2>
-        <tal:description replace="context/description" />
+        <h2 class="lazr-multiline-edit-header">Description</h2>
+        <tal:description replace="structure view/description_widget"/>
       </div>
     </div>
     <div class="yui-u">