mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 18:30:12 +01:00
added gui header customisation
This commit is contained in:
parent
01a92a4a16
commit
5e3651ac10
@ -358,3 +358,12 @@ create table if not exists `ldap` (
|
|||||||
) Engine=InnoDB;
|
) Engine=InnoDB;
|
||||||
|
|
||||||
|
|
||||||
|
create table if not exists `customer_settings` (
|
||||||
|
`domain` varchar(255) not null unique,
|
||||||
|
`branding_text` varchar(255) default null,
|
||||||
|
`branding_url` varchar(255) default null,
|
||||||
|
`support_link` varchar(255) default null,
|
||||||
|
`colour` varchar(255) default null
|
||||||
|
) Engine=InnoDB;
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,5 +14,12 @@ create table if not exists `ldap` (
|
|||||||
`ldap_bind_pw` varchar(255) not null
|
`ldap_bind_pw` varchar(255) not null
|
||||||
) Engine=InnoDB;
|
) Engine=InnoDB;
|
||||||
|
|
||||||
|
create table if not exists `customer_settings` (
|
||||||
|
`domain` varchar(255) not null unique,
|
||||||
|
`branding_text` varchar(255) default null,
|
||||||
|
`branding_url` varchar(255) default null,
|
||||||
|
`support_link` varchar(255) default null,
|
||||||
|
`colour` varchar(255) default null
|
||||||
|
) Engine=InnoDB;
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ $config['PILERGETD_PASSWORD'] = '';
|
|||||||
|
|
||||||
$config['BRANDING_TEXT'] = '';
|
$config['BRANDING_TEXT'] = '';
|
||||||
$config['BRANDING_URL'] = '';
|
$config['BRANDING_URL'] = '';
|
||||||
|
$config['SUPPORT_LINK'] = '';
|
||||||
|
|
||||||
$config['DEFAULT_LANG'] = 'en';
|
$config['DEFAULT_LANG'] = 'en';
|
||||||
|
|
||||||
@ -267,6 +268,7 @@ define('TABLE_ARCHIVING_RULE', 'archiving_rule');
|
|||||||
define('TABLE_RETENTION_RULE', 'retention_rule');
|
define('TABLE_RETENTION_RULE', 'retention_rule');
|
||||||
define('TABLE_OPTION', 'option');
|
define('TABLE_OPTION', 'option');
|
||||||
define('TABLE_LDAP', 'ldap');
|
define('TABLE_LDAP', 'ldap');
|
||||||
|
define('TABLE_CUSTOMER_SETTINGS', 'customer_settings');
|
||||||
define('TABLE_GOOGLE', 'google');
|
define('TABLE_GOOGLE', 'google');
|
||||||
define('TABLE_GOOGLE_IMAP', 'google_imap');
|
define('TABLE_GOOGLE_IMAP', 'google_imap');
|
||||||
define('VIEW_MESSAGES', 'v_messages');
|
define('VIEW_MESSAGES', 'v_messages');
|
||||||
|
@ -10,10 +10,14 @@ class ControllerCommonMenu extends Controller {
|
|||||||
|
|
||||||
$db = Registry::get('db');
|
$db = Registry::get('db');
|
||||||
|
|
||||||
|
$this->load->model('saas/customer');
|
||||||
|
|
||||||
$this->data['admin_user'] = Registry::get('admin_user');
|
$this->data['admin_user'] = Registry::get('admin_user');
|
||||||
$this->data['auditor_user'] = Registry::get('auditor_user');
|
$this->data['auditor_user'] = Registry::get('auditor_user');
|
||||||
$this->data['readonly_admin'] = Registry::get('readonly_admin');
|
$this->data['readonly_admin'] = Registry::get('readonly_admin');
|
||||||
|
|
||||||
|
$this->data['settings'] = $this->model_saas_customer->get_customer_settings_by_email();
|
||||||
|
|
||||||
$this->render();
|
$this->render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,6 +41,7 @@ $_['text_close'] = "Schließen";
|
|||||||
$_['text_compressed'] = "komprimiert";
|
$_['text_compressed'] = "komprimiert";
|
||||||
$_['text_confirm_to_reset_counters'] = "Zurücksetzen des Zählers bestätigen";
|
$_['text_confirm_to_reset_counters'] = "Zurücksetzen des Zählers bestätigen";
|
||||||
$_['text_connection_failed'] = "Connection failed";
|
$_['text_connection_failed'] = "Connection failed";
|
||||||
|
$_['text_contact_support'] = "Contact support";
|
||||||
$_['text_connection_ok'] = "Connection OK";
|
$_['text_connection_ok'] = "Connection OK";
|
||||||
$_['text_content_filter'] = "Inhaltsfilter";
|
$_['text_content_filter'] = "Inhaltsfilter";
|
||||||
$_['text_conversation_available'] = "Zugehörige Nachrichten vorhanden";
|
$_['text_conversation_available'] = "Zugehörige Nachrichten vorhanden";
|
||||||
|
@ -42,6 +42,7 @@ $_['text_compressed'] = "compressed";
|
|||||||
$_['text_confirm_to_reset_counters'] = "Confirm to reset counters";
|
$_['text_confirm_to_reset_counters'] = "Confirm to reset counters";
|
||||||
$_['text_connection_failed'] = "Connection failed";
|
$_['text_connection_failed'] = "Connection failed";
|
||||||
$_['text_connection_ok'] = "Connection OK";
|
$_['text_connection_ok'] = "Connection OK";
|
||||||
|
$_['text_contact_support'] = "Contact support";
|
||||||
$_['text_content_filter'] = "Content filter";
|
$_['text_content_filter'] = "Content filter";
|
||||||
$_['text_conversation_available'] = "Conversation available";
|
$_['text_conversation_available'] = "Conversation available";
|
||||||
$_['text_copied'] = "Copied";
|
$_['text_copied'] = "Copied";
|
||||||
|
@ -42,6 +42,7 @@ $_['text_compressed'] = "t
|
|||||||
$_['text_confirm_to_reset_counters'] = "Számlálók nullázásának megerõsítése";
|
$_['text_confirm_to_reset_counters'] = "Számlálók nullázásának megerõsítése";
|
||||||
$_['text_connection_failed'] = "Sikertelen kapcsolat";
|
$_['text_connection_failed'] = "Sikertelen kapcsolat";
|
||||||
$_['text_connection_ok'] = "Sikeres kapcsolat";
|
$_['text_connection_ok'] = "Sikeres kapcsolat";
|
||||||
|
$_['text_contact_support'] = "Segítég";
|
||||||
$_['text_content_filter'] = "Tartalomszûrõ";
|
$_['text_content_filter'] = "Tartalomszûrõ";
|
||||||
$_['text_conversation_available'] = "Levélváltás elérhetõ";
|
$_['text_conversation_available'] = "Levélváltás elérhetõ";
|
||||||
$_['text_copied'] = "Átmásolva";
|
$_['text_copied'] = "Átmásolva";
|
||||||
|
@ -42,6 +42,7 @@ $_['text_compressed'] = "tömörített";
|
|||||||
$_['text_confirm_to_reset_counters'] = "Számlálók nullázásának megerősítése";
|
$_['text_confirm_to_reset_counters'] = "Számlálók nullázásának megerősítése";
|
||||||
$_['text_connection_failed'] = "Sikertelen kapcsolat";
|
$_['text_connection_failed'] = "Sikertelen kapcsolat";
|
||||||
$_['text_connection_ok'] = "Sikeres kapcsolat";
|
$_['text_connection_ok'] = "Sikeres kapcsolat";
|
||||||
|
$_['text_contact_support'] = "Segítég";
|
||||||
$_['text_content_filter'] = "Tartalomszűrő";
|
$_['text_content_filter'] = "Tartalomszűrő";
|
||||||
$_['text_conversation_available'] = "Levélváltás elérhető";
|
$_['text_conversation_available'] = "Levélváltás elérhető";
|
||||||
$_['text_copied'] = "Átmásolva";
|
$_['text_copied'] = "Átmásolva";
|
||||||
|
@ -39,6 +39,7 @@ $_['text_clienthost'] = "Client host";
|
|||||||
$_['text_close'] = "Fechar";
|
$_['text_close'] = "Fechar";
|
||||||
$_['text_compressed'] = "comprimido";
|
$_['text_compressed'] = "comprimido";
|
||||||
$_['text_confirm_to_reset_counters'] = "Confirme para resetar os contadores";
|
$_['text_confirm_to_reset_counters'] = "Confirme para resetar os contadores";
|
||||||
|
$_['text_contact_support'] = "Contact support";
|
||||||
$_['text_content_filter'] = "Filtro de conteúdo";
|
$_['text_content_filter'] = "Filtro de conteúdo";
|
||||||
$_['text_conversation_available'] = "Conversão disponível";
|
$_['text_conversation_available'] = "Conversão disponível";
|
||||||
$_['text_copied'] = "Copiado";
|
$_['text_copied'] = "Copiado";
|
||||||
|
35
webui/model/saas/customer.php
Normal file
35
webui/model/saas/customer.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class ModelSaasCustomer extends Model
|
||||||
|
{
|
||||||
|
|
||||||
|
public function get_customer_settings_by_email() {
|
||||||
|
$data = array(
|
||||||
|
'branding_text' => BRANDING_TEXT,
|
||||||
|
'branding_url' => BRANDING_URL,
|
||||||
|
'branding_logo' => SITE_LOGO_SM,
|
||||||
|
'support_link' => SUPPORT_LINK,
|
||||||
|
'colour' => ''
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
if(!isset($_SESSION['email']) || !strchr($_SESSION['email'], '@') ) { return $data; }
|
||||||
|
|
||||||
|
list ($user, $domain) = explode("@", $_SESSION['email']);
|
||||||
|
|
||||||
|
$query = $this->db->query("SELECT * FROM " . TABLE_CUSTOMER_SETTINGS . " WHERE domain=(SELECT mapped FROM " . TABLE_DOMAIN . " WHERE domain=?)", array($domain));
|
||||||
|
|
||||||
|
if($query->num_rows > 0) {
|
||||||
|
if($query->row['branding_text']) { $data['branding_text'] = $query->row['branding_text']; }
|
||||||
|
if($query->row['branding_url']) { $data['branding_url'] = $query->row['branding_url']; }
|
||||||
|
if($query->row['branding_logo']) { $data['branding_logo'] = $query->row['branding_logo']; }
|
||||||
|
if($query->row['support_link']) { $data['support_link'] = $query->row['support_link']; }
|
||||||
|
if($query->row['colour']) { $data['colour'] = $query->row['colour']; }
|
||||||
|
}
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<div class="navbar navbar-fixed-top">
|
<div class="navbar navbar-fixed-top">
|
||||||
<div class="navbar-inner">
|
<div class="navbar-inner">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid"<?php if($settings['colour']) { ?> style="background: <?php print $settings['colour']; ?>;"<?php } ?>>
|
||||||
|
|
||||||
<!-- <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
<!-- <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
@ -10,7 +10,7 @@
|
|||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
</a> -->
|
</a> -->
|
||||||
|
|
||||||
<a class="brand" href="/" title="<?php print SITE_NAME; ?>"><img src="<?php print SITE_LOGO_SM; ?>" alt="<?php print SITE_NAME; ?>" /></a>
|
<a class="brand" href="<?php print $settings['branding_url']; ?>" title="<?php print $settings['branding_text']; ?>"><img src="<?php print $settings['branding_logo']; ?>" alt="<?php print $settings['branding_text']; ?>" /></a>
|
||||||
|
|
||||||
|
|
||||||
<!-- <div class="nav-collapse"> -->
|
<!-- <div class="nav-collapse"> -->
|
||||||
@ -52,6 +52,9 @@
|
|||||||
<li><a href="index.php?route=audit/audit"><i class="icon-book"></i> <?php print $text_audit; ?></a></li>
|
<li><a href="index.php?route=audit/audit"><i class="icon-book"></i> <?php print $text_audit; ?></a></li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if($settings['support_link']) { ?>
|
||||||
|
<li><a href="<?php print $settings['support_link']; ?>"><?php print $text_contact_support; ?></a></li>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<?php if(ENABLE_FOLDER_RESTRICTIONS == 1) { ?>
|
<?php if(ENABLE_FOLDER_RESTRICTIONS == 1) { ?>
|
||||||
<li><a href="/folders.php"><i class="icon-folder-close"></i> <?php print $text_folders; ?></a></li>
|
<li><a href="/folders.php"><i class="icon-folder-close"></i> <?php print $text_folders; ?></a></li>
|
||||||
@ -59,9 +62,12 @@
|
|||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<ul class="nav pull-right">
|
<ul class="nav pull-right">
|
||||||
|
<li><a href="<?php print $settings['branding_url']; ?>" target="_blank" <?php if($settings['colour']) { ?>style="background: <?php print $settings['colour']; ?>;"<?php } ?>><i class="icon-phone"></i> <?php print $settings['branding_text']; ?></a></li>
|
||||||
|
|
||||||
<li class="dropdown">
|
<li class="dropdown">
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-user"></i> <?php if(isset($_SESSION['realname'])) { print $_SESSION['realname']; ?> <?php } ?><b class="caret"></b></a>
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-user"></i> <?php if(isset($_SESSION['realname'])) { print $_SESSION['realname']; ?> <?php } ?><b class="caret"></b></a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
|
Loading…
Reference in New Issue
Block a user