Просмотр исходного кода

Moving 'Go To Custom Fileds' link from the Edit page to game monitor as a button

®omano 8 лет назад
Родитель
Сommit
aa821dbea6

BIN
images/customfields.png


+ 1 - 0
lang/English/modules/gamemanager.php

@@ -204,4 +204,5 @@ define('cid', "CID");
 define('phan', "Phantom");
 define('sec', "Seconds");
 define('unknown_rsync_mirror', "You attempted to start an update from a mirror which doesn't exist.");
+define('go_to_custom_fields', "Go to Custom Fields");
 ?>

+ 0 - 1
lang/English/modules/user_games.php

@@ -195,7 +195,6 @@ define('sucessfully_deleted', "Sucessfully deleted %s");
 define('the_agent_had_a_problem_deleting', "The Agent had a problem while deleting %s. Please, check the Agent's log.");
 define('connection_timeout_or_problems_reaching_the_agent', "Connection timeout or problems with reaching the Agent");
 define('does_not_exist_yet', "Does not exist yet.");
-define('go_to_custom_fields', "Go to Custom Fields");
 define('back_to_edit_server', "Back to edit server");
 define('update_settings', "Update settings");
 define('settings_updated', "Settings updated.");

+ 10 - 0
modules/gamemanager/server_monitor.php

@@ -452,6 +452,16 @@ function exec_ogp_module() {
 									<span>". edit_configuration_files ."</span>
 					</a>";
 				}
+
+				if (preg_match("/c/",$server_home['access_rights'])){
+					if( isset($server_xml->custom_fields) ) {
+						$manager .= "<a href=\"?m=user_games&p=custom_fields&home_id=".$server_home['home_id']."\" class=\"monitorbutton\">
+										<img src='" . check_theme_image("images/customfields.png") . "' title='". go_to_custom_fields ."'>
+										<span>". go_to_custom_fields ."</span>
+									</a>";
+					}
+				}
+
 			}
 
 			if( $isAdmin )

+ 0 - 5
modules/user_games/edit_home.php

@@ -612,18 +612,13 @@ function exec_ogp_module()
 	}
 	echo "</div>";
 	$home_info = $db->getGameHomeWithoutMods($home_id);
-	$custom_fileds_access_enabled = preg_match("/c/",$game_home['access_rights']) > 0 ? TRUE : FALSE;
 	echo "<p>";
 	echo "<a href='?m=gamemanager&p=game_monitor&home_id=$home_id'>&lt;&lt; ". back_to_game_monitor ."</a>";
 	if ( $isAdmin )
 	{
 		echo " &nbsp; ";
 		echo "<a href='?m=user_games'>&lt;&lt; ". back_to_game_servers ."</a>";
-		$custom_fileds_access_enabled = TRUE;
 	}
-	if( isset($server_xml->custom_fields) and $custom_fileds_access_enabled )
-		echo " &nbsp; <a href='?m=user_games&p=custom_fields&home_id=".$home_id."'>". go_to_custom_fields ." &gt;&gt;</a>";
-	
 	echo "</p>";
 	echo "<table class='center' id='main_settings' >";	
 	if ( $isAdmin )