On va essayer d'afficher le résultat de la XHR.
[Portfolio.git] / skins / slide_show.pt
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
3 <html xmlns="http://www.w3.org/1999/xhtml"
4 tal:define="photos python:filter(lambda p : not p.id.startswith('._') and p.size, here.listNearestFolderContents(contentFilter={'portal_type':'Photo'})) ;
5 lastIndex python:len(photos)-1;
6 start python:request.get('start', 0) ;
7 batch python:modules['ZTUtils'].Batch(photos, size=1, start=start) ;
8 previous python:batch.previous ;
9 next python:batch.next ;
10 nextStart python:next and (start + 1) or 0 ;
11 expandedTitle python:batch[0].title and here.Title() + ' - ' + batch[0].title or here.Title() ;
12 transition python:here.getOrSetSessionVar('stransition', value=request.get('transition', None), default='auto') ;
13 toggleTrans python: transition == 'auto' and 'manual' or 'auto' ;
14 dummy python:request.RESPONSE.setHeader('Content-Type', 'text/html;;charset=utf-8');
15 mtool here/portal_membership;
16 member mtool/getAuthenticatedMember;
17 isAnon mtool/isAnonymousUser;
18 pWidth python:not isAnon and member.photo_width or 800;"
19 i18n:domain="plinn">
20
21 <head>
22 <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
23 <title tal:content="expandedTitle">Gabarit photo</title>
24 <link href="slide_style.css" rel="stylesheet" media="screen"
25 tal:attributes="href string:${here/portal_url}/slide_style.css" />
26 <meta http-equiv="refresh" content="5;URL=next_url"
27 tal:condition="python:transition == 'auto'"
28 tal:attributes="content python:'5;;url=' + here.absolute_url() + '/slide_show?start:int=' + str(nextStart)" />
29 <script type="text/javascript">//<!--
30 function preloadNextImage(nextImageUrl) {
31 nextImage = new Image() ;
32 nextImage.src = nextImageUrl ;
33 }
34 // -->
35 </script>
36 </head>
37
38 <body tal:attributes="onload python:next and '''javascript:preloadNextImage('%s/getResizedImage?size=%d_%d');;''' % (next[0].absolute_url(), pWidth, pWidth) or nothing">
39 <table width="100%" cellspacing="0">
40 <tr>
41 <td width="25%">
42 <table id="Nav" cellspacing="0">
43 <tr>
44 <td colspan="3">
45 <a href="." tal:attributes="href here/absolute_url" title="Close" i18n:attributes="title"
46 ><img src="close.gif" height="24" width="24" border="0" tal:attributes="src here/close.gif/absolute_url" alt="Close" i18n:attributes="alt" /></a>
47 </td>
48 </tr>
49 <tr>
50 <td colspan="3"><br /></td>
51 </tr>
52 <tr>
53 <td>
54 <a title="Previous" href="." tal:condition="previous"
55 tal:attributes="href string:${request/URL0}?start:int=${previous/first}"
56 i18n:attributes="title"
57 ><img src="fleche_g.gif" alt="Previous" height="24" width="24" border="0" tal:attributes="src here/fleche_g.gif/absolute_url" i18n:attributes="alt" /></a>
58 <a title="Previous" href="." tal:condition="not:previous"
59 tal:attributes="href string:${request/URL0}?start:int=${lastIndex}"
60 i18n:attributes="title"
61 ><img src="fleche_g.gif" alt="Previous" height="24" width="24" border="0" tal:attributes="src here/fleche_g.gif/absolute_url" i18n:attributes="alt" /></a>
62 </td>
63 <td tal:define="title python:transition == 'auto' and 'Stop' or 'Play'">
64 <a href="." tal:attributes="href python:'%s?start:int=%s&transition=%s' % (request['URL0'], start, toggleTrans ) ; title title" i18n:attributes="title"
65 ><img src="pause.gif" alt="" height="24" width="24" border="0"
66 tal:attributes="src python:here.absolute_url() + '/' +(transition == 'auto' and 'pause.gif' or 'play.gif') ; alt title" /></a>
67 </td>
68 <td>
69 <a title="Next" href="." tal:condition="next"
70 tal:attributes="href string:${request/URL0}?start:int=${next/first}"
71 i18n:attributes="title"
72 ><img src="fleche_d.gif" alt="Next" height="24" width="24" border="0" tal:attributes="src here/fleche_d.gif/absolute_url" i18n:attributes="alt" /></a>
73 <a title="Next" href="." tal:condition="not:next"
74 tal:attributes="href request/URL0"
75 i18n:attributes="title"
76 ><img src="fleche_d.gif" alt="Next" height="24" width="24" border="0" tal:attributes="src here/fleche_d.gif/absolute_url" i18n:attributes="alt" /></a>
77 </td>
78 </tr>
79 <tr>
80 <td colspan="3" tal:content="python:'%d / %d'%(start+1, lastIndex+1)" style="font-size:small; text-align:center; color:#666"></td>
81 </tr>
82 </table>
83 </td>
84 <td width="50%">
85 <table cellspacing="0">
86 <tr>
87 <td>
88 <br/>
89 </td>
90 </tr>
91 <tr>
92 <td>
93 <img id="MainImage" src="corse_071.jpg" alt="" height="332" width="500" border="0"
94 tal:define="size python:batch[0].getResizedImageSize(size=(pWidth, pWidth))"
95 tal:attributes="src python:batch[0].absolute_url() + '/getResizedImage?size=%d_%d' % (pWidth, pWidth) ;
96 width python:size[0] ;
97 height python:size[1]" />
98 </td>
99 </tr>
100 <tr>
101 <td>
102 <br/>
103 </td>
104 </tr>
105 <tr tal:define="dt python:batch[0].DateTimeOriginal() ;
106 year dt/year ;
107 month python:str(dt.month()).zfill(2) ;
108 day python:str(dt.day()).zfill(2) ;
109 hour python:str(dt.hour()).zfill(2) ;
110 minute python:str(dt.minute()).zfill(2) ;
111 second python:str(int(dt.second())).zfill(2)">
112 <td id="Footer">
113 <span tal:replace="expandedTitle">Corse - Plage de Palombagia - Septembre 2002</span>
114 - <span i18n:translate=""><span i18n:name="month" tal:content="month" />/<span i18n:name="day" tal:content="day" />/<span i18n:name="year" tal:content="year" />&nbsp;&nbsp;<span i18n:name="hour" tal:content="hour" />:<span i18n:name="minute" tal:content="minute" />:<span i18n:name="second" tal:content="second" /></span>
115 </td>
116 </tr>
117 </table>
118 </td>
119 <td width="25%"></td>
120 </tr>
121 </table>
122 </body>
123
124 </html>