Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 14145 | Rev 14575 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
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) {
14150 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);
14150 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
 
14150 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()) :  ?>
14150 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') ?>" />
11565 efrain 124
	<?php endif; ?>
11578 nelberth 125
	<?php
126
	echo $this->headStyle();
127
	echo $this->headLink();
128
	echo $this->headScript();
129
	?>
14150 stevensc 130
 
11578 nelberth 131
 
14150 stevensc 132
 
4686 stevensc 133
</head>
134
 
135
<body class="hold-transition sidebar-mini">
136
	<!-- Site wrapper -->
14150 stevensc 137
	<div class="wrapper">
138
 
139
		<div id="menu-sidebar"></div>
8759 stevensc 140
 
4686 stevensc 141
		<!-- Content Wrapper. Contains page content -->
14143 stevensc 142
		<div class="content-wrapper">
4686 stevensc 143
			<section class="content">
144
				<?php echo $this->content ?>
145
			</section>
14150 stevensc 146
 
147
 
148
			<?php
11565 efrain 149
			if ($currentUserHelper->hasIdentity()) {
14150 stevensc 150
			    echo $this->chatHelper($user->id);
11565 efrain 151
			}
152
			?>
14150 stevensc 153
 
4686 stevensc 154
			<!-- /.content -->
155
		</div>
156
		<!-- /.content-wrapper -->
157
	</div>
158
	<!-- jQuery -->
159
	<script src="<?php echo $this->basePath('plugins/jquery/jquery.js') ?>"></script>
160
	<!-- Bootstrap 4 -->
161
	<script src="<?php echo $this->basePath('plugins/bootstrap/js/bootstrap.bundle.min.js') ?>"></script>
162
	<!-- AdminLTE App -->
8906 stevensc 163
	<script src="<?php echo $this->basePath('js/adminlte.min.js') ?>"></script>
4686 stevensc 164
	<!--  Aplicacion -->
165
	<script src="<?php echo $this->basePath('plugins/bootstrap-notify/bootstrap-notify.min.js') ?>"></script>
166
	<script src="<?php echo $this->basePath('js/app.js') ?>"></script>
11577 nelberth 167
	<?php if ($currentUserHelper->hasIdentity()) :  ?>
168
		<script type="text/javascript" src="<?php echo $this->basePath('vendors/smiley/smiley.js') ?>"></script>
169
		<script type="text/javascript" src="<?php echo $this->basePath('vendors/smiley/js/emojione.min.js') ?>"></script>
170
	<?php endif; ?>
4686 stevensc 171
	<?php
172
	echo $this->inlineScript();
173
	?>
14150 stevensc 174
 
175
 
4686 stevensc 176
</body>
177
 
1 www 178
</html>