]> err.no Git - sope/commitdiff
tweaked layout
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Mon, 22 Aug 2005 17:28:27 +0000 (17:28 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Mon, 22 Aug 2005 17:28:27 +0000 (17:28 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1062 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-appserver/samples/CoreDataBlog/MonthPage.wo/MonthPage.html
sope-appserver/samples/CoreDataBlog/MonthPage.wo/MonthPage.wod
sope-appserver/samples/CoreDataBlog/MonthPage.wo/MonthPage.woo

index ce880446471bac33ea8489933b8f93bf9fc4f60a..5ecdf94bb87788868927638ac20bbf4dfb6186d3 100644 (file)
@@ -75,7 +75,7 @@
       }
       caption.calendarhead { 
         font-family: palatino, georgia, times new roman, serif;
-        color:       #666600;
+        color:       #BE5303;
         font-size:   small;
         padding:     2px;
         letter-spacing: .3em;
@@ -91,7 +91,7 @@
       }       
       .sidetitle {
         font-family: palatino, georgia, times new roman, serif;
-        color:       #666600;
+        color:       #BE5303;
         font-size:   small;
         padding:     2px;
         margin-top:  30px;
   </head>
 
   <body>
-    <div id="banner">
-      <img src="http://www.mulle-kybernetik.com/weblog/images/nat-weblog-collage.jpg"
-           height="110" width="752" align="" border="0" hspace="0" vspace="0"
-          alt="Banner" title="" longdesc="" /><br />
+    <div id="banner" style="text-align: right;">
+      <img src="http://sope.opengroupware.org/images/lori_48x48_lookleft.png"
+           border="0" width="48" height="48" alt="Lori" title="Lori" />
     </div>
 
 
 
       <div class="blog">
         <#Posts>
-          <h2 class="date"><#PostDate/></h2> <!-- Note: MT groups by date -->
+          <h2 class="date"><!-- Note: MT groups by date -->
+            <#HasDate>
+              <#PostDate/>
+            </#HasDate>
+          </h2>
 
           <div class="blogbody">
             <h3 class="title"><#PostTitle/></h3>
 
       <div class="sidetitle">Search</div>
       <div class="side">
-        Search this site:
-        add a form here and bind
-        to query match
+        Search this site:<br />
+        add a form here and bind<br />
+        to query match<br />
+        Note: we can only bind one?
       </div>
 
 
       <div class="sidetitle">Archives</div>
       <div class="side">
-        impossible in an efficient way?
+        impossible in an efficient way?<br />
         August 2005<br />
         Juli 2005
       </div>
 
       <div class="sidetitle">Recent Entries</div>
       <div class="side">
-        DG with limit=10 here,<br />
-        order by date
+        <#RecentPosts>
+          <!-- TODO: add link, maybe focus on date of post? -->
+          <#PostTitle/><br />
+        </#RecentPosts>
       </div>
     </div>
 
index c3b3c94df12f6bfa7fe5a5359b808778bb5507aa..07186b841a77a6be28ff8bc1f5f58755124acd22 100644 (file)
@@ -4,7 +4,14 @@ Posts: WORepetition {
   list = postDisplayGroup.displayedObjects;
   item = post;
 }
+RecentPosts: WORepetition {
+  list = recentPostsDisplayGroup.displayedObjects;
+  item = post;
+}
 
+HasDate: WOConditional {
+  condition = post.creationDate.isNotEmpty;
+}
 PostDate: WOString {
   value          = post.creationDate;
   valueWhenEmpty = "[no date]";
@@ -24,6 +31,7 @@ PostTitle: WOString {
 PostBody: WOString {
   value          = post.body;
   valueWhenEmpty = "[no body]";
+  insertBR       = YES;
 }
 PostAuthor: WOString {
   value = post.author.name;
index 0bf3f95b036504126dea2e716123c5d69d32303e..7fb1103bfa97bf99f64af13e73cb64cdbba3ede5 100644 (file)
       selectsFirstObjectAfterFetch = YES;
       fetchesOnLoad                = YES;
     };
+
+    recentPostsDisplayGroup = {
+      class      = WODisplayGroup;
+      dataSource = {
+        class              = EOCoreDataSource;
+        editingContext     = session.defaultManagedObjectContext;
+        fetchSpecification = {
+          class      = EOFetchSpecification;
+          entityName = Post;
+          fetchLimit = 10;
+          isDeep     = YES;
+          sortOrderings = (
+            { class = EOSortOrdering; 
+              key = "creationDate";
+              selector = "compareDescending:";
+            }
+          );
+        };
+      };
+      formatForLikeQualifier       = "%@*";
+      localKeys                    = ();
+      numberOfObjectsPerBatch      = 0;
+      selectsFirstObjectAfterFetch = YES;
+      fetchesOnLoad                = YES;
+    };
   };
 }