+ setSite
[Portfolio.git] / skins / photo_view.pt
1 <html xmlns="http://www.w3.org/1999/xhtml"
2 xmlns:tal="http://xml.zope.org/namespaces/tal"
3 xmlns:metal="http://xml.zope.org/namespaces/metal"
4 xmlns:portfolio="http://xml.plinn.org/namespaces/portoflio"
5 metal:use-macro="here/main_template/macros/master"
6 >
7
8 <head>
9 <meta http-equiv="content-type" content="text/html;charset=UTF-8"/>
10 <metal:block metal:fill-slot="javascript_head_slot">
11 <script type="text/javascript" tal:attributes="src string:${portal_url}/cart_widgets.js"></script>
12 <script type="text/javascript" tal:attributes="src string:${portal_url}/photo_film_viewer.js"></script>
13 <script type="text/javascript" tal:attributes="src string:${portal_url}/DHTMLapi.js"></script>
14 <script type="text/javascript" tal:attributes="src string:${portal_url}/navigateur.js"></script>
15 <script type="text/javascript" tal:attributes="src string:${portal_url}/mosaique.js"></script>
16 <script type="text/javascript" tal:attributes="src string:${portal_url}/swfobject.js"></script>
17 </metal:block>
18 <title>photo_view</title>
19 </head>
20
21 <body i18n:domain="portfolio">
22 <div metal:fill-slot="main_no_tabs" tal:omit-tag=""
23 tal:define="contextInfos options/contextInfos|here/getPhotoContextInfos;
24 index contextInfos/index">
25 <div id="photo_viewer">
26 <table cellspacing="0" class="photo_viewer">
27 <tr>
28 <td id="medium_image" tal:attributes="class python:contextInfos['isSelected'] and 'selected' or None">
29 <div tal:condition="not:here/size" i18n:translate="">Empty image: upload an image file in "Edit" tab.</div>
30 <div tal:condition="here/size" tal:omit-tag="">
31 <img src="corse_071.jpg" border="0"
32 tal:define="dummy python:here.getOrSetSessionVar(key='preferedImageSize', value=(600, 600));
33 size python:here.getResizedImageSize(request);
34 width python:size[0];
35 height python:size[1];"
36 tal:attributes="src string:${here/absolute_url}/getResizedImage?size=600;
37 alt here/Title;
38 width width;
39 height height"/>
40 </div>
41 </td>
42 <td class="metadata_bar">
43 <div id="image_toolbar" class="image_toolbar">
44 <a title="Previous" rel="prev"
45 tal:attributes="href contextInfos/previous"
46 i18n:attributes="title">
47 <img tal:attributes="src string:${portal_url}/prev_img_btn.gif" width="23" height="27" alt="Previous" i18n:attributes="alt"
48 name="previous" />
49 </a>
50 <a title="Next" rel="next"
51 tal:attributes="href contextInfos/next"
52 i18n:attributes="title">
53 <img tal:attributes="src string:${portal_url}/next_img_btn.gif" width="23" height="27" alt="Next" i18n:attributes="alt"
54 name="next" />
55 </a>
56 <img tal:attributes="src string:${portal_url}/slide_show_btn.gif" width="33" height="27" alt="slide show" i18n:attributes="alt"
57 id="slide_show"/>
58 <script type="text/javascript" tal:content="python:'''
59 (function(){
60 var params = {'allowFullScreen' : true
61 ,'allowScriptAccess' : 'always'};
62 swfobject.embedSWF('%s/slide_show.swf', 'slide_show', '33', '27', '9.0.0', undefined, undefined, params);
63 })();
64 ''' % portal_url">
65 </script>
66 <img tal:attributes="src string:${portal_url}/imgtoolbar_sep.gif" style="padding:0" width="2" height="27" alt="|" />
67 <a title="Back to portfolio..." rel="index"
68 tal:attributes="href contextInfos/backUrl"
69 i18n:attributes="title" tal:on-error="string:">
70 <img tal:attributes="src string:${portal_url}/lightbox_btn.gif" width="31" height="27" alt="Back to portfolio..." i18n:attributes="alt"
71 name="back_to_portfolio" />
72 </a>
73 <a title="Full screen (f)" i18n:attributes="title"
74 tal:attributes="href string:${here/absolute_url}/zoom_view">
75 <img tal:attributes="src string:${portal_url}/full_screen_btn.gif" width="31" height="27" alt="Full screen (f)" i18n:attributes="alt"
76 name="full_screen"/>
77 </a>
78 <img tal:attributes="src string:${portal_url}/imgtoolbar_sep.gif" style="padding:0" width="2" height="27" alt="|" />
79 <a tal:define="selected contextInfos/isSelected;
80 msg python:selected and 'Retirer de la sélection' or 'Ajouter à la sélection';
81 action python:selected and 'remove_to_selection' or 'add_to_selection';
82 imgSrc python:'%s/%s' % (portal_url, selected and 'unselect_flag_btn.gif' or 'select_flag_btn.gif');"
83 tal:attributes="href python:'%s/%s' % (here.absolute_url(), action); title msg">
84 <img tal:attributes="src imgSrc; alt msg" width="31" height="27"
85 name="toggle_selection"/>
86 </a>
87 <div style="display:inline;position:relative">
88 <div id="cart_slide"></div>
89 <a tal:attributes="href python:'%s/get_slide_buyable_items' % here.absolute_url();
90 class python:(contextInfos.get('buyable') and [None] or['hidden'])[0]"
91 title="Add to cart" i18n:attributes="title">
92 <img width="31" height="27" alt="Add to cart" name="show_buyable"
93 tal:attributes="src string:$portal_url/cart_btn.gif" i18n:attributes="alt"/>
94 </a>
95 </div>
96 <img tal:attributes="src string:${portal_url}/imgtoolbar_sep.gif" style="padding:0" width="2" height="27" alt="|" />
97 <a title="Edit metadata"
98 tal:define="ModifyPortalContent python:modules['Products.CMFCore'].permissions.ModifyPortalContent"
99 tal:condition="python:mtool.checkPermission(ModifyPortalContent, here)"
100 tal:attributes="href string:${here/absolute_url}/photo_edit_form"
101 i18n:attributes="title">
102 <img tal:attributes="src string:${portal_url}/edit_metadata_btn.gif" width="31" height="27" alt="Edit metadata" i18n:attributes="alt"
103 name="edit_metadata"/>
104 </a>
105 </div>
106 <div id="image_metadata" class="image_metadata">
107 <span tal:define="title here/Title" tal:condition="title" tal:omit-tag="">
108 <span class="photographer" tal:define="creator here/Creator" tal:content="python:'%s :' % creator" tal:condition="creator">Benoît PIN</span>
109 <span class="title_summary" tal:content="title"></span>
110 </span>
111 <div class="description" tal:content="here/Description"></div>
112 <div tal:define="keywords here/Subject" tal:condition="keywords">
113 <h4 i18n:translate="">Keywords</h4>
114 <ul class="keywords"
115 tal:define="mq nocall:modules/ZTUtils/make_query;
116 kwurl python:lambda k: '%s/search?%s' % (portal_url, mq(Subject=k, portal_type=['Photo']))">
117 <li tal:repeat="k keywords"><a tal:content="k" tal:attributes="href python:kwurl(k)">bla</a></li>
118 </ul>
119 </div>
120 <div><span i18n:translate="" tal:omit-tag="">reference:</span> <span tal:replace="context/getId">bidule.jpg</span></div>
121 <div tal:define="rights here/Rights"
122 tal:content="python:rights.startswith('©') and rights or '© %s' % rights"></div>
123 <div tal:define="ViewRawImage python:modules['Products.Portfolio.permissions'].ViewRawImage"
124 tal:condition="python:mtool.checkPermission(ViewRawImage, here)" style="font-weight:bold; margin-top:1em">
125 <a tal:attributes="href string:${here/absolute_url}/photo_download" i18n:translate="">download picture</a>
126 </div>
127 </div>
128 </td>
129 </tr>
130 </table>
131 </div>
132
133 <!-- film bar -->
134 <div metal:use-macro="here/photo_layout_macros/macros/film_bar">
135 film bar
136 </div>
137
138 </div>
139
140
141
142 <div metal:fill-slot="footer" tal:omit-tag="">
143 <div metal:use-macro="here/viewThreadsAtBottom/macros/threadsDisplay" />
144 </div>
145 </body>
146
147 </html>