Radio Page Code Review Changes
Defined a SAAS_PRODUCT_BRANDING_NAME constant. Defined constants for default station logo.
This commit is contained in:
parent
0796f58878
commit
8e8f8aa55b
5 changed files with 11 additions and 25 deletions
|
@ -3,6 +3,8 @@
|
||||||
define('PRODUCT_NAME' , 'Airtime');
|
define('PRODUCT_NAME' , 'Airtime');
|
||||||
define('PRODUCT_SITE_URL' , 'http://airtime.sourcefabric.org');
|
define('PRODUCT_SITE_URL' , 'http://airtime.sourcefabric.org');
|
||||||
|
|
||||||
|
define('SAAS_PRODUCT_BRANDING_NAME', 'Airtime Pro');
|
||||||
|
|
||||||
define('COMPANY_NAME' , 'Sourcefabric');
|
define('COMPANY_NAME' , 'Sourcefabric');
|
||||||
define('COMPANY_SUFFIX' , 'z.ú.');
|
define('COMPANY_SUFFIX' , 'z.ú.');
|
||||||
define('COMPANY_SITE' , 'Sourcefabric.org');
|
define('COMPANY_SITE' , 'Sourcefabric.org');
|
||||||
|
@ -20,6 +22,9 @@ define('AIRTIME_COPYRIGHT_DATE' , '2010-2012');
|
||||||
define('AIRTIME_REST_VERSION' , '1.1');
|
define('AIRTIME_REST_VERSION' , '1.1');
|
||||||
define('AIRTIME_API_VERSION' , '1.1');
|
define('AIRTIME_API_VERSION' , '1.1');
|
||||||
|
|
||||||
|
define('DEFAULT_LOGO_PLACEHOLDER', 1);
|
||||||
|
define('DEFAULT_LOGO_FILE', 'airtime_logo.png');
|
||||||
|
|
||||||
// Metadata Keys for files
|
// Metadata Keys for files
|
||||||
define('MDATA_KEY_FILEPATH' , 'filepath');
|
define('MDATA_KEY_FILEPATH' , 'filepath');
|
||||||
define('MDATA_KEY_DIRECTORY' , 'directory');
|
define('MDATA_KEY_DIRECTORY' , 'directory');
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link href='http://fonts.googleapis.com/css?family=Roboto:400,100,300,700' rel='stylesheet' type='text/css'>
|
<link href='http://fonts.googleapis.com/css?family=Roboto:400,100,300,700' rel='stylesheet' type='text/css'>
|
||||||
|
|
||||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
|
|
||||||
<?php echo $this->headTitle() ?>
|
<?php echo $this->headTitle() ?>
|
||||||
<?php echo $this->headLink() ?>
|
<?php echo $this->headLink() ?>
|
||||||
<?php echo $this->headScript() ?>
|
<?php echo $this->headScript() ?>
|
||||||
|
@ -14,23 +13,5 @@
|
||||||
|
|
||||||
<?php echo $this->layout()->content ?>
|
<?php echo $this->layout()->content ?>
|
||||||
|
|
||||||
<!--
|
|
||||||
<div class="footer">
|
|
||||||
<?php
|
|
||||||
$company = COMPANY_NAME . " " . COMPANY_SUFFIX;
|
|
||||||
$licenseSiteAnchor = "<a href='" . LICENSE_URL . "'>"
|
|
||||||
. LICENSE_VERSION
|
|
||||||
. "</a>";
|
|
||||||
$companySiteAnchor = "<a href='" . COMPANY_SITE_URL . "'>"
|
|
||||||
. $company
|
|
||||||
. "</a>";
|
|
||||||
echo sprintf(_('%1$s copyright © %2$s All rights reserved.<br />'
|
|
||||||
. 'Maintained and distributed under the %3$s by %4$s'),
|
|
||||||
PRODUCT_NAME, $company,
|
|
||||||
$licenseSiteAnchor,
|
|
||||||
$companySiteAnchor);
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
-->
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -502,7 +502,7 @@ class Application_Model_Preference
|
||||||
if (!empty($description)) {
|
if (!empty($description)) {
|
||||||
return $description;
|
return $description;
|
||||||
} else {
|
} else {
|
||||||
return "Powered by Airtime Pro";
|
return sprintf(_("Powered by %s"), SAAS_PRODUCT_BRANDING_NAME);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -613,7 +613,7 @@ class Application_Model_Preference
|
||||||
} else {
|
} else {
|
||||||
// We return the Airtime logo if no logo is set in the database.
|
// We return the Airtime logo if no logo is set in the database.
|
||||||
// airtime_logo.png is stored under the public directory
|
// airtime_logo.png is stored under the public directory
|
||||||
return "airtime_logo.png";
|
return DEFAULT_LOGO_PLACEHOLDER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
<div id="Logo-img-container">
|
<div id="Logo-img-container">
|
||||||
<?php
|
<?php
|
||||||
$logoImg = $this->element->getView()->logoImg;
|
$logoImg = $this->element->getView()->logoImg;
|
||||||
if ($logoImg === "airtime_logo.png") {
|
if ($logoImg === DEFAULT_LOGO_PLACEHOLDER) {
|
||||||
$src = "airtime_logo.png";
|
$src = DEFAULT_LOGO_FILE;
|
||||||
} else {
|
} else {
|
||||||
$src = "data:image/png;base64,".$logoImg;
|
$src = "data:image/png;base64,".$logoImg;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
|
|
||||||
<div class="bck_cover"></div>
|
<div class="bck_cover"></div>
|
||||||
|
|
||||||
<?php if ($this->stationLogo === "airtime_logo.png") {
|
<?php if ($this->stationLogo === DEFAULT_LOGO_PLACEHOLDER) {
|
||||||
echo "<a href='#' class='logo'><img src='airtime_logo.png'></a>";
|
echo "<a href='#' class='logo'><img src='".DEFAULT_LOGO_FILE."'></a>";
|
||||||
} else {
|
} else {
|
||||||
echo "<a href='#' class='logo'><img src='data:image/png;base64," . $this->stationLogo . "'></a>";
|
echo "<a href='#' class='logo'><img src='data:image/png;base64," . $this->stationLogo . "'></a>";
|
||||||
} ?>
|
} ?>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue