[Erp5-report] r16275 - in /erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style: SkinTemplat...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Sep 12 04:23:01 CEST 2007


Author: rafael
Date: Wed Sep 12 04:23:01 2007
New Revision: 16275

URL: http://svn.erp5.org?rev=16275&view=rev
Log:
unhardcoded values. Started to use Zoom Base Category to configure Zooms at Planning Box.

Modified:
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/planning_content.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/planning_validate_date_list.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/planning_content.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/planning_content.xml?rev=16275&r1=16274&r2=16275&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/planning_content.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/planning_content.xml Wed Sep 12 04:23:01 2007
@@ -220,7 +220,7 @@
       <tal:block tal:condition="python:basic.field.get_value(\'use_date_zoom\')">\n
         <!-- Defining Date Zoom Level -->\n
           <!-- XXX This part has to be improved -->\n
-          <tal:block tal:repeat="current_zoom_level python:[[\'Day\',1],[\'Week\',7],[\'Month\',30],[\'Year\',365]]">\n
+          <tal:block tal:repeat="current_zoom_level python:[ [i.getTitle() , i.getIntIndex() ] for i in context.portal_categories.zoom.contentValues() ]">\n
             <tal:block tal:condition="python:current_zoom_level[1]==basic.secondary_axis_info[\'zoom_level\']">\n
               <b tal:replace="nothing"> current zoom level is selected </b>\n
               <option selected="selected" value="None"\n

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/planning_validate_date_list.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/planning_validate_date_list.xml?rev=16275&r1=16274&r2=16275&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/planning_validate_date_list.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/planning_validate_date_list.xml Wed Sep 12 04:23:01 2007
@@ -88,21 +88,23 @@
 #    finish 0h of the next year\'s first day.\n
 #  \n
 \n
+zoom = context.portal_categories.zoom\n
+\n
 # Normalize Day.\n
 bound_start = DateTime(DateTime(bound_begin).strftime("%Y/%m/%d"))\n
 bound_stop = bound_start\n
-if int(zoom_level) == 1:\n
+if int(zoom_level) == zoom.first_zoom_level.getIntIndex():\n
   bound_start = bound_start + zoom_variation\n
   bound_stop = bound_start + 1\n
 \n
-if int(zoom_level) == 7:\n
+if int(zoom_level) == zoom.second_zoom_level.getIntIndex():\n
   # Normalize Week.\n
   while bound_start.Day() is not \'Sunday\':\n
     bound_start = bound_start - 1\n
   bound_start = bound_start + 7 * zoom_variation\n
   bound_stop = bound_start + 7\n
  \n
-if int(zoom_level) == 30:\n
+if int(zoom_level) == zoom.third_zoom_level.getIntIndex():\n
   # Normalize Month.\n
   month = bound_start.month() + zoom_variation\n
   year = bound_start.year() + (month - 1) / 12\n
@@ -117,7 +119,7 @@
     month = month + 1\n
   bound_stop = DateTime(year, month, 1)\n
 \n
-if int(zoom_level) == 365:\n
+if int(zoom_level) == zoom.fourth_zoom_level.getIntIndex():\n
   # Normalize Year.\n
   year = bound_start.year() + zoom_variation\n
   bound_start = DateTime(year, 1, 1)\n
@@ -177,8 +179,10 @@
                             <string>bound_begin</string>
                             <string>zoom_level</string>
                             <string>zoom_variation</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>zoom</string>
                             <string>DateTime</string>
-                            <string>_getattr_</string>
                             <string>bound_start</string>
                             <string>bound_stop</string>
                             <string>int</string>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision?rev=16275&r1=16274&r2=16275&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision Wed Sep 12 04:23:01 2007
@@ -1,1 +1,1 @@
-436
+440




More information about the Erp5-report mailing list