[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 <div id="leftmenu"> 2 <div id="leftmenu-design"> 3 <div class="objectinfo"> 4 <div class="box-header"><div class="box-tc"><div class="box-ml"><div class="box-mr"><div class="box-tl"><div class="box-tr"> 5 <h4>{'Object information'|i18n( 'design/admin/content/history' )}</h4> 6 </div></div></div></div></div></div> 7 8 <div class="box-bc"><div class="box-ml"><div class="box-mr"><div class="box-bl"><div class="box-br"><div class="box-content"> 9 10 {* Object ID *} 11 <p> 12 <label>{'ID'|i18n( 'design/admin/content/history' )}:</label> 13 {$object.id} 14 </p> 15 16 {* Created *} 17 <p> 18 <label>{'Created'|i18n( 'design/admin/content/history' )}:</label> 19 {section show=$object.published} 20 {$object.published|l10n( shortdatetime )}<br /> 21 {$object.current.creator.name|wash} 22 {section-else} 23 {'Not yet published'|i18n( 'design/admin/content/history' )} 24 {/section} 25 </p> 26 27 {* Modified *} 28 <p> 29 <label>{'Modified'|i18n( 'design/admin/content/history' )}:</label> 30 {section show=$object.modified} 31 {$object.modified|l10n( shortdatetime )}<br /> 32 {fetch( content, object, hash( object_id, $object.content_class.modifier_id ) ).name|wash} 33 {section-else} 34 {'Not yet published'|i18n( 'design/admin/content/history' )} 35 {/section} 36 </p> 37 38 {* Published version*} 39 <p> 40 <label>{'Published version'|i18n( 'design/admin/content/history' )}:</label> 41 {section show=$object.published} 42 {$object.current_version} 43 {section-else} 44 {'Not yet published'|i18n( 'design/admin/content/history' )} 45 {/section} 46 </p> 47 48 </div></div></div></div></div></div> 49 50 </div> 51 52 </div> 53 </div> 54 55 <div id="maincontent"><div id="fix"> 56 <div id="maincontent-design"> 57 <!-- Maincontent START --> 58 59 {switch match=$edit_warning} 60 {case match=1} 61 <div class="message-warning"> 62 <h2><span class="time">[{currentdate()|l10n( shortdatetime )}]</span> {'Version not a draft'|i18n( 'design/admin/content/history' )}</h2> 63 <ul> 64 <li>{'Version %1 is not available for editing anymore, only drafts can be edited.'|i18n( 'design/admin/content/history',, array( $edit_version ) )}</li> 65 <li>{'To edit this version create a copy of it.'|i18n( 'design/admin/content/history' )}</li> 66 </ul> 67 </div> 68 {/case} 69 {case match=2} 70 <div class="message-warning"> 71 <h2><span class="time">[{currentdate()|l10n( shortdatetime )}]</span> {'Version not yours'|i18n( 'design/admin/content/history' )}</h2> 72 <ul> 73 <li>{'Version %1 was not created by you, only your own drafts can be edited.'|i18n( 'design/admin/content/history',, array( $edit_version ) )}</li> 74 <li>{'To edit this version create a copy of it.'|i18n( 'design/admin/content/history' )}</li> 75 </ul> 76 </div> 77 {/case} 78 {case match=3} 79 <div class="message-warning"> 80 <h2><span class="time">[{currentdate()|l10n( shortdatetime )}]</span> {'Unable to create new version'|i18n( 'design/admin/content/history' )}</h2> 81 <ul> 82 <li>{'Version history limit has been exceeded and no archived version can be removed by the system.'|i18n( 'design/admin/content/history' )}</li> 83 <li>{'You can change your version history settings in content.ini, remove draft versions or edit existing drafts.'|i18n( 'design/admin/content/history' )}</li> 84 </ul> 85 </div> 86 {/case} 87 {case} 88 {/case} 89 {/switch} 90 91 92 {def $page_limit=30 93 $version_list=fetch(content,version_list,hash(contentobject, $object,limit,$page_limit,offset,$view_parameters.offset)) 94 $list_count=fetch(content,version_count, hash(contentobject, $object))} 95 96 <form name="versionsform" action={concat( '/content/history/', $object.id, '/' )|ezurl} method="post"> 97 98 <div class="context-block"> 99 100 {* DESIGN: Header START *}<div class="box-header"><div class="box-tc"><div class="box-ml"><div class="box-mr"><div class="box-tl"><div class="box-tr"> 101 <h1 class="context-title">{'Versions for <%object_name> [%version_count]'|i18n( 'design/admin/content/history',, hash( '%object_name', $object.name, '%version_count', $version_list|count ) )|wash}</h1> 102 {* DESIGN: Mainline *}<div class="header-mainline"></div> 103 {* DESIGN: Header END *}</div></div></div></div></div></div> 104 {* DESIGN: Content START *}<div class="box-ml"><div class="box-mr"><div class="box-content"> 105 106 {if $version_list} 107 <table class="list" cellspacing="0"> 108 <tr> 109 <th class="tight"><img src={'toggle-button-16x16.gif'|ezimage} alt="Toggle selection" onclick="ezjs_toggleCheckboxes( document.versionsform, 'DeleteIDArray[]' ); return false;" /></th> 110 <th>{'Version'|i18n( 'design/admin/content/history' )}</th> 111 <th>{'Status'|i18n( 'design/admin/content/history' )}</th> 112 <th>{'Edited language'i18n( 'design/admin/content/history' )}</th> 113 <th>{'Creator'|i18n( 'design/admin/content/history' )}</th> 114 <th>{'Created'|i18n( 'design/admin/content/history' )}</th> 115 <th>{'Modified'|i18n( 'design/admin/content/history' )}</th> 116 <th class="tight"> </th> 117 <th class="tight"> </th> 118 </tr> 119 120 121 {foreach $version_list as $version 122 sequence array( bglight, bgdark ) as $seq 123 } 124 125 {def $initial_language = $version.initial_language} 126 <tr class="{$seq}"> 127 128 {* Remove. *} 129 <td> 130 {if and($version.can_remove,or( eq( $version.status, 0 ),eq( $version.status, 3), eq( $version.status, 4 ) ))} 131 <input type="checkbox" name="DeleteIDArray[]" value="{$version.id}" title="{'Select version #%version_number for removal.'|i18n( 'design/admin/content/history',, hash( '%version_number', $version.version ) )}" /> 132 {else} 133 <input type="checkbox" name="" value="" disabled="disabled" title="{'Version #%version_number can not be removed because it is either the published version of the object or because you do not have permissions to remove it.'|i18n( 'design/admin/content/history',, hash( '%version_number', $version.version ) )}" /> 134 {/if} 135 </td> 136 137 {* Version/view. *} 138 <td><a href={concat( '/content/versionview/', $object.id, '/', $version.version, '/', $initial_language.locale )|ezurl} title="{'View the contents of version #%version_number. Translation: %translation.'|i18n( 'design/admin/content/history',, hash( '%version_number', $version.version, '%translation', $initial_language.name ) )}">{$version.version}</a></td> 139 140 {* Status. *} 141 <td>{$version.status|choose( 'Draft'|i18n( 'design/admin/content/history' ), 'Published'|i18n( 'design/admin/content/history' ), 'Pending'|i18n( 'design/admin/content/history' ), 'Archived'|i18n( 'design/admin/content/history' ), 'Rejected'|i18n( 'design/admin/content/history' ), 'Untouched draft'|i18n( 'design/admin/content/history' ) )}</td> 142 143 {* Edited language. *} 144 <td> 145 <img src="{$initial_language.locale|flag_icon}" alt="{$initial_language.locale}" /> <a href={concat('/content/versionview/', $object.id, '/', $version.version, '/', $initial_language.locale, '/' )|ezurl} title="{'View the contents of version #%version_number. Translation: %translation.'|i18n( 'design/admin/content/history',, hash( '%translation', $initial_language.name, '%version_number', $version.version ) )}" >{$initial_language.name|wash}</a> 146 </td> 147 148 {* Creator. *} 149 <td>{$version.creator.name|wash}</td> 150 151 {* Created. *} 152 <td>{$version.created|l10n( shortdatetime )}</td> 153 154 {* Modified. *} 155 <td>{$version.modified|l10n( shortdatetime )}</td> 156 157 {* Copy button. *} 158 <td align="right" class="right"> 159 {def $can_edit_lang = 0} 160 {foreach $object.can_edit_languages as $edit_language} 161 {if eq( $edit_language.id, $initial_language.id )} 162 {set $can_edit_lang = 1} 163 {/if} 164 {/foreach} 165 166 {if and( $can_edit, $can_edit_lang )} 167 <input type="hidden" name="CopyVersionLanguage[{$version.version}]" value="{$initial_language.locale}" /> 168 <input type="image" src={'copy.gif'|ezimage} name="HistoryCopyVersionButton[{$version.version}]" value="" title="{'Create a copy of version #%version_number.'|i18n( 'design/admin/content/history',, hash( '%version_number', $version.version ) )}" /> 169 {else} 170 <input type="image" src={'copy-disabled.gif'|ezimage} name="" value="" disabled="disabled" title="{'You can not make copies of versions because you do not have permissions to edit the object.'|i18n( 'design/admin/content/history' )}" /> 171 {/if} 172 {undef $can_edit_lang} 173 </td> 174 175 {* Edit button. *} 176 <td> 177 {if and( array(0, 5)|contains($version.status), $version.creator_id|eq( $user_id ), $can_edit ) } 178 <input type="image" src={'edit.gif'|ezimage} name="HistoryEditButton[{$version.version}]" value="" title="{'Edit the contents of version #%version_number.'|i18n( 'design/admin/content/history',, hash( '%version_number', $version.version ) )}" /> 179 {else} 180 <input type="image" src={'edit-disabled.gif'|ezimage} name="HistoryEditButton[{$version.version}]" value="" disabled="disabled" title="{'You can not edit the contents of version #%version_number either because it is not a draft or because you do not have permissions to edit the object.'|i18n( 'design/admin/content/history',, hash( '%version_number', $version.version ) )}" /> 181 {/if} 182 </td> 183 184 </tr> 185 {undef $initial_language} 186 {/foreach} 187 </table> 188 {else} 189 <div class="block"> 190 <p>{'This object does not have any versions.'|i18n( 'design/admin/content/history' )}</p> 191 </div> 192 {/if} 193 194 <div class="context-toolbar"> 195 {include name=navigator 196 uri='design:navigator/google.tpl' 197 page_uri=concat( '/content/history/', $object.id, '///' ) 198 item_count=$list_count 199 view_parameters=$view_parameters 200 item_limit=$page_limit} 201 </div> 202 203 {* DESIGN: Content END *}</div></div></div> 204 205 <div class="controlbar"> 206 {* DESIGN: Control bar START *}<div class="box-bc"><div class="box-ml"><div class="box-mr"><div class="box-tc"><div class="box-bl"><div class="box-br"> 207 208 <div class="block"> 209 <div class="left"> 210 <input class="button" type="submit" name="RemoveButton" value="{'Remove selected'|i18n( 'design/admin/content/history' )}" title="{'Remove the selected versions from the object.'|i18n( 'design/admin/content/history' )}" /> 211 <input type="hidden" name="DoNotEditAfterCopy" value="" /> 212 </div> 213 {if $object.can_diff} 214 {def $languages=$object.languages} 215 <div class="right"> 216 <form action={concat( $module.functions.history.uri, '/', $object.id, '/' )|ezurl} method="post"> 217 <select name="Language"> 218 {foreach $languages as $lang} 219 <option value="{$lang.locale}">{$lang.name|wash}</option> 220 {/foreach} 221 </select> 222 <select name="FromVersion"> 223 {foreach $object.versions as $ver} 224 <option {if eq( $ver.version, $selectOldVersion)}selected="selected"{/if} value="{$ver.version}">{$ver.version|wash}</option> 225 {/foreach} 226 </select> 227 <select name="ToVersion"> 228 {foreach $object.versions as $ver} 229 <option {if eq( $ver.version, $selectNewVersion)}selected="selected"{/if} value="{$ver.version}">{$ver.version|wash}</option> 230 {/foreach} 231 </select> 232 <input type="hidden" name="ObjectID" value="{$object.id}" /> 233 <input class="button" type="submit" name="DiffButton" value="{'Show differences'|i18n( 'design/admin/content/history' )}" /> 234 </form> 235 </div> 236 {/if} 237 238 <div class="break"></div> 239 240 241 <div class="block"> 242 <div class="left"> 243 <form name="versionsback" action={concat( '/content/history/', $object.id, '/' )|ezurl} method="post"> 244 {if is_set( $redirect_uri )} 245 <input class="text" type="hidden" name="RedirectURI" value="{$redirect_uri}" /> 246 {/if} 247 <input class="button" type="submit" name="BackButton" value="{'Back'|i18n( 'design/admin/content/history' )}" /> 248 </form> 249 250 </div> 251 </div> 252 253 254 <div class="break"></div> 255 256 </div> 257 258 {* DESIGN: Control bar END *}</div></div></div></div></div></div> 259 260 </div> 261 262 </div> 263 264 {if and( is_set( $object ), is_set( $diff ), is_set( $oldVersion ), is_set( $newVersion ) )|not} 265 {* Published context block start *} 266 {* Published window. *} 267 <div class="context-block"> 268 {* DESIGN: Header START *}<div class="box-header"><div class="box-tc"><div class="box-ml"><div class="box-mr"><div class="box-tl"><div class="box-tr"> 269 <h2 class="context-title">{'Published version'|i18n( 'design/admin/content/history' )}</h2> 270 {* DESIGN: Subline *}<div class="header-subline"></div> 271 {* DESIGN: Header END *}</div></div></div></div></div></div> 272 {* DESIGN: Content START *}<div class="box-bc"><div class="box-ml"><div class="box-mr"><div class="box-bl"><div class="box-br"><div class="box-content"> 273 274 275 <table class="list" cellspacing="0"> 276 <tr> 277 <th>{'Version'|i18n( 'design/admin/content/history' )}</th> 278 <th>{"Translations"|i18n("design/admin/content/history")}</th> 279 <th>{'Creator'|i18n( 'design/admin/content/history' )}</th> 280 <th>{'Created'|i18n( 'design/admin/content/history' )}</th> 281 <th>{'Modified'|i18n( 'design/admin/content/history' )}</th> 282 <th class="tight">{'Copy translation'|i18n( 'design/admin/content/history' )}</th> 283 <th class="tight"> </th> 284 </tr> 285 286 {def $published_item=$object.current 287 $initial_language = $published_item.initial_language} 288 <tr> 289 290 {* Version/view. *} 291 <td><a href={concat( '/content/versionview/', $object.id, '/', $published_item.version, '/', $initial_language.locale )|ezurl} title="{'View the contents of version #%version_number. Translation: %translation.'|i18n( 'design/admin/content/history',, hash( '%version_number', $published_item.version, '%translation', $initial_language.name ) )}">{$published_item.version}</a></td> 292 293 {* Translations *} 294 <td> 295 {foreach $published_item.language_list as $lang} 296 {delimiter}<br />{/delimiter} 297 <img src="{$lang.language_code|flag_icon}" alt="{$lang.language_code|wash}" /> 298 <a href={concat("/content/versionview/",$object.id,"/",$published_item.version,"/",$lang.language_code,"/")|ezurl}>{$lang.locale.intl_language_name|wash}</a> 299 {/foreach} 300 </td> 301 302 {* Creator. *} 303 <td>{$published_item.creator.name|wash}</td> 304 305 {* Created. *} 306 <td>{$published_item.created|l10n( shortdatetime )}</td> 307 308 {* Modified. *} 309 <td>{$published_item.modified|l10n( shortdatetime )}</td> 310 311 {* Copy translation list. *} 312 <td align="right" class="right"> 313 <select name="CopyVersionLanguage[{$published_item.version}]"> 314 {foreach $published_item.language_list as $lang_list} 315 <option value="{$lang_list.language_code}"{if $lang_list.language_code|eq($published_item.initial_language.locale)} selected="selected"{/if}>{$lang_list.locale.intl_language_name|wash}</option> 316 {/foreach} 317 </select> 318 </td> 319 320 {* Copy button *} 321 <td> 322 {def $can_edit_lang = 0} 323 {foreach $object.can_edit_languages as $edit_language} 324 {if eq( $edit_language.id, $initial_language.id )} 325 {set $can_edit_lang = 1} 326 {/if} 327 {/foreach} 328 329 {if and( $can_edit, $can_edit_lang )} 330 <input type="image" src={'copy.gif'|ezimage} name="HistoryCopyVersionButton[{$published_item.version}]" value="" /> 331 {else} 332 <input type="image" src={'copy-disabled.gif'|ezimage} name="" value="" disabled="disabled" title="{'You can not make copies of versions because you do not have permissions to edit the object.'|i18n( 'design/admin/content/history' )}" /> 333 {/if} 334 {undef $can_edit_lang} 335 </td> 336 337 </tr> 338 {undef $initial_language} 339 </table> 340 341 {* DESIGN: Content END *}</div></div></div></div></div></div> 342 </div> 343 {* Published context block end *} 344 345 {* New drafts context block *} 346 {* Drafts window. *} 347 <div class="context-block"> 348 {* DESIGN: Header START *}<div class="box-header"><div class="box-tc"><div class="box-ml"><div class="box-mr"><div class="box-tl"><div class="box-tr"> 349 <h2 class="context-title">{'New drafts [%newerDraftCount]'|i18n( 'design/admin/content/history',, hash( '%newerDraftCount', $newerDraftVersionListCount ) )}</h2> 350 {* DESIGN: Subline *}<div class="header-subline"></div> 351 {* DESIGN: Header END *}</div></div></div></div></div></div> 352 {* DESIGN: Content START *}<div class="box-bc"><div class="box-ml"><div class="box-mr"><div class="box-bl"><div class="box-br"><div class="box-content"> 353 354 {if $newerDraftVersionList|count|ge(1)} 355 <table class="list" cellspacing="0"> 356 <tr> 357 <th>{'Version'|i18n( 'design/admin/content/history' )}</th> 358 <th>{'Edited language'i18n( 'design/admin/content/history' )}</th> 359 <th>{'Creator'|i18n( 'design/admin/content/history' )}</th> 360 <th>{'Created'|i18n( 'design/admin/content/history' )}</th> 361 <th>{'Modified'|i18n( 'design/admin/content/history' )}</th> 362 <th class="tight"> </th> 363 <th class="tight"> </th> 364 </tr> 365 366 {foreach $newerDraftVersionList as $draft_version 367 sequence array( bglight, bgdark ) as $seq} 368 {def $initial_language = $draft_version.initial_language} 369 <tr class="{$seq}"> 370 371 {* Version/view. *} 372 <td><a href={concat( '/content/versionview/', $object.id, '/', $draft_version.version, '/', $initial_language.locale )|ezurl} title="{'View the contents of version #%version_number. Translation: %translation.'|i18n( 'design/admin/content/history',, hash( '%version_number', $draft_version.version, '%translation', $initial_language.name ) )}">{$draft_version.version}</a></td> 373 374 {* Edited language. *} 375 <td> 376 <img src="{$initial_language.locale|flag_icon}" alt="{$initial_language.locale}" /> <a href={concat('/content/versionview/', $object.id, '/', $draft_version.version, '/', $initial_language.locale, '/' )|ezurl} title="{'View the contents of version #%version_number. Translation: %translation.'|i18n( 'design/admin/content/history',, hash( '%translation', $initial_language.name, '%version_number', $draft_version.version ) )}" >{$initial_language.name|wash}</a> 377 </td> 378 379 {* Creator. *} 380 <td>{$draft_version.creator.name|wash}</td> 381 382 {* Created. *} 383 <td>{$draft_version.created|l10n( shortdatetime )}</td> 384 385 {* Modified. *} 386 <td>{$draft_version.modified|l10n( shortdatetime )}</td> 387 388 {* Copy button. *} 389 <td align="right" class="right"> 390 {def $can_edit_lang = 0} 391 {foreach $object.can_edit_languages as $edit_language} 392 {if eq( $edit_language.id, $initial_language.id )} 393 {set $can_edit_lang = 1} 394 {/if} 395 {/foreach} 396 397 {if and( $can_edit, $can_edit_lang )} 398 <input type="hidden" name="CopyVersionLanguage[{$draft_version.version}]" value="{$initial_language.locale}" /> 399 <input type="image" src={'copy.gif'|ezimage} name="HistoryCopyVersionButton[{$draft_version.version}]" value="" title="{'Create a copy of version #%version_number.'|i18n( 'design/admin/content/history',, hash( '%version_number', $draft_version.version ) )}" /> 400 {else} 401 <input type="image" src={'copy-disabled.gif'|ezimage} name="" value="" disabled="disabled" title="{'You can not make copies of versions because you do not have permissions to edit the object.'|i18n( 'design/admin/content/history' )}" /> 402 {/if} 403 {undef $can_edit_lang} 404 </td> 405 406 {* Edit button. *} 407 <td> 408 {if and( array(0, 5)|contains($draft_version.status), $draft_version.creator_id|eq( $user_id ), $can_edit ) } 409 <input type="image" src={'edit.gif'|ezimage} name="HistoryEditButton[{$draft_version.version}]" value="" title="{'Edit the contents of version #%version_number.'|i18n( 'design/admin/content/history',, hash( '%version_number', $draft_version.version ) )}" /> 410 {else} 411 <input type="image" src={'edit-disabled.gif'|ezimage} name="HistoryEditButton[{$draft_version.version}]" disabled="disabled" value="" title="{'You can not edit the contents of version #%version_number either because it is not a draft or because you do not have permissions to edit the object.'|i18n( 'design/admin/content/history',, hash( '%version_number', $draft_version.version ) )}" /> 412 {/if} 413 </td> 414 415 </tr> 416 {undef $initial_language} 417 {/foreach} 418 </table> 419 {else} 420 <div class="block"> 421 <p>{'This object does not have any drafts.'|i18n( 'design/admin/content/history' )}</p> 422 </div> 423 {/if} 424 425 {* DESIGN: Content END *}</div></div></div></div></div></div> 426 </div> 427 428 </form> 429 430 {elseif and( is_set( $object ), is_set( $diff ), is_set( $oldVersion ), is_set( $newVersion ) )} 431 {literal} 432 <script type="text/javascript"> 433 function show( element, method ) 434 { 435 document.getElementById( element ).className = method; 436 } 437 </script> 438 {/literal} 439 {* DESIGN: Header START *}<div class="box-header"><div class="box-tc"><div class="box-ml"><div class="box-mr"><div class="box-tl"><div class="box-tr"> 440 <h2 class="context-title">{'Differences between versions %oldVersion and %newVersion'|i18n( 'design/admin/content/history',, hash( '%oldVersion', $oldVersion, '%newVersion', $newVersion ) )}</h2> 441 {* DESIGN: Mainline *}<div class="header-subline"></div> 442 {* DESIGN: Header END *}</div></div></div></div></div></div> 443 <div class="box-bc"><div class="box-ml"><div class="box-mr"><div class="box-bl"><div class="box-br"><div class="box-content"> 444 445 <div id="diffview"> 446 447 <script type="text/javascript"> 448 document.write('<div class="context-toolbar"><div class="block"><ul><li><a href="#" onclick="show(\'diffview\', \'previous\'); return false;">{'Old version'|i18n( 'design/admin/content/history' )}</a></li><li><a href="#" onclick="show(\'diffview\', \'inlinechanges\'); return false;">{'Inline changes'|i18n( 'design/admin/content/history' )}</a></li><li><a href="#" onclick="show(\'diffview\', \'blockchanges\'); return false;">{'Block changes'|i18n( 'design/admin/content/history' )}</a></li><li><a href="#" onclick="show(\'diffview\', \'latest\'); return false;">{'New version'|i18n( 'design/admin/content/history' )}</a></li></ul></div></div>'); 449 </script> 450 451 {foreach $object.data_map as $attr} 452 <div class="block"> 453 <label>{$attr.contentclass_attribute.name}:</label> 454 <div class="attribute-view-diff"> 455 {attribute_diff_gui view=diff attribute=$attr old=$oldVersion new=$newVersion diff=$diff[$attr.contentclassattribute_id]} 456 </div> 457 </div> 458 {/foreach} 459 460 </div> 461 462 </div></div></div></div></div></div> 463 464 <div class="block"> 465 <div class="left"> 466 <form action={concat( '/content/history/', $object.id, '/' )|ezurl} method="post"> 467 <input class="button" type="submit" value="{'Back to history'|i18n( 'design/admin/content/history' )}" /> 468 </form> 469 </div> 470 </div> 471 {/if} 472 473 <!-- Maincontent END --> 474 </div> 475 <div class="break"></div> 476 </div></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 |