Changeset 294


Ignore:
Timestamp:
03/10/10 21:32:12 (2 years ago)
Author:
takanori
Message:

template code refactoring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Products.ATGoogleMaps/trunk/Products/ATGoogleMaps/skins/ATGoogleMaps/gmap_view.pt

    r289 r294  
    3434 
    3535    <!-- gmarker --> 
    36     <ul tal:define="folderContents context/getFolderContents"> 
    37       <tal:entry tal:repeat="item folderContents"> 
    38         <tal:block tal:define="marker item/getObject; 
    39                                item_id item/getId|item/id; 
    40                                item_title_or_id item/pretty_title_or_id; 
    41                                item_wf_state item/review_state|python: wtool.getInfoFor(item, 'review_state', ''); 
    42                                item_wf_state_class python:'state-' + normalizeString(item_wf_state); 
    43                                "> 
    44           <li id="" 
    45             tal:attributes="id string:infowindow_link_${item_id}"> 
     36    <tal:gmarker tal:define="folderContents context/getFolderContents"> 
     37      <ul class="gmarkerBlock"> 
     38        <tal:entry tal:repeat="item folderContents"> 
     39          <li id = "" 
     40              tal:define="item_id item/getId|item/id; 
     41                          item_title_or_id item/pretty_title_or_id; 
     42                          item_wf_state item/review_state|python: wtool.getInfoFor(item, 'review_state', ''); 
     43                          item_wf_state_class python:'state-' + normalizeString(item_wf_state);" 
     44              tal:attributes="id string:infowindow_link_${item_id}"> 
    4645            <a href="javascript:void(0)" 
    4746               onclick="this.blur()" 
    4847               tal:content="item_title_or_id" 
    4948               tal:attributes="class string:${item_wf_state_class}"> 
    50               Marker title 
     49              Marker title 
    5150            </a> 
    52             <div id="" style="display: none;" 
    53                  tal:attributes="id string:infowindow_html_${item_id}"> 
    54               <h2 class="documentFirstHeading"> 
    55                 <metal:field use-macro="python:marker.widget('title', mode='view')"> 
    56                   Title 
    57                 </metal:field> 
    58               </h2> 
     51          </li> 
     52        </tal:entry> 
     53      </ul> 
    5954 
    60               <span tal:replace="structure marker/infowindow" /> 
     55      <tal:entry tal:repeat="item folderContents"> 
     56        <div id="" style="display: none;" 
     57             tal:define="marker item/getObject; 
     58                         item_id item/getId|item/id;" 
     59             tal:attributes="id string:infowindow_html_${item_id}"> 
     60          <h2 class="documentFirstHeading"> 
     61            <metal:field use-macro="python:marker.widget('title', mode='view')"> 
     62              Title 
     63            </metal:field> 
     64          </h2> 
    6165 
    62               <div class="documentActions"> 
    63                 <ul> 
    64                   <li> 
    65                     <a href="" 
    66                        tal:attributes="href marker/absolute_url" 
    67                        i18n:translate="" i18n:domain="plone"> 
    68                       View 
    69                     </a> 
    70                   </li> 
    71                 </ul> 
    72               </div> 
    73             </div> 
    74           </li> 
    75         </tal:block> 
     66          <span tal:replace="structure marker/infowindow" /> 
     67 
     68          <div class="documentActions"> 
     69            <ul> 
     70              <li> 
     71                <a href="" 
     72                   tal:attributes="href marker/absolute_url" 
     73                   i18n:translate="" i18n:domain="plone"> 
     74                  View 
     75                </a> 
     76              </li> 
     77            </ul> 
     78          </div> 
     79        </div> 
    7680      </tal:entry> 
    77     </ul> 
     81    </tal:gmarker> 
     82 
    7883     
    7984    <div id="map_canvas" 
Note: See TracChangeset for help on using the changeset viewer.