Ignore:
Timestamp:
02/20/10 15:13:01 (2 years ago)
Author:
takanori
Message:

add marker html code for infowindow

File:
1 edited

Legend:

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

    r263 r271  
    3838 
    3939    <!-- gmarker --> 
    40     <ul tal:define="markers python: context.objectValues(['GMarker'])" 
    41         tal:condition="nothing"> 
    42       <tal:gmarker tal:repeat="here markers"> 
     40    <ul tal:define="markers python: context.objectValues(['GMarker'])"> 
     41      <tal:gmarker tal:repeat="marker markers"> 
    4342        <li id="" 
    44             tal:condition="context/point | nothing" 
    45             tal:attributes="id string:marker_link_${context/id}"> 
    46           <a href="javascript:void(0)" onclick="this.blur()" tal:content="context/pretty_title_or_id"> 
     43            tal:define="mid marker/id; 
     44                        " 
     45            tal:condition="marker/point | nothing" 
     46            tal:attributes="id string:infowindow_link_${mid}"> 
     47          <a href="javascript:void(0)" onclick="this.blur()" tal:content="marker/pretty_title_or_id"> 
    4748            Gmarker title 
    4849          </a> 
    49         </li> 
    50         <!-- info window --> 
    51         <div id="" style="display: none;" 
    52              tal:attributes="id string:marker_html_${context/id}"> 
    53           <div style="width: 290px;"> 
    54             <div class="documentActions"> 
    55               <a href="" tal:condition="context/url"  
    56                  tal:attributes="href context/url"  
    57                  i18n:translate="" i18n:domain="plone">  
    58                 Link  
    59               </a>  
    60             </div>  
    61  
    62             <h1 class="documentFirstHeading"> 
    63               <a href="" tal:content="context/pretty_title_or_id" 
    64                  tal:attributes="href context/absolute_url"> 
    65                 Title or id 
    66               </a> 
    67             </h1> 
     50          <!-- info window --> 
     51          <div id="" style="display: none;" 
     52               tal:attributes="id string:infowindow_html_${mid}"> 
     53            <h2 class="documentFirstHeading"> 
     54              <metal:field use-macro="python:marker.widget('title', mode='view')"> 
     55                Title 
     56              </metal:field> 
     57            </h2> 
    6858 
    6959            <img src="" style="float: left; margin: 5px;" 
    70                  tal:condition="context/imageurl" 
    71                  tal:attributes="src context/imageurl" /> 
     60                 tal:condition="marker/imageurl" 
     61                 tal:attributes="src marker/imageurl" /> 
    7262 
    73             <div metal:use-macro="context/gmarker_view/macros/gmarker"> 
    74               show related items if they exist 
     63            <p class="documentDescription"> 
     64              <metal:field use-macro="python:marker.widget('description', mode='view')"> 
     65                Description 
     66              </metal:field> 
     67            </p> 
     68 
     69            <div tal:condition="marker/address"> 
     70              <metal:field use-macro="python:marker.widget('address', mode='view')"> 
     71                Address 
     72              </metal:field> 
    7573            </div> 
    76      
    77             <div style="clear: both;" tal:condition="context/getText" 
    78                  tal:content="structure context/getText"> 
    79                Body Text 
    80             </div> 
    8174 
    82             <div metal:use-macro="context/document_relateditems/macros/relatedItems"> 
    83               show related items if they exist 
     75            <div tal:condition="marker/phone"> 
     76              <metal:field use-macro="python:marker.widget('phone', mode='view')"> 
     77                Phone 
     78              </metal:field> 
    8479            </div> 
    85           </div> 
    86         </div> 
    87         <div id="" style="display: none;" 
    88              tal:attributes="id string:detail_html_${context/id}" 
    89              tal:condition="context/detail"> 
    90           <div style="width: 290px;"> 
     80 
     81            <div tal:condition="marker/url"> 
     82              <a href="" 
     83                 tal:attributes="href marker/url" 
     84                 i18n:translate="" i18n:domain="plone"> 
     85                Link 
     86              </a> 
     87            </div> 
     88 
     89            <br style="clear: both;"/> 
     90 
     91            <div tal:condition="marker/detail" 
     92                 tal:content="structure marker/getDetail"> 
     93              Detail Text 
     94            </div> 
     95 
    9196            <div class="documentActions"> 
    92               <a href="" tal:condition="context/url"  
    93                  tal:attributes="href context/url"  
    94                  i18n:translate="" i18n:domain="plone">  
    95                 Link  
    96               </a>  
    97             </div>  
     97              <ul> 
     98                <li> 
     99                  <a href="" 
     100                     tal:attributes="href marker/absolute_url" 
     101                     i18n:translate="" i18n:domain="plone"> 
     102                    View 
     103                  </a> 
     104                </li> 
     105              </ul> 
     106            </div> 
    98107 
    99             <h1 class="documentFirstHeading"> 
    100               <a href="" tal:content="context/pretty_title_or_id" 
    101                  tal:attributes="href context/absolute_url"> 
    102                 Title or id 
    103               </a> 
    104             </h1> 
    105             <div tal:content="structure context/getDetail"> 
    106                Detail Text 
    107             </div> 
    108108          </div> 
    109         </div> 
     109        </li> 
    110110      </tal:gmarker> 
    111111    </ul> 
Note: See TracChangeset for help on using the changeset viewer.