267 lines
11 KiB
PHTML
267 lines
11 KiB
PHTML
<?php
|
|
|
|
use PHPCensor\Helper\Lang;
|
|
|
|
$user = $this->getUser();
|
|
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title><?= $title; ?><?= (!empty($subtitle) ? ' - ' . $subtitle : ''); ?></title>
|
|
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
|
|
|
|
<link href="<?= APP_URL; ?>assets/vendor/admin-lte/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
|
|
<link href="<?= APP_URL; ?>assets/vendor/admin-lte/dist/css/AdminLTE.min.css" rel="stylesheet" type="text/css" />
|
|
<link href="<?= APP_URL; ?>assets/css/ansi-colors.css" rel="stylesheet" type="text/css" />
|
|
<link href="<?= APP_URL; ?>assets/css/main.css" rel="stylesheet" type="text/css" />
|
|
|
|
<link href="<?= APP_URL; ?>assets/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
|
|
<link href="<?= APP_URL; ?>assets/vendor/ionicons/css/ionicons.min.css" rel="stylesheet" type="text/css" />
|
|
|
|
<script src="<?= APP_URL; ?>assets/js/class.js"></script>
|
|
|
|
<script src="<?= APP_URL; ?>assets/vendor/admin-lte/plugins/jQuery/jquery-2.2.3.min.js"></script>
|
|
<script src="<?= APP_URL; ?>assets/vendor/admin-lte/plugins/jQueryUI/jquery-ui.min.js" type="text/javascript"></script>
|
|
<script src="<?= APP_URL; ?>assets/vendor/admin-lte/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
|
|
|
|
<link href="<?= APP_URL; ?>assets/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
|
|
<script src="<?= APP_URL; ?>assets/vendor/admin-lte/plugins/chartjs/Chart.min.js" type="text/javascript"></script>
|
|
<script src="<?= APP_URL; ?>assets/vendor/admin-lte/dist/js/app.min.js" type="text/javascript"></script>
|
|
<script src="<?= APP_URL; ?>assets/vendor/sprintf-js/dist/sprintf.min.js"></script>
|
|
|
|
<script src="<?= APP_URL; ?>assets/js/app.js?v2" type="text/javascript"></script>
|
|
<script src="<?= APP_URL; ?>assets/vendor/notifyjs/dist/notify.js" type="text/javascript"></script>
|
|
|
|
<script>
|
|
var APP_URL = '<?= APP_URL; ?>';
|
|
var LANGUAGE = '<?= Lang::getLanguage(); ?>';
|
|
|
|
<?php if (defined('JSON_UNESCAPED_UNICODE')): ?>
|
|
var STRINGS = <?= json_encode(Lang::getStrings(), JSON_UNESCAPED_UNICODE); ?>;
|
|
<?php else: ?>
|
|
var STRINGS = <?= json_encode(Lang::getStrings()); ?>;
|
|
<?php endif; ?>
|
|
</script>
|
|
|
|
</head>
|
|
<body class="app-layout <?= (!empty($skin) ? 'skin-' . $skin : 'skin-black'); ?>">
|
|
<div class="wrapper row-offcanvas row-offcanvas-left">
|
|
|
|
<!-- header logo: style can be found in header.less -->
|
|
<header class="main-header">
|
|
<a href="<?= APP_URL; ?>" class="logo" title="PHP Censor">
|
|
<img src="<?= APP_URL; ?>assets/img/php-censor-white.svg" width="170" height="auto" alt="PHP Censor" />
|
|
</a>
|
|
<!-- Header Navbar: style can be found in header.less -->
|
|
<nav class="navbar navbar-static-top" role="navigation">
|
|
<!-- Sidebar toggle button-->
|
|
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
|
|
<span class="sr-only"><?php Lang::out('toggle_navigation'); ?></span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
</a>
|
|
<div class="navbar-custom-menu">
|
|
<ul class="nav navbar-nav">
|
|
|
|
<li class="dropdown messages-menu app-pending">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
|
<i class="fa fa-clock-o"></i>
|
|
<span class="label label-info app-pending-count"></span>
|
|
</a>
|
|
<ul class="dropdown-menu">
|
|
<li class="header"><?php Lang::out('n_builds_pending', 0); ?></li>
|
|
<li>
|
|
<ul class="menu app-pending-list">
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li class="dropdown messages-menu app-running">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
|
<i class="fa fa-cogs"></i>
|
|
<span class="label label-warning app-running-count"></span>
|
|
</a>
|
|
<ul class="dropdown-menu">
|
|
<li class="header"><?php Lang::out('n_builds_running', 0); ?></li>
|
|
<li>
|
|
<ul class="menu app-running-list">
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<?php if (!$this->loginIsDisabled()): ?>
|
|
<!-- User Account: style can be found in dropdown.less -->
|
|
<li class="dropdown user user-menu">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
|
<i class="glyphicon glyphicon-user"></i>
|
|
<span><?= $user->getName(); ?> <i class="caret"></i></span>
|
|
</a>
|
|
<ul class="dropdown-menu">
|
|
<!-- User image -->
|
|
<li class="user-header">
|
|
<img src="https://www.gravatar.com/avatar/<?= md5($user->getEmail()); ?>?d=mm" class="img-circle" alt="<?= $user->getName(); ?>" />
|
|
<p>
|
|
<?= $user->getName(); ?>
|
|
</p>
|
|
</li>
|
|
|
|
<!-- Menu Footer-->
|
|
<li class="user-footer">
|
|
<div class="pull-left">
|
|
<a href="<?= APP_URL; ?>user/profile" class="btn btn-default btn-flat"><?php Lang::out('edit_profile'); ?></a>
|
|
</div>
|
|
<div class="pull-right">
|
|
<a href="<?= APP_URL; ?>session/logout" class="btn btn-default btn-flat"><?php Lang::out('sign_out'); ?></a>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<?php endif; ?>
|
|
</ul>
|
|
</div>
|
|
</nav>
|
|
</header>
|
|
<!-- Left side column. contains the logo and sidebar -->
|
|
<aside class="main-sidebar sidebar-offcanvas">
|
|
<!-- sidebar: style can be found in sidebar.less -->
|
|
<section class="sidebar">
|
|
|
|
<?php if (!$this->loginIsDisabled()): ?>
|
|
<!-- Sidebar user panel -->
|
|
<div class="user-panel">
|
|
<div class="pull-left image">
|
|
<img src="https://www.gravatar.com/avatar/<?= md5($user->getEmail()); ?>?d=mm" class="img-circle" alt="<?= $user->getName(); ?>" />
|
|
</div>
|
|
<div class="pull-left info">
|
|
<p><?php Lang::out('hello_name', $user->getName()); ?></p>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<!-- sidebar menu: : style can be found in sidebar.less -->
|
|
<ul class="sidebar-menu">
|
|
<li<?= (array_key_exists('archived', $_GET) ? '' : ' class="active"'); ?>>
|
|
<a href="<?= APP_URL; ?>">
|
|
<i class="fa fa-dashboard"></i> <span><?php Lang::out('dashboard'); ?></span>
|
|
</a>
|
|
</li>
|
|
|
|
<?php if ($user->getIsAdmin()): ?>
|
|
<li class="treeview">
|
|
<a href="#">
|
|
<i class="fa fa-edit"></i>
|
|
<span><?php Lang::out('admin_options'); ?></span>
|
|
<i class="fa fa-angle-left pull-right"></i>
|
|
</a>
|
|
<ul class="treeview-menu">
|
|
<li>
|
|
<a href="<?= APP_URL; ?>project/add">
|
|
<i class="fa fa-angle-double-right"></i> <?php Lang::out('add_project'); ?>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="<?= APP_URL; ?>group">
|
|
<i class="fa fa-angle-double-right"></i> <?php Lang::out('project_groups'); ?>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="<?= APP_URL; ?>user">
|
|
<i class="fa fa-angle-double-right"></i> <?php Lang::out('manage_users'); ?>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<?php endif; ?>
|
|
|
|
<?php foreach ($groups as $group): ?>
|
|
<li class="treeview">
|
|
<a href="#">
|
|
<i class="fa fa-folder"></i>
|
|
<span><?= $group['title']; ?></span>
|
|
<i class="fa fa-angle-left pull-right"></i>
|
|
</a>
|
|
|
|
<?php if (count($group['projects'])): ?>
|
|
<ul class="treeview-menu">
|
|
<?php foreach($group['projects'] as $project): ?>
|
|
<li>
|
|
<a href="<?= APP_URL; ?>project/view/<?= $project->getId(); ?>">
|
|
<i class="fa fa-<?= $project->getIcon(); ?>"></i>
|
|
<span><?= $project->getTitle(); ?></span>
|
|
</a>
|
|
</li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
<?php endif; ?>
|
|
|
|
</li>
|
|
<?php endforeach; ?>
|
|
|
|
<li class="treeview">
|
|
<a href="#">
|
|
<i class="fa fa-archive"></i> <span><?php Lang::out('archived_menu'); ?></span>
|
|
<i class="fa fa-angle-left pull-right"></i>
|
|
</a>
|
|
|
|
<?php if (count($archived_projects)): ?>
|
|
<ul class="treeview-menu">
|
|
<?php foreach($archived_projects as $archived_project): ?>
|
|
<li>
|
|
<a href="<?= APP_URL; ?>project/view/<?= $archived_project->getId(); ?>">
|
|
<i class="fa fa-<?= $archived_project->getIcon(); ?>"></i>
|
|
<span><?= $archived_project->getTitle(); ?></span>
|
|
</a>
|
|
</li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
<?php endif; ?>
|
|
</li>
|
|
|
|
</ul>
|
|
</section>
|
|
<!-- /.sidebar -->
|
|
</aside>
|
|
|
|
<!-- Right side column. Contains the navbar and content of the page -->
|
|
<aside class="content-wrapper">
|
|
<!-- Content Header (Page header) -->
|
|
<section class="content-header">
|
|
<div class="pull-right">
|
|
<?= (!empty($actions) ? $actions : ''); ?>
|
|
</div>
|
|
|
|
<h1>
|
|
<?= (!empty($title) ? $title : 'PHP Censor'); ?>
|
|
|
|
<?php if (!empty($subtitle)): ?>
|
|
<small><?= $subtitle; ?></small>
|
|
<?php endif; ?>
|
|
</h1>
|
|
|
|
</section>
|
|
|
|
<!-- Main content -->
|
|
<section class="content">
|
|
<?php
|
|
if (!empty($_SESSION['global_error'])) {
|
|
$message = $_SESSION['global_error'];
|
|
unset($_SESSION['global_error']);
|
|
print '<div class="alert alert-danger">' . $message . '</div>';
|
|
}
|
|
?>
|
|
|
|
<?= $content; ?>
|
|
</section>
|
|
</aside>
|
|
<footer class="main-footer">
|
|
PHP Censor v<?= $version; ?>
|
|
</footer>
|
|
</div>
|
|
</body>
|
|
</html>
|