Changeset 2276
- Timestamp:
- Mar 12, 2008, 2:06:50 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/site_update.php
r2114 r2276 3 3 // | PhpWebGallery - a PHP based picture gallery | 4 4 // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net | 5 // | Copyright (C) 2003-200 7PhpWebGallery Team - http://phpwebgallery.net |5 // | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net | 6 6 // +-----------------------------------------------------------------------+ 7 7 // | file : $Id$ … … 352 352 } 353 353 354 $template-> output .='<!-- scanning dirs : '354 $template->append('footer_elements', '<!-- scanning dirs : ' 355 355 . get_elapsed_time($start, get_moment()) 356 . ' -->' ."\n";356 . ' -->' ); 357 357 } 358 358 // +-----------------------------------------------------------------------+ … … 366 366 367 367 $fs = $site_reader->get_elements($basedir); 368 $template-> output .='<!-- get_elements: '368 $template->append('footer_elements', '<!-- get_elements: ' 369 369 . get_elapsed_time($start, get_moment()) 370 . " -->\n";370 . ' -->' ); 371 371 372 372 $cat_ids = array_diff(array_keys($db_categories), $to_delete); … … 582 582 } 583 583 584 $template-> output .='<!-- scanning files : '584 $template->append('footer_elements', '<!-- scanning files : ' 585 585 . get_elapsed_time($start_files, get_moment()) 586 . ' -->' ."\n";586 . ' -->' ); 587 587 588 588 // retrieving informations given by uploaders … … 654 654 $start = get_moment(); 655 655 update_category('all'); 656 $template-> output .='<!-- update_category(all) : '656 $template->append('footer_elements', '<!-- update_category(all) : ' 657 657 . get_elapsed_time($start,get_moment()) 658 . ' -->' ."\n";658 . ' -->' ); 659 659 $start = get_moment(); 660 660 ordering(); 661 661 update_global_rank(); 662 $template-> output .='<!-- ordering categories : '662 $template->append('footer_elements', '<!-- ordering categories : ' 663 663 . get_elapsed_time($start, get_moment()) 664 . ' -->' ."\n";664 . ' -->'); 665 665 } 666 666 … … 681 681 $opts['recursive'], 682 682 false); 683 $template-> output .='<!-- get_filelist : '683 $template->append('footer_elements', '<!-- get_filelist : ' 684 684 . get_elapsed_time($start, get_moment()) 685 . ' -->' ."\n";685 . ' -->'); 686 686 $start = get_moment(); 687 687 … … 727 727 ); 728 728 } 729 $template-> output .='<!-- update files : '729 $template->append('footer_elements', '<!-- update files : ' 730 730 . get_elapsed_time($start,get_moment()) 731 . ' -->' ."\n";731 . ' -->'); 732 732 }// end if sync files 733 733 } … … 739 739 and ($_POST['sync'] == 'dirs' or $_POST['sync'] == 'files')) 740 740 { 741 $template->assign _block_vars(741 $template->assign( 742 742 'update_result', 743 743 array( … … 783 783 $opts['only_new']); 784 784 785 $template-> output .='<!-- get_filelist : '785 $template->append('footer_elements', '<!-- get_filelist : ' 786 786 . get_elapsed_time($start, get_moment()) 787 . ' -->' ."\n";787 . ' -->'); 788 788 789 789 $start = get_moment(); … … 880 880 } 881 881 882 $template-> output .='<!-- metadata update : '882 $template->append('footer_elements', '<!-- metadata update : ' 883 883 . get_elapsed_time($start, get_moment()) 884 . ' -->' ."\n";885 886 $template->assign _block_vars(884 . ' -->'); 885 886 $template->assign( 887 887 'metadata_result', 888 888 array( … … 911 911 } 912 912 913 $template->assign _vars(913 $template->assign( 914 914 array( 915 915 'SITE_URL'=>$site_url, 916 'U_SITE_MANAGER'=> PHPWG_ROOT_PATH.'admin.php?page=site_manager',916 'U_SITE_MANAGER'=> get_root_url().'admin.php?page=site_manager', 917 917 'L_RESULT_UPDATE'=>$result_title.l10n('update_part_research'), 918 918 'L_RESULT_METADATA'=>$result_title.l10n('update_result_metadata'), 919 'METADATA_LIST' => $used_metadata 919 'METADATA_LIST' => $used_metadata, 920 'U_HELP' => get_root_url().'popuphelp.php?page=synchronize', 920 921 )); 921 922 922 $template->assign_vars(923 array(924 'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=synchronize'925 )926 );927 923 // +-----------------------------------------------------------------------+ 928 924 // | introduction : choices | … … 930 926 if (!isset($_POST['submit']) or (isset($simulate) and $simulate)) 931 927 { 932 $template->assign_block_vars('introduction', array());933 934 928 if (isset($simulate) and $simulate) 935 929 { 936 switch ($_POST['sync']) 937 { 938 case 'dirs' : 939 { 940 $template->assign_vars( 941 array('SYNC_DIRS_CHECKED'=>'checked="checked"')); 942 break; 943 } 944 case 'files' : 945 { 946 $template->assign_vars( 947 array('SYNC_ALL_CHECKED'=>'checked="checked"')); 948 break; 949 } 950 case 'metadata_new' : 951 { 952 $template->assign_vars( 953 array('SYNC_META_NEW_CHECKED'=>'checked="checked"')); 954 break; 955 } 956 case 'metadata_all' : 957 { 958 $template->assign_vars( 959 array('SYNC_META_ALL_CHECKED'=>'checked="checked"')); 960 break; 961 } 962 } 963 964 if (isset($_POST['display_info']) and $_POST['display_info'] == 1) 965 { 966 $template->assign_vars( 967 array('DISPLAY_INFO_CHECKED'=>'checked="checked"')); 968 } 969 970 if (isset($_POST['add_to_caddie']) and $_POST['add_to_caddie'] == 1) 971 { 972 $template->assign_vars( 973 array('ADD_TO_CADDIE_CHECKED'=>'checked="checked"')); 974 } 975 976 if (isset($_POST['subcats-included']) and $_POST['subcats-included'] == 1) 977 { 978 $template->assign_vars( 979 array('SUBCATS_INCLUDED_CHECKED'=>'checked="checked"')); 980 } 930 $tpl_introduction = array( 931 'sync' => $_POST['sync'], 932 'display_info' => isset($_POST['display_info']) and $_POST['display_info']==1, 933 'add_to_caddie' => isset($_POST['add_to_caddie']) and $_POST['add_to_caddie']==1, 934 'subcats_included' => isset($_POST['subcats-included']) and $_POST['subcats-included']==1, 935 ); 981 936 982 937 if (isset($_POST['cat']) and is_numeric($_POST['cat'])) … … 991 946 else 992 947 { 993 $template->assign_vars( 994 array('SYNC_DIRS_CHECKED' => 'checked="checked"', 995 'SUBCATS_INCLUDED_CHECKED'=>'checked="checked"')); 948 $tpl_introduction = array( 949 'sync' => 'dirs', 950 'display_info' => false, 951 'add_to_caddie' => false, 952 'subcats_included' => true, 953 ); 996 954 997 955 $cat_selected = array(); 998 956 } 957 958 $template->assign('introduction', $tpl_introduction); 999 959 1000 960 $query = ' … … 1005 965 display_select_cat_wrapper($query, 1006 966 $cat_selected, 1007 ' introduction.category_option',967 'category_options', 1008 968 false); 1009 969 } … … 1011 971 if (count($errors) > 0) 1012 972 { 1013 $template->assign_block_vars('sync_errors', array());1014 973 foreach ($errors as $error) 1015 974 { 1016 $template->a ssign_block_vars(1017 'sync_errors .error',975 $template->append( 976 'sync_errors', 1018 977 array( 1019 978 'ELEMENT' => $error['path'], … … 1024 983 foreach ($error_labels as $error_type=>$error_description) 1025 984 { 1026 $template->a ssign_block_vars(1027 'sync_error s.error_caption',985 $template->append( 986 'sync_error_captions', 1028 987 array( 1029 988 'TYPE' => $error_type, … … 1031 990 )); 1032 991 } 1033 1034 } 992 } 993 1035 994 if (count($infos) > 0 1036 995 and isset($_POST['display_info']) 1037 996 and $_POST['display_info'] == 1) 1038 997 { 1039 $template->assign_block_vars('sync_infos', array());1040 998 foreach ($infos as $info) 1041 999 { 1042 $template->a ssign_block_vars(1043 'sync_infos .info',1000 $template->append( 1001 'sync_infos', 1044 1002 array( 1045 1003 'ELEMENT' => $info['path'], -
trunk/template/yoga/admin/site_update.tpl
r2222 r2276 1 <!-- DEV TAG: not smarty migrated --> 2 <!-- $Id$ --> 1 {* $Id$ *} 3 2 4 3 <div class="titrePage"> 5 4 <ul class="categoryActions"> 6 <li><a href="{ U_HELP}" onclick="popuphelp(this.href); return false;" title="{lang:Help}"><img src="{themeconf:icon_dir}/help.png" class="button" alt="(?)"></a></li>5 <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/help.png" class="button" alt="(?)"></a></li> 7 6 </ul> 8 <h2>{ lang:title_update}: <a href="{SITE_URL}">{SITE_URL}</a></h2>7 <h2>{'title_update'|@translate}: <a href="{$SITE_URL}">{$SITE_URL}</a></h2> 9 8 </div> 10 9 11 <!-- BEGIN update_result --> 12 <h3>{ L_RESULT_UPDATE}</h3>10 {if isset($update_result)} 11 <h3>{$L_RESULT_UPDATE}</h3> 13 12 <ul> 14 <li class="update_summary_new">{ update_result.NB_NEW_CATEGORIES} {lang:update_nb_new_categories}</li>15 <li class="update_summary_new">{ update_result.NB_NEW_ELEMENTS} {lang:update_nb_new_elements}</li>16 <li class="update_summary_del">{ update_result.NB_DEL_CATEGORIES} {lang:update_nb_del_categories}</li>17 <li class="update_summary_del">{ update_result.NB_DEL_ELEMENTS} {lang:update_nb_del_elements}</li>18 <li>{ update_result.NB_UPD_ELEMENTS} {lang:update_nb_upd_elements}</li>19 <li class="update_summary_err">{ update_result.NB_ERRORS} {lang:update_nb_errors}</li>13 <li class="update_summary_new">{$update_result.NB_NEW_CATEGORIES} {'update_nb_new_categories'|@translate}</li> 14 <li class="update_summary_new">{$update_result.NB_NEW_ELEMENTS} {'update_nb_new_elements'|@translate}</li> 15 <li class="update_summary_del">{$update_result.NB_DEL_CATEGORIES} {'update_nb_del_categories'|@translate}</li> 16 <li class="update_summary_del">{$update_result.NB_DEL_ELEMENTS} {'update_nb_del_elements'|@translate}</li> 17 <li>{$update_result.NB_UPD_ELEMENTS} {'update_nb_upd_elements'|@translate}</li> 18 <li class="update_summary_err">{$update_result.NB_ERRORS} {'update_nb_errors'|@translate}</li> 20 19 </ul> 21 <!-- END update_result --> 20 {/if} 22 21 23 <!-- BEGIN metadata_result --> 24 <h3>{ L_RESULT_METADATA}</h3>22 {if isset($metadata_result)} 23 <h3>{$L_RESULT_METADATA}</h3> 25 24 <ul> 26 <li>{ metadata_result.NB_ELEMENTS_DONE} {lang:update_nb_elements_metadata_sync}</li>27 <li>{ metadata_result.NB_ELEMENTS_CANDIDATES} {lang:update_nb_elements_metadata_available}</li>28 <li>{ lang:update_used_metadata} : {METADATA_LIST}</li>25 <li>{$metadata_result.NB_ELEMENTS_DONE} {'update_nb_elements_metadata_sync'|@translate}</li> 26 <li>{$metadata_result.NB_ELEMENTS_CANDIDATES} {'update_nb_elements_metadata_available'|@translate}</li> 27 <li>{'update_used_metadata'|@translate} : {$METADATA_LIST}</li> 29 28 </ul> 30 <!-- END metadata_result --> 29 {/if} 31 30 32 31 33 <!-- BEGIN sync_errors --> 34 <h3>{ lang:update_error_list_title}</h3>32 {if not empty($sync_errors)} 33 <h3>{'update_error_list_title'|@translate}</h3> 35 34 <div class="errors"> 36 35 <ul> 37 <!-- BEGIN error -->38 <li>[{ sync_errors.error.ELEMENT}] {sync_errors.error.LABEL}</li>39 <!-- END error -->36 {foreach from=$sync_errors item=error} 37 <li>[{$error.ELEMENT}] {$error.LABEL}</li> 38 {/foreach} 40 39 </ul> 41 40 </div> 42 <h3>{ lang:update_errors_caption}</h3>41 <h3>{'update_errors_caption'|@translate}</h3> 43 42 <ul> 44 <!-- BEGIN error_caption -->45 <li><strong>{ sync_errors.error_caption.TYPE}</strong>: {sync_errors.error_caption.LABEL}</li>46 <!-- END error_caption -->43 {foreach from=$sync_error_captions item=caption} 44 <li><strong>{$caption.TYPE}</strong>: {$caption.LABEL}</li> 45 {/foreach} 47 46 </ul> 48 <!-- END sync_errors --> 47 {/if} 49 48 50 <!-- BEGIN sync_infos --> 51 <h3>{ lang:update_infos_title}</h3>49 {if not empty($sync_infos)} 50 <h3>{'update_infos_title'|@translate}</h3> 52 51 <div class="infos"> 53 52 <ul> 54 <!-- BEGIN info -->55 <li>[{ sync_infos.info.ELEMENT}] {sync_infos.info.LABEL}</li>56 <!-- END sync_infos -->53 {foreach from=$sync_infos item=info} 54 <li>[{$info.ELEMENT}] {$info.LABEL}</li> 55 {/foreach} 57 56 </ul> 58 57 </div> 59 <!-- END infos --> 58 {/if} 60 59 61 <!-- BEGIN introduction --> 62 <h3>{ lang:update_default_title}</h3>63 <form action=" {F_ACTION}" method="post" id="update">60 {if isset($introduction)} 61 <h3>{'update_default_title'|@translate}</h3> 62 <form action="" method="post" id="update"> 64 63 65 64 <fieldset id="syncFiles"> 66 <legend>{ lang:update_sync_files}</legend>65 <legend>{'update_sync_files'|@translate}</legend> 67 66 <ul> 68 <li><label><input type="radio" name="sync" value="dirs" { SYNC_DIRS_CHECKED} /> {lang:update_sync_dirs}</label></li>69 <li><label><input type="radio" name="sync" value="files" { SYNC_ALL_CHECKED} /> {lang:update_sync_all}</label></li>70 <li><label><input type="checkbox" name="display_info" value="1" { DISPLAY_INFO_CHECKED} /> {lang:update_display_info}</label></li>71 <li><label><input type="checkbox" name="add_to_caddie" value="1" { ADD_TO_CADDIE_CHECKED} /> {lang:add new elements to caddie}</label></li>67 <li><label><input type="radio" name="sync" value="dirs" {if 'dirs'==$introduction.sync}checked="checked"{/if}/> {'update_sync_dirs'|@translate}</label></li> 68 <li><label><input type="radio" name="sync" value="files" {if 'files'==$introduction.sync}checked="checked"{/if}/> {'update_sync_all'|@translate}</label></li> 69 <li><label><input type="checkbox" name="display_info" value="1" {if $introduction.display_info}checked="checked"{/if}/> {'update_display_info'|@translate}</label></li> 70 <li><label><input type="checkbox" name="add_to_caddie" value="1" {if $introduction.add_to_caddie}checked="checked"{/if}/> {'add new elements to caddie'|@translate}</label></li> 72 71 </ul> 73 72 </fieldset> 74 73 75 74 <fieldset id="syncMetadata"> 76 <legend>{ lang:update_sync_metadata}</legend>77 { lang:update_used_metadata} : {METADATA_LIST}.<br/>75 <legend>{'update_sync_metadata'|@translate}</legend> 76 {'update_used_metadata'|@translate} : {$METADATA_LIST}.<br/> 78 77 <ul> 79 <li><label><input type="radio" name="sync" value="metadata_new" { SYNC_META_NEW_CHECKED} /> {lang:update_sync_metadata_new}</label></li>80 <li><label><input type="radio" name="sync" value="metadata_all" { SYNC_META_ALL_CHECKED} /> {lang:update_sync_metadata_all}</label></li>78 <li><label><input type="radio" name="sync" value="metadata_new" {if 'metadata_new'==$introduction.sync}checked="checked"{/if}/> {'update_sync_metadata_new'|@translate}</label></li> 79 <li><label><input type="radio" name="sync" value="metadata_all" {if 'metadata_all'==$introduction.sync}checked="checked"{/if}/> {'update_sync_metadata_all'|@translate}</label></li> 81 80 </ul> 82 81 </fieldset> … … 84 83 <fieldset id="syncSimulate"> 85 84 <legend></legend> 86 <ul><li><label><input type="checkbox" name="simulate" value="1" checked="checked" { TAG_INPUT_ENABLED} /> {lang:update_simulate}</label></li></ul>85 <ul><li><label><input type="checkbox" name="simulate" value="1" checked="checked" {$TAG_INPUT_ENABLED} /> {'update_simulate'|@translate}</label></li></ul> 87 86 </fieldset> 88 87 89 88 <fieldset id="catSubset"> 90 <legend>{ lang:update_cats_subset}</legend>89 <legend>{'update_cats_subset'|@translate}</legend> 91 90 <ul> 92 91 <li> 93 92 <select class="categoryList" name="cat" size="10"> 94 <!-- BEGIN category_option --> 95 <option {introduction.category_option.SELECTED} value="{introduction.category_option.VALUE}">{introduction.category_option.OPTION}</option> 96 <!-- END category_option --> 93 {html_options options=$category_options selected=$category_options_selected} 97 94 </select> 98 95 </li> 99 96 100 <li><label><input type="checkbox" name="subcats-included" value="1" { SUBCATS_INCLUDED_CHECKED} /> {lang:search_subcats_included}</label></li>97 <li><label><input type="checkbox" name="subcats-included" value="1" {if $introduction.subcats_included}checked="checked"{/if}/> {'search_subcats_included'|@translate}</label></li> 101 98 </ul> 102 99 </fieldset> 103 100 104 101 <p class="bottomButtons"> 105 <input class="submit" type="submit" value="{ lang:submit}" name="submit" />106 <input class="submit" type="reset" value="{ lang:reset}" name="reset" />102 <input class="submit" type="submit" value="{'Submit'|@translate}" name="submit" /> 103 <input class="submit" type="reset" value="{'Reset'|@translate}" name="reset" /> 107 104 </p> 108 105 </form> 109 <!-- END introduction --> 106 {/if}{*isset $introduction*} 110 107 111 < a href="{U_SITE_MANAGER}">{lang:Site manager}</a>108 <p><a href="{$U_SITE_MANAGER}">{'Site manager'|@translate}</a></p>
Note: See TracChangeset
for help on using the changeset viewer.