- <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>