[MKDoc-commit] Various updated to events listing and splitting templates up into

chris at mkdoc.demon.co.uk chris at mkdoc.demon.co.uk
Wed Mar 30 13:43:58 BST 2005


Log Message:
-----------
Various updated to events listing and splitting templates up into smaller chunks

Tags:
----
mkdoc-1-6

Modified Files:
--------------
    mkd/templates/component/headlines/anon:
        en.html
    mkd/templates/component/headlines/anon/events:
        en.html
    mkd/templates/component/headlines/user_personalized:
        en.html

Added Files:
-----------
    mkd/templates/component/headlines/user_personalized/documents:
        en.html
    mkd/templates/component/headlines/user_personalized/events:
        en.html

-------------- next part --------------
Index: en.html
===================================================================
RCS file: /var/spool/cvs/mkd/templates/component/headlines/anon/events/Attic/en.html,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -Ltemplates/component/headlines/anon/events/en.html -Ltemplates/component/headlines/anon/events/en.html -u -r1.1.2.1 -r1.1.2.2
--- templates/component/headlines/anon/events/en.html
+++ templates/component/headlines/anon/events/en.html
@@ -19,7 +19,6 @@
 
   <dl>
 
-    <!--? Generate upcoming events style headlines -->
     <div 
       petal:repeat="row self/default_headlines" 
       petal:omit-tag=""
@@ -39,14 +38,15 @@
                               hreflang headline/lang; 
                               lang headline/lang; 
                               xml:lang headline/lang; 
+                              dir headline/direction;
                               title headline/description"
             petal:content="headline/title"
           >Title of the document</a>
-         <bdo
-           dir="ltr"
-           petal:attributes="self/direction"
-         >:</bdo>
-         <span
+          <bdo
+            dir="ltr"
+            petal:attributes="self/direction"
+          >:</bdo>
+          <span
             lang="en"
             xml:lang="en"
             dir="ltr"
Index: en.html
===================================================================
RCS file: /var/spool/cvs/mkd/templates/component/headlines/user_personalized/Attic/en.html,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -Ltemplates/component/headlines/user_personalized/en.html -Ltemplates/component/headlines/user_personalized/en.html -u -r1.1.2.1 -r1.1.2.2
--- templates/component/headlines/user_personalized/en.html
+++ templates/component/headlines/user_personalized/en.html
@@ -6,131 +6,27 @@
 
 ?-->
 <div
-  class="headlines"
   xmlns:petal="http://purl.org/petal/1.0/"
-  xmlns:metal="http://xml.zope.org/namespaces/metal"
+  petal:omit-tag=""
   petal:condition="true: self/is_user_logged_in; 
                    true: self/personalized_headlines"
 >
-  <h2 
-    xml:lang="en"
-    lang="en"
-    dir="ltr"
-    petal:condition="true: self/title"
-    petal:attributes="xml:lang lang; lang lang; dir dir;"
-    petal:content="self/title"
-  >Headlines Title</h2>
 
-  <p
-    xml:lang="en"
-    lang="en"
-    dir="ltr"
-  >
-    The following list of documents has been personalised for you based on
-    <a 
-      petal:define="preferences_p plugin: flo::plugin::Account::Preferences"
-      petal:attributes="href preferences_p/uri"
-      href="./.account.preferences"
-    >your preferences</a>:
-  </p>
-
-  <dl>
-
-    <!--? Generate upcoming events style headlines -->
+    <!--? Upcoming events style headlines -->
     <div 
       petal:condition="true: self/mode_is_upcoming"
-      petal:repeat="row self/personalized_headlines" 
       petal:omit-tag=""
     >
-      <dt 
-        class="event"
-        petal:define="headline row/document; timerange row/timerange;"
-      >
-        <a
-            href="#"
-            hreflang="en"
-            lang="en"
-            xml:lang="en"
-            dir="ltr"
-            petal:attributes="href headline/uri; 
-                              hreflang headline/lang; 
-                              lang headline/lang; 
-                              xml:lang headline/lang; 
-                              dir headline/direction;"
-            petal:content="headline/title"
-          >Title of the document</a>
-      </dt>
-      <dd
-        class="event"
-      > 
-        <span
-          lang="en"
-          xml:lang="en"
-          dir="ltr"
-          petal:attributes="lang headline/lang; 
-                            xml:lang headline/lang; 
-                            dir headline/direction;"
-          petal:content="timerange/title"
-        >
-          A description of the event.
-        </span>
-      </dd>
-      <dd
-        class="event"
-      >
-        <span
-          metal:use-macro="/macros/timerange/#simple"
-          class="mkdoc-date"
-        >
-          10:11am to 5:10pm Monday December 18 2005
-        </span>
-      </dd>
+    <?include file="./events/"?>
     </div>
 
 
-    <!--? Generate newest documents style headlines -->
+    <!--? Newest documents style headlines -->
     <div 
       petal:condition="true: self/mode_is_newest"
-      petal:repeat="headline self/personalized_headlines" 
       petal:omit-tag=""
     >
-      <dt
-        class="document"
-      >
-        <a
-            href="#"
-            hreflang="en"
-            lang="en"
-            xml:lang="en"
-            dir="ltr"
-            petal:attributes="href headline/uri; 
-                              hreflang headline/lang; 
-                              lang headline/lang; 
-                              xml:lang headline/lang; 
-                              dir headline/direction;"
-            petal:content="headline/title"
-          >Title of the document</a>
-      </dt>
-      <dd
-        class="document"
-      > 
-        <span
-          lang="en"
-          xml:lang="en"
-          dir="ltr"
-          petal:attributes="lang headline/lang; 
-                            xml:lang headline/lang; 
-                            dir headline/direction;"
-          petal:content="headline/description"
-        >
-          A description of the document.
-        </span>
-        <br />
-        <small petal:content="headline/date_created"> 
-          01-03-2005
-        </small>
-      </dd>
+    <?include file="./documents/"?>
     </div>
-  </dl>
 
 </div>
--- /dev/null
+++ templates/component/headlines/user_personalized/documents/en.html
@@ -0,0 +1,83 @@
+<!--?
+
+
+This template is used for rendering the headlines component in documents
+for users whos preference have been matched. 
+
+?-->
+<div
+  class="headlines"
+  xmlns:petal="http://purl.org/petal/1.0/"
+  xmlns:metal="http://xml.zope.org/namespaces/metal"
+  petal:condition="true: self/is_user_logged_in; 
+                   true: self/personalized_headlines"
+>
+  <h2 
+    xml:lang="en"
+    lang="en"
+    dir="ltr"
+    petal:condition="true: self/title"
+    petal:attributes="xml:lang lang; lang lang; dir dir;"
+    petal:content="self/title"
+  >Headlines Title</h2>
+
+  <p
+    xml:lang="en"
+    lang="en"
+    dir="ltr"
+  >
+    The following list of documents has been personalised for you based on
+    <a 
+      petal:define="preferences_p plugin: flo::plugin::Account::Preferences"
+      petal:attributes="href preferences_p/uri"
+      href="./.account.preferences"
+    >your preferences</a>:
+  </p>
+
+  <dl>
+
+    <div 
+      petal:condition="true: self/mode_is_newest"
+      petal:repeat="headline self/personalized_headlines" 
+      petal:omit-tag=""
+    >
+      <dt
+        class="document"
+      >
+        <a
+            href="#"
+            hreflang="en"
+            lang="en"
+            xml:lang="en"
+            dir="ltr"
+            petal:attributes="href headline/uri; 
+                              hreflang headline/lang; 
+                              lang headline/lang; 
+                              xml:lang headline/lang; 
+                              dir headline/direction;"
+            petal:content="headline/title"
+          >Title of the document</a>
+      </dt>
+      <dd
+        class="document"
+      > 
+        <span
+          lang="en"
+          xml:lang="en"
+          dir="ltr"
+          petal:attributes="lang headline/lang; 
+                            xml:lang headline/lang; 
+                            dir headline/direction;"
+          petal:content="headline/description"
+        >
+          A description of the document.
+        </span>
+        <br />
+        <small petal:content="headline/date_created"> 
+          01-03-2005
+        </small>
+      </dd>
+    </div>
+  </dl>
+
+</div>
Index: en.html
===================================================================
RCS file: /var/spool/cvs/mkd/templates/component/headlines/anon/Attic/en.html,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -Ltemplates/component/headlines/anon/en.html -Ltemplates/component/headlines/anon/en.html -u -r1.1.2.3 -r1.1.2.4
--- templates/component/headlines/anon/en.html
+++ templates/component/headlines/anon/en.html
@@ -6,9 +6,8 @@
 
 ?-->
 <div
-  class="headlines"
   xmlns:petal="http://purl.org/petal/1.0/"
-  xmlns:metal="http://xml.zope.org/namespaces/metal"
+  petal:omit-tag=""
   petal:condition="false: self/is_user_logged_in"
 >
 
--- /dev/null
+++ templates/component/headlines/user_personalized/events/en.html
@@ -0,0 +1,108 @@
+<!--?
+
+
+This template is used for rendering the headlines component in documents
+for users whos preference have been matched. 
+
+?-->
+<div
+  class="headlines"
+  xmlns:petal="http://purl.org/petal/1.0/"
+  xmlns:metal="http://xml.zope.org/namespaces/metal"
+  petal:condition="true: self/is_user_logged_in; 
+                   true: self/personalized_headlines"
+>
+  <h2 
+    xml:lang="en"
+    lang="en"
+    dir="ltr"
+    petal:condition="true: self/title"
+    petal:attributes="xml:lang lang; lang lang; dir dir;"
+    petal:content="self/title"
+  >Headlines Title</h2>
+
+  <p
+    xml:lang="en"
+    lang="en"
+    dir="ltr"
+  >
+    The following list of events has been personalised for you based on
+    <a 
+      petal:define="preferences_p plugin: flo::plugin::Account::Preferences"
+      petal:attributes="href preferences_p/uri"
+      href="./.account.preferences"
+    >your preferences</a>:
+  </p>
+
+  <dl>
+
+    <!--? Generate upcoming events style headlines -->
+    <div 
+      petal:condition="true: self/mode_is_upcoming"
+      petal:repeat="row self/personalized_headlines" 
+      petal:omit-tag=""
+    >
+      <dt 
+        class="event"
+        petal:define="headline row/document; timerange row/timerange;"
+      >
+        <a
+            href="#"
+            hreflang="en"
+            lang="en"
+            xml:lang="en"
+            dir="ltr"
+            petal:attributes="href headline/uri; 
+                              hreflang headline/lang; 
+                              lang headline/lang; 
+                              xml:lang headline/lang; 
+                              dir headline/direction;
+                              title headline/description"
+            petal:content="headline/title"
+        >Title of the document</a>
+        <bdo
+          dir="ltr"
+          petal:attributes="self/direction"
+        >:</bdo>
+        <span
+          lang="en"
+          xml:lang="en"
+          dir="ltr"
+          petal:attributes="href headline/uri; 
+                            lang headline/lang; 
+                            xml:lang headline/lang" 
+          petal:content="timerange/title"
+        >Title of the event</span>
+      </dt>
+<!--? Document description
+      <dd
+        class="event"
+      > 
+        <span
+          lang="en"
+          xml:lang="en"
+          dir="ltr"
+          petal:attributes="lang headline/lang; 
+                            xml:lang headline/lang; 
+                            dir headline/direction;"
+          petal:content="timerange/title"
+        >
+          A description of the event.
+        </span>
+      </dd>
+?-->
+      <dd
+        class="event"
+      >
+        <span
+          metal:use-macro="/macros/timerange/#simple"
+          class="mkdoc-date"
+        >
+          10:11am to 5:10pm Monday December 18 2005
+        </span>
+      </dd>
+    </div>
+
+  </dl>
+
+</div>


More information about the MKDoc-commit mailing list