Commit eedbf579 authored by Ivan Tyagov's avatar Ivan Tyagov

Leave HTML generation to page template.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44278 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b0c52c13
...@@ -12,7 +12,9 @@ ...@@ -12,7 +12,9 @@
</item> </item>
<item> <item>
<key> <string>_Cacheable__manager_id</string> </key> <key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>_bind_names</string> </key> <key> <string>_bind_names</string> </key>
...@@ -60,10 +62,8 @@ ...@@ -60,10 +62,8 @@
"""\n """\n
from zExceptions import Unauthorized\n from zExceptions import Unauthorized\n
\n \n
translateString = context.Base_translateString\n
doc_info = {}\n doc_info = {}\n
owner_list = context.Base_getOwnerInfoList()\n doc_info[\'owner_list\'] = context.Base_getOwnerInfoList()\n
doc_info[\'owner\'] = \'; \'.join([owner[\'title\'] for owner in owner_list])\n
\n \n
if context.getModificationDate() is not None:\n if context.getModificationDate() is not None:\n
doc_info[\'modification_date\'] = context.WebSite_getFancyRelativeDate(context.getModificationDate())\n doc_info[\'modification_date\'] = context.WebSite_getFancyRelativeDate(context.getModificationDate())\n
...@@ -119,6 +119,7 @@ for websection in website.getWebSectionValueList(context):\n ...@@ -119,6 +119,7 @@ for websection in website.getWebSectionValueList(context):\n
sections.append({\'title\': websection.getCompactTranslatedTitle(),\n sections.append({\'title\': websection.getCompactTranslatedTitle(),\n
\'url\': websection.absolute_url()})\n \'url\': websection.absolute_url()})\n
doc_info[\'sections\'] = sections\n doc_info[\'sections\'] = sections\n
doc_info[\'url\'] = context.absolute_url()\n
\n \n
return context.Document_viewPopupTemplate(**doc_info)\n return context.Document_viewPopupTemplate(**doc_info)\n
</string> </value> </string> </value>
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[ <value> <unicode encoding="cdata"><![CDATA[
<tal:block tal:define="owner python: options.get(\'owner\', None);\n <tal:block tal:define="owner_list python: options.get(\'owner_list\', None);\n
modification_date python: options.get(\'modification_date\', None);\n modification_date python: options.get(\'modification_date\', None);\n
release_date python: options.get(\'release_date\', None);\n release_date python: options.get(\'release_date\', None);\n
publication_date python: options.get(\'publication_date\', None);\n publication_date python: options.get(\'publication_date\', None);\n
...@@ -47,20 +47,57 @@ ...@@ -47,20 +47,57 @@
language python: options.get(\'language\', None);\n language python: options.get(\'language\', None);\n
version python: options.get(\'version\', None);\n version python: options.get(\'version\', None);\n
thumbnail_url python: options.get(\'thumbnail_url\', None);\n thumbnail_url python: options.get(\'thumbnail_url\', None);\n
url python: options.get(\'url\', None);\n
sections python: options.get(\'sections\', None);\n
format python: request.get(\'format\', context.portal_preferences.getPreference(\'preferred_image_format\', \'png\'));\n format python: request.get(\'format\', context.portal_preferences.getPreference(\'preferred_image_format\', \'png\'));\n
quality python: request.get(\'format\', context.portal_preferences.getPreference(\'preferred_image_quality\', \'75.0\'))">\n quality python: request.get(\'format\', context.portal_preferences.getPreference(\'preferred_image_quality\', \'75.0\'))">\n
\n
<span id="listbox-preview-connector"></span>\n
\n \n
<div class="popup_row" tal:condition="thumbnail_url">\n <div class="popup_row" tal:condition="thumbnail_url">\n
<a tal:attributes="href url">\n
<img alt="Thumbnail" \n <img alt="Thumbnail" \n
i18n:translate="alt" i18n:domain="ui"\n i18n:translate="alt" i18n:domain="ui"\n
tal:attributes="src string:${thumbnail_url}?display=thumbnail&amp;format=${format}&amp;quality=${quality}"/>\n tal:attributes="src string:${thumbnail_url}?display=thumbnail&amp;format=${format}&amp;quality=${quality}"/>\n
</a>\n
</div>\n
\n
<div class="popup_row" tal:condition="reference"> \n
<span class="popup_label" \n
i18n:translate="" i18n:domain="ui">Reference:</span>\n
<span class="reference"\n
tal:content="reference|nothing"/>\n
</div>\n </div>\n
\n
<div class="popup_row" tal:condition="version"> \n
<span class="popup_label" \n
i18n:translate="" i18n:domain="ui">Version:</span>\n
<span class="version"\n
tal:content="version|nothing"/>\n
</div>\n
\n
<div class="popup_row" tal:condition="language"> \n
<span class="popup_label" \n
i18n:translate="" i18n:domain="ui">Language:</span>\n
<span class="language"\n
tal:content="language|nothing"/>\n
</div> \n
\n \n
<div class="popup_row" tal:condition="owner">\n <div class="popup_row" tal:condition="project">\n
<span class="popup_label " \n
i18n:translate="" i18n:domain="ui">Project:</span>\n
<span class="project"\n
tal:content="project|nothing"/>\n
</div>\n
\n
<div class="popup_row" tal:condition="owner_list">\n
<span class="popup_label" \n <span class="popup_label" \n
i18n:translate="" i18n:domain="ui">Owners:</span>\n i18n:translate="" i18n:domain="ui">Owner:</span>\n
<span class="owner" \n <span tal:repeat="owner owner_list"\n
tal:content="owner|nothing"/>\n class="owner">\n
<a tal:attributes="href owner/url"\n
tal:content="owner/title"/>\n
</span>\n
</div> \n </div> \n
\n \n
<div class="popup_row" tal:condition="modification_date">\n <div class="popup_row" tal:condition="modification_date">\n
...@@ -83,47 +120,22 @@ ...@@ -83,47 +120,22 @@
<span class="publication_date"\n <span class="publication_date"\n
tal:content="publication_date|nothing"/>\n tal:content="publication_date|nothing"/>\n
</div>\n </div>\n
\n
<div class="popup_row" tal:condition="status"> \n
<span class="popup_label" \n
i18n:translate="" i18n:domain="ui">Status:</span>\n
<span class="status"\n
tal:content="status|nothing"/>\n
</div>\n
\n \n
<div class="popup_row" tal:condition="reference"> \n <div class="popup_row" tal:condition="sections"> \n
<span class="popup_label" \n <span class="popup_label" \n
i18n:translate="" i18n:domain="ui">Reference:</span>\n i18n:translate="" i18n:domain="ui">Section:</span>\n
<span class="reference"\n <span tal:repeat="section sections"\n
tal:content="reference|nothing"/>\n class="section">\n
<a tal:attributes="href section/url"\n
tal:content="section/title"/>\n
</span>\n
</div>\n </div>\n
\n
<div class="popup_row" tal:condition="language"> \n
<span class="popup_label" \n
i18n:translate="" i18n:domain="ui">Language:</span>\n
<span class="language"\n
tal:content="language|nothing"/>\n
</div> \n
\n
<div class="popup_row" tal:condition="version"> \n
<span class="popup_label" \n
i18n:translate="" i18n:domain="ui">Version:</span>\n
<span class="version"\n
tal:content="version|nothing"/>\n
</div> \n
\n \n
<div class="popup_row" tal:condition="group">\n <div class="popup_row" tal:condition="status"> \n
<span class="popup_label" \n <span class="popup_label" \n
i18n:translate="" i18n:domain="ui">Group:</span>\n i18n:translate="" i18n:domain="ui">State:</span>\n
<span class="group"\n <span tal:attributes="class python:\'%s-state\' %status.lower()"\n
tal:content="group|nothing"/>\n tal:content="status|nothing"/>\n
</div>\n
\n
<div class="popup_row" tal:condition="project">\n
<span class="popup_label " \n
i18n:translate="" i18n:domain="ui">Project:</span>\n
<span class="project"\n
tal:content="project|nothing"/>\n
</div>\n </div>\n
\n \n
</tal:block> </tal:block>
......
1032 1035
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment