[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 {set-block scope=global variable=title}{'Poll %pollname'|i18n('design/base',,hash('%pollname',$node.name|wash))}{/set-block} 2 <div class="content-view-full"> 3 <div class="class-poll"> 4 <div class="poll-result"> 5 6 <h1>{'Results'|i18n( 'design/base' )}</h1> 7 8 {section show=$error} 9 10 {section show=$error_anonymous_user} 11 <div class="warning"> 12 <h2>{'Anonymous users are not allowed to vote on this poll, please login.'|i18n('design/base')}</h2> 13 </div> 14 {/section} 15 16 {section show=$error_existing_data} 17 <div class="warning"> 18 <h2>{'You have already voted for this poll.'|i18n('design/base')}</h2> 19 </div> 20 {/section} 21 22 {/section} 23 24 {section loop=$object.contentobject_attributes} 25 {section show=$:item.contentclass_attribute.is_information_collector} 26 {let attribute=$:item 27 contentobject_attribute_id=cond( $attribute|get_class|eq( 'ezinformationcollectionattribute' ),$attribute.contentobject_attribute_id, 28 $attribute|get_class|eq( 'ezcontentobjectattribute' ),$attribute.id ) 29 contentobject_attribute=cond( $attribute|get_class|eq( 'ezinformationcollectionattribute' ),$attribute.contentobject_attribute, 30 $attribute|get_class|eq( 'ezcontentobjectattribute' ),$attribute ) 31 total_count=fetch( 'content', 'collected_info_count', hash( 'object_attribute_id', $contentobject_attribute_id ) ) 32 item_counts=fetch( 'content', 'collected_info_count_list', hash( 'object_attribute_id', $contentobject_attribute_id ) ) } 33 34 <h3>{$contentobject_attribute.content.name}</h3> 35 36 <table class="poll-resultlist"> 37 <tr> 38 39 {section name=Option loop=$contentobject_attribute.content.option_list} 40 {let item_count=0} 41 {section show=is_set($item_counts[$:item.id])} 42 {set item_count=$item_counts[$:item.id]} 43 {/section} 44 <td class="poll-resultname"> 45 <p> 46 {$:item.value} 47 </p> 48 </td> 49 50 {let percentage = cond( $total_count|gt( 0 ), round( div( mul( $:item_count, 100 ), $total_count ) ), 0 ) 51 tenth = cond( $total_count|gt( 0 ), round( div( mul( $:item_count, 10 ), $total_count ) ), 0 )} 52 <td class="poll-resultbar"> 53 <table class="poll-resultbar"> 54 <tr> 55 <td class="poll-percentage"> 56 <i>{$:percentage}%</i> 57 </td> 58 <td class="poll-votecount"> 59 {'Votes'|i18n('design/base')}: {$:item_count} 60 </td> 61 </tr> 62 <tr> 63 <div class="chart-bar-edge-start"> 64 <div class="chart-bar-edge-end"> 65 <div class="chart-bar-resultbox"> 66 <div class="chart-bar-resultbar chart-bar-{$:percentage}-of-100 chart-bar-{$:tenth}-of-10" style="width: {$:percentage}%;"> 67 <div class="chart-bar-result-divider"></div> 68 </div> 69 </div> 70 </div> 71 </div> 72 </tr> 73 </table> 74 </td> 75 {/let} 76 {/let} 77 78 {delimiter} 79 </tr> 80 <tr> 81 {/delimiter} 82 83 {/section} 84 </tr> 85 </table> 86 {/let} 87 {section-else} 88 {section show=$attribute_hide_list|contains($:item.contentclass_attribute.identifier)|not} 89 <div class="attribute-short">{attribute_view_gui attribute=$:item}</div> 90 {/section} 91 {/section} 92 {/section} 93 94 <br/> 95 96 {"%count total votes"|i18n( 'design/base' ,, 97 hash( '%count', fetch( content, collected_info_count, hash( object_id, $object.id ) ) ) )} 98 99 <div class="content-results"> 100 <div class="attribute-link"> 101 <p><a href={$node.url_alias|ezurl}>{"Back to poll"|i18n("design/base")}</a></p> 102 </div> 103 </div> 104 105 </div> 106 </div> 107 </div>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 10:30:04 2007 | par Balluche grâce à PHPXref 0.7 |