Version initiale.
[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 <!--
57 <img tal:attributes="src string:${portal_url}/slide_show_btn.gif" width="33" height="27" alt="slide show" i18n:attributes="alt"
58 id="slide_show"/>
59 <script type="text/javascript" tal:content="python:'''
60 (function(){
61 var params = {'allowFullScreen' : true
62 ,'allowScriptAccess' : 'always'};
63 swfobject.embedSWF('slide_show.swf', 'slide_show', '33', '27', '9.0.0', undefined, undefined, params);
64 })();
65 '''">
66 </script>
67 -->
68 <img tal:attributes="src string:${portal_url}/imgtoolbar_sep.gif" style="padding:0" width="2" height="27" alt="|" />
69 <a title="Back to portfolio..." rel="index"
70 tal:attributes="href contextInfos/backUrl"
71 i18n:attributes="title" tal:on-error="string:">
72 <img tal:attributes="src string:${portal_url}/lightbox_btn.gif" width="31" height="27" alt="Back to portfolio..." i18n:attributes="alt"
73 name="back_to_portfolio" />
74 </a>
75 <a title="Full screen (f)" i18n:attributes="title"
76 tal:attributes="href string:${here/absolute_url}/zoom_view">
77 <img tal:attributes="src string:${portal_url}/full_screen_btn.gif" width="31" height="27" alt="Full screen (f)" i18n:attributes="alt"
78 name="full_screen"/>
79 </a>
80 <img tal:attributes="src string:${portal_url}/imgtoolbar_sep.gif" style="padding:0" width="2" height="27" alt="|" />
81 <a tal:define="selected contextInfos/isSelected;
82 msg python:selected and 'Retirer de la sélection' or 'Ajouter à la sélection';
83 action python:selected and 'remove_to_selection' or 'add_to_selection';
84 imgSrc python:'%s/%s' % (portal_url, selected and 'unselect_flag_btn.gif' or 'select_flag_btn.gif');"
85 tal:attributes="href python:'%s/%s' % (here.absolute_url(), action); title msg">
86 <img tal:attributes="src imgSrc; alt msg" width="31" height="27"
87 name="toggle_selection"/>
88 </a>
89 <div style="display:inline;position:relative">
90 <div id="cart_slide"></div>
91 <a tal:attributes="href python:'%s/get_slide_buyable_items' % here.absolute_url();
92 class python:(contextInfos.get('buyable') and [None] or['hidden'])[0]"
93 title="Add to cart" i18n:attributes="title">
94 <img width="31" height="27" alt="Add to cart" name="show_buyable"
95 tal:attributes="src string:$portal_url/cart_btn.gif" i18n:attributes="alt"/>
96 </a>
97 </div>
98 <img tal:attributes="src string:${portal_url}/imgtoolbar_sep.gif" style="padding:0" width="2" height="27" alt="|" />
99 <a title="Edit metadata"
100 tal:define="ModifyPortalContent python:modules['Products.CMFCore'].permissions.ModifyPortalContent"
101 tal:condition="python:mtool.checkPermission(ModifyPortalContent, here)"
102 tal:attributes="href string:${here/absolute_url}/photo_edit_form"
103 i18n:attributes="title">
104 <img tal:attributes="src string:${portal_url}/edit_metadata_btn.gif" width="31" height="27" alt="Edit metadata" i18n:attributes="alt"
105 name="edit_metadata"/>
106 </a>
107 </div>
108 <div id="image_metadata" class="image_metadata">
109 <span tal:define="title here/Title" tal:condition="title" tal:omit-tag="">
110 <span class="photographer" tal:define="creator here/Creator" tal:content="python:'%s :' % creator" tal:condition="creator">Benoît PIN</span>
111 <span class="title_summary" tal:content="title"></span>
112 </span>
113 <div class="description" tal:content="here/Description"></div>
114 <div tal:define="keywords here/Subject" tal:condition="keywords">
115 <h4 i18n:translate="">Keywords</h4>
116 <ul class="keywords"
117 tal:define="mq nocall:modules/ZTUtils/make_query;
118 kwurl python:lambda k: '%s/search?%s' % (portal_url, mq(Subject=k, portal_type=['Photo']))">
119 <li tal:repeat="k keywords"><a tal:content="k" tal:attributes="href python:kwurl(k)">bla</a></li>
120 </ul>
121 </div>
122 <div><span i18n:translate="" tal:omit-tag="">reference:</span> <span tal:replace="context/getId">bidule.jpg</span></div>
123 <div tal:define="rights here/Rights"
124 tal:content="python:rights.startswith('©') and rights or '© %s' % rights"></div>
125 <div tal:define="ViewRawImage python:modules['Products.Portfolio.permissions'].ViewRawImage"
126 tal:condition="python:mtool.checkPermission(ViewRawImage, here)" style="font-weight:bold; margin-top:1em">
127 <a tal:attributes="href string:${here/absolute_url}/photo_download" i18n:translate="">download picture</a>
128 </div>
129 </div>
130 </td>
131 </tr>
132 </table>
133 </div>
134
135 <!-- film bar -->
136 <div metal:use-macro="here/photo_layout_macros/macros/film_bar">
137 film bar
138 </div>
139
140 </div>
141
142
143
144 <div metal:fill-slot="footer" tal:omit-tag="">
145 <div metal:use-macro="here/viewThreadsAtBottom/macros/threadsDisplay" />
146 </div>
147 </body>
148
149 </html>