a194d6f4f387285f1955117f3b8028ec20395bb0
[Portfolio.git] / skins / portfolio_view.pt
1 <html xmlns="http://www.w3.org/1999/xhtml"
2 metal:use-macro="here/main_template/macros/master">
3
4 <head>
5 <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
6 <metal:block metal:fill-slot="javascript_head_slot">
7 <script type="text/javascript" tal:attributes="src string:$portal_url/cart_widgets.js"></script>
8 <script type="text/javascript" tal:attributes="src string:$portal_url/photo_lightbox_viewer.js"></script>
9 <tal:block
10 tal:define="AddPortalContent modules/Products/CMFCore/permissions/AddPortalContent"
11 tal:condition="python: mtool.checkPermission(AddPortalContent, here)">
12 <script type="text/javascript" tal:attributes="src string:$portal_url/fileupload.js" charset="utf-8"></script>
13 <script type="text/javascript" tal:attributes="src string:$portal_url/portfolio_upload.js" charset="utf-8"></script>
14 </tal:block>
15 </metal:block>
16 <title>portfolio_view</title>
17 </head>
18
19 <body i18n:domain="portfolio">
20 <div metal:fill-slot="header" tal:omit-tag="" tal:condition="not:here/hasPresentationPage">
21 <h1 id="DesktopTitle">
22 <span tal:replace="here/title_or_id">Page Title</span>
23 </h1>
24 <div id="DesktopDescription" tal:content="structure here/Description">
25 Description of the resource goes here, perhaps even wrapping lines; this is to make it long enough to test.
26 </div>
27 </div>
28
29 <div metal:fill-slot="main" tal:omit-tag=""
30 tal:define="AddPortalContent modules/Products/CMFCore/permissions/AddPortalContent;
31 ManageProperties modules/Products/CMFCore/permissions/ManageProperties;
32 dropable python:mtool.checkPermission(AddPortalContent, here);
33 orderable python:mtool.checkPermission(ManageProperties, here) and here.getDefaultSorting()[0] == 'position';
34 Batch python:modules['Products.Plinn'].Batch;
35 pho_start python:request.get('pho_start', 0);
36 port_start python:request.get('port_start', 0);
37 portfolios python:Batch(here.listNearestFolderContents(contentFilter={'portal_type' : 'Portfolio'}),
38 16, port_start, orphan=1, quantumleap=1, b_start_str='port_start');">
39 <div tal:condition="python:here.hasPresentationPage() and pho_start < 20"
40 tal:content="structure here/presentation_page">custom presentation</div>
41 <div tal:condition="portfolios" tal:omit-tag="">
42 <div tal:define="batch portfolios" tal:omit-tag="">
43 <div metal:use-macro="here/batch_macros/macros/navigation">batch navigation</div>
44 <div class="portfolio_lightbox">
45 <a tal:repeat="portfolio batch"
46 tal:attributes="href portfolio/absolute_url">
47 <span tal:define="sphoto portfolio/samplePhoto" tal:omit-tag="">
48 <span tal:condition="sphoto" tal:omit-tag="">
49 <img tal:attributes="src sphoto/src;
50 alt sphoto/alt;
51 height sphoto/height;
52 width sphoto/width;"/>
53 </span>
54 <span tal:condition="not:sphoto" tal:omit-tag="">
55 <img tal:attributes="src here/empty_portfolio.gif/absolute_url;
56 alt portfolio/title_or_id"/>
57 </span>
58 </span>
59 <h3 tal:content="portfolio/Title">Portfolio title or id</h3>
60 <div tal:content="portfolio/Description"></div>
61 </a>
62 </div>
63 </div>
64 </div>
65
66 <div tal:define="batchInfos python:here.getPhotosInfos(here);
67 batch batchInfos/batch;
68 infos batchInfos/infos;
69 features batchInfos/features"
70 tal:omit-tag="">
71 <form tal:attributes="action string:${here/absolute_url}/portfolio_edit_form" method="post">
72 <div id="lightbox_toolbar" class="image_toolbar"
73 tal:define="ModifyPortalContent modules/Products/CMFCore/permissions/ModifyPortalContent"
74 tal:condition="python:mtool.checkPermission(ModifyPortalContent, here)">
75 <span>
76 <span i18n:translate="" tal:omit-tag="">sorting:</span>
77 <select tal:define="sort_on batchInfos/sorting/sort_on"
78 name="sort_on">
79 <option tal:attributes="selected python:sort_on=='position'"
80 value="position" i18n:translate="">manual</option>
81 <option tal:attributes="selected python:sort_on=='DateTimeOriginal'"
82 value="DateTimeOriginal" i18n:translate="">shooting</option>
83 <option tal:attributes="selected python:sort_on=='modified'"
84 value="modified" i18n:translate="">modification</option>
85 </select>
86 <noscript>
87 <input type="submit" name="set_sorting" value="ok"/>
88 </noscript>
89 </span>
90 <input type="image" width="17" height="27" alt="delete" title="delete"
91 name="delete"
92 tal:attributes="src string:$portal_url/trash_btn.gif"
93 i18n:attributes="alt;title"/>
94 <br/>
95 </div>
96
97 <div metal:use-macro="here/photo_layout_macros/macros/grid">
98 affichage grille
99 </div>
100 </form>
101 </div>
102 <br clear="all"/>
103 </div>
104 </body>
105
106 </html>