ninegitea/templates/base.html.twig

190 lines
6.9 KiB
Twig
Raw Permalink Normal View History

2021-07-20 13:04:47 +02:00
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html"; charset="utf-8" />
2022-01-13 21:13:38 +01:00
<title>{% block title %}{{app.session.get("appname")}}{%if usetitle is defined %} = {{usetitle}} {%endif%}{% endblock %}</title>
2021-07-20 13:04:47 +02:00
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
{{ encore_entry_link_tags('app') }}
{% block encorelinktags %}
{% endblock encorelinktags %}
2023-12-22 13:53:10 +01:00
<link rel="shortcut icon" href="{{ asset("uploads/logo/"~app.session.get("logolight")) }}" />
2021-07-20 13:04:47 +02:00
</head>
2023-12-22 13:53:10 +01:00
<link href="{{ asset("styles/css/font.css") }}" rel="stylesheet" media="screen" />
<link href="{{ asset("styles/css/style.css")}}" rel="stylesheet" media="screen" />
2021-07-20 13:04:47 +02:00
<style>
{{ include('Include/style.css.twig') }}
</style>
{% if not app.session.get("apptheme") is empty %}
2023-12-22 13:53:10 +01:00
<link href="{{ asset("themes/"~app.session.get("apptheme")) }}/style.css" rel="stylesheet" media="screen" />
2021-07-20 13:04:47 +02:00
{% endif %}
<style>
{% block localstyle %}
{% endblock %}
</style>
{{ encore_entry_script_tags('app') }}
{% block encorescripttags %}
{% endblock %}
<script>
{{ include('Include/javascript.js.twig') }}
</script>
{% set class="" %}
{% if usemonocolor is defined and usemonocolor %}
{% set class="monocolor" %}
{% endif %}
<body class={{ class }}>
{% 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')}}">
2023-12-22 13:53:10 +01:00
<img src="{{ asset("uploads/logo/"~app.session.get("logodark")) }}" style="height:30px;margin-top:-3px;">
2021-07-20 13:04:47 +02:00
{{app.session.get("appname")}}
2022-01-13 21:13:38 +01:00
{%if usetitle is defined %} = {{usetitle}} {%endif%}
2021-07-20 13:04:47 +02:00
</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">
2022-01-22 11:18:42 +01:00
<ul class="nav navbar-nav">
2021-07-20 13:04:47 +02:00
</ul>
</div>
<ul class="nav navbar-top-links navbar-right">
{% if app.user %}
2023-08-25 14:44:12 +02:00
<li>
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="viewclosed">
<label class="custom-control-label" for="viewclosed" style="color:var(--colorfttitledark);">Afficher les tickets clos</label>
</div>
</li>
2021-07-20 13:04:47 +02:00
<li>
<a href="{{path("app_user_profil")}}">
2023-12-22 13:53:10 +01:00
<img src="{{ asset("uploads/avatar/"~app.user.avatar) }}" class="avatar">
2021-07-20 13:04:47 +02:00
</a>
</li>
{% endif %}
{% if is_granted('ROLE_ADMIN') %}
<li>
<a href="{{path("app_admin")}}"><i class="fa fa-cog fa-fw"></i></a>
</li>
{% endif %}
<li>
{% if app.user %}
<a href="{{path("app_logout")}}"><i class="fa fa-sign-out-alt fa-fw"></i></a>
{% else %}
<a href="{{path("app_login")}}"><i class="fa fa-sign-in-alt fa-fw"></i></a>
{% endif %}
</li>
</ul>
</nav>
{% endif %}
<main id="main" class="container-fluid {% if maxwidth is defined and maxwidth %} page-maxed {% endif %}">
{% set contentsidebar="" %}
{% if usesidebar is defined and usesidebar %}
{% set contentsidebar="contentsidebar" %}
{{ include('Include/sidebar.html.twig') }}
{%endif%}
<div id="mycontent" class="content {{contentsidebar}}">
{% block body %}
{% endblock %}
</div>
</main>
<div id="mymodal" class="modal" role="dialog">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title"></h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<iframe frameborder=0 width="100%" height="600px"></iframe>
</div>
</div>
</div>
</div>
<div id="mymodallarge" class="modal fade" role="dialog">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title"></h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
</div>
<div class="modal-body">
<iframe frameborder=0 width="100%" height="700px"></iframe>
</div>
</div>
</div>
</div>
{% block localexternalscript %}
{% endblock %}
2024-03-15 15:44:29 +01:00
<script>
{{ include('Include/javascript.js.twig') }}
</script>
2021-07-20 13:04:47 +02:00
<script>
2023-08-25 14:44:12 +02:00
{% if app.session.get('viewclosed') %}
$("#viewclosed").prop( "checked", {{ app.session.get('viewclosed') }} )
{% endif %}
$('#viewclosed').change(function() {
console.log(this.checked);
$.ajax({
method: "POST",
url: "{{ path('app_user_preference') }}",
data: {
key:'user',
id:'viewclosed',
value: this.checked
}
}).done(function( data ) {
location.reload(true);
});
});
2021-07-20 13:04:47 +02:00
{% block localjavascript %}
{% endblock %}
</script>
{% if not app.session.get("apptheme") is empty %}
2023-12-22 13:53:10 +01:00
<script src="{{ asset("themes/"~app.session.get("apptheme")) }}/local.js"></script>
2021-07-20 13:04:47 +02:00
{% endif %}
</body>
</html>