Allow installs to add a custom corp/org header link

Summary: A bunch of installs are doing this to varying degrees of success anyway, make it easier and nudge them toward a more consistent approach.

Test Plan: Set a custom logo, viewed normal and admin pages.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, epriestley

Maniphest Tasks: T700

Differential Revision: https://secure.phabricator.com/D2019
This commit is contained in:
epriestley
2012-03-26 09:29:31 -07:00
parent f8932b83da
commit ae9d1bf9ae
10 changed files with 57 additions and 6 deletions

View File

@@ -356,13 +356,30 @@ final class PhabricatorStandardPageView extends AphrontPageView {
$admin_class = 'phabricator-admin-page-view';
}
$custom_logo = null;
$with_custom = null;
$custom_conf = PhabricatorEnv::getEnvConfig('phabricator.custom.logo');
if ($custom_conf) {
$with_custom = 'phabricator-logo-with-custom';
$custom_logo = phutil_render_tag(
'a',
array(
'class' => 'logo-custom',
'href' => $custom_conf,
),
' ');
}
$header_chrome = null;
$footer_chrome = null;
if ($this->getShowChrome()) {
$header_chrome =
'<table class="phabricator-standard-header">'.
'<tr>'.
'<td class="phabricator-logo"><a href="/"> </a></td>'.
'<td class="phabricator-logo '.$with_custom.'">'.
$custom_logo.
'<a class="logo-standard" href="/"> </a>'.
'</td>'.
'<td>'.
'<table class="phabricator-primary-navigation">'.
'<tr>'.