Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 8913 | Rev 8915 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 8913 Rev 8914
Línea 1... Línea 1...
1
<?php
1
<?php
2
use LeadersLinked\Model\UserType;
-
 
3
 
-
 
4
$currentUser    = $this->currentUserHelper();
2
$currentUser    = $this->currentUserHelper();
5
$user = $currentUser->getUser();
3
$user = $currentUser->getUser();
6
$company = $currentUser->getCompany();
4
$company = $currentUser->getCompany();
Línea 7... Línea 5...
7
 
5
 
Línea 30... Línea 28...
30
	$this->inlineScript()->captureStart();
28
	$this->inlineScript()->captureStart();
31
	echo " jQuery( document ).ready(function( $ ) { $notify }); ";
29
	echo " jQuery( document ).ready(function( $ ) { $notify }); ";
32
	$this->inlineScript()->captureEnd();
30
	$this->inlineScript()->captureEnd();
33
}
31
}
Línea 34... Línea -...
34
 
-
 
35
if ($company) {
-
 
36
	$menu = getAclMenuCompany();
-
 
37
} else {
-
 
38
	$menu = getAclMenuSystem();
-
 
39
}
-
 
40
 
-
 
41
if ($company) {
-
 
42
	$names = explode(' ', $company->name);
-
 
43
	$companyId = $company->uuid;
-
 
44
	$companyName = $company->name;
-
 
45
	$companyImg = $company->image;
-
 
46
}
-
 
47
 
-
 
48
 
-
 
49
$usertype_id = $user->usertype_id;
-
 
50
 
-
 
51
//[REQUEST_URI] => /settings/company-sizes/
-
 
52
$request_uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';
-
 
53
 
-
 
54
if ($request_uri) {
-
 
55
  if (substr($request_uri, 0, 1) == '/') {
-
 
56
    $request_uri = substr($request_uri, 1);
-
 
57
  }
-
 
58
  if (substr($request_uri, strlen($request_uri) - 1, 1) == '/') {
-
 
59
    $request_uri = substr($request_uri, 0, strlen($request_uri) - 1);
-
 
60
  }
-
 
61
}
-
 
62
 
-
 
63
$acl = $this->viewModel()->getCurrent()->getVariable('acl');
-
 
64
 
-
 
65
$jsonMenu = json_encode($menu);
-
 
66
	
-
 
67
if($company){
-
 
68
$js = <<<JS
-
 
69
	const backendVars= {
-
 
70
		menu:JSON.parse('$jsonMenu'),
-
 
71
		companyId: "$company->uuid",
-
 
72
		companyImg: "$companyImg",
-
 
73
		companyName: "$companyName",
-
 
74
		name: "$names[0]",
-
 
75
	}	
-
 
76
JS;
-
 
77
} else {
-
 
78
	$js = <<<JS
-
 
79
	const backendVars= {
-
 
80
		menu:JSON.parse('$jsonMenu'),
-
 
81
		companyId: "",
-
 
82
		companyImg: "",
-
 
83
		companyName: "",
-
 
84
		name: "",
-
 
85
	}	
-
 
86
JS;
-
 
87
}
-
 
88
$this->inlineScript()->appendScript($js);
-
 
89
$this->inlineScript()->appendFile('/react-bundles/menu/menuBundle.js');
32
 
90
?>
33
?>
91
<!DOCTYPE html>
34
<!DOCTYPE html>
Línea 92... Línea 35...
92
<html lang="es">
35
<html lang="es">
Línea 125... Línea 68...
125
<body class="hold-transition sidebar-mini">
68
<body class="hold-transition sidebar-mini">
126
	<!-- Site wrapper -->
69
	<!-- Site wrapper -->
127
	<div class="wrapper">
70
	<div class="wrapper">
Línea 128... Línea 71...
128
 
71
 
-
 
72
		<!-- Main Sidebar Container -->
-
 
73
		<aside class="main-sidebar sidebar-light-primary right-border">
-
 
74
			<!-- Brand Logo -->
-
 
75
			<a href="<?php echo $this->url('dashboard') ?>" class="brand-link">
-
 
76
				<?php if ($company) :
129
		<!-- Main Sidebar Container -->
77
					$names = explode(' ', $company->name);
-
 
78
 
-
 
79
				?>
-
 
80
					<img src="<?php echo $this->url('storage', ['type' => 'company', 'code' => $company->uuid, 'filename' => $company->image]) ?>" alt="<?php echo $company->name ?>" class="brand-image " style="opacity: .8; background-color: white">
-
 
81
					<span class="brand-text font-weight-light"><?php echo $names[0] ?></span>
-
 
82
 
-
 
83
				<?php else : ?>
-
 
84
					<img src="<?php echo $this->basePath('img/logo-ll34x34.png') ?>" alt="Administrador" class="brand-image " style="opacity: .8; background-color: white">
-
 
85
					<span class="brand-text font-weight-light">Admin</span>
-
 
86
				<?php endif; ?>
-
 
87
			</a>
-
 
88
 
130
		
89
			<!-- Sidebar -->
-
 
90
			<div class="sidebar" id="menu-sidebar">
-
 
91
 
-
 
92
			</div>
-
 
93
			<!-- /.sidebar -->
Línea 131... Línea 94...
131
		<div id="menu-sidebar"></div>
94
		</aside>
132
 
95
 
133
		<!-- Content Wrapper. Contains page content -->
96
		<!-- Content Wrapper. Contains page content -->
134
		<div class="content-wrapper">
97
		<div class="content-wrapper">