From: optilude <svn...@pl...> - 2006-09-02 14:03:10
|
Author: optilude Date: Sat Sep 2 14:03:06 2006 New Revision: 10752 Added: plone.app.portlets/trunk/plone/app/portlets/browser/templates/ plone.app.portlets/trunk/plone/app/portlets/browser/templates/edit-manager-contextual.pt plone.app.portlets/trunk/plone/app/portlets/browser/templates/edit-manager.pt plone.app.portlets/trunk/plone/app/portlets/browser/templates/manage-contextual.pt plone.app.portlets/trunk/plone/app/portlets/browser/templates/manage-currentuser.pt Removed: plone.app.portlets/trunk/plone/app/portlets/browser/editmanager.pt plone.app.portlets/trunk/plone/app/portlets/browser/manage.pt plone.app.portlets/trunk/plone/app/portlets/browser/myportlets.pt Modified: plone.app.portlets/trunk/plone/app/portlets/browser/configure.zcml plone.app.portlets/trunk/plone/app/portlets/browser/editmanager.py Log: Clean up templates Modified: plone.app.portlets/trunk/plone/app/portlets/browser/configure.zcml ============================================================================== --- plone.app.portlets/trunk/plone/app/portlets/browser/configure.zcml (original) +++ plone.app.portlets/trunk/plone/app/portlets/browser/configure.zcml Sat Sep 2 14:03:06 2006 @@ -26,10 +26,10 @@ class=".manage.ManageContextualPortlets" permission="plone.app.portlets.ManagePortlets" > - + <browser:page name="manage-portlets" - template="manage.pt" + template="templates/manage-contextual.pt" /> <browser:page @@ -44,7 +44,7 @@ for="Products.CMFCore.interfaces.ISiteRoot" class=".manage.ManageCurrentUserPortlets" name="manage-my-portlets" - template="myportlets.pt" + template="templates/manage-currentuser.pt" permission="plone.app.portlets.ManageOwnPortlets" /> Modified: plone.app.portlets/trunk/plone/app/portlets/browser/editmanager.py ============================================================================== --- plone.app.portlets/trunk/plone/app/portlets/browser/editmanager.py (original) +++ plone.app.portlets/trunk/plone/app/portlets/browser/editmanager.py Sat Sep 2 14:03:06 2006 @@ -47,7 +47,7 @@ self.manager = manager # part of interface self.context = context self.request = request - self.template = ZopeTwoPageTemplateFile('editmanager.pt') + self.template = ZopeTwoPageTemplateFile('templates/edit-manager.pt') self.__updated = False self.__assignments = None self.__portlets = None @@ -124,6 +124,7 @@ def __init__(self, context, request, view, manager): EditPortletManagerRenderer.__init__(self, context, request, view, manager) + self.template = ZopeTwoPageTemplateFile('templates/edit-manager-contextual.pt') def context_blacklist_status(self): assignable = getMultiAdapter((self.context, self.manager,), ILocalPortletAssignmentManager) Added: plone.app.portlets/trunk/plone/app/portlets/browser/templates/edit-manager-contextual.pt ============================================================================== --- (empty file) +++ plone.app.portlets/trunk/plone/app/portlets/browser/templates/edit-manager-contextual.pt Sat Sep 2 14:03:06 2006 @@ -0,0 +1,37 @@ +<div> + + <strong>Portlets assigned here</strong> + + <tal:block repeat="portlet view/portlets"> + + <hr /> + + <div> + <a tal:attributes="href portlet/editview" + tal:content="portlet/title" /> + </div> + <div> + <a tal:attributes="href portlet/up_url">Up</a> + <a tal:attributes="href portlet/down_url">Down</a> + <a tal:attributes="href portlet/delete_url">Delete</a> + </div> + + <div tal:replace="structure portlet/html" /> + + </tal:block> + + <hr /> + + <strong>Filtering</strong> + + <hr /> + + <strong>Add</strong> + + <div tal:repeat="portlet view/addable_portlets"> + <a tal:attributes="href portlet/addview; + title portlet/description" + tal:content="portlet/title" /> + </div> + +</div> Added: plone.app.portlets/trunk/plone/app/portlets/browser/templates/edit-manager.pt ============================================================================== --- (empty file) +++ plone.app.portlets/trunk/plone/app/portlets/browser/templates/edit-manager.pt Sat Sep 2 14:03:06 2006 @@ -0,0 +1,33 @@ +<div> + + <strong>Portlets assigned here</strong> + + <tal:block repeat="portlet view/portlets"> + + <hr /> + + <div> + <a tal:attributes="href portlet/editview" + tal:content="portlet/title" /> + </div> + <div> + <a tal:attributes="href portlet/up_url">Up</a> + <a tal:attributes="href portlet/down_url">Down</a> + <a tal:attributes="href portlet/delete_url">Delete</a> + </div> + + <div tal:replace="structure portlet/html" /> + + </tal:block> + + <hr /> + + <strong>Add</strong> + + <div tal:repeat="portlet view/addable_portlets"> + <a tal:attributes="href portlet/addview; + title portlet/description" + tal:content="portlet/title" /> + </div> + +</div> Added: plone.app.portlets/trunk/plone/app/portlets/browser/templates/manage-contextual.pt ============================================================================== --- (empty file) +++ plone.app.portlets/trunk/plone/app/portlets/browser/templates/manage-contextual.pt Sat Sep 2 14:03:06 2006 @@ -0,0 +1,56 @@ +<html xmlns="http://www.w3.org/1999/xhtml" + xmlns:metal="http://xml.zope.org/namespaces/metal" + xmlns:tal="http://xml.zope.org/namespaces/tal" + xmlns:i18n="http://xml.zope.org/namespaces/i18n" + metal:use-macro="context/@@standard_macros/page"> +<head> +</head> + +<body> +<div metal:fill-slot="body"> + + <h1 class="documentFirstHeading">Manage portlets</h1> + + <p> + The left and right portlet slots will now display only those portlets + explicitly assigned here. Use the buttons on each portlet to move them + up or down, delete, edit portlets, blacklist categories or add new + portlets. + </p> + + <div tal:condition="view/has_legacy_portlets"> + + <h2>Legacy portlets</h2> + + <p> + There are legacy portlets defined here. Click + <a tal:attributes="href string:${context/absolute_url}/@@convert-legacy-portlets"> + here + </a> to convert them to new-style portlets. + </p> + </div> + + <h2>My portlets</h2> + + <p> + You can assign personal portlets by clicking + <a tal:attributes="href string:${context/portal_url}/@@manage-my-portlets">here</a> + </p> + + <h2>Group portlets</h2> + + <p> + Portlets can be assigned to groups. This works the same way as + assigning portlets to users, but the UI is not yet in place. Stay tuned. + </p> + + <h2>Content type portlets</h2> + + <p> + Portlets can be assigned to content types. This works the same way + as assigning portlets to users, but the UI is not yet in place. Stay tuned. + </p> + +</div> +</body> +</html> Added: plone.app.portlets/trunk/plone/app/portlets/browser/templates/manage-currentuser.pt ============================================================================== --- (empty file) +++ plone.app.portlets/trunk/plone/app/portlets/browser/templates/manage-currentuser.pt Sat Sep 2 14:03:06 2006 @@ -0,0 +1,25 @@ +<html xmlns="http://www.w3.org/1999/xhtml" + xmlns:metal="http://xml.zope.org/namespaces/metal" + xmlns:tal="http://xml.zope.org/namespaces/tal" + xmlns:i18n="http://xml.zope.org/namespaces/i18n" + metal:use-macro="context/@@standard_macros/page"> +<head> +</head> + +<body> +<div metal:fill-slot="body"> + + <h1 class="documentFirstHeading">Manage my portlets</h1> + + <p> + The left and right portlet slots will now display only those portlets + assigned to the current user. Use the up, down, delete and add links + there to manage user portlets. + </p> + <p> + Note that user portlets are normally rendered below context portlets. + </p> + +</div> +</body> +</html> |