first commit
This commit is contained in:
257
templates/base.tmpl
Normal file
257
templates/base.tmpl
Normal file
@ -0,0 +1,257 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>{{ .conf.AppName }}</title>
|
||||
<link rel="shortcut icon" href="{{.conf.AppWeburl}}/uploads/logo/{{.conf.AppLogolight}}" />
|
||||
|
||||
<script src="/public/lib/jquery/jquery.min.js"></script>
|
||||
<script src="/public/lib/bootstrap/js/bootstrap.min.js"></script>
|
||||
<script src="/public/lib/spectrum/spectrum.min.js"></script>
|
||||
<script src="/public/lib/ckeditor/ckeditor.js"></script>
|
||||
<script src="/public/lib/dropzone/dropzone.min.js"></script>
|
||||
<script src="/public/lib/iframeresizer/iframeResizer.min.js"></script>
|
||||
<script src="/public/lib/iframeresizer/iframeResizer.contentWindow.min.js"></script>
|
||||
<script src="/public/lib/cropperjs/cropper.min.js"></script>
|
||||
<script src="/public/lib/datatables/datatables.min.js"></script>
|
||||
<script src="/public/lib/datatables/datatables.init.js"></script>
|
||||
|
||||
<link href="/public/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="/public/lib/fontawesome/css/all.min.css" rel="stylesheet">
|
||||
<link href="/public/lib/spectrum/spectrum.min.css" rel="stylesheet">
|
||||
<link href="/public/lib/dropzone/dropzone.min.css" rel="stylesheet">
|
||||
<link href="/public/lib/cropperjs/cropper.min.css" rel="stylesheet">
|
||||
<link href="/public/lib/datatables/datatables.min.css" rel="stylesheet">
|
||||
|
||||
<script src="/public/theme/style.js"></script>
|
||||
<link href="/public/theme/font.css" rel="stylesheet">
|
||||
<link href="/public/theme/style.css" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
:root{
|
||||
--colorbgbodydark: {{ .conf.AppColorbgbodydark }};
|
||||
--colorftbodydark: {{ .conf.AppColorftbodydark }};
|
||||
--colorfttitledark: {{ .conf.AppColorfttitledark }};
|
||||
|
||||
--colorbgbodylight: {{ .conf.AppColorbgbodylight }};
|
||||
--colorftbodylight: {{ .conf.AppColorftbodylight }};
|
||||
--colorfttitlelight: {{ .conf.AppColorfttitlelight }};
|
||||
|
||||
--colorbgbodylightdarker: {{ .conf.AppColorbgbodylightdarker }};
|
||||
--colorfttitlelightdarker: {{ .conf.AppColorfttitlelightdarker }};
|
||||
|
||||
--colorbgbodydarkdarker: {{ .conf.AppColorbgbodydarkdarker }};
|
||||
--colorfttitledarkdarker: {{ .conf.AppColorfttitledarkdarker }};
|
||||
|
||||
--fontsizeh1: {{.conf.AppFontsizeh1}}px;
|
||||
--fontsizeh2: {{.conf.AppFontsizeh2}}px;
|
||||
--fontsizeh3: {{.conf.AppFontsizeh3}}px;
|
||||
--fontsizeh4: {{.conf.AppFontsizeh4}}px;
|
||||
--fontsizebody: {{.conf.AppFontsize}}px;
|
||||
|
||||
--fontbody: "{{ .conf.AppFontbody }}";
|
||||
--fonttitle: "{{ .conf.AppFonttitle }}";
|
||||
}
|
||||
|
||||
// Font
|
||||
body {
|
||||
font-family: var(--fontbody);
|
||||
}
|
||||
h1,h2,h3, .navbar-brand, .card-header, .modal-header h4 {
|
||||
font-family: var(--fonttitle);
|
||||
}
|
||||
|
||||
|
||||
// Background
|
||||
body {
|
||||
background-color: var(--colorbgbodylight);
|
||||
}
|
||||
.navbar.bg-dark, #sidebar, .avatar {
|
||||
background-color: var(--colorbgbodydark)!important;
|
||||
}
|
||||
.card {
|
||||
background-color: var(--colorbgbodylight);
|
||||
}
|
||||
.card-header {
|
||||
background-color: var(--colorbgbodylightdarker);
|
||||
}
|
||||
|
||||
.bodydark {
|
||||
background-color: var(--colorbgbodydark);
|
||||
}
|
||||
|
||||
// Color
|
||||
body, .table, .table-striped>tbody>tr:nth-of-type(odd) {
|
||||
color: var(--colorftbodylight);
|
||||
}
|
||||
h1,h2,h3,h4 {
|
||||
color: var(--colorfttitlelight);
|
||||
}
|
||||
a, .btn-link {
|
||||
color: var(--colorfttitlelight);
|
||||
}
|
||||
a:hover, .btn-link:hover {
|
||||
color: var(--colorfttitlelightdarker);
|
||||
}
|
||||
.navbar-dark .navbar-nav .nav-link {
|
||||
color: var(--colorfttitledarkdarker);
|
||||
}
|
||||
.navbar-dark .navbar-nav .nav-link:hover {
|
||||
color: var(--colorfttitledark);
|
||||
}
|
||||
.navbar-dark .navbar-nav .nav-section {
|
||||
color: var(--colorfttitledark);
|
||||
}
|
||||
.card-header {
|
||||
color: var(--colorfttitlelight);
|
||||
}
|
||||
|
||||
.bodydark h1,.bodydark h2,.bodydark h3,.bodydark h4 {
|
||||
color: var(--colorfttitledark);
|
||||
}
|
||||
|
||||
|
||||
// Size
|
||||
body, .table {
|
||||
font-size: var(--fontsizebody);
|
||||
}
|
||||
h1 {
|
||||
font-size: var(--fontsizeh1);
|
||||
}
|
||||
h2 {
|
||||
font-size: var(--fontsizeh2);
|
||||
}
|
||||
h3 {
|
||||
font-size: var(--fontsizeh3);
|
||||
}
|
||||
h4 {
|
||||
font-size: var(--fontsizeh4);
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{{if .useheader}}
|
||||
<header class="header">
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand my-auto align-middle" href="{{.conf.AppRoutes.home}}">
|
||||
<img id="logo" src="{{.conf.AppWeburl}}/uploads/logo/{{.conf.AppLogodark}}" style="height:40px; margin-right:10px;">
|
||||
{{ .conf.AppName }}
|
||||
</a>
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{.conf.AppRoutes.home}}">Home</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#">Link</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Dropdown
|
||||
</a>
|
||||
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||
<li><a class="dropdown-item" href="#">Action</a></li>
|
||||
<li><a class="dropdown-item" href="#">Another action</a></li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li><a class="dropdown-item" href="#">Something else here</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link disabled">Disabled</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="navbar-nav mb-2 mb-lg-0 ml-auto">
|
||||
{{ if .session.Login }}
|
||||
<li class="nav-item my-auto">
|
||||
<a class="nav-link" href="{{.conf.AppRoutes.userprofil}}">
|
||||
<img class="avatar" src="{{.conf.AppWeburl}}/uploads/avatar/{{.session.Avatar}}" style="height:40px">
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{{ if eq .session.Role "10" }}
|
||||
<li class="nav-item my-auto">
|
||||
<a class="nav-link" href="{{.conf.AppRoutes.homeconfig}}"><i class="fas fa-cog fa-2x"></i></a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
<li class="nav-item my-auto">
|
||||
<a class="nav-link" href="{{.conf.AppRoutes.securitylogout}}"><i class="fas fa-sign-out-alt fa-2x"></i></a>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li class="nav-item my-auto">
|
||||
<a class="nav-link" href="{{.conf.AppRoutes.securitylogin}}"><i class="fas fa-sign-in-alt fa-2x"></i></a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
{{end}}
|
||||
|
||||
{{if .usesidebar}}
|
||||
<div class="d-flex align-items-stretch">
|
||||
<div id="sidebar" class="navbar-dark bg-dark p-3">
|
||||
<ul class="navbar-nav flex-column">
|
||||
<li class="nav-item nav-link nav-section">Configuration</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{.conf.AppRoutes.configlist}}" title="Générale">
|
||||
<i class="fa fa-cog"></i><span class="nav-title px-2">Générale</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/bfcnature/admin/theme" title="Thème">
|
||||
<i class="fa fa-paint-brush"></i><span class="nav-title px-2">Thème</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item nav-link nav-section">Organisation</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{.conf.AppRoutes.userlist}}" title="Utilisateurs">
|
||||
<i class="fa fa-user"></i><span class="nav-title px-2">Utilisateurs</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="sidecontent" class="m-3" style="width:100%">
|
||||
{{ yield }}
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
{{if .usecontainer}}<div class="container mt-3">{{end}}
|
||||
{{ yield }}
|
||||
{{if .usecontainer}}</div>{{end}}
|
||||
{{end}}
|
||||
|
||||
<div id="mymodallarge" class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-xl" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title"></h4>
|
||||
<button type="button" class="btn close" data-dismiss="modal" aria-label="Close" onClick="$('#mymodallarge').modal('hide')">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<iframe class="resizeframe" frameborder=0 width="100%" scrolling="no"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
113
templates/config/edit.tmpl
Normal file
113
templates/config/edit.tmpl
Normal file
@ -0,0 +1,113 @@
|
||||
{{if eq .mode "submit"}}
|
||||
<h1>Ajout Configuration</h1>
|
||||
{{else}}
|
||||
<h1>Modification Configuration = {{.config.Title}}</h1>
|
||||
{{end}}
|
||||
|
||||
{{$value:=.config.Value}}
|
||||
{{ if eq $value ""}}
|
||||
{{$value = .config.Defaultvalue}}
|
||||
{{end}}
|
||||
|
||||
<form method="post">
|
||||
<button type="submit" href="{{.conf.AppRoutes.usersubmit}}" class="btn btn-success">Valider</button>
|
||||
<a href="{{.conf.AppRoutes.configlist}}" class="btn btn-secondary">Annuler</a>
|
||||
{{if eq .mode "update"}}
|
||||
<a href="{{.conf.AppRoutes.configdelete}}" class="btn btn-danger float-end">Supprimer</a>
|
||||
{{end}}
|
||||
|
||||
<div class="alert alert-info mt-3" role="alert">
|
||||
{{.config.Help | unescaped}}
|
||||
</div>
|
||||
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
Informations
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="mb-3">
|
||||
{{if eq .config.Typefield "string"}}
|
||||
<label for="value" class="form-label form-required">Valeur</label>
|
||||
<input type="string" class="form-control" id="value" name="value" required value="{{$value}}">
|
||||
{{end}}
|
||||
|
||||
{{if eq .config.Typefield "integer"}}
|
||||
<label for="value" class="form-label form-required">Valeur</label>
|
||||
<input type="number" min=1 class="form-control" id="value" name="value" required value="{{$value}}">
|
||||
{{end}}
|
||||
|
||||
{{if eq .config.Typefield "color"}}
|
||||
<label for="value" class="form-label form-required">Valeur</label>
|
||||
<input type="string" class="form-control spectrum" id="value" name="value" required value="{{$value}}">
|
||||
{{end}}
|
||||
|
||||
{{if eq .config.Typefield "logo"}}
|
||||
<center>
|
||||
<img src="{{.conf.AppWeburl}}/uploads/logo/{{$value}}" id="valueimage" height="90px">
|
||||
<input type="hidden" class="form-control" id="value" name="value" required value="{{$value}}"><br>
|
||||
<bouton class="btn btn-info mt-1" style="width:90px" onClick="ModalLoad('mymodallarge','Logo','{{.conf.AppRoutes.upload}}logo/value');" title='Ajouter un Logo'>Modifier</a>
|
||||
</center>
|
||||
{{end}}
|
||||
|
||||
{{if eq .config.Typefield "font"}}
|
||||
<div class="form-group">
|
||||
<label for="value" class="form-label form-required">Valeur</label>
|
||||
<select id="value" name="value" class="form-control">
|
||||
<option value=""></option>
|
||||
<option value="ABeeZee-Regular">ABeeZee-Regular</option>
|
||||
<option value="Acme-Regular">Acme-Regular</option>
|
||||
<option value="AlfaSlabOne-Regular">AlfaSlabOne-Regular</option>
|
||||
<option value="Anton-Regular">Anton-Regular</option>
|
||||
<option value="Baloo-Regular">Baloo-Regular</option>
|
||||
<option value="CarterOne-Regular">CarterOne-Regular</option>
|
||||
<option value="Chewy-Regular">Chewy-Regular</option>
|
||||
<option value="Courgette-Regular">Courgette-Regular</option>
|
||||
<option value="FredokaOne-Regular">FredokaOne-Regular</option>
|
||||
<option value="Grandstander">Grandstander</option>
|
||||
<option value="Helvetica">Helvetica</option>
|
||||
<option value="Justanotherhand-Regular">Justanotherhand-Regular</option>
|
||||
<option value="Lato-Regular">Lato-Regular</option>
|
||||
<option value="LexendDeca-Regular">LexendDeca-Regular</option>
|
||||
<option value="LuckiestGuy-Regular">LuckiestGuy-Regular</option>
|
||||
<option value="Overpass-Black">Overpass-Black</option>
|
||||
<option value="PassionOne">PassionOne</option>
|
||||
<option value="Peacesans">Peacesans</option>
|
||||
<option value="Redressed">Redressed</option>
|
||||
<option value="Righteous-Regular">Righteous-Regular</option>
|
||||
<option value="Roboto-Regular">Roboto-Regular</option>
|
||||
<option value="RubikMonoOne-Regular">RubikMonoOne-Regular</option>
|
||||
<option value="SigmarOne-Regular">SigmarOne-Regular</option>
|
||||
<option value="Signika-Regular">Signika-Regular</option>
|
||||
<option value="Teko-Bold">Teko-Bold</option>
|
||||
<option value="Viga-Regular">Viga-Regular</option>
|
||||
</select>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{if eq .config.Typefield "editor"}}
|
||||
<textarea name="value" class="ckeditor">
|
||||
{{$value | unescaped}}
|
||||
</textarea>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
{{if eq .config.Typefield "font"}}
|
||||
$('#value option[value="{{$value}}"]').prop('selected', true);
|
||||
{{end}}
|
||||
|
||||
{{if eq .config.Typefield "logo"}}
|
||||
function CallbackUpload(id,path,filename) {
|
||||
$("#"+id).val(filename);
|
||||
$("#"+id+"image").attr("src",path+filename);
|
||||
$("#mymodallarge").modal("hide");
|
||||
}
|
||||
{{end}}
|
||||
</script>
|
||||
|
||||
|
||||
|
316
templates/config/list.tmpl
Normal file
316
templates/config/list.tmpl
Normal file
@ -0,0 +1,316 @@
|
||||
<h1 class="border-bottom mb-3">Configurations</h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h3 class="mt-3">Générale</h3>
|
||||
<table class="table table-striped table-bordered table-hover" id="" style="width:100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="70px">
|
||||
<a href="{{.conf.AppRoutes.configupdate}}{{.configs.AppName.Id}}"><i class="fa fa-file"></i></a>
|
||||
<a href="{{.conf.AppRoutes.configdelete}}{{.configs.AppName.Id}}"><i class="fa fa-trash"></i></a>
|
||||
</td>
|
||||
<td width="30%">{{.configs.AppName.Title}}</td>
|
||||
<td>
|
||||
{{if .configs.AppName.Value}}
|
||||
{{.configs.AppName.Value}}
|
||||
{{else}}
|
||||
{{.configs.AppName.Defaultvalue}}
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="70px">
|
||||
<a href="{{.conf.AppRoutes.configupdate}}{{.configs.AppSubname.Id}}"><i class="fa fa-file"></i></a>
|
||||
<a href="{{.conf.AppRoutes.configdelete}}{{.configs.AppSubname.Id}}"><i class="fa fa-trash"></i></a>
|
||||
</td>
|
||||
<td width="30%">{{.configs.AppSubname.Title}}</td>
|
||||
<td>
|
||||
{{if .configs.AppSubname.Value}}
|
||||
{{.configs.AppSubname.Value}}
|
||||
{{else}}
|
||||
{{.configs.AppSubname.Defaultvalue}}
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td width="70px">
|
||||
<a href="{{.conf.AppRoutes.configupdate}}{{.configs.AppDescription.Id}}"><i class="fa fa-file"></i></a>
|
||||
<a href="{{.conf.AppRoutes.configdelete}}{{.configs.AppDescription.Id}}"><i class="fa fa-trash"></i></a>
|
||||
</td>
|
||||
<td width="30%">{{.configs.AppDescription.Title}}</td>
|
||||
<td>
|
||||
{{if .configs.AppDescription.Value}}
|
||||
{{.configs.AppDescription.Value | unescaped}}
|
||||
{{else}}
|
||||
{{.configs.AppDescription.Defaultvalue | unescaped}}
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<h3 class="mt-4">Couleurs des Fonds de page</h3>
|
||||
<table class="table table-striped table-bordered table-hover" id="" style="width:100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="70px">
|
||||
<a href="{{.conf.AppRoutes.configupdate}}{{.configs.AppColorbgbodydark.Id}}"><i class="fa fa-file"></i></a>
|
||||
<a href="{{.conf.AppRoutes.configdelete}}{{.configs.AppColorbgbodydark.Id}}"><i class="fa fa-trash"></i></a>
|
||||
</td>
|
||||
<td width="50%">{{.configs.AppColorbgbodydark.Title}}</td>
|
||||
<td style="background-color: var(--colorbgbodydark); color: var(--colorftbodydark);">
|
||||
{{if .configs.AppColorbgbodydark.Value}}
|
||||
{{.configs.AppColorbgbodydark.Value}}
|
||||
{{else}}
|
||||
{{.configs.AppColorbgbodydark.Defaultvalue}}
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="70px">
|
||||
<a href="{{.conf.AppRoutes.configupdate}}{{.configs.AppColorbgbodylight.Id}}"><i class="fa fa-file"></i></a>
|
||||
<a href="{{.conf.AppRoutes.configdelete}}{{.configs.AppColorbgbodylight.Id}}"><i class="fa fa-trash"></i></a>
|
||||
</td>
|
||||
<td width="50%">{{.configs.AppColorbgbodylight.Title}}</td>
|
||||
<td style="background-color: var(--colorbgbodylight); color: var(--colorftbodylight);">
|
||||
{{if .configs.AppColorbgbodylight.Value}}
|
||||
{{.configs.AppColorbgbodylight.Value}}
|
||||
{{else}}
|
||||
{{.configs.AppColorbgbodylight.Defaultvalue}}
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3 class="mt-4">Couleurs des Titres</h3>
|
||||
<table class="table table-striped table-bordered table-hover" id="" style="width:100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="70px">
|
||||
<a href="{{.conf.AppRoutes.configupdate}}{{.configs.AppColorfttitledark.Id}}"><i class="fa fa-file"></i></a>
|
||||
<a href="{{.conf.AppRoutes.configdelete}}{{.configs.AppColorfttitledark.Id}}"><i class="fa fa-trash"></i></a>
|
||||
</td>
|
||||
<td width="50%">{{.configs.AppColorfttitledark.Title}}</td>
|
||||
<td style="background-color: var(--colorbgbodydark); color: var(--colorfttitledark);">
|
||||
{{if .configs.AppColorfttitledark.Value}}
|
||||
{{.configs.AppColorfttitledark.Value}}
|
||||
{{else}}
|
||||
{{.configs.AppColorfttitledark.Defaultvalue}}
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="70px">
|
||||
<a href="{{.conf.AppRoutes.configupdate}}{{.configs.AppColorfttitlelight.Id}}"><i class="fa fa-file"></i></a>
|
||||
<a href="{{.conf.AppRoutes.configdelete}}{{.configs.AppColorfttitlelight.Id}}"><i class="fa fa-trash"></i></a>
|
||||
</td>
|
||||
<td width="50%">{{.configs.AppColorfttitlelight.Title}}</td>
|
||||
<td style="background-color: var(--colorbgbodylight); color: var(--colorfttitlelight);">
|
||||
{{if .configs.AppColorfttitlelight.Value}}
|
||||
{{.configs.AppColorfttitlelight.Value}}
|
||||
{{else}}
|
||||
{{.configs.AppColorfttitlelight.Defaultvalue}}
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3 class="mt-4">Couleurs des Polices</h3>
|
||||
<table class="table table-striped table-bordered table-hover" id="" style="width:100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="70px">
|
||||
<a href="{{.conf.AppRoutes.configupdate}}{{.configs.AppColorftbodydark.Id}}"><i class="fa fa-file"></i></a>
|
||||
<a href="{{.conf.AppRoutes.configdelete}}{{.configs.AppColorftbodydark.Id}}"><i class="fa fa-trash"></i></a>
|
||||
</td>
|
||||
<td width="50%">{{.configs.AppColorftbodydark.Title}}</td>
|
||||
<td style="background-color: var(--colorbgbodydark); color: var(--colorftbodydark);">
|
||||
{{if .configs.AppColorftbodydark.Value}}
|
||||
{{.configs.AppColorftbodydark.Value}}
|
||||
{{else}}
|
||||
{{.configs.AppColorftbodydark.Defaultvalue}}
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="70px">
|
||||
<a href="{{.conf.AppRoutes.configupdate}}{{.configs.AppColorftbodylight.Id}}"><i class="fa fa-file"></i></a>
|
||||
<a href="{{.conf.AppRoutes.configdelete}}{{.configs.AppColorftbodylight.Id}}"><i class="fa fa-trash"></i></a>
|
||||
</td>
|
||||
<td width="50%">{{.configs.AppColorftbodylight.Title}}</td>
|
||||
<td style="background-color: var(--colorbgbodylight); color: var(--colorftbodylight);">
|
||||
{{if .configs.AppColorftbodylight.Value}}
|
||||
{{.configs.AppColorftbodylight.Value}}
|
||||
{{else}}
|
||||
{{.configs.AppColorftbodylight.Defaultvalue}}
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<h3 class="mt-4">Logos</h3>
|
||||
<table class="table table-striped table-bordered table-hover" id="" style="width:100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="70px">
|
||||
<a href="{{.conf.AppRoutes.configupdate}}{{.configs.AppLogodark.Id}}"><i class="fa fa-file"></i></a>
|
||||
<a href="{{.conf.AppRoutes.configdelete}}{{.configs.AppLogodark.Id}}"><i class="fa fa-trash"></i></a>
|
||||
</td>
|
||||
<td width="50%">{{.configs.AppLogodark.Title}}</td>
|
||||
<td class="text-center" style="background-color: var(--colorbgbodydark); color: var(--colorftbodydark);">
|
||||
{{if .configs.AppLogodark.Value}}
|
||||
<img src="{{.conf.AppWeburl}}/uploads/logo/{{.configs.AppLogodark.Value}}" style="height:45px;">
|
||||
{{else}}
|
||||
<img src="{{.conf.AppWeburl}}/uploads/logo/{{.configs.AppLogodark.Defaultvalue}}" style="height:45px;">
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="70px">
|
||||
<a href="{{.conf.AppRoutes.configupdate}}{{.configs.AppLogolight.Id}}"><i class="fa fa-file"></i></a>
|
||||
<a href="{{.conf.AppRoutes.configdelete}}{{.configs.AppLogolight.Id}}"><i class="fa fa-trash"></i></a>
|
||||
</td>
|
||||
<td width="50%">{{.configs.AppLogolight.Title}}</td>
|
||||
<td class="text-center" style="background-color: var(--colorbgbodylight); color: var(--colorftbodylight);">
|
||||
{{if .configs.AppLogolight.Value}}
|
||||
<img src="{{.conf.AppWeburl}}/uploads/logo/{{.configs.AppLogolight.Value}}" style="height:45px;">
|
||||
{{else}}
|
||||
<img src="{{.conf.AppWeburl}}/uploads/logo/{{.configs.AppLogolight.Defaultvalue}}" style="height:45px;">
|
||||
{{end}}
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3 class="mt-4">Polices</h3>
|
||||
<table class="table table-striped table-bordered table-hover" id="" style="width:100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="70px">
|
||||
<a href="{{.conf.AppRoutes.configupdate}}{{.configs.AppFonttitle.Id}}"><i class="fa fa-file"></i></a>
|
||||
<a href="{{.conf.AppRoutes.configdelete}}{{.configs.AppFonttitle.Id}}"><i class="fa fa-trash"></i></a>
|
||||
</td>
|
||||
<td width="50%">{{.configs.AppFonttitle.Title}}</td>
|
||||
<td style="background-color: var(--colorbgbodydark); color: var(--colorftbodydark);">
|
||||
{{if .configs.AppFonttitle.Value}}
|
||||
{{.configs.AppFonttitle.Value}}
|
||||
{{else}}
|
||||
{{.configs.AppFonttitle.Defaultvalue}}
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="70px">
|
||||
<a href="{{.conf.AppRoutes.configupdate}}{{.configs.AppFontbody.Id}}"><i class="fa fa-file"></i></a>
|
||||
<a href="{{.conf.AppRoutes.configdelete}}{{.configs.AppFontbody.Id}}"><i class="fa fa-trash"></i></a>
|
||||
</td>
|
||||
<td width="50%">{{.configs.AppFontbody.Title}}</td>
|
||||
<td style="background-color: var(--colorbgbodylight); color: var(--colorftbodylight);">
|
||||
{{if .configs.AppFontbody.Value}}
|
||||
{{.configs.AppFontbody.Value}}
|
||||
{{else}}
|
||||
{{.configs.AppFontbody.Defaultvalue}}
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3 class="mt-4">Taille des Polices</h3>
|
||||
<table class="table table-striped table-bordered table-hover" id="" style="width:100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="70px">
|
||||
<a href="{{.conf.AppRoutes.configupdate}}{{.configs.AppFontsizeh1.Id}}"><i class="fa fa-file"></i></a>
|
||||
<a href="{{.conf.AppRoutes.configdelete}}{{.configs.AppFontsizeh1.Id}}"><i class="fa fa-trash"></i></a>
|
||||
</td>
|
||||
<td width="50%">{{.configs.AppFontsizeh1.Title}}</td>
|
||||
<td>
|
||||
{{if .configs.AppFontsizeh1.Value}}
|
||||
{{.configs.AppFontsizeh1.Value}}
|
||||
{{else}}
|
||||
{{.configs.AppFontsizeh1.Defaultvalue}}
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="70px">
|
||||
<a href="{{.conf.AppRoutes.configupdate}}{{.configs.AppFontsizeh2.Id}}"><i class="fa fa-file"></i></a>
|
||||
<a href="{{.conf.AppRoutes.configdelete}}{{.configs.AppFontsizeh2.Id}}"><i class="fa fa-trash"></i></a>
|
||||
</td>
|
||||
<td width="50%">{{.configs.AppFontsizeh2.Title}}</td>
|
||||
<td>
|
||||
{{if .configs.AppFontsizeh2.Value}}
|
||||
{{.configs.AppFontsizeh2.Value}}
|
||||
{{else}}
|
||||
{{.configs.AppFontsizeh2.Defaultvalue}}
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="70px">
|
||||
<a href="{{.conf.AppRoutes.configupdate}}{{.configs.AppFontsizeh3.Id}}"><i class="fa fa-file"></i></a>
|
||||
<a href="{{.conf.AppRoutes.configdelete}}{{.configs.AppFontsizeh3.Id}}"><i class="fa fa-trash"></i></a>
|
||||
</td>
|
||||
<td width="50%">{{.configs.AppFontsizeh3.Title}}</td>
|
||||
<td>
|
||||
{{if .configs.AppFontsizeh3.Value}}
|
||||
{{.configs.AppFontsizeh3.Value}}
|
||||
{{else}}
|
||||
{{.configs.AppFontsizeh3.Defaultvalue}}
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="70px">
|
||||
<a href="{{.conf.AppRoutes.configupdate}}{{.configs.AppFontsizeh4.Id}}"><i class="fa fa-file"></i></a>
|
||||
<a href="{{.conf.AppRoutes.configdelete}}{{.configs.AppFontsizeh4.Id}}"><i class="fa fa-trash"></i></a>
|
||||
</td>
|
||||
<td width="50%">{{.configs.AppFontsizeh4.Title}}</td>
|
||||
<td>
|
||||
{{if .configs.AppFontsizeh4.Value}}
|
||||
{{.configs.AppFontsizeh4.Value}}
|
||||
{{else}}
|
||||
{{.configs.AppFontsizeh4.Defaultvalue}}
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="70px">
|
||||
<a href="{{.conf.AppRoutes.configupdate}}{{.configs.AppFontsize.Id}}"><i class="fa fa-file"></i></a>
|
||||
<a href="{{.conf.AppRoutes.configdelete}}{{.configs.AppFontsize.Id}}"><i class="fa fa-trash"></i></a>
|
||||
</td>
|
||||
<td width="50%">{{.configs.AppFontsize.Title}}</td>
|
||||
<td>
|
||||
{{if .configs.AppFontsize.Value}}
|
||||
{{.configs.AppFontsize.Value}}
|
||||
{{else}}
|
||||
{{.configs.AppFontsize.Defaultvalue}}
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
1
templates/home/error.tmpl
Normal file
1
templates/home/error.tmpl
Normal file
@ -0,0 +1 @@
|
||||
{{.error}}
|
6
templates/home/home.tmpl
Normal file
6
templates/home/home.tmpl
Normal file
@ -0,0 +1,6 @@
|
||||
<center>
|
||||
<h1 class="mt-5" style="font-size:60px">{{.conf.AppName}}</h1>
|
||||
<p>{{.conf.AppSubname}}</p>
|
||||
|
||||
<img id="logo" src="{{.conf.AppWeburl}}/uploads/logo/{{.conf.AppLogolight}}" width="250px">
|
||||
</center>
|
35
templates/security/login.tmpl
Normal file
35
templates/security/login.tmpl
Normal file
@ -0,0 +1,35 @@
|
||||
<center>
|
||||
<h1 class="mt-5" style="font-size:60px">{{.conf.AppName}}</h1>
|
||||
<p>{{.conf.AppSubname}}</p>
|
||||
<img id="logo" src="{{.conf.AppWeburl}}/uploads/logo/{{.conf.AppLogolight}}" width="100px">
|
||||
</center>
|
||||
|
||||
<form method="post">
|
||||
<div class="card mt-3" style="max-width:300px; margin:auto">
|
||||
<div class="card-body">
|
||||
<div class="mb-3">
|
||||
<label for="login" class="form-label form-required">Login</label>
|
||||
<input type="string" class="form-control" id="login" name="login" required>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="password" class="form-label form-required">Mot de Passe</label>
|
||||
<input type="password" class="form-control" id="password" name="password" required>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-success" style="width;100%">Valider</button>
|
||||
|
||||
{{ if .error }}
|
||||
<div class='alert alert-danger mt-3 mb-3'>
|
||||
{{ .error | unescaped }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<script>
|
||||
$("body").addClass("bodydark");
|
||||
$("#login").focus();
|
||||
</script>
|
52
templates/upload/crop.tmpl
Normal file
52
templates/upload/crop.tmpl
Normal file
@ -0,0 +1,52 @@
|
||||
<form method="post" action="" enctype="multipart/form-data" id="myform">
|
||||
<button type="submit" class="btn btn-success">Valider</button>
|
||||
<button onClick="parent.$('#mymodallarge').modal('hide')" class="btn btn-secondary">Annuler</button>
|
||||
</form>
|
||||
|
||||
<center class="mb-3">
|
||||
<div class="preview" style="overflow:hidden; height:90px;"></div>
|
||||
</center>
|
||||
|
||||
<div>
|
||||
<img id="image" src="{{.pathfile}}" style="width:100%">
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
image = document.getElementById('image');
|
||||
const cropper = new Cropper(image, {
|
||||
aspectRatio: 1 / 1,
|
||||
preview: '.preview',
|
||||
});
|
||||
|
||||
$("#myform").submit(function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var formdata = new FormData(document.querySelector('form'));
|
||||
|
||||
result=cropper.getCroppedCanvas({ maxWidth: 4096, maxHeight: 4096 });
|
||||
result.toBlob(function (blob) {
|
||||
file = new File([blob], 'crooped.jpg');
|
||||
formdata.append("file", blob, 'thumb_{{.filename}}');
|
||||
|
||||
$.ajax({
|
||||
url: "{{.submitroute}}",
|
||||
data: formdata,
|
||||
type: "POST",
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function( response) {
|
||||
{{ if .iscallback }}
|
||||
parent.CallbackUpload("{{.id}}","{{.path}}",response.file);
|
||||
{{ else }}
|
||||
document.location.href="{{.redirect}}";
|
||||
{{ end }}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
</script>
|
58
templates/upload/upload.tmpl
Normal file
58
templates/upload/upload.tmpl
Normal file
@ -0,0 +1,58 @@
|
||||
<script type="text/javascript">
|
||||
|
||||
Dropzone.autoDiscover = false;
|
||||
filename="";
|
||||
|
||||
$(document).ready(function () {
|
||||
$("#mydropzone").dropzone({
|
||||
{{if .isonefile }}
|
||||
maxFiles: 1,
|
||||
{{end}}
|
||||
|
||||
{{ if .acceptedFiles }}
|
||||
acceptedFiles: "{{.acceptedFiles}}",
|
||||
{{ end }}
|
||||
|
||||
url: "{{.conf.AppRoutes.uploaded}}{{.typeupload}}/{{.id}}",
|
||||
|
||||
init: function () {
|
||||
var totalFiles = 0, completeFiles = 0;
|
||||
this.on("addedfile", function (file) {
|
||||
totalFiles += 1;
|
||||
});
|
||||
this.on("removed file", function (file) {
|
||||
totalFiles -= 1;
|
||||
});
|
||||
this.on("complete", function (file) {
|
||||
completeFiles += 1;
|
||||
if (completeFiles === totalFiles) {
|
||||
{{ if .iscallback }}
|
||||
parent.CallbackUpload("{{.id}}","{{.path}}",filename);
|
||||
{{ else if .iscropped }}
|
||||
document.location.href="{{.redirect}}?pathfile={{.path}}"+filename+"&filename="+filename;
|
||||
{{ else }}
|
||||
document.location.href="{{.redirect}}";
|
||||
{{ end }}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
success: function (file, response) {
|
||||
filename=response.file;
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<form id="mydropzone"
|
||||
class="dropzone"
|
||||
action="{{.conf.AppRoutes.uploaded}}{{.typeupload}}/{{.id}}"
|
||||
enctype="multipart/form-data"
|
||||
method="post">
|
||||
|
||||
<div class="dz-message" data-dz-message><span>Cliquez ici pour débuter votre téléchargement</span></div>
|
||||
|
||||
</form>
|
||||
|
||||
|
115
templates/user/edit.tmpl
Normal file
115
templates/user/edit.tmpl
Normal file
@ -0,0 +1,115 @@
|
||||
{{if eq .mode "submit"}}
|
||||
<h1>Ajout Utilisateur</h1>
|
||||
{{else if eq .mode "update" }}
|
||||
<h1>Modification Utilisateur</h1>
|
||||
{{ else }}
|
||||
<h1>Mon Profil</h1>
|
||||
{{end}}
|
||||
|
||||
<form method="post" oninput='repeatpassword.setCustomValidity(password.value != repeatpassword.value ? "Mot de passe non valide" : "")'>
|
||||
<button type="submit" href="{{.conf.AppRoutes.usersubmit}}" class="btn btn-success">Valider</button>
|
||||
|
||||
{{if eq .mode "profil"}}
|
||||
<a href="{{.conf.AppRoutes.home}}" class="btn btn-secondary">Annuler</a>
|
||||
{{else}}
|
||||
<a href="{{.conf.AppRoutes.userlist}}" class="btn btn-secondary">Annuler</a>
|
||||
{{end}}
|
||||
|
||||
{{if eq .mode "update"}}
|
||||
<a href="{{.conf.AppRoutes.userdelete}}{{.user.Id}}" class="btn btn-danger float-end" data-method="delete" data-confirm="Confirmez-vous la suppression de cet enregistrement ?">Supprimer</a>
|
||||
{{end}}
|
||||
|
||||
{{ if .error }}
|
||||
<div class='alert alert-danger mt-3 mb-3'>
|
||||
<strong>Erreur</strong><br>
|
||||
{{ .error | unescaped }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<center>
|
||||
<img class="avatar" id="avatarimage" src="{{.conf.AppWeburl}}/uploads/avatar/{{.user.Avatar}}">
|
||||
<input type="hidden" class="form-control" id="avatar" name="avatar" required value="{{.user.Avatar}}"><br>
|
||||
<bouton class="btn btn-info mt-1" style="width:90px" onClick="ModalLoad('mymodallarge','Avatar','{{.conf.AppRoutes.upload}}avatar/avatar');" title='Modifier votre Avatar'>Modifier</a>
|
||||
|
||||
</center>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
Identifiants
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="mb-3">
|
||||
<label for="login" class="form-label form-required">Login</label>
|
||||
<input type="string" class="form-control" id="login" name="login" {{if eq .mode "submit"}}required{{else}}readonly{{end}} value="{{.user.Login}}">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="password" class="form-label form-required">Mot de Passe</label>
|
||||
<input type="password" class="form-control" id="password" name="password" {{if eq .mode "submit"}}required{{end}}>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="repeatpassword" class="form-label form-required">Confirmer Mot de Passe</label>
|
||||
<input type="password" class="form-control" id="repeatpassword" name="repeatpassword" {{if eq .mode "submit"}}required{{end}}>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="string" class="form-label form-required">Api Key</label>
|
||||
<input type="string" class="form-control" id="apikey" name="apikey" required value="{{.user.Apikey}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
Informations
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ if ne .mode "profil" }}
|
||||
<div class="mb-3">
|
||||
<label for="role" class="form-label form-required">Rôle</label>
|
||||
<select id="role" name="role" class="form-control">
|
||||
<option value=""></option>
|
||||
<option value="10">Administrateur</option>
|
||||
<option value="50">Utilisateur</option>
|
||||
</select>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="firstname" class="form-label form-required">Prénom</label>
|
||||
<input type="string" class="form-control" id="firstname" name="firstname" required value="{{.user.Firstname}}">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="lastname" class="form-label form-required">Nom</label>
|
||||
<input type="string" class="form-control" id="lastname" name="lastname" required value="{{.user.Lastname}}">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="email" class="form-label form-required">Email</label>
|
||||
<input type="email" class="form-control" id="email" name="email" required value="{{.user.Email}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
$('#role option[value="{{.user.Role}}"]').prop('selected', true);
|
||||
function CallbackUpload(id,path,filename) {
|
||||
$("#"+id).val(filename);
|
||||
$("#"+id+"image").attr("src",path+filename);
|
||||
$("#mymodallarge").modal("hide");
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
50
templates/user/list.tmpl
Normal file
50
templates/user/list.tmpl
Normal file
@ -0,0 +1,50 @@
|
||||
<h1>Utilisateurs</h1>
|
||||
|
||||
<a href="{{.conf.AppRoutes.usersubmit}}" class="btn btn-success mb-3">Ajouter</a>
|
||||
|
||||
{{$routeupdate:=.conf.AppRoutes.userupdate}}
|
||||
{{$weburl:=.conf.AppWeburl}}
|
||||
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70px" class="no-sort text-center">Action</th>
|
||||
<th width="70px" class="no-sort text-center">Avatar</th>
|
||||
<th>Login</th>
|
||||
<th>Prénom</th>
|
||||
<th>Nom</th>
|
||||
<th>Email</th>
|
||||
<th>Rôle</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range $user := .users }}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<a href="{{$routeupdate}}{{ $user.Id }}"><i class="fas fa-file fa-2x"></i></a>
|
||||
</td>
|
||||
|
||||
<td class="text-center"><img class="avatar" id="avatarimage" src="{{$weburl}}/uploads/avatar/{{$user.Avatar}}" style="height:40px"></td>
|
||||
|
||||
<td>{{ $user.Login }}</td>
|
||||
<td>{{ $user.Firstname }}</td>
|
||||
<td>{{ $user.Lastname }}</td>
|
||||
<td>{{ $user.Email }}</td>
|
||||
<td>
|
||||
{{ if eq $user.Role 10}}Administrateur{{end}}
|
||||
{{ if eq $user.Role 50}}Utilisateur{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<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>
|
Reference in New Issue
Block a user