From: <nuc...@us...> - 2008-08-21 14:05:44
|
Revision: 5518 http://mantisbt.svn.sourceforge.net/mantisbt/?rev=5518&view=rev Author: nuclear_eclipse Date: 2008-08-21 14:05:41 +0000 (Thu, 21 Aug 2008) Log Message: ----------- Added management overview page as default target of the Manage link. This is just a first pass with some random stuff; we should add more important information and site-wide settings here. With some better info gathering and display, this could help out a lot with troubleshooting some basic problems on user's installs, or something... Modified Paths: -------------- trunk/mantisbt/config_defaults_inc.php trunk/mantisbt/core/html_api.php trunk/mantisbt/lang/strings_english.txt Added Paths: ----------- trunk/mantisbt/manage_overview_page.php Modified: trunk/mantisbt/config_defaults_inc.php =================================================================== --- trunk/mantisbt/config_defaults_inc.php 2008-08-21 11:19:17 UTC (rev 5517) +++ trunk/mantisbt/config_defaults_inc.php 2008-08-21 14:05:41 UTC (rev 5518) @@ -1129,6 +1129,12 @@ # Threshold needed to view project documentation $g_view_proj_doc_threshold = ANYBODY; + # Site manager + $g_manage_site_threshold = MANAGER; + + # Site admin + $g_admin_site_threshold = ADMINISTRATOR; + # Threshold needed to manage a project: edit project # details (not to add/delete projects), upload documentation, ...etc. $g_manage_project_threshold = MANAGER; Modified: trunk/mantisbt/core/html_api.php =================================================================== --- trunk/mantisbt/core/html_api.php 2008-08-21 11:19:17 UTC (rev 5517) +++ trunk/mantisbt/core/html_api.php 2008-08-21 14:05:41 UTC (rev 5518) @@ -633,20 +633,25 @@ } # Manage Users (admins) or Manage Project (managers) or Manage Custom Fields - $t_show_access = min( config_get( 'manage_user_threshold' ), config_get( 'manage_project_threshold' ), config_get( 'manage_custom_fields_threshold' ) ); - if ( access_has_global_level( $t_show_access) || access_has_any_project( $t_show_access ) ) { - $t_current_project = helper_get_current_project(); - if ( access_has_global_level( config_get( 'manage_user_threshold' ) ) ) { - $t_link = helper_mantis_url( 'manage_user_page.php' ); - } else { - if ( access_has_project_level( config_get( 'manage_project_threshold' ), $t_current_project ) - && ( $t_current_project <> ALL_PROJECTS ) ) { - $t_link = helper_mantis_url( 'manage_proj_edit_page.php?project_id=' ) . $t_current_project; + if ( access_has_global_level( config_get( 'manage_site_threshold' ) ) ) { + $t_link = helper_mantis_url( 'manage_overview_page.php' ); + $t_menu_options[] = "<a href=\"$t_link\">" . lang_get( 'manage_link' ) . '</a>'; + } else { + $t_show_access = min( config_get( 'manage_user_threshold' ), config_get( 'manage_project_threshold' ), config_get( 'manage_custom_fields_threshold' ) ); + if ( access_has_global_level( $t_show_access) || access_has_any_project( $t_show_access ) ) { + $t_current_project = helper_get_current_project(); + if ( access_has_global_level( config_get( 'manage_user_threshold' ) ) ) { + $t_link = helper_mantis_url( 'manage_user_page.php' ); } else { - $t_link = helper_mantis_url( 'manage_proj_page.php' ); + if ( access_has_project_level( config_get( 'manage_project_threshold' ), $t_current_project ) + && ( $t_current_project <> ALL_PROJECTS ) ) { + $t_link = helper_mantis_url( 'manage_proj_edit_page.php?project_id=' ) . $t_current_project; + } else { + $t_link = helper_mantis_url( 'manage_proj_page.php' ); + } } + $t_menu_options[] = "<a href=\"$t_link\">" . lang_get( 'manage_link' ) . '</a>'; } - $t_menu_options[] = "<a href=\"$t_link\">" . lang_get( 'manage_link' ) . '</a>'; } # News Page Modified: trunk/mantisbt/lang/strings_english.txt =================================================================== --- trunk/mantisbt/lang/strings_english.txt 2008-08-21 11:19:17 UTC (rev 5517) +++ trunk/mantisbt/lang/strings_english.txt 2008-08-21 14:05:41 UTC (rev 5518) @@ -707,6 +707,13 @@ $s_archives = 'Archives'; $s_rss = 'RSS'; +# manage_overview_page +$s_mantis_version = 'Mantis Version'; +$s_schema_version = 'Schema Version'; +$s_site_path = 'Site Path'; +$s_core_path = 'Core Path'; +$s_plugin_path = 'Plugin Path'; + # manage_create_new_user.php $s_created_user_part1 = 'Created user'; $s_created_user_part2 = 'with an access level of'; Added: trunk/mantisbt/manage_overview_page.php =================================================================== --- trunk/mantisbt/manage_overview_page.php (rev 0) +++ trunk/mantisbt/manage_overview_page.php 2008-08-21 14:05:41 UTC (rev 5518) @@ -0,0 +1,73 @@ +<?php +# Mantis - a php based bugtracking system + +# Copyright (C) 2002 - 2008 Mantis Team - man...@li...urceforge. + +# Mantis is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# Mantis is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Mantis. If not, see <http://www.gnu.org/licenses/>. + +require_once( 'core.php' ); + +auth_reauthenticate(); +access_ensure_global_level( config_get( 'manage_site_threshold' ) ); +$t_is_admin = access_has_global_level( config_get( 'admin_site_threshold' ) ); + +html_page_top1( lang_get( 'manage_link' ) ); +html_page_top2(); + +print_manage_menu(); +?> + +<br/> +<table class="width75" align="center" cellspacing="1"> + +<tr> +<td class="form-title" width="30%">Site Information</td> +</tr> + +<tr <?php echo helper_alternate_class() ?>> +<td class="category"><?php echo lang_get( 'mantis_version' ) ?></td> +<td><?php echo MANTIS_VERSION ?></td> +</tr> + +<tr <?php echo helper_alternate_class() ?>> +<td class="category"><?php echo lang_get( 'schema_version' ) ?></td> +<td><?php echo config_get( 'database_version' ) ?></td> +</tr> + +<?php if ( $t_is_admin ) { ?> +<tr class="spacer"> +<td></td> +</tr> + +<tr <?php echo helper_alternate_class() ?>> +<td class="category"><?php echo lang_get( 'site_path' ) ?></td> +<td><?php echo config_get( 'absolute_path' ) ?></td> +</tr> + +<tr <?php echo helper_alternate_class() ?>> +<td class="category"><?php echo lang_get( 'core_path' ) ?></td> +<td><?php echo config_get( 'core_path' ) ?></td> +</tr> + +<tr <?php echo helper_alternate_class() ?>> +<td class="category"><?php echo lang_get( 'plugin_path' ) ?></td> +<td><?php echo config_get( 'plugin_path' ) ?></td> +</tr> +<?php } ?> + +</table> + +<?php +html_page_bottom1( __FILE__ ); + Property changes on: trunk/mantisbt/manage_overview_page.php ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |