Commit 8cdba82f authored by Rafael Monnerat's avatar Rafael Monnerat Committed by Xiaowu Zhang

Minor changes and code styling

parent 29507d1e
...@@ -71,12 +71,13 @@ ...@@ -71,12 +71,13 @@
- rename to use asHTML terminology\n - rename to use asHTML terminology\n
"""\n """\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
category_path = \'portal_categories/publication_section/website/product/short_description\'\n
\n \n
# Find a related web page with appropriate publication_section\n # Find a related web page with appropriate publication_section\n
web_page = portal.portal_catalog(portal_type=\'Web Page\',\n web_page = portal.portal_catalog(portal_type=\'Web Page\',\n
default_follow_up_uid=context.getUid(),\n default_follow_up_uid=context.getUid(),\n
default_publication_section_uid=context.restrictedTraverse(\'portal_categories/publication_section/website/product/short_description\').getUid(), # XXX Bad hardcoding\n default_publication_section_uid=context.restrictedTraverse(category_path).getUid(), # XXX Bad hardcoding\n
)\n )\n
if web_page is None or len(web_page) == 0:\n if web_page is None or len(web_page) == 0:\n
return context.Base_translateString("No more information for this product.")\n return context.Base_translateString("No more information for this product.")\n
return web_page[0].getObject().asStrippedHTML()\n return web_page[0].getObject().asStrippedHTML()\n
......
...@@ -50,7 +50,19 @@ ...@@ -50,7 +50,19 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>return \'%s/%s\' % (context.getAbsoluteUrl(), \'Resource_viewAsShop\')\n <value> <string>"""\n
Return a URL for the product to display. If a default display\n
varition was defined by side effect, take it into account.\n
\n
TODO:\n
- make generic implementation of variation selection\n
"""\n
\n
variation = context.REQUEST.get(\'default_displayed_variation\', None)\n
if not variation:\n
return \'%s/%s\' % (context.getAbsoluteUrl(), \'Resource_viewAsShop\')\n
\n
return \'%s/%s?variation=%s\' % (context.getAbsoluteUrl(), \'Resource_viewAsShop\', variation)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
...@@ -142,10 +142,7 @@ ...@@ -142,10 +142,7 @@
</record> </record>
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle> <pickle>
<tuple> <global name="TALESMethod" module="Products.Formulator.TALESField"/>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -158,10 +155,7 @@ ...@@ -158,10 +155,7 @@
</record> </record>
<record id="3" aka="AAAAAAAAAAM="> <record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<tuple> <global name="TALESMethod" module="Products.Formulator.TALESField"/>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment