← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jcsackett/launchpad/share-share-alike into lp:launchpad

 

j.c.sackett has proposed merging lp:~jcsackett/launchpad/share-share-alike into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #931563 in Launchpad itself: "Projects need +sharing view"
  https://bugs.launchpad.net/launchpad/+bug/931563

For more details, see:
https://code.launchpad.net/~jcsackett/launchpad/share-share-alike/+merge/92864

Summary
=======
>From mockups, we want to create a "sharing" page for projects to help with
managing of disclosure (now termed sharing). This page lands the basic
infrastructure (placeholder view, zcml setup, template) to allow us to create
it.

Preimp
======
Spoke with Curtis Hovey. Additionally, there has been an *extensive* amount of
user testing and iterative design on the mockups themselves, which can be
found at http://people.canonical.com/~curtis/disclosure

Implementation
==============
This branch simply creates a view with label and page_title for breadcrumbs,
provides it an empty template, and wires it into the zcml. There are no links
to the sharing page yet, so we do not need any permission flags.

Tests
=====
There are no new tests for this branch, as the view has no actual
functionality yet. To confirm its addition broke nothing, run

bin/test -vvcm lp.registry.browser

QA
==
Go to qastaging.launchpad.net/launchpad/+sharing; you should see an empty page
with the sharing title.
-- 
https://code.launchpad.net/~jcsackett/launchpad/share-share-alike/+merge/92864
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jcsackett/launchpad/share-share-alike into lp:launchpad.
=== modified file 'lib/lp/registry/browser/configure.zcml'
--- lib/lp/registry/browser/configure.zcml	2012-02-01 15:26:32 +0000
+++ lib/lp/registry/browser/configure.zcml	2012-02-13 22:00:28 +0000
@@ -1455,6 +1455,12 @@
     </browser:pages>
     <browser:page
         for="lp.registry.interfaces.product.IProduct"
+        permission="launchpad.Edit"
+        name="+sharing"
+        class="lp.registry.browser.product.ProductSharingView"
+        template="../templates/product-sharing.pt"/>
+    <browser:page
+        for="lp.registry.interfaces.product.IProduct"
         permission="zope.Public"
         name="+purchase-subscription"
         class="lp.registry.browser.product.ProductPurchaseSubscriptionView"

=== modified file 'lib/lp/registry/browser/product.py'
--- lib/lp/registry/browser/product.py	2012-02-10 10:21:24 +0000
+++ lib/lp/registry/browser/product.py	2012-02-13 22:00:28 +0000
@@ -40,6 +40,7 @@
     'SortSeriesMixin',
     'ProjectAddStepOne',
     'ProjectAddStepTwo',
+    'ProductSharingView',
     ]
 
 
@@ -2388,3 +2389,9 @@
     def adapters(self):
         """See `LaunchpadFormView`"""
         return {IProductEditPeopleSchema: self.context}
+
+
+class ProductSharingView(LaunchpadView):
+
+    page_title = "Sharing"
+    label = page_title

=== added file 'lib/lp/registry/templates/product-sharing.pt'
--- lib/lp/registry/templates/product-sharing.pt	1970-01-01 00:00:00 +0000
+++ lib/lp/registry/templates/product-sharing.pt	2012-02-13 22:00:28 +0000
@@ -0,0 +1,15 @@
+<html
+  xmlns="http://www.w3.org/1999/xhtml";
+  xmlns:tal="http://xml.zope.org/namespaces/tal";
+  xmlns:metal="http://xml.zope.org/namespaces/metal";
+  xmlns:i18n="http://xml.zope.org/namespaces/i18n";
+  metal:use-macro="view/macro:page/main_only"
+  i18n:domain="launchpad"
+>
+
+<body>
+  <div metal:fill-slot="main">
+    Proprietary, embargoed security, or user-data information about this project is shared with these users and teams.
+  </div>
+</body>
+</html>


Follow ups