Skip to content

Commit

Permalink
- TICKET 7973: Possibility of configuring bigger execution icons
Browse files Browse the repository at this point in the history
  Changes on code position inside config files to allow simple configuration of images.
  • Loading branch information
fmancardi committed Jun 11, 2017
1 parent 10b3263 commit e067578
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 34 deletions.
5 changes: 0 additions & 5 deletions cfg/const.inc.php
Expand Up @@ -205,11 +205,6 @@
**/ **/
define('TL_STYLE_FOR_ADDED_TC', 'background-color:yellow;'); define('TL_STYLE_FOR_ADDED_TC', 'background-color:yellow;');


/** default filenames of CSS files of current GUI theme */
define('TL_CSS_MAIN', 'testlink.css');
define('TL_CSS_PRINT', 'tl_print.css');
define('TL_CSS_DOCUMENTS', 'tl_documents.css');

/** Browser Cookie keeptime */ /** Browser Cookie keeptime */
define('TL_COOKIE_KEEPTIME', (time()+60*60*24*30)); // 30 days define('TL_COOKIE_KEEPTIME', (time()+60*60*24*30)); // 30 days


Expand Down
71 changes: 43 additions & 28 deletions config.inc.php
Expand Up @@ -71,6 +71,32 @@
/** The root dir for the testlink installation with trailing slash */ /** The root dir for the testlink installation with trailing slash */
define('TL_ABS_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR); define('TL_ABS_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);


/** GUI themes (base for CSS and images)- modify if you create own one */
$tlCfg->theme_dir = 'gui/themes/default/';

/** Dir for compiled templates */
$tlCfg->temp_dir = TL_ABS_PATH . 'gui' . DIRECTORY_SEPARATOR .
'templates_c' . DIRECTORY_SEPARATOR;

/** default filenames of CSS files of current GUI theme */
define('TL_CSS_MAIN', 'testlink.css');
define('TL_CSS_PRINT', 'tl_print.css');
define('TL_CSS_DOCUMENTS', 'tl_documents.css');

define('TL_THEME_BASE_DIR', $tlCfg->theme_dir);
define('TL_THEME_IMG_DIR', $tlCfg->theme_dir . 'images/');
define('TL_THEME_CSS_DIR', $tlCfg->theme_dir . 'css/');
define('TL_TESTLINK_CSS', TL_THEME_CSS_DIR . TL_CSS_MAIN);
define('TL_PRINT_CSS', TL_THEME_CSS_DIR . TL_CSS_PRINT);

// name of your custom.css, place it in same folder that standard TL css
// null or '' => do not use
$tlCfg->custom_css = null;

// if you do not want to use this, redefine $tlCfg->custom_css as '' or null
define('TL_TESTLINK_CUSTOM_CSS', TL_THEME_CSS_DIR . $tlCfg->custom_css);


/** Include constants and magic numbers (users should not change it)*/ /** Include constants and magic numbers (users should not change it)*/
require_once(TL_ABS_PATH . 'cfg' . DIRECTORY_SEPARATOR . 'const.inc.php'); require_once(TL_ABS_PATH . 'cfg' . DIRECTORY_SEPARATOR . 'const.inc.php');


Expand Down Expand Up @@ -460,15 +486,9 @@
$tlCfg->api->id_format = "[ID: %s ]"; $tlCfg->api->id_format = "[ID: %s ]";




// -------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------
/* [GUI LAYOUT] */ /* [GUI LAYOUT] */


/** GUI themes (base for CSS and images)- modify if you create own one */
$tlCfg->theme_dir = 'gui/themes/default/';

/** Dir for compiled templates */
$tlCfg->temp_dir = TL_ABS_PATH . 'gui' . DIRECTORY_SEPARATOR . 'templates_c' . DIRECTORY_SEPARATOR;

/** Company logo (used by navigation bar and login page page) */ /** Company logo (used by navigation bar and login page page) */
$tlCfg->logo_login = 'tl-logo-transparent-25.png'; $tlCfg->logo_login = 'tl-logo-transparent-25.png';
$tlCfg->logo_navbar = 'tl-logo-transparent-12.5.png'; $tlCfg->logo_navbar = 'tl-logo-transparent-12.5.png';
Expand Down Expand Up @@ -1652,9 +1672,6 @@
*/ */
$g_prefix_name_for_copy = strftime("%Y%m%d-%H:%M:%S", time()); $g_prefix_name_for_copy = strftime("%Y%m%d-%H:%M:%S", time());


// name of your custom.css, place it in same folder that standard TL css
// null or '' => do not use
$tlCfg->custom_css = null;




/** /**
Expand All @@ -1674,6 +1691,11 @@
// 'tcSearchView' => 'myOwnTCSearchView.tpl', // 'tcSearchView' => 'myOwnTCSearchView.tpl',
// 'tcEdit' => 'tcEdit_ultraCool.tpl'); // 'tcEdit' => 'tcEdit_ultraCool.tpl');


/** Add o replace images */
$tlCfg->images = array();



// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
/* [PROXY] */ /* [PROXY] */
/* Used only */ /* Used only */
Expand All @@ -1697,11 +1719,6 @@
/** Functions for check request status */ /** Functions for check request status */
require_once('configCheck.php'); require_once('configCheck.php');


clearstatcache();
if ( file_exists( TL_ABS_PATH . 'custom_config.inc.php' ) )
{
require_once( TL_ABS_PATH . 'custom_config.inc.php' );
}


if( !defined('TL_JQUERY') ) if( !defined('TL_JQUERY') )
{ {
Expand All @@ -1713,12 +1730,17 @@
define('TL_DATATABLES_DIR','DataTables-1.10.4' ); define('TL_DATATABLES_DIR','DataTables-1.10.4' );
} }



/** root of testlink directory location seen through the web server */ /** root of testlink directory location seen through the web server */
/* 20070106 - franciscom - this statement it's not 100% right /* 20070106 - franciscom - this statement it's not 100% right
better use $_SESSION['basehref'] in the scripts. */ better use $_SESSION['basehref'] in the scripts. */
define('TL_BASE_HREF', get_home_url(array('force_https' => $tlCfg->force_https))); define('TL_BASE_HREF', get_home_url(array('force_https' => $tlCfg->force_https)));


clearstatcache();
if ( file_exists( TL_ABS_PATH . 'custom_config.inc.php' ) )
{
require_once( TL_ABS_PATH . 'custom_config.inc.php' );
}



if( !isset($g_attachments->access_icon) ) if( !isset($g_attachments->access_icon) )
{ {
Expand All @@ -1732,8 +1754,9 @@




/** Support for localization */ /** Support for localization */
// @TODO schlundus, move the code out of config and do it only once and not always in any include! // @TODO move the code out of config and do it only once and
// @TODO schlundus, a better parsing function should be include // not always in any include!
// @TODO a better parsing function should be include
$serverLanguage = false; $serverLanguage = false;
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
{ {
Expand Down Expand Up @@ -1767,25 +1790,17 @@
// Enable CSRF global protection // Enable CSRF global protection
$tlCfg->csrf_filter_enabled = TRUE; $tlCfg->csrf_filter_enabled = TRUE;


// -------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------
/** Converted and derived variables (Users should not modify this section) */ /** Converted and derived variables (Users should not modify this section) */
define('REFRESH_SPEC_TREE',$tlCfg->spec_cfg->automatic_tree_refresh ? 1 : 0); define('REFRESH_SPEC_TREE',$tlCfg->spec_cfg->automatic_tree_refresh ? 1 : 0);
define('TL_SORT_TABLE_ENGINE',$g_sort_table_engine); define('TL_SORT_TABLE_ENGINE',$g_sort_table_engine);
define("TL_REPOSITORY_MAXFILESIZE", 1024*1024*$tlCfg->repository_max_filesize); define("TL_REPOSITORY_MAXFILESIZE", 1024*1024*$tlCfg->repository_max_filesize);


define('TL_XMLEXPORT_HEADER', "<?xml version=\"1.0\" encoding=\"" . $tlCfg->charset . "\"?>\n"); define('TL_XMLEXPORT_HEADER', "<?xml version=\"1.0\" encoding=\"" . $tlCfg->charset . "\"?>\n");


define('TL_THEME_BASE_DIR', $tlCfg->theme_dir);
define('TL_THEME_IMG_DIR', $tlCfg->theme_dir . 'images/');
define('TL_THEME_CSS_DIR', $tlCfg->theme_dir . 'css/');
define('TL_TESTLINK_CSS', TL_THEME_CSS_DIR . TL_CSS_MAIN);
define('TL_PRINT_CSS', TL_THEME_CSS_DIR . TL_CSS_PRINT);

// if you do not want to use this, redefine $tlCfg->custom_css as '' or null
define('TL_TESTLINK_CUSTOM_CSS', TL_THEME_CSS_DIR . $tlCfg->custom_css);




// -------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------
// when a role is deleted, a new role must be assigned to all users // when a role is deleted, a new role must be assigned to all users
// having role to be deleted // having role to be deleted
// A right choice seems to be using $g_default_roleid. // A right choice seems to be using $g_default_roleid.
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion lib/functions/tlsmarty.inc.php
Expand Up @@ -454,7 +454,12 @@ static function getImageSet()
'test_status_passed_next' => $imgLoc . 'test_status_passed_next.png', 'test_status_passed_next' => $imgLoc . 'test_status_passed_next.png',
'test_status_failed_next' => $imgLoc . 'test_status_failed_next.png', 'test_status_failed_next' => $imgLoc . 'test_status_failed_next.png',
'test_status_blocked_next' => $imgLoc . 'test_status_blocked_next.png'); 'test_status_blocked_next' => $imgLoc . 'test_status_blocked_next.png');


$imi = config_get('images');
if(count($imi) >0)
{
$dummy = array_merge($dummy,$imi);
}
return $dummy; return $dummy;
} }


Expand Down

0 comments on commit e067578

Please sign in to comment.