mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-24 04:30:12 +01:00
- Including files for new customer UI features left out of last commit
This commit is contained in:
parent
9f6d3fd802
commit
3376984ec9
26
webui/controller/common/layout-customer.php
Normal file
26
webui/controller/common/layout-customer.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
class ControllerCommonLayoutCustomer extends Controller {
|
||||
|
||||
protected function index() {
|
||||
|
||||
|
||||
$this->data['title'] = $this->document->title;
|
||||
|
||||
$this->template = "common/layout-customer.tpl";
|
||||
|
||||
|
||||
$this->children = array(
|
||||
"common/menu",
|
||||
"common/footer"
|
||||
);
|
||||
|
||||
$this->render();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
@ -8,7 +8,7 @@ class ControllerCustomerList extends Controller {
|
||||
|
||||
$this->id = "content";
|
||||
$this->template = "customer/list.tpl";
|
||||
$this->layout = "common/layout";
|
||||
$this->layout = "common/layout-customer";
|
||||
|
||||
|
||||
$request = Registry::get('request');
|
||||
@ -34,12 +34,6 @@ class ControllerCustomerList extends Controller {
|
||||
|
||||
if(isset($this->request->get['id'])) { $this->data['id'] = $this->request->get['id']; }
|
||||
|
||||
$this->data['search'] = '';
|
||||
|
||||
if(isset($this->request->post['search'])) { $this->data['search'] = $this->request->post['search']; }
|
||||
else if(isset($this->request->get['search'])) { $this->data['search'] = $this->request->get['search']; }
|
||||
|
||||
|
||||
/* check if we are admin */
|
||||
|
||||
if(Registry::get('admin_user') == 1) {
|
||||
@ -78,7 +72,7 @@ class ControllerCustomerList extends Controller {
|
||||
$this->data['a'] = $this->model_saas_customer->get($this->data['id']);
|
||||
}
|
||||
else {
|
||||
$this->data['entries'] = $this->model_saas_customer->search($this->data['search']);
|
||||
$this->data['entries'] = $this->model_saas_customer->get();
|
||||
}
|
||||
|
||||
if ( isset($this->data['errorstring']) ) {
|
||||
@ -88,8 +82,7 @@ class ControllerCustomerList extends Controller {
|
||||
if (isset($this->request->post['branding_url'])) { $this->data['a']['branding_url'] = $this->request->post['branding_url'];}
|
||||
if (isset($this->request->post['branding_logo'])) { $this->data['a']['branding_logo'] = $this->request->post['branding_logo'];}
|
||||
if (isset($this->request->post['support_link'])) { $this->data['a']['support_link'] = $this->request->post['support_link'];}
|
||||
if (isset($this->request->post['text_colour'])) { $this->data['a']['text_colour'] = $this->request->post['text_colour'];}
|
||||
if (isset($this->request->post['background_colour'])) { $this->data['a']['background_colour'] = $this->request->post['background_colour'];}
|
||||
if (isset($this->request->post['colour'])) { $this->data['a']['colour'] = $this->request->post['colour'];}
|
||||
}
|
||||
|
||||
}
|
||||
@ -113,11 +106,8 @@ class ControllerCustomerList extends Controller {
|
||||
$this->error['branding_text'] = $this->data['text_field_required'];
|
||||
}
|
||||
// if colour is provided it must be in the format #fcfcfc or #fcf
|
||||
if(isset($this->request->post['text_colour']) && strlen($this->request->post['text_colour']) > 0 && !preg_match('/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/', $this->request->post['text_colour'])) {
|
||||
$this->error['text_colour'] = $this->data['text_field_colour'];
|
||||
}
|
||||
if(isset($this->request->post['background_colour']) && strlen($this->request->post['background_colour']) > 0 && !preg_match('/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/', $this->request->post['background_colour'])) {
|
||||
$this->error['background_colour'] = $this->data['text_field_colour'];
|
||||
if(isset($this->request->post['colour']) && strlen($this->request->post['colour']) > 0 && !preg_match('/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/', $this->request->post['colour'])) {
|
||||
$this->error['colour'] = $this->data['text_field_colour'];
|
||||
}
|
||||
|
||||
if (!$this->error) {
|
||||
|
@ -0,0 +1,67 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print DEFAULT_LANG; ?>" lang="<?php print DEFAULT_LANG; ?>">
|
||||
|
||||
<head>
|
||||
<title><?php print $title; ?> | <?php print SITE_NAME; ?> <?php if(PROVIDED_BY) { print PROVIDED_BY; } ?></title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="Content-Language" content="en" />
|
||||
<?php if(SITE_KEYWORDS) { ?><meta name="keywords" content="<?php print SITE_KEYWORDS; ?>" /><?php } ?>
|
||||
<?php if(SITE_DESCRIPTION) { ?><meta name="description" content="<?php print SITE_DESCRIPTION; ?>" /><?php } ?>
|
||||
<?php if(PROVIDED_BY) { ?><meta name="author" content="<?php print PROVIDED_BY; ?>" /><?php } ?>
|
||||
<meta name="rating" content="general" />
|
||||
<meta name="robots" content="all" />
|
||||
|
||||
<link href="/view/theme/default/assets/css/metro-bootstrap.css" rel="stylesheet" />
|
||||
|
||||
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||
<!-- original location: http://html5shim.googlecode.com/svn/trunk/html5.js -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="/view/theme/default/assets/js/html5.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<script type="text/javascript" src="/view/javascript/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="/view/javascript/jquery-ui-custom.min.js"></script>
|
||||
<script type="text/javascript" src="/view/javascript/rc-splitter.js"></script>
|
||||
<script type="text/javascript" src="/view/theme/default/assets/js/bootstrap.js"></script>
|
||||
<script type="text/javascript" src="/view/theme/default/assets/js/fileupload.js"></script>
|
||||
<script type="text/javascript" src="/view/theme/default/assets/js/jscolor.js"></script>
|
||||
<script type="text/javascript" src="/view/javascript/piler.js"></script>
|
||||
<!-- Fav and touch icons -->
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/view/theme/default/assets/ico/apple-touch-icon-144-precomposed.png">
|
||||
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/view/theme/default/assets/ico/apple-touch-icon-114-precomposed.png">
|
||||
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/view/theme/default/assets/ico/apple-touch-icon-72-precomposed.png">
|
||||
<link rel="apple-touch-icon-precomposed" href="/view/theme/default/assets/ico/apple-touch-icon-57-precomposed.png">
|
||||
<link rel="shortcut icon" href="/view/theme/default/assets/ico/favicon.png">
|
||||
</head>
|
||||
|
||||
<body<?php
|
||||
|
||||
if(isset($this->request->get['route'])) {
|
||||
|
||||
if($this->request->get['route'] == 'health/health') { ?> onload="Piler.load_health(); setInterval('Piler.load_health()', Piler.health_refresh * 1000);"<?php }
|
||||
if($this->request->get['route'] == 'stat/online') { ?> onload="setInterval('Piler.reload_page()', Piler.health_refresh * 1000);"<?php }
|
||||
|
||||
} ?>>
|
||||
|
||||
<div id="menu">
|
||||
<?php print $menu; ?>
|
||||
</div>
|
||||
|
||||
<div id="piler1" class="container">
|
||||
|
||||
|
||||
<div id="main">
|
||||
|
||||
<?php if($title) { ?><h3><?php print $title; ?></h3><?php } ?>
|
||||
|
||||
<?php print $content; ?>
|
||||
|
||||
</div> <!-- main -->
|
||||
|
||||
<div id="footer"><?php print $footer; ?></div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user