Changeset 85

Show
Ignore:
Timestamp:
15/01/07 19:45:17
Author:
sjudge
Message:

fixed popoll to show qualatitive info (average/brilliant!!!).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/OATSOFT/skins/oatsoft_styles/popoll_slot2.pt

    r51 r85  
    4343                  type python:test((poll.getPollNumber() > 1), 'checkbox', 'radio'); 
    4444                  id string:cb${repeat/choice/index};"/> 
    45               <span tal:define="choice_index repeat/choice/index;" tal:replace="structure string:${choice}">>Choice</span><br/> 
     45              <span tal:define="choice_index repeat/choice/index;" tal:replace="structure string:${choice}">>Choice</span><span tal:condition="python: choice=='1'"> (Average)</span><span tal:condition="python: choice=='5'"> (Excellent)</span><br/> 
    4646 
    4747          </span> 
     
    5757              cellspacing="0" border="0" cellpadding="2"> 
    5858              <tr tal:repeat="choice python: poll.getResults()" align=left> 
     59 
    5960                  <td tal:define="choice_id python:choice[0]; 
    6061                      choice_count python:choice[1]; choice_percentage python:'%0.2f'%choice[2]; bar_percentage python:int(choice[2])"> 
    61                       <img src="bar_1_10.gif" height="10" tal:attributes="width string:${bar_percentage}"> 
     62                      <span tal:replace="structure string:${choice_id}">Choice 1</span><span tal:condition="python: choice_id=='1'"> (Average)</span><span tal:condition="python: choice_id=='5'"> (Excellent)</span>: 
    6263                      <b tal:content="string:${choice_percentage}%">44%</b><br /> 
    63                       <span tal:replace="structure string:${choice_id}">Choice 1</span> 
    6464                  </td> 
    6565              </tr>