Commit e07b968d authored by Ivan Tyagov's avatar Ivan Tyagov

Minor code cleanup.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14703 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e891a01b
...@@ -74,32 +74,39 @@ ...@@ -74,32 +74,39 @@
"""\n """\n
\n \n
translateString = context.Base_translateString\n translateString = context.Base_translateString\n
\n doc_info = {}\n
vals = {}\n
owner_list = context.Base_getOwnerInfoList()\n owner_list = context.Base_getOwnerInfoList()\n
vals[\'owner\'] = \'; \'.join([owner[\'title\'] for owner in owner_list])\n doc_info[\'owner\'] = \'; \'.join([owner[\'title\'] for owner in owner_list])\n
\n
if context.getModificationDate() is not None:\n if context.getModificationDate() is not None:\n
vals[\'moddate\'] = context.WebSite_getFancyRelativeDate(context.getModificationDate())\n doc_info[\'modification_date\'] = context.WebSite_getFancyRelativeDate(context.getModificationDate())\n
publdate = context.Document_getLastWorkflowStateEntryDate(state=(\'public,\'), state_name=\'validation_state\')\n \n
if publdate is not None:\n publication_date = context.Document_getLastWorkflowStateEntryDate(state=(\'public,\'),\n
vals[\'publdate\'] = context.WebSite_getFancyRelativeDate(publdate)\n state_name=\'validation_state\')\n
reldate = context.Document_getLastWorkflowStateEntryDate(state=(\'released,\'), state_name=\'validation_state\')\n if publication_date is not None:\n
if reldate is not None:\n doc_info[\'publication_date\'] = context.WebSite_getFancyRelativeDate(publication_date)\n
vals[\'reldate\'] = context.WebSite_getFancyRelativeDate(reldate)\n \n
release_date = context.Document_getLastWorkflowStateEntryDate(state=(\'released,\'),\n
state_name=\'validation_state\')\n
if release_date is not None:\n
doc_info[\'release_date\'] = context.WebSite_getFancyRelativeDate(release_date)\n
\n
try:\n try:\n
vals[\'status\'] = context.getTranslatedValidationStateTitle() or \'\'\n doc_info[\'status\'] = context.getTranslatedValidationStateTitle() or \'\'\n
except AttributeError:\n except AttributeError:\n
vals[\'status\'] = \'\'\n doc_info[\'status\'] = \'\'\n
\n
try:\n try:\n
vals[\'group\'] = context.getGroup() or \'\'\n doc_info[\'group\'] = context.getGroup() or \'\'\n
except AttributeError:\n except AttributeError:\n
vals[\'group\'] = \'\'\n doc_info[\'group\'] = \'\'\n
\n
try:\n try:\n
vals[\'project\'] = context.getSourceProjectTitle() or \'\'\n doc_info[\'project\'] = context.getSourceProjectTitle() or \'\'\n
except AttributeError:\n except AttributeError:\n
vals[\'project\'] = \'\'\n doc_info[\'project\'] = \'\'\n
\n \n
return context.Document_viewPopupTemplate(**vals)\n return context.Document_viewPopupTemplate(**doc_info)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -157,7 +164,7 @@ return context.Document_viewPopupTemplate(**vals)\n ...@@ -157,7 +164,7 @@ return context.Document_viewPopupTemplate(**vals)\n
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>translateString</string> <string>translateString</string>
<string>vals</string> <string>doc_info</string>
<string>owner_list</string> <string>owner_list</string>
<string>append</string> <string>append</string>
<string>$append0</string> <string>$append0</string>
...@@ -166,8 +173,8 @@ return context.Document_viewPopupTemplate(**vals)\n ...@@ -166,8 +173,8 @@ return context.Document_viewPopupTemplate(**vals)\n
<string>_getitem_</string> <string>_getitem_</string>
<string>_write_</string> <string>_write_</string>
<string>None</string> <string>None</string>
<string>publdate</string> <string>publication_date</string>
<string>reldate</string> <string>release_date</string>
<string>AttributeError</string> <string>AttributeError</string>
<string>_apply_</string> <string>_apply_</string>
</tuple> </tuple>
......
635 640
\ 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