diff --git a/Source/Source.php b/Source/Source.php index af7eedc..e971712 100644 --- a/Source/Source.php +++ b/Source/Source.php @@ -38,6 +38,7 @@ return array( 'show_repo_link' => ON, 'show_search_link' => OFF, + 'show_repo_stats' => ON, 'view_threshold' => VIEWER, 'update_threshold' => UPDATER, diff --git a/Source/lang/strings_english.txt b/Source/lang/strings_english.txt index 2895f0c..383fd71 100644 --- a/Source/lang/strings_english.txt +++ b/Source/lang/strings_english.txt @@ -92,6 +92,7 @@ $s_plugin_Source_menu_links = 'Main Menu Links'; $s_plugin_Source_show_repo_link = 'Repositories'; $s_plugin_Source_show_search_link = 'Search'; +$s_plugin_Source_show_repo_stats = 'Repository Statistics'; $s_plugin_Source_enabled_features = 'Enabled Features'; $s_plugin_Source_enable_mapping = 'Branch Mappings'; $s_plugin_Source_enable_resolving = 'Resolve Fixed Issues'; diff --git a/Source/pages/index.php b/Source/pages/index.php index 950ca48..1edc757 100644 --- a/Source/pages/index.php +++ b/Source/pages/index.php @@ -14,6 +14,11 @@ access_ensure_global_level( plugin_config_get( 'view_threshold' ) ); $t_can_manage = access_has_global_level( plugin_config_get( 'manage_threshold' ) ); +$t_show_stats = plugin_config_get( 'show_repo_stats' ); +$t_class = $t_show_stats ? 'width75' : 'width60'; +$t_title_span = $t_show_stats ? 2 : 1; +$t_links_span = $t_show_stats ? 4 : 2; + $t_types = SourceTypes(); $t_repos = SourceRepo::load_all(); @@ -22,11 +27,11 @@ ?>
- +
- - + + + -stats(); ?> +> +stats(); ?> +>
+
name ) ?> type ) ) ?> id, plugin_lang_get( 'changesets' ) ); diff --git a/Source/pages/manage_config.php b/Source/pages/manage_config.php index 7eb93a2..1e810ed 100644 --- a/Source/pages/manage_config.php +++ b/Source/pages/manage_config.php @@ -22,6 +22,7 @@ $f_show_repo_link = gpc_get_bool( 'show_repo_link', OFF ); $f_show_search_link = gpc_get_bool( 'show_search_link', OFF ); +$f_show_repo_stats = gpc_get_bool( 'show_repo_stats', OFF ); $f_enable_mapping = gpc_get_bool( 'enable_mapping', OFF ); $f_enable_resolving = gpc_get_bool( 'enable_resolving', OFF ); @@ -78,6 +79,7 @@ maybe_set_option( 'show_repo_link', $f_show_repo_link ); maybe_set_option( 'show_search_link', $f_show_search_link ); +maybe_set_option( 'show_repo_stats', $f_show_repo_stats ); maybe_set_option( 'enable_mapping', $f_enable_mapping ); maybe_set_option( 'enable_resolving', $f_enable_resolving ); diff --git a/Source/pages/manage_config_page.php b/Source/pages/manage_config_page.php index 88b3697..55a99d7 100644 --- a/Source/pages/manage_config_page.php +++ b/Source/pages/manage_config_page.php @@ -69,6 +69,8 @@
+