changeset 241:99432bde94ed

change sorting of talks from calendar.
author casties
date Fri, 31 Jan 2014 10:57:41 +0100
parents e8f5f5033641
children 0b7a95c02f68
files zpt/staff/member_index_html.zpt zpt/staff/talks_full_html.zpt
diffstat 2 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/zpt/staff/member_index_html.zpt	Mon Jan 27 11:37:55 2014 +0100
+++ b/zpt/staff/member_index_html.zpt	Fri Jan 31 10:57:41 2014 +0100
@@ -1,6 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
 	  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html metal:use-macro="here/main_template/macros/page">
+<html xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal"
+      xmlns="http://www.w3.org/1999/xhtml" metal:use-macro="here/main_template/macros/page">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <metal:block metal:fill-slot="head">
@@ -76,7 +77,7 @@
     <tal:block tal:define="calendar member/getTalksCal">
       <tal:block tal:condition="calendar">
         <tal:block tal:define="upcoming python:calendar.getFlag('only_upcoming'); 
-            talks python:test(upcoming, calendar.getAllItemsFromTodayOn()[:5], calendar.getNext(5))" tal:condition="talks">
+            talks python:test(upcoming, calendar.getAllItemsFromTodayOn()[:5], calendar.getNext(5, reverse=True))" tal:condition="talks">
         
           <h2 class="line" tal:condition="upcoming">Upcoming talks and presentations</h2>
           <h2 class="line" tal:condition="not:upcoming">Talks and presentations</h2>
@@ -104,7 +105,7 @@
           <table class="items shorter">
             <tr tal:repeat="talk python:here.ZDBSlice(talks,size=5)">
               <td width="25%" tal:content="talk/date" />
-              <td><a tal:omit-tag="not:talk/link" tal:attributes="href talk/link"> <span tal:replace="talk/place" /> &#150; <i><span
+              <td><a class="external" target="_blank" tal:omit-tag="not:talk/link" tal:attributes="href talk/link"> <span tal:replace="talk/place" /> &#150; <i><span
                     tal:replace="talk/title" /></i>
               </a></td>
             </tr>
--- a/zpt/staff/talks_full_html.zpt	Mon Jan 27 11:37:55 2014 +0100
+++ b/zpt/staff/talks_full_html.zpt	Fri Jan 31 10:57:41 2014 +0100
@@ -1,6 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" metal:use-macro="here/main_template/macros/page">
+<html xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal"
+      xmlns="http://www.w3.org/1999/xhtml" metal:use-macro="here/main_template/macros/page">
 <head>
 <tal:block metal:fill-slot="head">
   <tal:x define="global member here/getContent" />
@@ -21,12 +22,12 @@
 
     <tal:block tal:define="calendar here/getTalksCal">
       <tal:block tal:condition="calendar">
-        <tal:block tal:define="talks python:calendar.getSortedItems()">
+        <tal:block tal:define="talks python:calendar.getSortedItems(reverse=True)">
           <table class="items shorter">
             <tr tal:repeat="talk talks">
               <tal:block tal:define="url python:talk.getValue('url')">
-                <td width="25%" tal:content="python:talk.getDate()" />
-                <td><a tal:omit-tag="not:url" tal:attributes="href url"> <span
+                <td tal:content="python:talk.getDate()" />
+                <td><a class="external" target="_blank" tal:omit-tag="not:url" tal:attributes="href url"> <span
                     tal:replace="python:talk.getValue('location')" /> &#150; <i><span
                       tal:replace="python:talk.getValue('title')" /></i>
                 </a></td>
@@ -41,7 +42,7 @@
           <table class="items shorter">
             <tr tal:repeat="talk talks">
               <td><span tal:content="talk/date" /></td>
-              <td><a tal:attributes="href talk/link" tal:omit-tag="not:talk/link"> <span tal:content="talk/place" />
+              <td><a class="external" target="_blank" tal:attributes="href talk/link" tal:omit-tag="not:talk/link"> <span tal:content="talk/place" />
                   &#150; <i tal:content="talk/title" />
               </a></td>
             </tr>