[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 {* DO NOT EDIT THIS FILE! Use an override template instead. *} 2 <div class="toolbar-item {$placement}"> 3 {section show=and( is_set( $module_result.content_info ), 4 is_set( $module_result.view_parameters ), 5 or( fetch(content, node, hash( node_id, $module_result.node_id ) ).path_string|contains( concat( '/', $show_subtree, '/' ) ), 6 $requested_uri_string|begins_with( $show_subtree ), 7 $show_classidentifiers|explode( ',' )|contains( $module_result.content_info.class_identifier ) ) )} 8 {let today_info=false() 9 class_identifier_list=$show_classidentifiers|explode( ',' ) 10 cache_keys=array( $module_result.view_parameters.year, $module_result.view_parameters.month, $module_result.view_parameters.day ) 11 time_start=false() 12 time_end=false() 13 time_published=false() 14 time_current=false()} 15 16 {switch match=cond( and( $module_result.view_parameters, $module_result.view_parameters.year, $module_result.view_parameters.month, $module_result.view_parameters.day )|ne( false() ), 1, 17 and( $module_result.view_parameters, $module_result.view_parameters.year, $module_result.view_parameters.month )|ne( false() ), 2, 18 and( $module_result, $module_result.content_info ), 3, 19 false() )} 20 {case match=1} 21 {set today_info=$module_result.view_parameters 22 time_start=maketime( 0, 0, 0, $today_info.month, 1, $today_info.year) 23 time_end=maketime( 23, 59, 59, $today_info.month | inc, 0, $today_info.year ) 24 time_published=maketime( 0, 0, 0, $today_info.month, $today_info.day, $today_info.year ) 25 time_current=maketime( 0, 0, 0, $today_info.month, $today_info.day, $today_info.year )} 26 {/case} 27 {case match=2} 28 {set today_info=$module_result.view_parameters 29 cache_keys=array( $today_info.year, $today_info.month ) 30 time_start=maketime( 0, 0, 0, $today_info.month, 1, $today_info.year) 31 time_end=maketime( 23, 59, 59, $today_info.month | inc, 0, $today_info.year ) 32 time_published=maketime( 0, 0, 0, $today_info.month, 1, $today_info.year )} 33 {/case} 34 {case match=3} 35 {let current_node=cond( $module_result.content_info.node_id, fetch( content, node, hash( node_id, $module_result.content_info.node_id ) ), 36 false() )} 37 {set today_info=cond( and( $current_node, $class_identifier_list|contains( $current_node.object.class_identifier ) ), 38 $current_node.object.published, 39 currentdate() )|gettime 40 time_start=maketime( 0, 0, 0, $today_info.month, 1, $today_info.year ) 41 time_end=maketime( 23, 59, 59, $today_info.month | inc, 0, $today_info.year ) 42 time_published=maketime( 0, 0, 0, $today_info.month, $today_info.day, $today_info.year ) 43 time_current=maketime( 0, 0, 0, $today_info.month, $today_info.day, $today_info.year ) 44 cache_keys=false()} 45 {/let} 46 {/case} 47 {case} 48 {set today_info=currentdate()|gettime() 49 time_start=maketime( 0, 0, 0, $today_info.month, 1, $today_info.year ) 50 time_end=maketime( 23, 59, 59, $today_info.month | inc, 0, $today_info.year ) 51 time_published=maketime( 0, 0, 0, $today_info.month, $today_info.day, $today_info.year ) 52 time_current=maketime( 0, 0, 0, $today_info.month, $today_info.day, $today_info.year ) 53 cache_keys=false()} 54 {/case} 55 {/switch} 56 57 {* Expire the content cache twice a day, 58 This is required because of the current day marking *} 59 {*{cache-block keys=$cache_keys expiry=mul( 60, 60, 12 ) subtree_expiry=$show_subtree}*} 60 61 <div class="toolbox"> 62 <div class="toolbox-design"> 63 <h2>{'Calendar'|i18n( 'design/standard/toolbar' )}</h2> 64 65 <div class="toolbox-content"> 66 {* {let log_node_id=$module_result.content_info.node_id *} 67 {* log_node=fetch( content, node, hash( node_id, $log_node_id ) ) *} 68 {let foo_node=fetch( content, node, hash( node_id, $module_result.node_id ) ) } 69 {let log_node=fetch( content, node, hash( node_id, $show_subtree ) ) 70 show_week=false() 71 month_list=null 72 month=null} 73 {section show=and( is_set( $log_node), eq( $foo_node.url_alias, $log_node.url_alias ) ) } 74 {set month_list=fetch( content, calendar, hash( parent_node_id,$log_node.node_id, 75 class_filter_type, include, 76 class_filter_array, $class_identifier_list, 77 attribute_filter, array( and, array( 'published', '>=', 78 $time_start ), 79 array( 'published', '<=', 80 $time_end ) ), 81 group_by, array( "published", "day" ) ) ) 82 month=$month_list|month_overview( 'published', $time_published, 83 hash( current, $time_current, 84 current_class, 'selected', 85 today_class, 'today', 86 link, $log_node.url_alias, 87 month_link, true(), year_link, true(), day_link, true(), 88 next, hash( link, $log_node.url_alias ), 89 previous, hash( link, $log_node.url_alias ) ) )} 90 {include name=Month uri="design:navigator/monthview.tpl" month=$month show_week=$show_week} 91 {section-else} 92 {set month_list=fetch( content, calendar, hash( parent_node_id,2, 93 class_filter_type, include, 94 class_filter_array, $class_identifier_list, 95 attribute_filter, array( and, array( 'published', '>=', 96 $time_start ), 97 array( 'published', '<=', 98 $time_end ) ), 99 group_by, array( "published", "day" ) ) ) 100 month=$month_list|month_overview( 'published', $time_published, 101 hash( current, $time_current, 102 current_class, 'selected', 103 today_class, 'today', 104 link, $foo_node.url_alias, 105 month_link, true(), year_link, true(), day_link, true(), 106 next, hash( link, $foo_node.url_alias ), 107 previous, hash( link, $foo_node.url_alias ) ) )} 108 {include name=Month uri="design:navigator/monthview.tpl" month=$month show_week=$show_week} 109 {/section} 110 {/let} 111 {/let} 112 </div> 113 </div> 114 </div> 115 116 117 {*{cache-block}*} 118 119 {/let} 120 121 {/section} 122 </div> 123
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 |