svg
This commit is contained in:
40
templates/accounting/edit.html.twig
Normal file
40
templates/accounting/edit.html.twig
Normal file
@ -0,0 +1,40 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %} = {{title}}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>{{title}}</h1>
|
||||
|
||||
|
||||
{{ form_start(form) }}
|
||||
{{ form_widget(form.submit) }}
|
||||
<a href="{{ path(routecancel) }}" class="btn btn-secondary ms-1">Annuler</a>
|
||||
{%if mode=="update" %}<a href="{{ path(routedelete,{id:form.vars.value.id}) }}" class="btn btn-danger float-end" onclick="return confirm('Confirmez-vous la suppression de cet enregistrement ?')">Supprimer</a>{%endif%}
|
||||
|
||||
{% include('include/error.html.twig') %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 mx-auto">
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">Information</div>
|
||||
<div class="card-body">
|
||||
{{ form_row(form.num01) }}
|
||||
{{ form_row(form.num02) }}
|
||||
{{ form_row(form.title) }}
|
||||
{{ form_row(form.category) }}
|
||||
{{ form_row(form.icon) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localscript %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#accounting_num01").focus();
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
49
templates/accounting/list.html.twig
Normal file
49
templates/accounting/list.html.twig
Normal file
@ -0,0 +1,49 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %} = {{title}}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>{{title}}</h1>
|
||||
<a href="{{ path(routesubmit) }}" class="btn btn-success">Ajouter</a>
|
||||
|
||||
<div class="dataTable_wrapper">
|
||||
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70px" class="no-sort">Action</th>
|
||||
<th width="120px">Icône</th>
|
||||
<th width="120px">Compte</th>
|
||||
<th width="150px">Catégorie</th>
|
||||
<th>Titre</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for accounting in accountings %}
|
||||
<tr>
|
||||
<td><a href="{{ path(routeupdate,{id:accounting.id}) }}"><i class="fas fa-file fa-2x"></i></a></td>
|
||||
<td class="text-center">
|
||||
{% if accounting.icon %}
|
||||
<i class="fas {{accounting.icon}} fa-2x"></i>
|
||||
{% endif %}
|
||||
<td>{{accounting.num01}}-{{accounting.num02}}</td>
|
||||
<td>{{accounting.category}}</td>
|
||||
<td>{{accounting.title}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localscript %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#dataTables').DataTable({
|
||||
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 1, "asc" ]]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
@ -13,6 +13,8 @@
|
||||
<link rel="stylesheet" href="{{ asset('lib/select2/select2-bootstrap-5-theme.min.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('lib/dropzone/dropzone.min.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('lib/dropzone/dropzone-bootstrap.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('lib/imgareaselect/css/imgareaselect-default.css') }}">
|
||||
|
||||
<link rel="stylesheet" href="{{ asset('lib/app/app.css') }}">
|
||||
|
||||
<script src="{{ asset('lib/jquery/jquery.min.js') }}"></script>
|
||||
@ -23,6 +25,7 @@
|
||||
<script src="{{ asset('lib/select2/select2.min.js') }}"></script>
|
||||
<script src="{{ asset('lib/select2/select2.init.js') }}"></script>
|
||||
<script src="{{ asset('lib/dropzone/dropzone.min.js') }}"></script>
|
||||
<script src="{{ asset('lib/imgareaselect/js/jquery.imgareaselect.dev.js') }}"></script>
|
||||
<script src="{{ asset('lib/app/app.js') }}"></script>
|
||||
|
||||
{% block javascripts %}
|
||||
@ -42,9 +45,7 @@
|
||||
<div class="collapse navbar-collapse" id="navbarColor02">
|
||||
<ul class="navbar-nav me-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="#">Home
|
||||
<span class="visually-hidden">(current)</span>
|
||||
</a>
|
||||
<a href="{{path('app_user_accounting')}}" class="nav-link" href="#">Plan Comptable</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#">Features</a>
|
||||
@ -70,9 +71,19 @@
|
||||
|
||||
<div class="navbar-nav ms-auto ps-3 d-flex flex-row position-absolute" style="right: 15px; top:15px">
|
||||
{% if app.user %}
|
||||
<div class="nav-link">
|
||||
<select class="select2" name="selectcompany" id="selectcompany" style="width:200px" data-change="{{path('app_user_selectcompany')}}">
|
||||
<option value="" disabled selected>Selectionnez une compagnie</option>
|
||||
{%for company in app.session.get('companys')%}
|
||||
<option value="{{company.id}}" {{app.session.get('company') and company.id==app.session.get('company').id?"selected":""}}>{{company.title}}</option>
|
||||
{%endfor%}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{% if is_granted('ROLE_ADMIN') %}
|
||||
<a class="nav-link px-2" href="{{path('app_admin')}}"><i class="fa-solid fa-cog fa-2x"></i></a>
|
||||
{% endif %}
|
||||
<a class="nav-link px-2" href="{{path('app_user_profil')}}"><img src="{{asset(app.user.avatar)}}" class="avatar"></a>
|
||||
<a class="nav-link px-2" href="{{path('app_logout')}}"><i class="fa-solid fa-right-from-bracket fa-2x"></i></a>
|
||||
{% else %}
|
||||
<a class="nav-link px-2" href="{{path('app_login')}}"><i class="fa-solid fa-right-to-bracket fa-2x"></i></a>
|
||||
@ -100,6 +111,11 @@
|
||||
<i class="fas fa-user fa-fw"></i>
|
||||
<span>Utilisateurs</span>
|
||||
</a>
|
||||
|
||||
<a href="{{ path('app_admin_company') }}" title="Compagnies">
|
||||
<i class="fas fa-building fa-fw"></i>
|
||||
<span>Compagnies</span>
|
||||
</a>
|
||||
</div>
|
||||
</sidebar>
|
||||
{% endif %}
|
||||
|
67
templates/company/edit.html.twig
Normal file
67
templates/company/edit.html.twig
Normal file
@ -0,0 +1,67 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %} = {{title}}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>{{title}}</h1>
|
||||
|
||||
|
||||
{{ form_start(form) }}
|
||||
{{ form_widget(form.submit) }}
|
||||
<a href="{{ path(routecancel) }}" class="btn btn-secondary ms-1">Annuler</a>
|
||||
{%if mode=="update" %}<a href="{{ path(routedelete,{id:form.vars.value.id}) }}" class="btn btn-danger float-end" onclick="return confirm('Confirmez-vous la suppression de cet enregistrement ?')">Supprimer</a>{%endif%}
|
||||
|
||||
{% include('include/error.html.twig') %}
|
||||
|
||||
<div class="text-center d-flex flex-column align-items-center">
|
||||
<img id="company_logo_img" src="{{asset(form.vars.value.logo)}}" class="bigavatar mb-2">
|
||||
{{ form_row(form.logo) }}
|
||||
<a class="btn btn-info" style="max-width:100%; margin-bottom:15px;" data-bs-toggle="modal" data-bs-target="#mymodal" onClick="ModalLoad('mymodal','Logo','{{ path('app_user_upload_crop01',{endpoint:'logo',reportThumb:'company_logo'}) }}');" title='Ajouter un logo'>Modifier</a>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 mx-auto">
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">Information</div>
|
||||
<div class="card-body">
|
||||
{{ form_row(form.title) }}
|
||||
{{ form_row(form.email) }}
|
||||
{{ form_row(form.adress) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">Banque</div>
|
||||
<div class="card-body">
|
||||
{{ form_row(form.bankname) }}
|
||||
{{ form_row(form.bankcode) }}
|
||||
{{ form_row(form.bankguichet) }}
|
||||
{{ form_row(form.banknum) }}
|
||||
{{ form_row(form.bankkey) }}
|
||||
{{ form_row(form.banklocality) }}
|
||||
{{ form_row(form.bankiban) }}
|
||||
{{ form_row(form.bankbic) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 mx-auto">
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">Permissions</div>
|
||||
<div class="card-body">
|
||||
{{ form_row(form.users) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localscript %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#company_title").focus();
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
@ -1,20 +0,0 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Hello CompanyController!{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<style>
|
||||
.example-wrapper { margin: 1em auto; max-width: 800px; width: 95%; font: 18px/1.5 sans-serif; }
|
||||
.example-wrapper code { background: #F5F5F5; padding: 2px 6px; }
|
||||
</style>
|
||||
|
||||
<div class="example-wrapper">
|
||||
<h1>Hello {{ controller_name }}! ✅</h1>
|
||||
|
||||
This friendly message is coming from:
|
||||
<ul>
|
||||
<li>Your controller at <code>/home/afornerot/cadoles/nine-project/ninecompta/src/Controller/CompanyController.php</code></li>
|
||||
<li>Your template at <code>/home/afornerot/cadoles/nine-project/ninecompta/templates/company/index.html.twig</code></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endblock %}
|
42
templates/company/list.html.twig
Normal file
42
templates/company/list.html.twig
Normal file
@ -0,0 +1,42 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %} = {{title}}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>{{title}}</h1>
|
||||
<a href="{{ path(routesubmit) }}" class="btn btn-success">Ajouter</a>
|
||||
|
||||
<div class="dataTable_wrapper">
|
||||
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70px" class="no-sort">Action</th>
|
||||
<th width="70px">Logo</th>
|
||||
<th>Nom</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for company in companys %}
|
||||
<tr>
|
||||
<td><a href="{{ path(routeupdate,{id:company.id}) }}"><i class="fas fa-file fa-2x"></i></a></td>
|
||||
<td><img class="avatar" src="{{ asset(company.logo)}}"></td>
|
||||
<td>{{company.title}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localscript %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#dataTables').DataTable({
|
||||
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 2, "asc" ]]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
@ -1,10 +1,19 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Hello HomeController!{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<select class="select2" name="state">
|
||||
<option value="AL">Alabama</option>
|
||||
<option value="WY">Wyoming</option>
|
||||
</select>
|
||||
|
||||
<div class="d-flex justify-content-center">
|
||||
{% for accounting in accountings %}
|
||||
<div class="card" style="width:400px">
|
||||
<div class="card-body d-flex align-items-center">
|
||||
<div class="ps-4">
|
||||
<i class="fas {{accounting.icon}} fa-4x"></i>
|
||||
</div>
|
||||
|
||||
<div class="p-3 fs-1">{{accounting.title}}</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
1
templates/home/nocompany.html.twig
Normal file
1
templates/home/nocompany.html.twig
Normal file
@ -0,0 +1 @@
|
||||
<h2>Veuillez selectionner une compagnie</h2>
|
13
templates/include/error.html.twig
Normal file
13
templates/include/error.html.twig
Normal file
@ -0,0 +1,13 @@
|
||||
{% for message in app.flashes('error') %}
|
||||
<div class="alert alert-danger mt-3">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% if form.vars.errors is not empty %}
|
||||
<div class="alert alert-danger mt-3">
|
||||
{% for error in form.vars.errors %}
|
||||
<li>{{ error.message }}</li>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
@ -35,12 +35,9 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block localscript %}
|
||||
<script type="module">
|
||||
import $ from 'jquery';
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$("#username").focus();
|
||||
});
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
@ -10,20 +10,23 @@
|
||||
|
||||
{% block body %}
|
||||
<a class="btn btn-secondary" onClick="closeModal();">Annuler</a>
|
||||
|
||||
<form action="{{ oneup_uploader_endpoint(endpoint) }}" class="dropzone" id="myDropzone" style="margin-top:10px">
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
{% block localscript %}
|
||||
<script>
|
||||
Dropzone.options.myDropzone = {
|
||||
maxFiles: 1,
|
||||
acceptedMimeTypes: 'image/*',
|
||||
success: function(file, response){
|
||||
$(location).attr('href',"{{ path('app_user_crop02') }}");
|
||||
// Construction de l'url de retour
|
||||
url="{{ path('app_user_upload_crop02',{reportThumb: reportThumb, path:'xxx', file:'yyy'})|escape('js') }}";
|
||||
url=url.replace("xxx",response["path"]);
|
||||
url=url.replace("yyy",response["file"]);
|
||||
|
||||
// Navigation sur l'url de retour
|
||||
$(location).attr('href',url);
|
||||
},
|
||||
|
||||
|
83
templates/upload/crop02.html.twig
Normal file
83
templates/upload/crop02.html.twig
Normal file
@ -0,0 +1,83 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block localstyle %}
|
||||
<style>
|
||||
body {
|
||||
background-color: transparent;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
{{ form_widget(form.submit) }} <a class="btn btn-secondary" onClick="closeModal();">Annuler</a>
|
||||
|
||||
<div id='preview' style='overflow:hidden; width:90px; height:90px; position: absolute; top: 0px; right: 10px;'>
|
||||
<img src="{{ asset(image) }}" style='position: relative;' alt='Thumbnail Preview' />
|
||||
</div>
|
||||
|
||||
<div style="margin-top:50px;">
|
||||
<img id="largeimg" src="{{ asset(image) }}">
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localscript %}
|
||||
<script>
|
||||
function preview(img, selection) {
|
||||
var scaleX = 90 / selection.width;
|
||||
var scaleY = 90 / selection.height;
|
||||
|
||||
$('#preview img').css({
|
||||
width: Math.round(scaleX * $('#largeimg').width()) + 'px',
|
||||
height: Math.round(scaleY * $('#largeimg').height()) + 'px',
|
||||
marginLeft: '-' + Math.round(scaleX * selection.x1) + 'px',
|
||||
marginTop: '-' + Math.round(scaleY * selection.y1) + 'px'
|
||||
});
|
||||
$('#form_x1').val(selection.x1);
|
||||
$('#form_y1').val(selection.y1);
|
||||
$('#form_x2').val(selection.x2);
|
||||
$('#form_y2').val(selection.y2);
|
||||
$('#form_w').val(selection.width);
|
||||
$('#form_h').val(selection.height);
|
||||
}
|
||||
|
||||
function reportThumb() {
|
||||
window.parent.$("#user_avatar").val("{{thumb}}");
|
||||
url="{{ asset(thumb) }}";
|
||||
window.parent.$("#user_avatar_img").attr("src",url);
|
||||
closeModal();
|
||||
}
|
||||
|
||||
function closeModal() {
|
||||
window.parent.$("#mymodal").modal('hide');
|
||||
}
|
||||
|
||||
$(window).on("load",function () {
|
||||
{% if toReport %}
|
||||
reportThumb();
|
||||
{% endif %}
|
||||
$('#largeimg').imgAreaSelect({ aspectRatio: '1:1', onSelectChange: preview });
|
||||
|
||||
|
||||
var selection = new Object();
|
||||
if($('#largeimg').height()<$('#largeimg').width()) {
|
||||
selection.width = $('#largeimg').height();
|
||||
selection.height = $('#largeimg').height();
|
||||
}
|
||||
else {
|
||||
selection.width = $('#largeimg').width();
|
||||
selection.height = $('#largeimg').width();
|
||||
}
|
||||
|
||||
selection.x1=0;
|
||||
selection.x2=0;
|
||||
selection.y1=0;
|
||||
selection.y2=0;
|
||||
|
||||
preview($('#largeimg'),selection);
|
||||
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
@ -9,13 +9,18 @@
|
||||
{{ form_start(form) }}
|
||||
{{ form_widget(form.submit) }}
|
||||
<a href="{{ path(routecancel) }}" class="btn btn-secondary ms-1">Annuler</a>
|
||||
{%if mode!="submit" %}<a href="{{ path(routedelete,{id:form.vars.value.id}) }}" class="btn btn-danger float-end" onclick="return confirm('Confirmez-vous la suppression de cet enregistrement ?')">Supprimer</a>{%endif%}
|
||||
{%if mode=="update" %}<a href="{{ path(routedelete,{id:form.vars.value.id}) }}" class="btn btn-danger float-end" onclick="return confirm('Confirmez-vous la suppression de cet enregistrement ?')">Supprimer</a>{%endif%}
|
||||
|
||||
{% include('include/error.html.twig') %}
|
||||
|
||||
<a class="btn btn-info" style="max-width:100%; margin-bottom:15px;" data-bs-toggle="modal" data-bs-target="#mymodal" onClick="ModalLoad('mymodal','Avatar','{{ path('app_user_crop01',{endpoint:'avatar'}) }}');" title='Ajouter un avatar'>Modifier</a>
|
||||
<div class="text-center d-flex flex-column align-items-center">
|
||||
<img id="user_avatar_img" src="{{asset(form.vars.value.avatar)}}" class="bigavatar mb-2">
|
||||
{{ form_row(form.avatar) }}
|
||||
<a class="btn btn-info" style="max-width:100%; margin-bottom:15px;" data-bs-toggle="modal" data-bs-target="#mymodal" onClick="ModalLoad('mymodal','Avatar','{{ path('app_user_upload_crop01',{endpoint:'avatar',reportThumb:'user_avatar'}) }}');" title='Ajouter un avatar'>Modifier</a>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-6 mx-auto">
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">Information</div>
|
||||
<div class="card-body">
|
||||
@ -26,22 +31,24 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">Permissions</div>
|
||||
<div class="card-body">
|
||||
{{ form_row(form.roles) }}
|
||||
{{ form_row(form.companys) }}
|
||||
{%if form.roles is defined%}
|
||||
<div class="col-md-6">
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">Permissions</div>
|
||||
<div class="card-body">
|
||||
{{ form_row(form.roles) }}
|
||||
{{ form_row(form.companys) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{%endif%}
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localscript %}
|
||||
<script type="module">
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#user_username").focus();
|
||||
});
|
||||
|
Reference in New Issue
Block a user