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
\n
if index > 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
\n
return result\n
......
......@@ -72,6 +72,7 @@ for item in current_section.WebSection_getDocumentValueList():\n
result.append(item)\n
\n
result.sort(key = lambda x: x.effective_date)\n
result = result[::-1]\n
\n
return result\n
</string> </value>
......@@ -121,6 +122,7 @@ return result\n
<string>_getiter_</string>
<string>item</string>
<string>None</string>
<string>_getitem_</string>
</tuple>
</value>
</item>
......
......@@ -40,13 +40,14 @@
<value> <string encoding="cdata"><![CDATA[
<tal:block tal:define="nearby python: context.WebSection_getNearbyPost();\n
section python: context.getWebSectionValue().absolute_url() + \'/\';\n
previous nearby/previous;\n
next nearby/next">\n
\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
<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
\n
</tal:block>
......
28
\ No newline at end of file
32
\ 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