shrink -> adjust.
[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 translate nocall:modules/Products/Portfolio/utils/translate;
26 _ python:lambda msg : translate(msg, here)">
27 <div id="photo_viewer">
28 <table cellspacing="0" class="photo_viewer">
29 <tr>
30 <td id="medium_image" tal:attributes="class python:contextInfos['isSelected'] and 'selected' or None">
31 <div tal:condition="not:here/size" i18n:translate="">Empty image: upload an image file in "Edit" tab.</div>
32 <div tal:condition="here/size" tal:omit-tag="">
33 <img src="corse_071.jpg" border="0"
34 tal:define="dummy python:here.getOrSetSessionVar(key='preferedImageSize', value=(600, 600));
35 size python:here.getResizedImageSize(request);
36 width python:size[0];
37 height python:size[1];"
38 tal:attributes="src string:${here/absolute_url}/getResizedImage?size=600;
39 alt here/Title;
40 width width;
41 height height"/>
42 </div>
43 </td>
44 <td class="metadata_bar">
45 <div id="image_toolbar" class="image_toolbar">
46 <a title="Previous" rel="prev"
47 tal:attributes="href contextInfos/previous"
48 i18n:attributes="title">
49 <img tal:attributes="src string:${portal_url}/prev_img_btn.gif" width="23" height="27" alt="Previous" i18n:attributes="alt"
50 name="previous" />
51 </a>
52 <a title="Next" rel="next"
53 tal:attributes="href contextInfos/next"
54 i18n:attributes="title">
55 <img tal:attributes="src string:${portal_url}/next_img_btn.gif" width="23" height="27" alt="Next" i18n:attributes="alt"
56 name="next" />
57 </a>
58 <img tal:attributes="src string:${portal_url}/slide_show_btn.gif" width="33" height="27" alt="slide show" i18n:attributes="alt"
59 id="slide_show"/>
60 <script type="text/javascript" tal:content="python:'''
61 (function(){
62 var params = {'allowFullScreen' : true
63 ,'allowScriptAccess' : 'always'};
64 swfobject.embedSWF('%s/slide_show.swf', 'slide_show', '33', '27', '9.0.0', undefined, undefined, params);
65 })();
66 ''' % portal_url">
67 </script>
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 <div metal:define-macro="image_metadata" tal:omit-tag="">
110 <span tal:define="title here/Title" tal:condition="title" tal:omit-tag="">
111 <span class="photographer" tal:define="creator here/Creator" tal:content="python:'%s :' % creator" tal:condition="creator">Benoît PIN</span>
112 <span class="title_summary" tal:content="title"></span>
113 </span>
114 <div tal:condition="here/showDateTimeOriginal|nothing"
115 tal:content="python:here.DateTimeOriginal().strftime(_('%m/%d/%Y %H:%M:%S'))"></div>
116 <div class="description" tal:content="here/Description"></div>
117 <div tal:define="keywords here/Subject" tal:condition="keywords">
118 <h4 i18n:translate="">Keywords</h4>
119 <ul class="keywords"
120 tal:define="mq nocall:modules/ZTUtils/make_query;
121 kwurl python:lambda k: '%s/search?%s' % (portal_url, mq(Subject=k, portal_type=['Photo']))">
122 <li tal:repeat="k keywords"><a tal:content="k" tal:attributes="href python:kwurl(k)">bla</a></li>
123 </ul>
124 </div>
125 <div><span i18n:translate="" tal:omit-tag="">reference:</span> <span tal:replace="context/getId">bidule.jpg</span></div>
126 <div tal:define="rights here/Rights"
127 tal:condition="rights"
128 tal:content="python:rights.startswith('©') and rights or '© %s' % rights"></div>
129 <div tal:define="ViewRawImage python:modules['Products.Portfolio.permissions'].ViewRawImage"
130 tal:condition="python:mtool.checkPermission(ViewRawImage, here)" style="font-weight:bold; margin-top:1em">
131 <a tal:attributes="href string:${here/absolute_url}/photo_download" i18n:translate="">download picture</a>
132 </div>
133 </div>
134 </div>
135 </td>
136 </tr>
137 </table>
138 </div>
139
140 <!-- film bar -->
141 <div metal:use-macro="here/photo_layout_macros/macros/film_bar">
142 film bar
143 </div>
144
145 </div>
146
147
148
149 <div metal:fill-slot="footer" tal:omit-tag="">
150 <div metal:use-macro="here/viewThreadsAtBottom/macros/threadsDisplay" />
151 </div>
152 </body>
153
154 </html>