Show
Ignore:
Timestamp:
08/05/10 18:28:38 (22 months ago)
Author:
mauro
Message:

plone4

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plone4bio.base/trunk/src/plone4bio/base/browser/templates/annotations.pt

    r45 r149  
    1              <tal:annotations tal:define="annotations context/annotations; 
    2                                           keys python:annotations.keys(); 
    3                                           keystoignore python:[x for x in keys if x[-7:] == 'protein' ]; 
    4                                           keys python:list(set(keys).difference(['references','dbxref','dates','gi','id']+keystoignore)); 
    5                                           keysgroups python:[x.split('_')[0] for x in keys]; 
    6                                           keysgroups python:list(set(keysgroups)); 
    7                                           sorting python:keysgroups.sort()" 
    8                                 tal:repeat="keygroup keysgroups"> 
    9                                 <dl tal:attributes="id string:group-${keygroup}" class="collapsible inline collapsedOnLoad"> 
    10                                 <dt class="collapsibleHeader" tal:content="keygroup">keygroup</dt> 
    11                                 <dd class="collapsibleContent"> 
    12                                 <table class="listing" summary="Annotations" style="width:100%"> 
    13                                         <tr><th colspan="2" tal:content="keygroup"  style="text-align:left" style="width:100%"/></tr> 
    14                                         <tal:annotgroup  tal:define="subannots python:[key for key in keys if key.startswith(keygroup)]; 
    15                                                                      sorting python:subannots.sort();" 
    16                                                          tal:repeat="subannot subannots"> 
    17                                         <tr     style="width:100%" 
    18                                                 tal:define="oddrow repeat/subannot/odd; 
     1<div id="accordion-annotations"> 
     2    <tal:annotations tal:define="annotations context/annotations; 
     3                keys python:annotations.keys(); 
     4                            keystoignore python:[x for x in keys if x[-7:] == 'protein' ]; 
     5                            keys python:list(set(keys).difference(['references','dbxref','dates','gi','id']+keystoignore)); 
     6                            keysgroups python:[x.split('_')[0] for x in keys]; 
     7                            keysgroups python:list(set(keysgroups)); 
     8                            sorting python:keysgroups.sort()" 
     9                tal:repeat="keygroup keysgroups"> 
     10        <h3><a href="#" tal:content="keygroup">keygroup</a></h3> 
     11        <div> 
     12            <table class="listing" summary="Annotations" style="width:100%"> 
     13                            <tal:annotgroup tal:define="subannots python:[key for key in keys if key.startswith(keygroup)];  
     14                            sorting python:subannots.sort();" 
     15                                        tal:repeat="subannot subannots"> 
     16                                        <tr tal:define="oddrow repeat/subannot/odd; 
    1917                                                            annotdatas python:annotations[subannot];" 
    20                                                 tal:attributes="class python:(oddrow and 'even' or 'odd');"> 
    21                                                 <td tal:content="subannot" style="width:200px; max-width:200px"/> 
    22                                                 <td 
    23                                                     tal:condition="python:isinstance(annotdatas,list) and annotdatas"> 
    24                                                         <ul> 
     18                            tal:attributes="class python:(oddrow and 'even' or 'odd');"> 
     19                                                <td tal:content="subannot" /> 
     20                                                <td tal:condition="python:isinstance(annotdatas,list) and annotdatas"> 
     21                                                    <ul> 
    2522                                                            <tal:annotdata tal:define="annotlist python:[]; 
    2623                                                                                       annotlistspace python:[]; 
     
    2825                                                                                       insertspace python:[annotlistspace.append(', '.join(x.split(','))) for x in annotlist]" 
    2926                                                                           tal:repeat="annotdata annotlistspace"> 
    30                                                                 <li><span tal:content="annotdata" /></li> 
     27                                                                    <li tal:content="annotdata">annotation data</li> 
    3128                                                            </tal:annotdata> 
    32                                                         </ul> 
     29                                                    </ul> 
    3330                                                </td> 
    34                                                 <td  
    35                                                     tal:condition="python:isinstance(annotdatas,str) and annotdatas" > 
    36                                                         <ul> 
     31                                                <td tal:condition="python:isinstance(annotdatas,str) and annotdatas"> 
     32                            <ul> 
    3733                                                            <tal:annotdata  tal:define="annotlistspace python:[]; 
    3834                                                                                        annotdatas python:annotdatas.split('###'); 
    3935                                                                                        insertspace python:[annotlistspace.append(', '.join(x.split(','))) for x in annotdatas]" 
    4036                                                                            tal:repeat="annotdata annotlistspace"> 
    41                                                                 <li><span tal:content="annotdata" /></li> 
     37                                    <li tal:content="annotdata">annotation data</li> 
    4238                                                            </tal:annotdata> 
    43                                                         </ul> 
    44                                                 </td> 
     39                            </ul> 
     40                        </td> 
    4541                                        </tr> 
    46                                         </tal:annotgroup>                                        
    47                                 </table> 
    48                                 </dd> 
    49                                 </dl> 
    50  
    51              </tal:annotations> 
     42                                </tal:annotgroup>                                        
     43                        </table> 
     44                </div> 
     45    </tal:annotations> 
     46</div>