[Erp5-report] r37314 ivan - in /erp5/trunk/bt5/erp5_km: SkinTemplateItem/portal_skins/erp5_...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Jul 28 10:47:37 CEST 2010


Author: ivan
Date: Wed Jul 28 10:47:33 2010
New Revision: 37314

URL: http://svn.erp5.org?rev=37314&view=rev
Log:
When showing search results define other listbox modes and mark current one.
Follow CSS convention.

Modified:
    erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/ListBox_asHTML.xml
    erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/WebSite_viewAdvancedSearchResultList/listbox.xml
    erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/listbox.css.xml
    erp5/trunk/bt5/erp5_km/bt/revision

Modified: erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/ListBox_asHTML.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/ListBox_asHTML.xml?rev=37314&r1=37313&r2=37314&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/ListBox_asHTML.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/ListBox_asHTML.xml [utf8] Wed Jul 28 10:47:33 2010
@@ -62,10 +62,11 @@
               show_search_line here/showSearchLine;\n
               is_web_mode request/is_web_mode | nothing;\n
               is_dialog_mode request/dialog_mode | nothing;\n
+              display_style_list here/getDisplayStyleList;\n
               list_style python:request.get(\'list_style\', \n
-              selection.getParams().get(\'list_style\', is_web_mode and \'table\' or None));\n
+                                             selection.getParams().get(\'list_style\', here.getDefaultDisplayStyle()));\n
               dummy python: list_style == \'search\' and here.setDisplayedColumnIdList((\'getIconAsHTML\', \'getSummaryAsHTML\'))\n
-                         or list_style == \'thumb\' and here.setDisplayedColumnIdList((\'title\', \'thumbnail\'));\n
+                           or list_style == \'thumbnail\' and here.setDisplayedColumnIdList((\'title\', \'thumbnail\'));\n
               line_list here/query;\n
               listbox_max_lines  python: int(here.getMaxLineNumber());\n
               total_line         python: int(here.total_size);\n
@@ -73,10 +74,8 @@
               current_page_max   python: listbox_max_lines * current_page;\n
               current_page_start python: (listbox_max_lines * (current_page - 1)) + 1;\n
               current_page_stop  python: (total_line < current_page_max) and total_line or current_page_max;\n
-\n
               listbox_id request/current_form_id | form_id ;\n
               listbox_url string:${context_url}/${listbox_id};\n
-\n
               ">\n
 \n
   <!-- Define hidden input.  -->\n
@@ -438,19 +437,16 @@
       </div>\n
 \n
       <!-- Choose display mode -->\n
-      <!--TODO define show_display_selection-->\n
-      <div  tal:define="style_list here/getDisplayStyleList"\n
-            tal:condition="python: not is_gadget_mode and len(style_list) > 0"\n
-            class="display_selection"\n
-            i18n:domain="ui">\n
-        <span i18n:translate="">Display :</span>\n
+      <!--TODO define show_display_selection macro-->\n
+      <div tal:condition="python: len(display_style_list) > 0"\n
+           class="list-style-selection">\n
+        <span i18n:translate="" i18n:domain="ui">Display :</span>\n
         <ul>\n
-          <li tal:repeat="style style_list">\n
-            <a tal:attributes="href python: \'%s?list_style=%s\' % (listbox_url, style[0])"\n
+          <li tal:repeat="style display_style_list">\n
+            <a tal:attributes="href python: \'%s?list_style=%s\' % (listbox_url, style[0]);\n
+                               class python: test(style[0]==list_style, \'selected\',\'\');"\n
                tal:content="python: style[1]"\n
-                i18n:translate="">\n
-              Tabular\n
-            </a>\n
+               i18n:translate="" i18n:domain="ui"/>\n
           </li>\n
         </ul>\n
       </div>\n

Modified: erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/WebSite_viewAdvancedSearchResultList/listbox.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/WebSite_viewAdvancedSearchResultList/listbox.xml?rev=37314&r1=37313&r2=37314&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/WebSite_viewAdvancedSearchResultList/listbox.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/WebSite_viewAdvancedSearchResultList/listbox.xml [utf8] Wed Jul 28 10:47:33 2010
@@ -385,6 +385,10 @@
                     <value> <string></string> </value>
                 </item>
                 <item>
+                    <key> <string>default_display_style</string> </key>
+                    <value> <string>search</string> </value>
+                </item>
+                <item>
                     <key> <string>default_params</string> </key>
                     <value>
                       <list/>
@@ -397,7 +401,20 @@
                 <item>
                     <key> <string>display_style_list</string> </key>
                     <value>
-                      <list/>
+                      <list>
+                        <tuple>
+                          <string>table</string>
+                          <string>table</string>
+                        </tuple>
+                        <tuple>
+                          <string>search</string>
+                          <string>search</string>
+                        </tuple>
+                        <tuple>
+                          <string>thumbnail</string>
+                          <string>thumbnail</string>
+                        </tuple>
+                      </list>
                     </value>
                 </item>
                 <item>

Modified: erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/listbox.css.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/listbox.css.xml?rev=37314&r1=37313&r2=37314&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/listbox.css.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/listbox.css.xml [utf8] Wed Jul 28 10:47:33 2010
@@ -218,26 +218,28 @@ div.search_popup{\n
   float:left;\n
 }\n
 \n
-/*Display selection choice*/\n
-.display_selection {\n
+/* List style selection */\n
+div.list-style-selection {\n
   width:auto;\n
   float:left;\n
 }\n
-.display_selection span{\n
+div.list-style-selection span{\n
   font-weight:bold;\n
   padding-left:10px;\n
   vertical-align:-4px;\n
 }\n
-.display_selection ul{\n
+div.list-style-selection ul{\n
   display:inline;\n
   padding-left:0;\n
   margin: 0;\n
   vertical-align: -4px;\n
 }\n
-.display_selection li{\n
+div.list-style-selection li{\n
   display: inline;\n
 }\n
-\n
+div.list-style-selection li a.selected{\n
+  font-weight: bold;\n
+}\n
 /* Search bar */\n
 div.extendedSearchBar {\n
   float:left;\n

Modified: erp5/trunk/bt5/erp5_km/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_km/bt/revision?rev=37314&r1=37313&r2=37314&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_km/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_km/bt/revision [utf8] Wed Jul 28 10:47:33 2010
@@ -1 +1 @@
-1493
\ No newline at end of file
+1494
\ No newline at end of file




More information about the Erp5-report mailing list