diff options
author | rub <rub@piwigo.org> | 2007-03-09 22:52:22 +0000 |
---|---|---|
committer | rub <rub@piwigo.org> | 2007-03-09 22:52:22 +0000 |
commit | 3495d30775a3d9c104fc46ea24f5fd6ee7d69600 (patch) | |
tree | 55d82154ea9da424ed02f98ef146da7187e28253 | |
parent | b0478ef330b8f729554aec55baa81d9e3d02a063 (diff) |
Add DateTime on administration introduction page (Useful to help user on the forum, ...)
Move history configuration in a other tab.
Use translation on picture hint (Kb).
Show hint oh the menu text (not only on counter)
git-svn-id: http://piwigo.org/svn/trunk@1884 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/configuration.php | 38 | ||||
-rw-r--r-- | admin/intro.php | 7 | ||||
-rw-r--r-- | include/category_cats.inc.php | 2 | ||||
-rw-r--r-- | include/functions.inc.php | 2 | ||||
-rw-r--r-- | include/functions_html.inc.php | 21 | ||||
-rw-r--r-- | language/en_UK.iso-8859-1/admin.lang.php | 1 | ||||
-rw-r--r-- | language/fr_FR.iso-8859-1/admin.lang.php | 1 | ||||
-rw-r--r-- | template/yoga/admin/configuration.tpl | 34 | ||||
-rw-r--r-- | template/yoga/admin/intro.tpl | 10 |
9 files changed, 80 insertions, 36 deletions
diff --git a/admin/configuration.php b/admin/configuration.php index de9c3b162..fabc6b189 100644 --- a/admin/configuration.php +++ b/admin/configuration.php @@ -49,13 +49,16 @@ else } $general_checkboxes = array( - 'log', - 'history_admin', - 'history_guest', 'email_admin_on_new_user', 'allow_user_registration', ); +$history_checkboxes = array( + 'log', + 'history_admin', + 'history_guest' + ); + $comments_checkboxes = array( 'comments_forall', 'comments_validation', @@ -81,6 +84,14 @@ if (isset($_POST['submit']) and !is_adviser()) } break; } + case 'history' : + { + foreach( $history_checkboxes as $checkbox) + { + $_POST[$checkbox] = empty($_POST[$checkbox])?'false':'true'; + } + break; + } case 'comments' : { // the number of comments per page must be an integer between 5 and 50 @@ -170,6 +181,11 @@ $page['tabsheet'] = array 'caption' => l10n('conf_general_title'), 'url' => $conf_link.'general' ), + 'history' => array + ( + 'caption' => l10n('conf_history_title'), + 'url' => $conf_link.'history' + ), 'comments' => array ( 'caption' => l10n('conf_comments_title'), @@ -235,6 +251,22 @@ switch ($page['section']) } break; } + case 'history' : + { + //Necessary for merge_block_vars + $template->assign_block_vars('history', array()); + + foreach( $history_checkboxes as $checkbox) + { + $template->merge_block_vars( + 'history', + array( + strtoupper($checkbox) => ($conf[$checkbox]==true)?$html_check:'' + ) + ); + } + break; + } case 'comments' : { $template->assign_block_vars( diff --git a/admin/intro.php b/admin/intro.php index 5e8e83f9a..6ff2470ed 100644 --- a/admin/intro.php +++ b/admin/intro.php @@ -184,6 +184,9 @@ SELECT COUNT(*) ;'; list($nb_comments) = mysql_fetch_row(pwg_query($query)); +$php_current_timestamp = date("Y-m-d H:i:s"); +list($db_current_timestamp) = mysql_fetch_row(pwg_query('SELECT CURRENT_TIMESTAMP;')); + $template->assign_vars( array( 'PWG_VERSION' => PHPWG_VERSION, @@ -205,7 +208,9 @@ $template->assign_vars( 'DB_GROUPS' => sprintf(l10n('%d groups'), $nb_groups), 'DB_COMMENTS' => sprintf(l10n('%d comments'), $nb_comments), 'U_CHECK_UPGRADE' => PHPWG_ROOT_PATH.'admin.php?action=check_upgrade', - 'U_PHPINFO' => PHPWG_ROOT_PATH.'admin.php?action=phpinfo' + 'U_PHPINFO' => PHPWG_ROOT_PATH.'admin.php?action=phpinfo', + 'PHP_DATATIME' => $php_current_timestamp, + 'DB_DATATIME' => $db_current_timestamp, ) ); diff --git a/include/category_cats.inc.php b/include/category_cats.inc.php index 8e967bdc9..f50f9ff77 100644 --- a/include/category_cats.inc.php +++ b/include/category_cats.inc.php @@ -256,7 +256,7 @@ if (count($categories) > 0) $category['count_images'], $category['count_categories'], true, - '; ' + ' / ' ), 'U_IMG_LINK' => make_index_url( diff --git a/include/functions.inc.php b/include/functions.inc.php index 5540c87c8..00a915d90 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -840,7 +840,7 @@ function get_thumbnail_title($element_info) if (!empty($element_info['filesize'])) { - $thumbnail_title .= ' : '.$element_info['filesize'].' KB'; + $thumbnail_title .= ' : '.l10n_dec('%d Kb', '%d Kb', $element_info['filesize']); } return $thumbnail_title; diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php index 43cf5d9e6..db6d12710 100644 --- a/include/functions_html.inc.php +++ b/include/functions_html.inc.php @@ -428,13 +428,22 @@ function get_html_menu_category($categories, $selected_category) ) ); + $title = get_display_images_count + ( + $category['nb_images'], + $category['count_images'], + $category['count_categories'], + false, + ' / ' + ); + $menu.= "\n".'<a href="'.$url.'"'; if ($selected_category!=null and $category['id'] == $selected_category['id_uppercat']) { $menu.= ' rel="up"'; } - $menu.= '>'.$category['name'].'</a>'; + $menu.= ' title=" '.$title.'">'.$category['name'].'</a>'; if ( $category['count_images']>0 ) {// at least one direct or indirect image @@ -442,15 +451,7 @@ function get_html_menu_category($categories, $selected_category) // at least one image in this category -> class menuInfoCat $menu.= ($category['nb_images'] > 0 ? "menuInfoCat" : "menuInfoCatByChild").'"'; - $menu.= ' title="'; - $menu.= ' '.get_display_images_count - ( - $category['nb_images'], - $category['count_images'], - $category['count_categories'], - false, - ' / ' - ).'">'; + $menu.= ' title=" '.$title.'">'; // show total number of images $menu.= '['.$category['count_images'].']'; $menu.= '</span>'; diff --git a/language/en_UK.iso-8859-1/admin.lang.php b/language/en_UK.iso-8859-1/admin.lang.php index c4f173372..86ea288ff 100644 --- a/language/en_UK.iso-8859-1/admin.lang.php +++ b/language/en_UK.iso-8859-1/admin.lang.php @@ -226,6 +226,7 @@ $lang['conf_comments_title'] = 'Comments'; $lang['conf_confirmation'] = 'Information data registered in database'; $lang['conf_default'] = 'Default display'; $lang['conf_default_title'] = 'Default display'; +$lang['conf_history_title'] = 'History'; $lang['conf_gallery_url_error'] = 'The gallery URL is not valid.'; $lang['conf_general_title'] = 'Main'; $lang['conf_nb_comment_page_error'] = 'The number of comments a page must be between 5 and 50 included.'; diff --git a/language/fr_FR.iso-8859-1/admin.lang.php b/language/fr_FR.iso-8859-1/admin.lang.php index 535acac0f..ea9cb67c8 100644 --- a/language/fr_FR.iso-8859-1/admin.lang.php +++ b/language/fr_FR.iso-8859-1/admin.lang.php @@ -226,6 +226,7 @@ $lang['conf_comments_title'] = 'Commentaires'; $lang['conf_confirmation'] = 'Informations enregistrées dans la base de données'; $lang['conf_default'] = 'Affichage par défaut'; $lang['conf_default_title'] = 'Affichage par défaut'; +$lang['conf_history_title'] = 'Historique'; $lang['conf_gallery_url_error'] = 'L\'adresse de la galerie n\'est pas valide.'; $lang['conf_general_title'] = 'Principale'; $lang['conf_nb_comment_page_error'] = 'Le nombre de commentaires d\'utilisateurs par page doit être compris entre 5 et 50.'; diff --git a/template/yoga/admin/configuration.tpl b/template/yoga/admin/configuration.tpl index 0cf53dcd3..dc6a5c3d3 100644 --- a/template/yoga/admin/configuration.tpl +++ b/template/yoga/admin/configuration.tpl @@ -64,29 +64,27 @@ <input type="checkbox" name="allow_user_registration" id="allow_user_registration" {general.ALLOW_USER_REGISTRATION} /> </label> </li> + </ul> +</fieldset> +<!-- END general --> - <br/> - <li> - <fieldset> - <legend>{lang:History}</legend> - <ul> - <li> - <label><span class="property">{lang:Users}</span><input type="checkbox" name="log" {general.LOG} /></label> - </li> +<!-- BEGIN history --> +<fieldset id="historyConf"> + <ul> + <li> + <label><span class="property">{lang:Users}</span><input type="checkbox" name="log" {history.LOG} /></label> + </li> - <li> - <label><span class="property">{lang:user_status_admin}</span><input type="checkbox" name="history_admin" {general.HISTORY_ADMIN} /></label> - </li> + <li> + <label><span class="property">{lang:user_status_admin}</span><input type="checkbox" name="history_admin" {history.HISTORY_ADMIN} /></label> + </li> - <li> - <label><span class="property">{lang:Guests}</span><input type="checkbox" name="history_guest" {general.HISTORY_GUEST} /></label> - </li> - </ul> - </fieldset> - </li> + <li> + <label><span class="property">{lang:Guests}</span><input type="checkbox" name="history_guest" {history.HISTORY_GUEST} /></label> + </li> </ul> </fieldset> -<!-- END general --> +<!-- END history --> <!-- BEGIN comments --> <fieldset id="commentsConf"> diff --git a/template/yoga/admin/intro.tpl b/template/yoga/admin/intro.tpl index 9d35a6bc4..319f172e4 100644 --- a/template/yoga/admin/intro.tpl +++ b/template/yoga/admin/intro.tpl @@ -24,8 +24,8 @@ <dd> <ul> <li>{lang:Operating system}: {OS}</li> - <li>PHP: {PHP_VERSION} (<a href="{U_PHPINFO}">{lang:Show info}</a>)</li> - <li>MySQL: {MYSQL_VERSION}</li> + <li>PHP: {PHP_VERSION} (<a href="{U_PHPINFO}">{lang:Show info}</a>) [{PHP_DATATIME}]</li> + <li>MySQL: {MYSQL_VERSION} [{DB_DATATIME}]</li> </ul> </dd> @@ -55,4 +55,10 @@ </ul> </dd> + <dt>{lang:Clock}</dt> + <dd> + <ul> + </ul> + </dd> + </dl> |