svg
This commit is contained in:
630
templates/base.html.twig
Normal file
630
templates/base.html.twig
Normal file
@@ -0,0 +1,630 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
{% set color = app.session.get('color') %}
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html"; charset="utf-8" />
|
||||
<title>{% block title %}{{ appName }}{% endblock %}</title>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
{% block head_style %}
|
||||
{{ encore_entry_link_tags('app') }}
|
||||
{% endblock head_style %}
|
||||
|
||||
{% block stylesheets %}{% endblock %}
|
||||
|
||||
<link rel="shortcut icon" href="/{{ appAlias }}/images/logo.png" />
|
||||
</head>
|
||||
|
||||
|
||||
<style>
|
||||
/* global */
|
||||
.bg-dark {
|
||||
background-color: #152c3c !important;
|
||||
}
|
||||
|
||||
h1{
|
||||
padding: 40px 0px 9px 0px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.nav a{
|
||||
background: none;
|
||||
color: #CFD8DC;
|
||||
font-size: 14px;
|
||||
padding: 5px 0px 5px 25px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
/* Sidebar Styles */
|
||||
.contentsidebar {
|
||||
margin-left:250px;
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
z-index: 1000;
|
||||
position: fixed;
|
||||
left: 250px;
|
||||
width: 250px;
|
||||
height: 100%;
|
||||
margin-left: -250px;
|
||||
overflow-y: auto;
|
||||
background: #152c3c;
|
||||
-webkit-transition: all 0.5s ease;
|
||||
-moz-transition: all 0.5s ease;
|
||||
-o-transition: all 0.5s ease;
|
||||
transition: all 0.5s ease;
|
||||
}
|
||||
|
||||
#sidebar header {
|
||||
background-color: #263238;
|
||||
font-size: 20px;
|
||||
line-height: 52px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#sidebar header a {
|
||||
color: #fff;
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#sidebar header a:hover {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#sidebar .nav{
|
||||
display: block;
|
||||
}
|
||||
|
||||
#sidebar .nav a {
|
||||
padding: 0px 10px 5px 10px;
|
||||
}
|
||||
|
||||
#sidebar .nav .last{
|
||||
border-bottom: 5px solid #455A64;
|
||||
padding-bottom:5px;
|
||||
}
|
||||
|
||||
#sidebar .title {
|
||||
color: #CFD8DC;
|
||||
font-size: 16px;
|
||||
padding: 0px 10px 0px 10px;
|
||||
display: block;
|
||||
text-transform: uppercase;
|
||||
margin-left: 0px !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#sidebar .nav .last{
|
||||
border-bottom: 5px solid #455A64;
|
||||
padding-bottom:5px;
|
||||
}
|
||||
|
||||
#sidebar .nav a:hover{
|
||||
background: none;
|
||||
color: #ECEFF1;
|
||||
}
|
||||
|
||||
#sidebar .nav a .fa{
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
#sidebar .nav .select-control {
|
||||
padding: 0px 10px 5px 10px;
|
||||
margin-top: -12px;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
background-color: #343a40;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
border-radius: 100%;
|
||||
margin-top: -5px;
|
||||
}
|
||||
|
||||
.avatar.big{
|
||||
width: 90px;
|
||||
height: 90px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
@media (max-width: 991px) {
|
||||
.contentsidebar {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
position: static;
|
||||
margin:0px -15px;
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
a.btn {
|
||||
color:#ffffff;
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
#sidebar {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
{% if useheader is defined and useheader %}
|
||||
#main {
|
||||
padding-top:55px;
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
|
||||
th.dt-center, td.dt-center { text-align: center; }
|
||||
|
||||
|
||||
.new-page {display:none;}
|
||||
{% if fgprint is defined and fgprint %}
|
||||
.no-print {display:none}
|
||||
|
||||
.new-page {
|
||||
clear: both;
|
||||
display: block;
|
||||
border :1px solid transparent;
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
#sidebar,.navbar,.sf-toolbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#mycontent{
|
||||
margin:0px;
|
||||
//width:800px;
|
||||
}
|
||||
|
||||
#main{
|
||||
margin:0px;
|
||||
padding:10px;
|
||||
}
|
||||
|
||||
.homecard {
|
||||
display:inline-block;
|
||||
float:none;
|
||||
}
|
||||
{% endif %}
|
||||
{% block localstyle %}
|
||||
|
||||
{% endblock %}
|
||||
</style>
|
||||
|
||||
<body>
|
||||
{% if useheader is defined and useheader %}
|
||||
<nav class="navbar navbar-expand-lg navbar-dark fixed-top bg-dark">
|
||||
<a class="navbar-brand" href="{{ path('app_home')}}">
|
||||
<img src="/{{appAlias}}/images/logo.png" style="height:30px;margin-top:-3px;">
|
||||
{{appName}}
|
||||
</a>
|
||||
|
||||
{% if usesidebar is defined and usesidebar %}
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#sidebar" aria-controls="sidebar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
{% endif %}
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav">
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<ul class="nav navbar-top-links navbar-right">
|
||||
{% if app.user and ("ROLE_USER" in app.user.roles or "ROLE_MASTER" in app.user.roles or "ROLE_VALIDATOR" in app.user.roles or "ROLE_ADMIN" in app.user.roles)%}
|
||||
<li>
|
||||
<a href="{{path("app_user_profil")}}">
|
||||
<img src="/{{appAlias}}/uploads/avatar/{{app.user.avatar}}" class="avatar">
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% set routeignore = ["app_home","app_event","app_customer_submit","app_project_submit","app_offer_submit","app_task_submit","app_service_submit","app_user_submit","app_nature_submit","app_nature_update","app_job_submit","app_breakday_submit","app_breakday_update"] %}
|
||||
{% if app.request.attributes.get('_route') not in routeignore %}
|
||||
<li>
|
||||
<a onClick="myprint()" style="cursor:pointer; color:#fff"><i class="fa fa-print fa-fw"></i></a>
|
||||
</li>
|
||||
{%endif%}
|
||||
|
||||
<li>
|
||||
{% if app.user %}
|
||||
{% if appAuth=="MYSQL" %}
|
||||
<a href="{{path("app_logout")}}"><i class="fa fa-sign-out-alt fa-fw"></i></a>
|
||||
{% elseif appAuth=="CAS" %}
|
||||
<a href="{{path("app_logoutcas")}}"><i class="fa fa-sign-out-alt fa-fw"></i></a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if appAuth=="MYSQL" %}
|
||||
<a href="{{path("app_login")}}"><i class="fa fa-sign-in-alt fa-fw"></i></a>
|
||||
{% elseif appAuth=="CAS" %}
|
||||
<a href="{{path("app_logincas")}}"><i class="fa fa-sign-in-alt fa-fw"></i></a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% endif %}
|
||||
|
||||
<main id="main" class="container-fluid">
|
||||
{% set contentsidebar="" %}
|
||||
{% if usesidebar is defined and usesidebar %}
|
||||
{% set contentsidebar="contentsidebar" %}
|
||||
|
||||
<div id="sidebar" class="collapse">
|
||||
<ul style="padding-bottom:70px" class="nav">
|
||||
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_VALIDATOR') or is_granted('ROLE_MASTER') or is_granted('ROLE_USER') %}
|
||||
<p></p>
|
||||
<li>
|
||||
<label class="control-label" style="padding:0px 10px 5px 10px; color:#fff;">
|
||||
Nombre de Mois
|
||||
</label>
|
||||
<div class="select-control">
|
||||
<select class="form-control select2entity" id="sidemonth" name="sidemonth">
|
||||
{% set selected="" %}
|
||||
{% for i in 1..48 %}
|
||||
{% set selected="" %}
|
||||
{%if i==app.session.get('nbmonth') %}
|
||||
{% set selected="selected" %}
|
||||
{% endif %}
|
||||
<option value="{{i}}" {{selected}}>{{i}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<label class="control-label" style="padding:0px 10px 5px 10px; color:#fff;">
|
||||
Service
|
||||
</label>
|
||||
<div class="select-control">
|
||||
<select class="form-control select2entity" id="sideservice" name="sideservice">
|
||||
<option value="all" selected>Toutes les services</option>
|
||||
{% for service in app.session.get('services') %}
|
||||
{% set selected="" %}
|
||||
{%if service.id==app.session.get('idservice') %}
|
||||
{% set selected="selected" %}
|
||||
{% endif %}
|
||||
<option value="{{service.id}}" {{selected}}>{{service.name}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<label class="control-label" style="padding:0px 10px 5px 10px; color:#fff;">
|
||||
Domaine
|
||||
</label>
|
||||
<div class="select-control">
|
||||
<select class="form-control select2entity" id="sidedomaine" name="sidedomaine">
|
||||
<option value="all" selected>Toutes les domaines</option>
|
||||
{% for domaine in app.session.get('domaines') %}
|
||||
{% set selected="" %}
|
||||
{%if domaine.id==app.session.get('iddomaine') %}
|
||||
{% set selected="selected" %}
|
||||
{% endif %}
|
||||
<option value="{{domaine.id}}" {{selected}}>{{domaine.name}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<label class="control-label" style="padding:0px 10px 5px 10px; color:#fff;">
|
||||
Intervenant
|
||||
</label>
|
||||
<div class="select-control">
|
||||
<select class="form-control select2entity" id="sideuser" name="sideuser">
|
||||
<option value="all" selected>Tout le monde</option>
|
||||
|
||||
{% for user in app.session.get('users') %}
|
||||
{% set selected="" %}
|
||||
{%if user.id==app.session.get('iduser') %}
|
||||
{% set selected="selected" %}
|
||||
{% endif %}
|
||||
<option value="{{user.id}}" {{selected}}>{{user.displayname}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<label class="control-label" style="padding:0px 10px 5px 10px; color:#fff;">
|
||||
Projet
|
||||
</label>
|
||||
<div class="select-control">
|
||||
<select class="form-control select2entity" id="sideproject" name="sideproject">
|
||||
<option value="all" selected>Tous les projets</option>
|
||||
{% for project in app.session.get('projects')|sort((a, b) => a.displayname <=> b.displayname) %}
|
||||
{% set selected="" %}
|
||||
{%if project.id==app.session.get('idproject') %}
|
||||
{% set selected="selected" %}
|
||||
{% endif %}
|
||||
<option value="{{project.id}}" {{selected}}>{{project.displayname}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="last"></li>
|
||||
|
||||
<li class="title">Planning</li>
|
||||
<li>
|
||||
<a href="{{path("app_synthese")}}">
|
||||
<i class="fa fa-id-card"></i>Synthese
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_planning")}}">
|
||||
<i class="fa fa-tachometer-alt"></i>Planning
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_report")}}">
|
||||
<i class="fa fa-pen-square"></i>Rapport
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_event")}}">
|
||||
<i class="fa fa-calendar-alt"></i>Calendrier
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_timer")}}">
|
||||
<i class="fa fa-stopwatch"></i>Suivi Horaire
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_holiday")}}">
|
||||
<i class="fa fa-umbrella-beach"></i>Mes Congés
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_stat_view")}}">
|
||||
<i class="fas fa-chart-line"></i>Statistiques
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="last">
|
||||
<a href="{{path("app_export_view")}}">
|
||||
<i class="fa fa-file-download"></i>Exports
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_VALIDATOR') %}
|
||||
<li class="title">Validations</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_validation")}}">
|
||||
<i class="fa fa-user-check"></i>Validation Calendrier
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_validationholiday")}}">
|
||||
<i class="fa fa-user-tag"></i>Validation Congés
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="last">
|
||||
<a href="{{path("app_validationtimer")}}">
|
||||
<i class="fa fa-user-clock"></i>Validation Horaires
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_MASTER') %}
|
||||
<li class="title">Projets</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_customer")}}">
|
||||
<i class="fa fa-user"></i>Clients
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_project")}}">
|
||||
<i class="fa fa-suitcase"></i>Projets
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_offer")}}">
|
||||
<i class="fa fa-euro-sign"></i>Commandes
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_task")}}">
|
||||
<i class="fa fa-tasks"></i>Tâches
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="last">
|
||||
<a href="{{path("app_budget_last")}}">
|
||||
<i class="fa fa-money-bill-alt"></i>Budgets
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if is_granted('ROLE_ADMIN') %}
|
||||
<li class="title">Organisation</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_service")}}">
|
||||
<i class="fa fa-building"></i>Service
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_domaine")}}">
|
||||
<i class="fas fa-money-bill-alt"></i> Domaines
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_user")}}">
|
||||
<i class="fa fa-users"></i>Utilisateurs
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_nature")}}">
|
||||
<i class="fa fa-folder"></i>Natures
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_job")}}">
|
||||
<i class="fa fa-clipboard-list"></i>Métiers
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_year")}}">
|
||||
<i class="fa fa-calendar-alt"></i>Exercices Comptable
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="last">
|
||||
<a href="{{path("app_breakday")}}">
|
||||
<i class="fa fa-gifts"></i>Jours Fériés
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% if appCron %}
|
||||
<li class="title">Outils</li>
|
||||
<li>
|
||||
<a href="{{path("app_cron")}}">
|
||||
<i class="fa fa-cogs"></i>Jobs
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="last">
|
||||
<a href="{{path("app_cron_log")}}">
|
||||
<i class="fa fa-list-alt"></i>Logs / Dump
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
{%endif%}
|
||||
|
||||
|
||||
<div id="mycontent" class="content {{contentsidebar}}">
|
||||
{% block body %}
|
||||
|
||||
{% endblock %}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
|
||||
{{ encore_entry_script_tags('app') }}
|
||||
|
||||
{% block localexternalscript %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var doit = true;
|
||||
|
||||
$("a[data-method]").on('click',function(){
|
||||
if($(this).data('confirm')){
|
||||
doit = confirm($(this).data('confirm'));
|
||||
if(!doit) return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#sidemonth').on('select2:select', function (e) {
|
||||
var data = e.params.data;
|
||||
console.log(data.id);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
nbmonth: data.id,
|
||||
},
|
||||
url: "{{ path('app_home_selectmonth') }}",
|
||||
success: function (response) {
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#sideuser').on('select2:select', function (e) {
|
||||
var data = e.params.data;
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
iduser: data.id,
|
||||
},
|
||||
url: "{{ path('app_home_selectuser') }}",
|
||||
success: function (response) {
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#sideproject').on('select2:select', function (e) {
|
||||
var data = e.params.data;
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
idproject: data.id,
|
||||
},
|
||||
url: "{{ path('app_home_selectproject') }}",
|
||||
success: function (response) {
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#sideservice').on('select2:select', function (e) {
|
||||
var data = e.params.data;
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
idservice: data.id,
|
||||
},
|
||||
url: "{{ path('app_home_selectservice') }}",
|
||||
success: function (response) {
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#sidedomaine').on('select2:select', function (e) {
|
||||
var data = e.params.data;
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
iddomaine: data.id,
|
||||
},
|
||||
url: "{{ path('app_home_selectdomaine') }}",
|
||||
success: function (response) {
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
{% block localjavascript %}
|
||||
|
||||
{% endblock %}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user