Commit 256a43ee authored by Pierre Ducroquet's avatar Pierre Ducroquet

- Fix post sort order

- Fix stupid typo in NearbyPost
- Fix navigator links

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31946 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a789d4e6
...@@ -66,7 +66,7 @@ except:\n ...@@ -66,7 +66,7 @@ except:\n
\n \n
if index > 0:\n if index > 0:\n
result["previous"] = items[0]\n result["previous"] = items[0]\n
elif index+1 < len(items):\n if index+1 < len(items):\n
result["next"] = items[index+1]\n result["next"] = items[index+1]\n
\n \n
return result\n return result\n
......
...@@ -72,6 +72,7 @@ for item in current_section.WebSection_getDocumentValueList():\n ...@@ -72,6 +72,7 @@ for item in current_section.WebSection_getDocumentValueList():\n
result.append(item)\n result.append(item)\n
\n \n
result.sort(key = lambda x: x.effective_date)\n result.sort(key = lambda x: x.effective_date)\n
result = result[::-1]\n
\n \n
return result\n return result\n
</string> </value> </string> </value>
...@@ -121,6 +122,7 @@ return result\n ...@@ -121,6 +122,7 @@ return result\n
<string>_getiter_</string> <string>_getiter_</string>
<string>item</string> <string>item</string>
<string>None</string> <string>None</string>
<string>_getitem_</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -40,13 +40,14 @@ ...@@ -40,13 +40,14 @@
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
<tal:block tal:define="nearby python: context.WebSection_getNearbyPost();\n <tal:block tal:define="nearby python: context.WebSection_getNearbyPost();\n
section python: context.getWebSectionValue().absolute_url() + \'/\';\n
previous nearby/previous;\n previous nearby/previous;\n
next nearby/next">\n next nearby/next">\n
\n \n
<span class="blog_navigator">\n <span class="blog_navigator">\n
<a href="nowhere.html" tal:condition="python: previous is not None" tal:attributes="href previous">Previous</a>\n <a href="nowhere.html" tal:condition="python: previous is not None" tal:attributes="href python: section + previous">Previous</a>\n
&nbsp;\n &nbsp;\n
<a href="elsewhere.html" tal:condition="python: next is not None" tal:attributes="href next">Next</a>\n <a href="elsewhere.html" tal:condition="python: next is not None" tal:attributes="href python: section + next">Next</a>\n
</span>\n </span>\n
\n \n
</tal:block> </tal:block>
......
28 32
\ 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