Prise en compte du paramètre thumb_size au moment de la fabrication.
[Portfolio.git] / skins / portfolio_view.pt
index e0768d0..3028e15 100644 (file)
@@ -4,8 +4,14 @@
   <head>
     <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
     <metal:block metal:fill-slot="javascript_head_slot">
   <head>
     <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
     <metal:block metal:fill-slot="javascript_head_slot">
-      <script type="text/javascript" tal:attributes="src string:${portal_url}/cart_widgets.js"></script>
-      <script type="text/javascript" tal:attributes="src string:${portal_url}/photo_lightbox_viewer.js"></script>
+      <script type="text/javascript" tal:attributes="src string:$portal_url/cart_widgets.js"></script>
+      <script type="text/javascript" tal:attributes="src string:$portal_url/photo_lightbox_viewer.js"></script>
+      <tal:block
+        tal:define="AddPortalContent modules/Products/CMFCore/permissions/AddPortalContent"
+        tal:condition="python: mtool.checkPermission(AddPortalContent, here)">
+        <script type="text/javascript" tal:attributes="src string:$portal_url/fileupload.js" charset="utf-8"></script>
+        <script type="text/javascript" tal:attributes="src string:$portal_url/portfolio_upload.js" charset="utf-8"></script>
+      </tal:block>
     </metal:block>
     <title>portfolio_view</title>
   </head>
     </metal:block>
     <title>portfolio_view</title>
   </head>
     </div>
 
     <div metal:fill-slot="main" tal:omit-tag=""
     </div>
 
     <div metal:fill-slot="main" tal:omit-tag=""
-         tal:define="ModifyPortalContent modules/Products/CMFCore/permissions/ModifyPortalContent;
-                     ctool nocall:here/portal_catalog;
-                     slide_size portal_object/slide_size;
+         tal:define="AddPortalContent modules/Products/CMFCore/permissions/AddPortalContent;
+                     dropable python:mtool.checkPermission(AddPortalContent, here);
                      Batch python:modules['Products.Plinn'].Batch;
                      Batch python:modules['Products.Plinn'].Batch;
-                     pho_start python:0;pho_start request/pho_start | pho_start;
-                     port_start python:0;port_start request/port_start | port_start;
+                     pho_start python:request.get('pho_start', 0);
+                     port_start python:request.get('port_start', 0);
                      portfolios python:Batch(here.listNearestFolderContents(contentFilter={'portal_type' : 'Portfolio'}),
                                              16, port_start, orphan=1, quantumleap=1, b_start_str='port_start');">
     <div tal:condition="python:here.hasPresentationPage() and pho_start < 20"
                      portfolios python:Batch(here.listNearestFolderContents(contentFilter={'portal_type' : 'Portfolio'}),
                                              16, port_start, orphan=1, quantumleap=1, b_start_str='port_start');">
     <div tal:condition="python:here.hasPresentationPage() and pho_start < 20"