[Jifty-commit] r2034 - in wifty/trunk/share/web: templates templates/_elements

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Thu Oct 19 17:04:42 EDT 2006


Author: nelhage
Date: Thu Oct 19 17:04:41 2006
New Revision: 2034

Added:
   wifty/trunk/share/web/templates/_elements/page_list
   wifty/trunk/share/web/templates/search
Modified:
   wifty/trunk/share/web/static/css/app.css
   wifty/trunk/share/web/templates/pages
   wifty/trunk/share/web/templates/recent

Log:
Actually adding the search page, and restyling it slightly

Modified: wifty/trunk/share/web/static/css/app.css
==============================================================================
--- wifty/trunk/share/web/static/css/app.css	(original)
+++ wifty/trunk/share/web/static/css/app.css	Thu Oct 19 17:04:41 2006
@@ -34,13 +34,13 @@
     border: 1px outset #3d4286;
 }
 
-#recentupdates dt {
+.pagelist dt {
     float: left;
     clear: left;
     width: 45%;
 }
 
-#recentupdates dd {
+.pagelist dd {
     margin-left: 2em;
     padding-left: 0;
     margin-bottom: 0.5em;
@@ -48,8 +48,8 @@
     width: 50%;
 }
 
-* html #recentupdates dt,
-* html #recentupdates dd { position: relative; }
+* html .pagelist dt,
+* html .pagelist dd { position: relative; }
 
 #history dd {
     font-size: 0.95em;

Added: wifty/trunk/share/web/templates/_elements/page_list
==============================================================================
--- (empty file)
+++ wifty/trunk/share/web/templates/_elements/page_list	Thu Oct 19 17:04:41 2006
@@ -0,0 +1,16 @@
+<%args>
+$pages
+$id
+</%args>
+<dl id="<%$id%>" class="pagelist">
+% while (my $page = $pages->next) {
+<dt><% Jifty->web->link( label => $page->name, url => '/view/'.$page->name)%></dt>
+<dd><%$page->updated%>
+% if($page->updated_by->id) {
+  (<% $page->updated_by->name %>)
+% } else {
+  (Anonymous)
+% }
+</dd>
+% }
+</dl>

Modified: wifty/trunk/share/web/templates/pages
==============================================================================
--- wifty/trunk/share/web/templates/pages	(original)
+++ wifty/trunk/share/web/templates/pages	Thu Oct 19 17:04:41 2006
@@ -2,15 +2,5 @@
 $pages
 </%args>
 <&|/_elements/wrapper, title => 'These are the pages on your wiki!' &>
-<ul id="pagelist">
-% while (my $page = $pages->next) {
-<li><% 
-        Jifty->web->link(
-            label => $page->name,
-            url   => '/view/' . $page->name
-            )
-
-    %></li>
-% } 
-</ul>
+<& /_elements/page_list, pages => $pages, id => 'allpages' &>
 </&>

Modified: wifty/trunk/share/web/templates/recent
==============================================================================
--- wifty/trunk/share/web/templates/recent	(original)
+++ wifty/trunk/share/web/templates/recent	Thu Oct 19 17:04:41 2006
@@ -2,16 +2,5 @@
 $pages
 </%args>
 <&|/_elements/wrapper, title => 'Updated this week' &>
-<dl id="recentupdates">
-% while (my $page = $pages->next) {
-<dt><% Jifty->web->link( label => $page->name, url => '/view/'.$page->name)%></dt>
-<dd><%$page->updated%>
-% if($page->updated_by->id) {
-  (<% $page->updated_by->name %>)
-% } else {
-  (Anonymous)
-% }
-</dd>
-% }
-</dl>
+<& /_elements/page_list, pages => $pages, id => 'recentupdates' &>
 </&>

Added: wifty/trunk/share/web/templates/search
==============================================================================
--- (empty file)
+++ wifty/trunk/share/web/templates/search	Thu Oct 19 17:04:41 2006
@@ -0,0 +1,19 @@
+<%args>
+$pages
+$search
+</%args>
+<%init>
+warn $search;
+</%init>
+<&|/_elements/wrapper, title => 'Search' &>
+<% Jifty->web->form->start %>  
+  <div id="searchbox" class="inline">
+    <% $search->form_field('contains', label => 'Find pages containing:') %>
+    <% $search->button(label => 'Search') %>
+  </div>
+  
+<% Jifty->web->form->end %>  
+% if($pages) {  
+<& /_elements/page_list, pages => $pages, id => 'searchresults' &>
+% }
+</&>


More information about the Jifty-commit mailing list