jslint
[Portfolio.git] / skins / photo_view.pt
index 921b7d6..f17f22b 100644 (file)
@@ -21,7 +21,9 @@
   <body i18n:domain="portfolio">
     <div metal:fill-slot="main_no_tabs" tal:omit-tag=""
          tal:define="contextInfos options/contextInfos|here/getPhotoContextInfos;
   <body i18n:domain="portfolio">
     <div metal:fill-slot="main_no_tabs" tal:omit-tag=""
          tal:define="contextInfos options/contextInfos|here/getPhotoContextInfos;
-                     index contextInfos/index">
+                     index contextInfos/index;
+                     translate nocall:modules/Products/Portfolio/utils/translate;
+                     _ python:lambda msg : translate(msg, here)">
       <div id="photo_viewer">
         <table cellspacing="0" class="photo_viewer">
           <tr>
       <div id="photo_viewer">
         <table cellspacing="0" class="photo_viewer">
           <tr>
@@ -59,9 +61,9 @@
                   (function(){
                   var params = {'allowFullScreen' : true
                                ,'allowScriptAccess' : 'always'};
                   (function(){
                   var params = {'allowFullScreen' : true
                                ,'allowScriptAccess' : 'always'};
-                  swfobject.embedSWF('slide_show.swf', 'slide_show', '33', '27', '9.0.0', undefined, undefined, params);
+                  swfobject.embedSWF('%s/slide_show.swf', 'slide_show', '33', '27', '9.0.0', undefined, undefined, params);
                   })();
                   })();
-                  '''">
+                  ''' % portal_url">
                 </script>
                 <img tal:attributes="src string:${portal_url}/imgtoolbar_sep.gif" style="padding:0" width="2" height="27" alt="|" />
                 <a title="Back to portfolio..." rel="index"
                 </script>
                 <img tal:attributes="src string:${portal_url}/imgtoolbar_sep.gif" style="padding:0" width="2" height="27" alt="|" />
                 <a title="Back to portfolio..." rel="index"
                 </a>
               </div>
               <div id="image_metadata" class="image_metadata">
                 </a>
               </div>
               <div id="image_metadata" class="image_metadata">
-                <span tal:define="title here/Title" tal:condition="title" tal:omit-tag="">
-                  <span class="photographer" tal:define="creator here/Creator" tal:content="python:'%s :' % creator" tal:condition="creator">Benoît PIN</span>
-                  <span class="title_summary" tal:content="title"></span>
-                </span>
-                <div class="description" tal:content="here/Description"></div>
-                <div tal:define="keywords here/Subject" tal:condition="keywords">
-                  <h4 i18n:translate="">Keywords</h4>
-                  <ul class="keywords"
-                      tal:define="mq nocall:modules/ZTUtils/make_query;
-                                  kwurl python:lambda k: '%s/search?%s' % (portal_url, mq(Subject=k, portal_type=['Photo']))">
-                    <li tal:repeat="k keywords"><a tal:content="k" tal:attributes="href python:kwurl(k)">bla</a></li>
-                  </ul>
-                </div>
-                <div><span i18n:translate="" tal:omit-tag="">reference:</span> <span tal:replace="context/getId">bidule.jpg</span></div>
-                <div tal:define="rights here/Rights"
-                     tal:content="python:rights.startswith('©') and rights or '© %s' % rights"></div>
-                <div tal:define="ViewRawImage python:modules['Products.Portfolio.permissions'].ViewRawImage"
-                     tal:condition="python:mtool.checkPermission(ViewRawImage, here)" style="font-weight:bold; margin-top:1em">
-                     <a tal:attributes="href string:${here/absolute_url}/photo_download" i18n:translate="">download picture</a>
+                <div  metal:define-macro="image_metadata" tal:omit-tag="">
+                  <span tal:define="title here/Title" tal:condition="title" tal:omit-tag="">
+                    <span class="photographer" tal:define="creator here/Creator" tal:content="python:'%s :' % creator" tal:condition="creator">Benoît PIN</span>
+                    <span class="title_summary" tal:content="title"></span>
+                  </span>
+                  <div tal:condition="here/showDateTimeOriginal|nothing"
+                       tal:content="python:here.DateTimeOriginal().strftime(_('%m/%d/%Y %H:%M:%S'))"></div>
+                  <div class="description" tal:content="here/Description"></div>
+                  <div tal:define="keywords here/Subject" tal:condition="keywords">
+                    <h4 i18n:translate="">Keywords</h4>
+                    <ul class="keywords"
+                        tal:define="mq nocall:modules/ZTUtils/make_query;
+                                    kwurl python:lambda k: '%s/search?%s' % (portal_url, mq(Subject=k, portal_type=['Photo']))">
+                      <li tal:repeat="k keywords"><a tal:content="k" tal:attributes="href python:kwurl(k)">bla</a></li>
+                    </ul>
+                  </div>
+                  <div><span i18n:translate="" tal:omit-tag="">reference:</span> <span tal:replace="context/getId">bidule.jpg</span></div>
+                  <div tal:define="rights here/Rights"
+                       tal:condition="rights"
+                       tal:content="python:rights.startswith('©') and rights or '© %s' % rights"></div>
+                  <div tal:define="ViewRawImage python:modules['Products.Portfolio.permissions'].ViewRawImage"
+                       tal:condition="python:mtool.checkPermission(ViewRawImage, here)" style="font-weight:bold; margin-top:1em">
+                       <a tal:attributes="href string:${here/absolute_url}/photo_download" i18n:translate="">download picture</a>
+                  </div>
                 </div>
               </div>
             </td>
                 </div>
               </div>
             </td>