diff options
author | rvelices <rv-github@modusoptimus.com> | 2008-03-03 12:50:54 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2008-03-03 12:50:54 +0000 |
commit | 7688a7cbb6c4906f70d87b56cd6e90d028e99666 (patch) | |
tree | e197ac0fef76f918e100ae1e45c582309d3e99d8 | |
parent | 14bfa8a3e6e5fa81fa3eba565a1b696840f351cd (diff) |
- history, stats and redirect go smarty
- lang correction
- small change in calling check_server_plugins (use by ref param instead of global)
git-svn-id: http://piwigo.org/svn/trunk@2245 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r-- | admin/history.php | 172 | ||||
-rw-r--r-- | admin/include/functions_plugins.inc.php | 13 | ||||
-rw-r--r-- | admin/plugins_new.php | 30 | ||||
-rw-r--r-- | admin/plugins_update.php | 28 | ||||
-rw-r--r-- | admin/stats.php | 18 | ||||
-rw-r--r-- | template/yoga/admin/history.tpl | 173 | ||||
-rw-r--r-- | template/yoga/admin/plugins_update.tpl | 2 | ||||
-rw-r--r-- | template/yoga/admin/stats.tpl | 44 | ||||
-rw-r--r-- | template/yoga/redirect.tpl | 6 |
9 files changed, 211 insertions, 275 deletions
diff --git a/admin/history.php b/admin/history.php index 5c2264384..fe8914f5d 100644 --- a/admin/history.php +++ b/admin/history.php @@ -2,7 +2,7 @@ // +-----------------------------------------------------------------------+ // | PhpWebGallery - a PHP based picture gallery | // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net | -// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net | +// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net | // +-----------------------------------------------------------------------+ // | file : $Id$ // | last update : $Date$ @@ -107,7 +107,7 @@ if (isset($_POST['submit'])) { $search['fields']['image_id'] = intval($_POST['image_id']); } - + if (!empty($_POST['filename'])) { $search['fields']['filename'] = str_replace( @@ -123,9 +123,9 @@ if (isset($_POST['submit'])) // TODO manage inconsistency of having $_POST['image_id'] and // $_POST['filename'] simultaneously - + // echo '<pre>'; print_r($search); echo '</pre>'; - + if (!empty($search)) { // register search rules in database, then they will be available on @@ -139,7 +139,7 @@ INSERT INTO '.SEARCH_TABLE.' pwg_query($query); $search_id = mysql_insert_id(); - + redirect( PHPWG_ROOT_PATH.'admin.php?page=history&search_id='.$search_id ); @@ -159,21 +159,10 @@ $template->set_filename('history', 'admin/history.tpl'); // TabSheet initialization history_tabsheet(); -$base_url = PHPWG_ROOT_PATH.'admin.php?page=history'; - -$template->assign_vars( +$template->assign( array( 'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=history', - - 'F_ACTION' => PHPWG_ROOT_PATH.'admin.php?page=history' - ) - ); - -$template->assign_vars( - array( - 'TODAY_DAY' => date('d', time()), - 'TODAY_MONTH' => date('m', time()), - 'TODAY_YEAR' => date('Y', time()), + 'F_ACTION' => get_root_url().'admin.php?page=history' ) ); @@ -212,7 +201,7 @@ INSERT INTO '.SEARCH_TABLE.' pwg_query($query); $search_id = mysql_insert_id(); - + redirect( PHPWG_ROOT_PATH.'admin.php?page=history&search_id='.$search_id ); @@ -286,7 +275,7 @@ SELECT id, uppercats $uppercats_of = simple_hash_from_query($query, 'id', 'uppercats'); $name_of_category = array(); - + foreach ($uppercats_of as $category_id => $uppercats) { $name_of_category[$category_id] = get_cat_display_name_cache( @@ -359,7 +348,7 @@ SELECT $name_of_tag[ $row['id'] ] = $row['name']; } } - + $i = 0; $first_line = $page['start'] + 1; $last_line = $page['start'] + $conf['nb_logs_page']; @@ -374,7 +363,7 @@ SELECT // unknown) but the non image element filesize. Proposed solution: add // #images.representative_filesize and add 'representative' in the // choices of #history.image_type. - + if (isset($line['image_type'])) { if ($line['image_type'] == 'high') @@ -401,12 +390,12 @@ SELECT { $summary['guests_IP'][ $line['IP'] ] = 0; } - + $summary['guests_IP'][ $line['IP'] ]++; } - + $i++; - + if ($i < $first_line or $i > $last_line) { continue; @@ -497,9 +486,9 @@ SELECT } } } - - $template->assign_block_vars( - 'detail', + + $template->append( + 'search_results', array( 'DATE' => $line['date'], 'TIME' => $line['time'], @@ -514,7 +503,6 @@ SELECT : 'deleted '.$line['category_id'] ) : '', 'TAGS' => $tags_string, - 'T_CLASS' => ($i % 2) ? 'row1' : 'row2', ) ); } @@ -528,23 +516,23 @@ SELECT // avoided in next steps unset($username_of[ $conf['guest_id'] ]); } - + $summary['nb_members'] = count($username_of); $member_strings = array(); foreach ($username_of as $user_id => $user_name) { $member_string = $user_name.' <a href="'; - $member_string.= PHPWG_ROOT_PATH.'admin.php?page=history'; + $member_string.= get_root_url().'admin.php?page=history'; $member_string.= '&search_id='.$page['search_id']; $member_string.= '&user_id='.$user_id; $member_string.= '">+</a>'; $member_strings[] = $member_string; } - - $template->assign_block_vars( - 'summary', + + $template->assign( + 'search_summary', array( 'NB_LINES' => l10n_dec( '%d line filtered', '%d lines filtered', @@ -577,18 +565,13 @@ SELECT if (isset($page['search_id'])) { $navbar = create_navigation_bar( - PHPWG_ROOT_PATH.'admin.php'.get_query_string_diff(array('start')), + get_root_url().'admin.php'.get_query_string_diff(array('start')), $page['nb_lines'], $page['start'], $conf['nb_logs_page'] ); - $template->assign_block_vars( - 'navigation', - array( - 'NAVBAR' => $navbar - ) - ); + $template->assign('NAV_BAR', $navbar); } // +-----------------------------------------------------------------------+ @@ -602,7 +585,7 @@ if (isset($page['search'])) if (isset($page['search']['fields']['date-after'])) { $tokens = explode('-', $page['search']['fields']['date-after']); - + $form['start_year'] = (int)$tokens[0]; $form['start_month'] = (int)$tokens[1]; $form['start_day'] = (int)$tokens[2]; @@ -646,50 +629,36 @@ else pwg_get_cookie_var('history_display_thumbnail', $display_thumbnails[2]); } -// start date -get_day_list('start_day', @$form['start_day']); -get_month_list('start_month', @$form['start_month']); -// end date -get_day_list('end_day', @$form['end_day']); -get_month_list('end_month', @$form['end_month']); -$template->assign_vars( +$month_list = $lang['month']; +$month_list[0]='------------'; +ksort($month_list); + +$template->assign( array( - 'START_YEAR' => @$form['start_year'], - 'END_YEAR' => @$form['end_year'], 'IMAGE_ID' => @$form['image_id'], 'FILENAME' => @$form['filename'], + + 'month_list' => $month_list, + + 'START_DAY_SELECTED' => @$form['start_day'], + 'START_MONTH_SELECTED' => @$form['start_month'], + 'START_YEAR' => @$form['start_year'], + + 'END_DAY_SELECTED' => @$form['end_day'], + 'END_MONTH_SELECTED' => @$form['end_month'], + 'END_YEAR' => @$form['end_year'], ) ); -foreach ($types as $option) -{ - $selected = ''; - - if (in_array($option, $form['types'])) - { - $selected = 'selected="selected"'; - } - - $template->assign_block_vars( - 'types_option', +$template->assign( array( - 'VALUE' => $option, - 'CONTENT' => l10n($option), - 'SELECTED' => $selected, - ) - ); -} - -$template->assign_block_vars( - 'user_option', - array( - 'VALUE'=> -1, - 'CONTENT' => '------------', - 'SELECTED' => '' + 'type_option_values' => $types, + 'type_option_selected' => $form['types'] ) ); + $query = ' SELECT '.$conf['user_fields']['id'].' AS id, @@ -697,50 +666,23 @@ SELECT FROM '.USERS_TABLE.' ORDER BY username ASC ;'; -$result = pwg_query($query); - -while ($row = mysql_fetch_array($result)) -{ - $selected = ''; - - if (isset($form['user']) - and $row['id'] == $form['user']) - { - $selected = 'selected="selected"'; - } - - $template->assign_block_vars( - 'user_option', - array( - 'VALUE' => $row['id'], - 'CONTENT' => $row['username'], - 'SELECTED' => $selected, - ) - ); -} +$template->assign( + array( + 'user_options' => simple_hash_from_query($query, 'id','username'), + 'user_options_selected' => array(@$form['user']) + ) +); -foreach ($display_thumbnails as $display_thumbnail) -{ - $selected = ''; - - if ($display_thumbnail === $form['display_thumbnail']) - { - $selected = 'selected="selected"'; - } - - $template->assign_block_vars( - 'display_thumbnail', - array( - 'VALUE' => $display_thumbnail, - 'CONTENT' => l10n($display_thumbnail), - 'SELECTED' => $selected, - ) - ); -} +$template->assign( + array( + 'display_thumbnail_values' => $display_thumbnails, + 'display_thumbnail_selected' => array($form['display_thumbnail']), + ) + ); // +-----------------------------------------------------------------------+ // | html code display | // +-----------------------------------------------------------------------+ $template->assign_var_from_handle('ADMIN_CONTENT', 'history'); -?> +?>
\ No newline at end of file diff --git a/admin/include/functions_plugins.inc.php b/admin/include/functions_plugins.inc.php index 9b59fdb0f..b51a22fd2 100644 --- a/admin/include/functions_plugins.inc.php +++ b/admin/include/functions_plugins.inc.php @@ -136,10 +136,8 @@ function sort_plugins_by_state($plugins, $db_plugins_by_id) * Retrieve PEM server datas * @param bool (true for retrieve new extensions) */ -function check_server_plugins($newext=false) +function check_server_plugins(& $fs_plugins, $newext=false) { - global $fs_plugins; - foreach($fs_plugins as $plugin_id => $fs_plugin) { if (!empty($fs_plugin['uri']) and strpos($fs_plugin['uri'] , 'extension_view.php?eid=')) @@ -150,7 +148,7 @@ function check_server_plugins($newext=false) $fs_plugins[$plugin_id]['extension'] = $extension; } } - + $url = PEM_URL . '/uptodate.php?version=' . rawurlencode(PHPWG_VERSION) . '&extensions=' . implode(',', $plugins_to_check); $url .= $newext ? '&newext=Plugin' : ''; @@ -170,7 +168,6 @@ function check_server_plugins($newext=false) */ function extract_plugin_files($action, $source, $dest) { - global $archive; if ($archive = tempnam( PHPWG_PLUGINS_PATH, 'zip')) { if (@copy(PEM_URL . str_replace(' ', '%20', $source), $archive)) @@ -192,12 +189,12 @@ function extract_plugin_files($action, $source, $dest) { $root = dirname($main_filepath); // main.inc.php path in archive if ($action == 'upgrade') - { + { $extract_path = PHPWG_PLUGINS_PATH.$dest; } else { - $extract_path = PHPWG_PLUGINS_PATH + $extract_path = PHPWG_PLUGINS_PATH . ($root == '.' ? 'extension_' . $dest : basename($root)); } if($result = $zip->extract(PCLZIP_OPT_PATH, $extract_path, @@ -222,7 +219,7 @@ function extract_plugin_files($action, $source, $dest) else $status = 'dl_archive_error'; } else $status = 'temp_path_error'; - + @unlink($archive); return $status; } diff --git a/admin/plugins_new.php b/admin/plugins_new.php index e3bdf8f7d..186a1901e 100644 --- a/admin/plugins_new.php +++ b/admin/plugins_new.php @@ -52,66 +52,66 @@ if (isset($_GET['installstatus'])) case 'ok': array_push($page['infos'], l10n('plugins_install_ok'), l10n('plugins_install_need_activate')); break; - + case 'temp_path_error': - array_push($page['errors'], l10n('plugins_temp_path_error')); + array_push($page['errors'], l10n('plugins_temp_path_error')); break; - + case 'dl_archive_error': - array_push($page['errors'], l10n('plugins_dl_archive_error')); + array_push($page['errors'], l10n('plugins_dl_archive_error')); break; case 'archive_error': - array_push($page['errors'], l10n('plugins_archive_error')); + array_push($page['errors'], l10n('plugins_archive_error')); break; default: - array_push($page['errors'], sprintf(l10n('plugins_extract_error'), $_GET['installstatus']), l10n('plugins_check_chmod')); + array_push($page['errors'], sprintf(l10n('plugins_extract_error'), $_GET['installstatus']), l10n('plugins_check_chmod')); } } //----------------------------------------------------------------sort options $order = isset($_GET['order']) ? $_GET['order'] : 'date'; - -$template->assign('order', + +$template->assign('order', array(htmlentities($my_base_url.'&order=date') => l10n('Post date'), htmlentities($my_base_url.'&order=name') => l10n('Name'), htmlentities($my_base_url.'&order=author') => l10n('Author'))); - + $template->assign('selected', htmlentities($my_base_url.'&order=').$order); // +-----------------------------------------------------------------------+ // | start template output | // +-----------------------------------------------------------------------+ -$plugins_infos = check_server_plugins(true); +$plugins_infos = check_server_plugins($fs_plugins, true); if ($plugins_infos !== false) { if ($order == 'date') krsort($plugins_infos); else uasort($plugins_infos, 'extension_'.$order.'_compare'); - + foreach($plugins_infos as $plugin) { $ext_desc = nl2br(htmlspecialchars(strip_tags( utf8_encode($plugin['ext_description'])))); - + $ver_desc = sprintf(l10n('plugins_description'), $plugin['version'], date('Y-m-d', $plugin['date']), nl2br(htmlspecialchars(strip_tags( utf8_encode($plugin['description']))))); - + $url_auto_install = htmlentities($my_base_url) . '&extension=' . $plugin['id_extension'] . '&install=%2Fupload%2Fextension-' . $plugin['id_extension'] . '%2Frevision-' . $plugin['id_revision'] . '%2F' . str_replace(' ', '%20',$plugin['url']); - + $url_download = PEM_URL .'/upload/extension-'.$plugin['id_extension'] . '/revision-' . $plugin['id_revision'] . '/' . $plugin['url']; - + $template->append('plugins', array('EXT_NAME' => $plugin['ext_name'], 'EXT_URL' => PEM_URL.'/extension_view.php?eid='.$plugin['id_extension'], diff --git a/admin/plugins_update.php b/admin/plugins_update.php index 6017c56db..43aab8d56 100644 --- a/admin/plugins_update.php +++ b/admin/plugins_update.php @@ -58,21 +58,21 @@ if (isset($_GET['upgradestatus']) and isset($_GET['plugin'])) break; case 'temp_path_error': - array_push($page['errors'], l10n('plugins_temp_path_error')); + array_push($page['errors'], l10n('plugins_temp_path_error')); break; - + case 'dl_archive_error': - array_push($page['errors'], l10n('plugins_dl_archive_error')); + array_push($page['errors'], l10n('plugins_dl_archive_error')); break; case 'archive_error': - array_push($page['errors'], l10n('plugins_archive_error')); + array_push($page['errors'], l10n('plugins_archive_error')); break; default: array_push($page['errors'], sprintf(l10n('plugins_extract_error'), - $_GET['upgradestatus'])); + $_GET['upgradestatus'])); } } @@ -80,7 +80,7 @@ if (isset($_GET['upgradestatus']) and isset($_GET['plugin'])) // +-----------------------------------------------------------------------+ // | start template output | // +-----------------------------------------------------------------------+ -$plugins_infos = check_server_plugins(); +$plugins_infos = check_server_plugins($fs_plugins); if ($plugins_infos !== false) { @@ -90,16 +90,16 @@ if ($plugins_infos !== false) and isset($plugins_infos[$fs_plugin['extension']])) { $plugin_info = $plugins_infos[$fs_plugin['extension']]; - + $ext_desc = nl2br(htmlspecialchars(strip_tags( utf8_encode($plugin_info['ext_description'])))); - + $ver_desc = sprintf(l10n('plugins_description'), $plugin_info['version'], date('Y-m-d', $plugin_info['date']), nl2br(htmlspecialchars(strip_tags( utf8_encode($plugin_info['description']))))); - + if ($plugin_info['version'] == $fs_plugin['version']) { // Plugin is up to date @@ -116,18 +116,18 @@ if ($plugins_infos !== false) $url_auto_update = htmlentities($my_base_url) . '&plugin=' . $plugin_id . ( - (isset($db_plugins_by_id[$plugin_id]) - and $db_plugins_by_id[$plugin_id]['state'] == 'active') ? + (isset($db_plugins_by_id[$plugin_id]) + and $db_plugins_by_id[$plugin_id]['state'] == 'active') ? '&action=deactivate' : '' ) . '&upgrade=%2Fupload%2Fextension-' . $fs_plugin['extension'] . '%2Frevision-' . $plugin_info['id_revision'] . '%2F' . $plugin_info['url']; - + $url_download = PEM_URL.'/upload/extension-'. $fs_plugin['extension'] . '/revision-' . $plugin_info['id_revision'] . '/' . $plugin_info['url']; - + $template->append('plugins_not_uptodate', array('EXT_NAME' => $fs_plugin['name'], 'EXT_URL' => $fs_plugin['uri'], @@ -140,7 +140,7 @@ if ($plugins_infos !== false) 'URL_DOWNLOAD' => $url_download)); } } - else + else { // Can't check plugin $template->append('plugins_cant_check', diff --git a/admin/stats.php b/admin/stats.php index 07a98848c..72970dc57 100644 --- a/admin/stats.php +++ b/admin/stats.php @@ -388,14 +388,14 @@ $template->set_filename('stats', 'admin/stats.tpl'); // TabSheet initialization history_tabsheet(); -$base_url = PHPWG_ROOT_PATH.'admin.php?page=history'; +$base_url = get_root_url().'admin.php?page=history'; -$template->assign_vars( +$template->assign( array( 'L_STAT_TITLE' => implode($conf['level_separator'], $title_parts), 'PERIOD_LABEL' => $period_label, - 'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=history', - 'F_ACTION' => PHPWG_ROOT_PATH.'admin.php?page=history', + 'U_HELP' => get_root_url().'popuphelp.php?page=history', + 'F_ACTION' => $base_url, ) ); @@ -468,7 +468,7 @@ if (count($datas) > 0) else if (isset($page['month'])) { $url = - PHPWG_ROOT_PATH.'admin.php' + get_root_url().'admin.php' .'?page=stats' .'&year='.$page['year'] .'&month='.$page['month'] @@ -482,7 +482,7 @@ if (count($datas) > 0) else if (isset($page['year'])) { $url = - PHPWG_ROOT_PATH.'admin.php' + get_root_url().'admin.php' .'?page=stats' .'&year='.$page['year'] .'&month='.$i @@ -494,7 +494,7 @@ if (count($datas) > 0) { // at least the year is defined $url = - PHPWG_ROOT_PATH.'admin.php' + get_root_url().'admin.php' .'?page=stats' .'&year='.$i ; @@ -507,8 +507,8 @@ if (count($datas) > 0) $value = '<a href="'.$url.'">'.$value.'</a>'; } - $template->assign_block_vars( - 'statrow', + $template->append( + 'statrows', array( 'VALUE' => $value, 'PAGES' => $datas[$i], diff --git a/template/yoga/admin/history.tpl b/template/yoga/admin/history.tpl index d8386defe..e3ccc1197 100644 --- a/template/yoga/admin/history.tpl +++ b/template/yoga/admin/history.tpl @@ -1,158 +1,151 @@ -<!-- DEV TAG: not smarty migrated --> +{* $Id$ *} <div class="titrePage"> <ul class="categoryActions"> <li> <a - href="{U_HELP}" + href="{$U_HELP}" onclick="popuphelp(this.href); return false;" - title="{lang:Help}" + title="{'Help'|@translate}" > - <img src="{themeconf:icon_dir}/help.png" class="button" alt="(?)"> + <img src="{$themeconf.icon_dir}/help.png" class="button" alt="(?)"> </a> </li> </ul> - <h2>{lang:History} {TABSHEET_TITLE}</h2> - {TABSHEET}
+ <h2>{'History'|@translate} {$TABSHEET_TITLE}</h2> + {$TABSHEET}
</div> -<form class="filter" method="post" name="filter" action="{F_ACTION}"> +<form class="filter" method="post" name="filter" action="{$F_ACTION}"> <fieldset> - <legend>{lang:Filter}</legend> + <legend>{'Filter'|@translate}</legend> <ul> - <li><label>{lang:search_date_from}</label></li> + <li><label>{'search_date_from'|@translate}</label></li> <li> <select name="start_day"> - <!-- BEGIN start_day --> - <option {start_day.SELECTED} value="{start_day.VALUE}">{start_day.OPTION}</option> - <!-- END start_day --> + <option value="0">--</option>
+ {section name=day start=1 loop=31}
+ <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$START_DAY_SELECTED}selected="selected"{/if}>{$smarty.section.day.index}</option>
+ {/section}
</select> <select name="start_month"> - <!-- BEGIN start_month --> - <option {start_month.SELECTED} value="{start_month.VALUE}">{start_month.OPTION}</option> - <!-- END start_month --> + {html_options options=$month_list selected=$START_MONTH_SELECTED}
</select> - <input name="start_year" value="{START_YEAR}" type="text" size="4" maxlength="4" > + <input name="start_year" value="{$START_YEAR}" type="text" size="4" maxlength="4" > </li> </ul> <ul> - <li><label>{lang:search_date_to}</label></li> + <li><label>{'search_date_to'|@translate}</label></li> <li> <select name="end_day"> - <!-- BEGIN end_day --> - <option {end_day.SELECTED} value="{end_day.VALUE}">{end_day.OPTION}</option> - <!-- END end_day --> + <option value="0">--</option>
+ {section name=day start=1 loop=31}
+ <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$END_DAY_SELECTED}selected="selected"{/if}>{$smarty.section.day.index}</option>
+ {/section}
</select> <select name="end_month"> - <!-- BEGIN end_month --> - <option {end_month.SELECTED} value="{end_month.VALUE}">{end_month.OPTION}</option> - <!-- END end_month --> + {html_options options=$month_list selected=$END_MONTH_SELECTED}
</select> - <input name="end_year" value="{END_YEAR}" type="text" size="4" maxlength="4" > + <input name="end_year" value="{$END_YEAR}" type="text" size="4" maxlength="4" > </li> </ul> <label> - {lang:Element type} + {'Element type'|@translate} <select name="types[]" multiple="multiple" size="4"> - <!-- BEGIN types_option --> - <option value="{types_option.VALUE}" {types_option.SELECTED}> - {types_option.CONTENT} - </option> - <!-- END types_option --> + {html_options values=$type_option_values output=$type_option_values|translate selected=$type_option_selected}
</select> </label> <label> - {lang:User} + {'User'|@translate} <select name="user"> - <!-- BEGIN user_option --> - <option value="{user_option.VALUE}" {user_option.SELECTED}> - {user_option.CONTENT} - </option> - <!-- END user_option --> + <option value="-1">------------</option>
+ {html_options options=$user_options selected=$user_options_selected}
</select> </label> <label> - {lang:Image id} - <input name="image_id" value="{IMAGE_ID}" type="text" size="5"> + {'Image id'|@translate} + <input name="image_id" value="{$IMAGE_ID}" type="text" size="5"> </label> <label> - {lang:File name} - <input name="filename" value="{FILENAME}" type="text"> + {'File name'|@translate} + <input name="filename" value="{$FILENAME}" type="text"> </label> - <input class="submit" type="submit" name="submit" value="{lang:submit}" /> + <input class="submit" type="submit" name="submit" value="{'Submit'|@translate}" /> </fieldset> <fieldset>
- <legend>{lang:Display}</legend>
+ <legend>{'Display'|@translate}</legend>
<ul>
<li>
- {lang:Thumbnails}
+ {'Thumbnails'|@translate}
<select name="display_thumbnail">
- <!-- BEGIN display_thumbnail -->
- <option {display_thumbnail.SELECTED} value="{display_thumbnail.VALUE}">{display_thumbnail.CONTENT}</option>
- <!-- END display_thumbnail -->
+ {html_options values=$display_thumbnail_values output=$display_thumbnail_values|translate selected=$display_thumbnail_selected}
</select>
</li>
</ul>
</fieldset>
</form> - -<!-- BEGIN summary --> +
+{if isset($search_summary)} <fieldset> - <legend>{lang:Summary}</legend> + <legend>{'Summary'|@translate}</legend> <ul> - <li>{summary.NB_LINES}</li> - <li>{summary.FILESIZE}</li> + <li>{$search_summary.NB_LINES}, {$search_summary.FILESIZE}</li> <li> - {summary.USERS} + {$search_summary.USERS} <ul> - <li>{summary.MEMBERS}</li> - <li>{summary.GUESTS}</li> + <li>{$search_summary.MEMBERS}</li> + <li>{$search_summary.GUESTS}</li> </ul> </li> </ul> </fieldset> -<!-- END summary --> +{/if} -<!-- BEGIN navigation --> -<div class="admin"> -{navigation.NAVBAR} -</div> -<!-- END navigation --> +
+{if !empty($NAV_BAR)}
+<div class="navigationBar">
+ {$NAV_BAR}
+</div>
+{/if}
+
<table class="table2" id="detailedStats"> - <tr class="throw"> - <th>{lang:date}</th> - <th>{lang:time}</th> - <th>{lang:user}</th> - <th>{lang:IP}</th> - <th>{lang:image}</th> - <th>{lang:Element type}</th> - <th>{lang:section}</th> - <th>{lang:category}</th> - <th>{lang:tags}</th> - </tr> -<!-- BEGIN detail --> - <tr class="{detail.T_CLASS}"> - <td class="hour">{detail.DATE}</td> - <td class="hour">{detail.TIME}</td> - <td>{detail.USER}</td> - <td>{detail.IP}</td> - <td>{detail.IMAGE}</td> - <td>{detail.TYPE}</td> - <td>{detail.SECTION}</td> - <td>{detail.CATEGORY}</td> - <td>{detail.TAGS}</td> - </tr> -<!-- END detail --> +<tr class="throw"> + <th>{'date'|@translate}</th> + <th>{'time'|@translate}</th> + <th>{'user'|@translate}</th> + <th>{'IP'|@translate}</th> + <th>{'image'|@translate}</th> + <th>{'Element type'|@translate}</th> + <th>{'section'|@translate}</th> + <th>{'category'|@translate}</th> + <th>{'tags'|@translate}</th> +</tr> +{if !empty($search_results) } +{foreach from=$search_results item=detail name=res_loop}
+<tr class="{if $smarty.foreach.res_loop.index is odd}row1{else}row2{/if}"> + <td class="hour">{$detail.DATE}</td> + <td class="hour">{$detail.TIME}</td> + <td>{$detail.USER}</td> + <td>{$detail.IP}</td> + <td>{$detail.IMAGE}</td> + <td>{$detail.TYPE}</td> + <td>{$detail.SECTION}</td> + <td>{$detail.CATEGORY}</td> + <td>{$detail.TAGS}</td> +</tr> +{/foreach}
+{/if} </table> - -<!-- BEGIN navigation --> -<div class="admin"> -{navigation.NAVBAR} -</div> -<!-- END navigation --> +
+
+{if !empty($NAV_BAR)}
+<div class="navigationBar">
+ {$NAV_BAR}
+</div>
+{/if}
diff --git a/template/yoga/admin/plugins_update.tpl b/template/yoga/admin/plugins_update.tpl index 6712726ff..ca1ca541e 100644 --- a/template/yoga/admin/plugins_update.tpl +++ b/template/yoga/admin/plugins_update.tpl @@ -12,7 +12,7 @@ <td>{'Name'|@translate}</td> <td>{'plugins_actual_version'|@translate}</td> <td>{'plugins_new_version'|@translate}</td> - <td>{'plugins_action'|@translate}</td> + <td>{'Actions'|@translate}</td> </tr> </thead> {foreach from=$plugins_not_uptodate item=plugin name=plugins_loop} diff --git a/template/yoga/admin/stats.tpl b/template/yoga/admin/stats.tpl index 08ac8b7f8..95331b7ef 100644 --- a/template/yoga/admin/stats.tpl +++ b/template/yoga/admin/stats.tpl @@ -1,34 +1,38 @@ -<!-- DEV TAG: not smarty migrated --> -<!-- $Id$ --> +{* $Id$ *} + <div class="titrePage"> <ul class="categoryActions"> <li> <a - href="{U_HELP}" + href="{$U_HELP}" onclick="popuphelp(this.href); return false;" - title="{lang:Help}" + title="{'Help'|@translate}" > - <img src="{themeconf:icon_dir}/help.png" class="button" alt="(?)"> + <img src="{$themeconf.icon_dir}/help.png" class="button" alt="(?)"> </a> </li> </ul> - <h2>{lang:History} {TABSHEET_TITLE}</h2> - {TABSHEET} + <h2>{'History'|@translate} {$TABSHEET_TITLE}</h2> + {$TABSHEET} </div> -<h3>{L_STAT_TITLE}</h3> +<h3>{$L_STAT_TITLE}</h3> <table class="table2" id="dailyStats"> - <tr class="throw"> - <th>{PERIOD_LABEL}</th> - <th>{lang:Pages seen}</th> - <th></th> - </tr> -<!-- BEGIN statrow --> - <tr> - <td style="white-space: nowrap">{statrow.VALUE}</td> - <td class="number">{statrow.PAGES}</td> - <td><div class="statBar" style="width:{statrow.WIDTH}px"></div></td> - </tr> -<!-- END statrow --> + <tr class="throw"> + <th>{$PERIOD_LABEL}</th> + <th>{'Pages seen'|@translate}</th> + <th></th> + </tr> + +{if not empty($statrows)} +{foreach from=$statrows item=row} + <tr> + <td style="white-space: nowrap">{$row.VALUE}</td> + <td class="number">{$row.PAGES}</td> + <td><div class="statBar" style="width:{$row.WIDTH}px"></div></td> + </tr> +{/foreach} +{/if} + </table> diff --git a/template/yoga/redirect.tpl b/template/yoga/redirect.tpl index 2f19e575b..308411aec 100644 --- a/template/yoga/redirect.tpl +++ b/template/yoga/redirect.tpl @@ -1,3 +1,3 @@ -<!-- DEV TAG: not smarty migrated --> -<p>{U_REDIRECT_MSG}</p> -<p><a href="{U_REFRESH}">{lang:click_to_redirect}</a></p> +{* $Id$ *} +<p>{$REDIRECT_MSG}</p> +<p><a href="{$refresh.U_REFRESH}">{'click_to_redirect'|@translate}</a></p> |