atphoto_infos(EXIF修正版)
ATPhotoでEXIF情報表示正常化&簡素化で修正したやつ(/portal_skins/ATPhoto/atphoto_infos)
Size 3.1 kB - File type text/plainFile contents
<div tal:define="dummy python: request.RESPONSE.setHeader('Content-Type','text/xml'); global charset site_properties/default_charset|string:utf-8;" tal:replace='structure string:<?xml version="1.0" encoding="$charset"?>' /><tal:comment tal:replace="nothing"> All of us know that zpt suck for xml... But if we want it, we can do it ;) In this way, we use the same template in photo_view and to get infos with ajax </tal:comment ><metal:block use-macro="here/global_defines/macros/defines" /><tal:define tal:define="global charset site_properties/default_charset|string:utf-8; global isViewTemplate python:1; global lang language; "/><metal:cache use-macro="here/global_cache_settings/macros/cacheheaders" /><metal:header tal:define="dummy python: request.RESPONSE.setHeader('Content-Type','text/xml;;charset=%s' % charset);" /> <root> <exif><span tal:replace="structure string:<![CDATA["/> <metal:exif metal:define-macro="infos" tal:define="info_type info_type|request/info_type|string:EXIF; values values | python: test(info_type == 'EXIF',context.getEXIF_Filter(context.getEXIF()),context.getIPTC());"> <tal:block tal:condition="values"> <div align="center"> <table class="listing"> <tr> <th><span i18n:translate="Key">Key</span></th> <th><span i18n:translate="Value">Value</span></th> </tr> <tal:items tal:repeat="key values/keys"> <tr tal:define="oddrow repeat/key/odd;" tal:attributes="class python:test(oddrow, 'even', 'odd')"> <td tal:condition="key" align="center"> <span tal:replace="key"/> </td> <td tal:condition="key" tal:define="value python:values[key]" align="left"> <span tal:replace="value" tal:condition="value"/> </td> </tr> </tal:items> </table> </div> </tal:block> </metal:exif> <span tal:replace="structure string:]]>" /></exif><iptc tal:define="info_type string:IPTC"><span tal:replace="structure string:<![CDATA["/> <metal:infos use-macro="here/atphoto_infos/macros/infos" /> <span tal:replace="structure string:]]>" /></iptc><documentbyline><span tal:replace="structure string:<![CDATA["/> <metal:documentbyline metal:use-macro="here/document_byline/macros/byline" /> <span tal:replace="structure string:]]>" /></documentbyline><discussion><span tal:replace="structure string:<![CDATA["/> <metal:discussion use-macro="here/viewThreadsAtBottom/macros/discussionView" /> <span tal:replace="structure string:]]>" /></discussion> </root>