Proyectos de Subversion LeadersLinked - Backend

Rev

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

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