Index: browser.py
===================================================================
RCS file: /home/cvs/cvsroot/plone/Products/rfasite/browser.py,v
retrieving revision 1.55
retrieving revision 1.55.2.2
diff -u -r1.55 -r1.55.2.2
--- browser.py	10 Sep 2007 15:27:22 -0000	1.55
+++ browser.py	22 Jan 2008 22:30:19 -0000	1.55.2.2
@@ -1,6 +1,6 @@
 """ RFA browser views
 
-$Id: browser.py,v 1.55 2007/09/10 15:27:22 tseaver Exp $
+$Id: browser.py,v 1.55.2.2 2008/01/22 22:30:19 tseaver Exp $
 """
 import calendar
 import urlparse
@@ -110,16 +110,22 @@
 
         navroot = self.navroot()
         navroot_path = '/'.join(navroot.getPhysicalPath())
-        pathquery = {'query': navroot_path} # add {'depth':x} here to limit
-        query = {
-            'path':pathquery, 'portal_type':['Section'],
-            'sort_on':'nav_sort_spec', 'sort_order':'asc'
-            }
+        pathquery = {'query': navroot_path,
+                     'depth': 2,
+                    } 
+        query = {'path': pathquery,
+                 'portal_type': ['Section'],
+                 'sort_on': 'nav_sort_spec',
+                 'sort_order': 'asc'
+                }
 
         context = utils.context(self)
         c_path = '/'.join(context.getPhysicalPath())
         ctool = getToolByName(context, 'portal_catalog')
-        brains = ctool.searchResults(query)
+        brains = ctool.search(query_request=query,
+                              sort_index='nav_sort_spec',
+                              reverse=0,
+                             )
         parents = {}
         root = {'children':[]}
         for brain in brains:
@@ -287,9 +293,9 @@
 
         if section is not None:
             for story in section.listFeaturedStories(use_catalog=True):
-                s_allowed = IAllowed(story)
-                if not s_allowed:
-                    continue
+                #s_allowed = IAllowed(story)
+                #if not s_allowed:
+                #    continue
                 story_url = story.absolute_url()
                 if story_url == self._top_url:
                     continue
Index: section.py
===================================================================
RCS file: /home/cvs/cvsroot/plone/Products/rfasite/section.py,v
retrieving revision 1.32
retrieving revision 1.32.2.1
diff -u -r1.32 -r1.32.2.1
--- section.py	7 Sep 2007 20:58:22 -0000	1.32
+++ section.py	22 Jan 2008 22:30:19 -0000	1.32.2.1
@@ -1,6 +1,6 @@
 """ RFA Section Module
 
-$Id: section.py,v 1.32 2007/09/07 20:58:22 tseaver Exp $
+$Id: section.py,v 1.32.2.1 2008/01/22 22:30:19 tseaver Exp $
 """
 from AccessControl import ClassSecurityInfo
 from Globals import InitializeClass
@@ -233,12 +233,22 @@
         spec = '/'.join(path), self.nav_index
         return spec
 
-    def listFeaturedStories(self, with_audio_only=False, use_catalog=False):
+    def listFeaturedStories(self,
+                            with_audio_only=False,
+                            use_catalog=False,
+                            limit=None,
+                           ):
         """ See ISection.
         """
         max = self.getMaxStories()
+        if limit is not None:
+            max = min(max, int(limit))
+
         if use_catalog:
             where = '/'.join(self.getPhysicalPath())
+            path_query = {'query': where,
+                         #'depth': 1,  # XXX can't?
+                         }
             catalog = getToolByName(self, 'portal_catalog')
             brains = catalog.search(query_request={'path': where,
                                                    'portal_type': 'Story',
@@ -246,7 +256,7 @@
                                                   },
                                     sort_index='effective',
                                     reverse=True,
-                                    limit=max * 2, # allow for some headroom
+                                    limit=min(max * 2, 20),
                                    )
             stories = [x.getObject() for x in brains]
         else:
@@ -257,7 +267,7 @@
         if with_audio_only:
             return _only_audio(stories, max)
 
-        # XXX: let view do the filtering?
+        # XXX: let view do the filtering? Not for now.
         checker = _AllowedOrNoneChecker()
         return [x for x in stories if checker(x)][:max]
 
Index: skins/rfa/global_contentmenu.pt
===================================================================
RCS file: /home/cvs/cvsroot/plone/Products/rfasite/skins/rfa/global_contentmenu.pt,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- skins/rfa/global_contentmenu.pt	15 Nov 2006 18:00:17 -0000	1.3
+++ skins/rfa/global_contentmenu.pt	22 Jan 2008 00:41:33 -0000	1.3.2.1
@@ -8,7 +8,9 @@
 <ul tal:define="manage_portal python:checkPermission('Manage portal', here);
                 parent_folder plone_view/getCurrentFolder;
                 disableMenu python:here.portal_factory.isTemporary(here);
-                useSelf python:isStructuralFolder and not isContextDefaultPage;"
+                useSelf python:isStructuralFolder and not isContextDefaultPage;
+                here_url context/absolute_url;
+               "
     tal:condition="not:disableMenu">
 
     <tal:states define="review_state wf_state;
Index: skins/rfa/main_template.pt
===================================================================
RCS file: /home/cvs/cvsroot/plone/Products/rfasite/skins/rfa/main_template.pt,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- skins/rfa/main_template.pt	7 Sep 2007 16:38:59 -0000	1.2
+++ skins/rfa/main_template.pt	22 Jan 2008 00:41:33 -0000	1.2.2.1
@@ -131,7 +131,8 @@
               <metal:block define-slot="content">
                 <div id="content"
                      metal:define-macro="content"
-                     tal:define="show_border python:here.showEditableBorder(template_id=template_id, actions=actions );"
+                     tal:define="show_border python:here.showEditableBorder(
+                                   template_id=template_id, actions=actions );"
                      tal:attributes="class python:test(show_border,'documentEditable','')">
 
                   <metal:ifborder tal:condition="show_border" >
Index: skins/rfa/news_box.pt
===================================================================
RCS file: /home/cvs/cvsroot/plone/Products/rfasite/skins/rfa/news_box.pt,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -u -r1.6 -r1.6.2.1
--- skins/rfa/news_box.pt	18 Jan 2008 16:26:24 -0000	1.6
+++ skins/rfa/news_box.pt	22 Jan 2008 22:30:20 -0000	1.6.2.1
@@ -1,7 +1,9 @@
 <div class="borderbox">
  <h1 tal:content="context/Title">TITLE</h1>
  <ul>
-  <li class="migratedtitle" tal:repeat="story python: context.listFeaturedStories()[:7]">
+  <li class="migratedtitle"
+      tal:repeat="story python: context.listFeaturedStories(use_catalog=True,
+                                                            limit=7)[:7]">
     <a href="#"
        tal:attributes="href story/absolute_url"
        tal:content="story/Title">STORY TITLE</a></li>
Index: skins/rfa/section_layout.pt
===================================================================
RCS file: /home/cvs/cvsroot/plone/Products/rfasite/skins/rfa/section_layout.pt,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -u -r1.5 -r1.5.2.1
--- skins/rfa/section_layout.pt	5 Sep 2007 20:34:53 -0000	1.5
+++ skins/rfa/section_layout.pt	22 Jan 2008 00:41:33 -0000	1.5.2.1
@@ -2,6 +2,7 @@
                                                       'title':'',
                                                       'featured_image':'',
                                                       'description':''}">
+                  template_id template/getId;
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
       lang="en"
       metal:use-macro="context/main_template/macros/master"
Index: skins/rfa_retail/main_template.pt
===================================================================
RCS file: /home/cvs/cvsroot/plone/Products/rfasite/skins/rfa_retail/main_template.pt,v
retrieving revision 1.69
retrieving revision 1.69.2.1
diff -u -r1.69 -r1.69.2.1
--- skins/rfa_retail/main_template.pt	27 Nov 2007 22:52:40 -0000	1.69
+++ skins/rfa_retail/main_template.pt	22 Jan 2008 00:41:33 -0000	1.69.2.1
@@ -1,12 +1,12 @@
 ﻿<metal:page define-macro="master"><metal:doctype define-slot="doctype"
 ><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" ></metal:doctype>
 <metal:block define-slot="top_slot" />
-<metal:block use-macro="here/global_defines/macros/defines" />
-<html tal:define="purl      portal_url;
+<html tal:define="purl      context/portal_url;
                   subsite   context/getSubsite;
                   surl      subsite/absolute_url;
                   pinfo     request/PATH_INFO;
                   turl      python:request.get('URL');
+                  turl      python:request.get('URL');
                   subsiteID python:context.getSubsite().getId();
                   encoding  python:context.REQUEST.get('encoding');
                   textonly  python:context.REQUEST.get('textonly');
Index: skins/rfa_retail/search.pt
===================================================================
RCS file: /home/cvs/cvsroot/plone/Products/rfasite/skins/rfa_retail/search.pt,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- skins/rfa_retail/search.pt	18 Jan 2008 16:41:43 -0000	1.2
+++ skins/rfa_retail/search.pt	25 Jan 2008 17:25:20 -0000	1.2.2.1
@@ -43,8 +43,7 @@
        tal:content="result/pretty_title_or_id">TITLE</a>
 
     <span tal:omit-tag=""
-          tal:content="python:toLocalizedTime(result.EffectiveDate,
-                                              long_format=1)"
+          tal:content="python:result.EffectiveDate"
           >Effective Date</span>
 
    </dt>
Index: skins/rfa_retail/sendto_form.cpt
===================================================================
RCS file: /home/cvs/cvsroot/plone/Products/rfasite/skins/rfa_retail/sendto_form.cpt,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- skins/rfa_retail/sendto_form.cpt	7 May 2007 16:35:04 -0000	1.2
+++ skins/rfa_retail/sendto_form.cpt	22 Jan 2008 00:41:33 -0000	1.2.2.1
@@ -12,7 +12,12 @@
 <body>
 
  <div metal:fill-slot="contentwell"
-      tal:define="errors options/state/getErrors;">
+      tal:define="errors options/state/getErrors;
+                  context_url context/absolute_url;
+                  template_id template/getId;
+                  mtool context/portal_membership;
+                  member mtool/getAuthenticatedMember;
+                 ">
 
   <h1 i18n:translate="heading_send_page_to">Send this page to somebody</h1>
 
@@ -27,7 +32,7 @@
         action="sendto_form"
         method="post"
         enctype="multipart/form-data"
-        tal:attributes="action string:$here_url/$template_id">
+        tal:attributes="action string:$context_url/$template_id">
 
    <fieldset>
 
@@ -55,9 +60,8 @@
              id="send_to_address"
              name="send_to_address"
              size="25"
-             tabindex=""
              tal:attributes="value request/send_to_address | nothing;
-                             tabindex tabindex/next;"
+                            "
              />
     </div>
 
@@ -81,11 +85,10 @@
              id="send_from_address"
              name="send_from_address"
              size="25"
-             tabindex=""
              tal:attributes="value python:
                                 request.get('send_from_address',
                                             member.getProperty('email',''));
-                             tabindex tabindex/next;"
+                            "
              />
     </div>
 
@@ -98,11 +101,9 @@
 
      <textarea cols="80"
                rows="5"
-               tabindex=""
                id="comment"
                name="comment"
                tal:content="request/comment | nothing"
-               tal:attributes="tabindex tabindex/next;"
                >
        Comment
      </textarea>
@@ -110,12 +111,10 @@
 
     <div class="formControls">
      <input class="context"
-            tabindex=""
             type="submit"
             name="form.button.Send"
             value="Send"
             i18n:attributes="value label_send;"
-            tal:attributes="tabindex tabindex/next;"
             />
     </div>
 
