1 |
www |
1 |
<?php
|
11565 |
efrain |
2 |
$currentUserHelper = $this->currentUserHelper();
|
|
|
3 |
$user = $currentUserHelper->getUser();
|
|
|
4 |
$company = $currentUserHelper->getCompany();
|
1 |
www |
5 |
|
|
|
6 |
$notify = '';
|
|
|
7 |
$messages = $this->flashMessenger()->getInfoMessages();
|
4686 |
stevensc |
8 |
foreach ($messages as $message) {
|
|
|
9 |
$notify .= "$.fn.showInfo('$message')";
|
1 |
www |
10 |
}
|
|
|
11 |
|
|
|
12 |
$messages = $this->flashMessenger()->getSuccessMessages();
|
4686 |
stevensc |
13 |
foreach ($messages as $message) {
|
|
|
14 |
$notify .= "$.fn.showSuccess('$message')";
|
1 |
www |
15 |
}
|
|
|
16 |
|
|
|
17 |
$messages = $this->flashMessenger()->getWarningMessages();
|
4686 |
stevensc |
18 |
foreach ($messages as $message) {
|
|
|
19 |
$notify .= " $.fn.showWarning('$message')";
|
1 |
www |
20 |
}
|
|
|
21 |
|
|
|
22 |
$messages = $this->flashMessenger()->getErrorMessages();
|
4686 |
stevensc |
23 |
foreach ($messages as $message) {
|
|
|
24 |
$notify .= " $.fn.showError('$message')";
|
1 |
www |
25 |
}
|
|
|
26 |
|
4686 |
stevensc |
27 |
if ($notify) {
|
|
|
28 |
$this->inlineScript()->captureStart();
|
|
|
29 |
echo " jQuery( document ).ready(function( $ ) { $notify }); ";
|
|
|
30 |
$this->inlineScript()->captureEnd();
|
1 |
www |
31 |
}
|
|
|
32 |
|
9056 |
stevensc |
33 |
if ($company) {
|
|
|
34 |
$menu = getAclMenuCompany();
|
|
|
35 |
} else {
|
|
|
36 |
$menu = getAclMenuSystem();
|
|
|
37 |
}
|
8922 |
stevensc |
38 |
|
9056 |
stevensc |
39 |
if ($company) {
|
|
|
40 |
$names = explode(' ', $company->name);
|
|
|
41 |
$companyId = $company->uuid;
|
|
|
42 |
$companyName = $company->name;
|
|
|
43 |
$companyImg = $company->image;
|
|
|
44 |
}
|
8922 |
stevensc |
45 |
|
9056 |
stevensc |
46 |
$usertype_id = $user->usertype_id;
|
|
|
47 |
|
|
|
48 |
//[REQUEST_URI] => /settings/company-sizes/
|
|
|
49 |
$request_uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';
|
|
|
50 |
|
|
|
51 |
if ($request_uri) {
|
14575 |
stevensc |
52 |
if (substr($request_uri, 0, 1) == '/') {
|
|
|
53 |
$request_uri = substr($request_uri, 1);
|
|
|
54 |
}
|
|
|
55 |
if (substr($request_uri, strlen($request_uri) - 1, 1) == '/') {
|
|
|
56 |
$request_uri = substr($request_uri, 0, strlen($request_uri) - 1);
|
|
|
57 |
}
|
9056 |
stevensc |
58 |
}
|
|
|
59 |
|
|
|
60 |
$acl = $this->viewModel()->getCurrent()->getVariable('acl');
|
|
|
61 |
|
|
|
62 |
$jsonMenu = json_encode($menu);
|
14575 |
stevensc |
63 |
|
|
|
64 |
if ($company) {
|
|
|
65 |
$js = <<<JS
|
9056 |
stevensc |
66 |
const backendVars= {
|
|
|
67 |
menu:JSON.parse('$jsonMenu'),
|
|
|
68 |
companyId: "$company->uuid",
|
|
|
69 |
companyImg: "$companyImg",
|
|
|
70 |
companyName: "$companyName",
|
|
|
71 |
name: "$names[0]",
|
|
|
72 |
}
|
|
|
73 |
JS;
|
|
|
74 |
} else {
|
|
|
75 |
$js = <<<JS
|
|
|
76 |
const backendVars= {
|
|
|
77 |
menu:JSON.parse('$jsonMenu'),
|
|
|
78 |
companyId: "",
|
|
|
79 |
companyImg: "",
|
|
|
80 |
companyName: "",
|
|
|
81 |
name: "",
|
|
|
82 |
}
|
|
|
83 |
JS;
|
|
|
84 |
}
|
|
|
85 |
$this->inlineScript()->appendScript($js);
|
|
|
86 |
$this->inlineScript()->appendFile('/react-bundles/menu/menuBundle.js');
|
|
|
87 |
|
1 |
www |
88 |
?>
|
|
|
89 |
<!DOCTYPE html>
|
|
|
90 |
<html lang="es">
|
|
|
91 |
|
4686 |
stevensc |
92 |
<head>
|
|
|
93 |
<?php
|
|
|
94 |
echo $this->headTitle();
|
|
|
95 |
echo $this->headMeta()->appendHttpEquiv('X-UA-Compatible', 'IE=edge')
|
|
|
96 |
->appendHttpEquiv('expires', '0')
|
|
|
97 |
->appendHttpEquiv('expires', 'Tue, 01 Jan 1980 1:00:00 GMT')
|
|
|
98 |
->appendHttpEquiv('pragma', 'no-cache')
|
|
|
99 |
->appendHttpEquiv('Cache-Control', 'no-store')
|
|
|
100 |
->appendHttpEquiv('Cache-Control', 'max-age=0')
|
|
|
101 |
->appendHttpEquiv('Cache-Control', 'no-cache')
|
|
|
102 |
->appendHttpEquiv('charset', 'UTF-8')
|
|
|
103 |
->appendName('viewport', 'width=device-width, initial-scale=1.0');
|
|
|
104 |
?>
|
1 |
www |
105 |
|
14575 |
stevensc |
106 |
<!-- Google Font: Source Sans Pro -->
|
|
|
107 |
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
|
|
|
108 |
<!-- Font Awesome -->
|
|
|
109 |
<link rel="stylesheet" href="<?php echo $this->basePath('plugins/font-awesome/css/font-awesome.css') ?>">
|
4686 |
stevensc |
110 |
<!-- Theme style -->
|
|
|
111 |
<link rel="stylesheet" href="<?php echo $this->basePath('css/adminlte.min.css') ?>">
|
|
|
112 |
<!-- App style -->
|
|
|
113 |
<link rel="stylesheet" href="<?php echo $this->basePath('css/app.css') ?>">
|
|
|
114 |
<link rel="stylesheet" href="<?php echo $this->basePath('/react-bundles/menu/main.css') ?>">
|
9002 |
stevensc |
115 |
<script src="<?php echo $this->basePath('plugins/ckeditor/ckeditor.js') ?>"></script>
|
1 |
www |
116 |
|
11578 |
nelberth |
117 |
<?php if ($currentUserHelper->hasIdentity()) : ?>
|
14575 |
stevensc |
118 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/icons.css') ?>" />
|
|
|
119 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('vendors/smiley/assets/sprites/emojione.sprites.css') ?>" />
|
|
|
120 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('vendors/uploader/jquery.ui.plupload/css/jquery-ui.css') ?>" />
|
|
|
121 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('vendors/uploader/jquery.ui.plupload/css/jquery.ui.plupload.css') ?>" />
|
|
|
122 |
|
|
|
123 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/chat.css') ?>" />
|
|
|
124 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/style.css') ?>" />
|
|
|
125 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/style-cesa.css') ?>" />
|
14900 |
stevensc |
126 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/responsive-cesa.css') ?>" />
|
11565 |
efrain |
127 |
<?php endif; ?>
|
11578 |
nelberth |
128 |
<?php
|
|
|
129 |
echo $this->headStyle();
|
|
|
130 |
echo $this->headLink();
|
|
|
131 |
echo $this->headScript();
|
|
|
132 |
?>
|
|
|
133 |
|
14575 |
stevensc |
134 |
|
|
|
135 |
|
4686 |
stevensc |
136 |
</head>
|
|
|
137 |
|
|
|
138 |
<body class="hold-transition sidebar-mini">
|
|
|
139 |
<!-- Site wrapper -->
|
14150 |
stevensc |
140 |
<div class="wrapper">
|
14575 |
stevensc |
141 |
|
14150 |
stevensc |
142 |
<div id="menu-sidebar"></div>
|
8759 |
stevensc |
143 |
|
4686 |
stevensc |
144 |
<!-- Content Wrapper. Contains page content -->
|
14143 |
stevensc |
145 |
<div class="content-wrapper">
|
4686 |
stevensc |
146 |
<section class="content">
|
|
|
147 |
<?php echo $this->content ?>
|
|
|
148 |
</section>
|
14575 |
stevensc |
149 |
|
|
|
150 |
|
|
|
151 |
<?php
|
11565 |
efrain |
152 |
if ($currentUserHelper->hasIdentity()) {
|
14575 |
stevensc |
153 |
echo $this->chatHelper($user->id);
|
11565 |
efrain |
154 |
}
|
|
|
155 |
?>
|
14575 |
stevensc |
156 |
|
4686 |
stevensc |
157 |
<!-- /.content -->
|
|
|
158 |
</div>
|
|
|
159 |
<!-- /.content-wrapper -->
|
|
|
160 |
</div>
|
|
|
161 |
<!-- jQuery -->
|
|
|
162 |
<script src="<?php echo $this->basePath('plugins/jquery/jquery.js') ?>"></script>
|
|
|
163 |
<!-- Bootstrap 4 -->
|
|
|
164 |
<script src="<?php echo $this->basePath('plugins/bootstrap/js/bootstrap.bundle.min.js') ?>"></script>
|
|
|
165 |
<!-- AdminLTE App -->
|
8906 |
stevensc |
166 |
<script src="<?php echo $this->basePath('js/adminlte.min.js') ?>"></script>
|
4686 |
stevensc |
167 |
<!-- Aplicacion -->
|
|
|
168 |
<script src="<?php echo $this->basePath('plugins/bootstrap-notify/bootstrap-notify.min.js') ?>"></script>
|
|
|
169 |
<script src="<?php echo $this->basePath('js/app.js') ?>"></script>
|
11577 |
nelberth |
170 |
<?php if ($currentUserHelper->hasIdentity()) : ?>
|
|
|
171 |
<script type="text/javascript" src="<?php echo $this->basePath('vendors/smiley/smiley.js') ?>"></script>
|
|
|
172 |
<script type="text/javascript" src="<?php echo $this->basePath('vendors/smiley/js/emojione.min.js') ?>"></script>
|
|
|
173 |
<?php endif; ?>
|
4686 |
stevensc |
174 |
<?php
|
|
|
175 |
echo $this->inlineScript();
|
|
|
176 |
?>
|
14575 |
stevensc |
177 |
|
|
|
178 |
|
4686 |
stevensc |
179 |
</body>
|
|
|
180 |
|
1 |
www |
181 |
</html>
|