svg
This commit is contained in:
@ -46,25 +46,25 @@
|
||||
{{ form_row(form.value) }}
|
||||
{% if config.type=="logo" %}
|
||||
<div style="width:90px; margin:10px auto;">
|
||||
{% set color = "" %}
|
||||
{% if config.id=='logodark' %}
|
||||
{% set color = app.session.get('colorbgbodydark') %}
|
||||
{% elseif config.id=='logolight' %}
|
||||
{% set color = app.session.get('colorbgbodylight') %}
|
||||
{% endif %}
|
||||
{% set color = "" %}
|
||||
{% if config.id=='logodark' %}
|
||||
{% set color = app.session.get('colorbgbodydark') %}
|
||||
{% elseif config.id=='logolight' %}
|
||||
{% set color = app.session.get('colorbgbodylight') %}
|
||||
{% endif %}
|
||||
|
||||
<img id="config_value_img" src="{{asset("uploads/logo/"~config.value)}}" style="background-color: {{color}}; width:90px;height:90px; margin:auto;display:block;">
|
||||
<a class="btn btn-info" style="width:90px" onClick="ModalLoad('extraLargeModal','Logo','{{ path('app_user_config_logo') }}');" title='Ajouter un Logo'>Modifier</a>
|
||||
<a class="btn btn-info" style="width:90px" onClick="ModalLoad('extraLargeModal','Logo','{{ path('app_user_config_logo') }}');" title='Ajouter un Logo'>Modifier</a>
|
||||
<img id="config_value_img" src="{{asset("uploads/logo/"~config.value)}}" style="background-color: {{color}}; width:90px;height:90px; margin:auto;display:block;">
|
||||
</div>
|
||||
{% elseif config.type=="hero" %}
|
||||
<div style="margin:10px auto;">
|
||||
<img id="config_value_img" src="{{asset("uploads/hero/"~config.value)}}" style="width:100%;margin:auto;display:block;">
|
||||
<a class="btn btn-info" style="width:100%" onClick="ModalLoad('extraLargeModal','Carrousel','{{ path('app_crop01', {"type": "hero", "reportinput": "config_value" }) }}');" title='Ajouter une Bannière'>Modifier</a>
|
||||
<a class="btn btn-info" style="width:100%" onClick="ModalLoad('extraLargeModal','Carrousel','{{ path('app_crop01', {"type": "hero", "reportinput": "config_value" }) }}');" title='Ajouter une Bannière'>Modifier</a>
|
||||
<img id="config_value_img" src="{{asset("uploads/hero/"~config.value)}}" style="width:100%;margin:auto;display:block;">
|
||||
</div>
|
||||
{% elseif config.type=="image" %}
|
||||
<div style="margin:10px auto;">
|
||||
<img id="config_value_img" src="{{asset("uploads/image/"~config.value)}}" style="width:100%;margin:auto;display:block;">
|
||||
<a class="btn btn-info" style="width:100%" onClick="ModalLoad('extraLargeModal','Image','{{ path('app_crop01', {"type": "image", "reportinput": "config_value" }) }}');" title='Ajouter une Image'>Modifier</a>
|
||||
<a class="btn btn-info" style="width:100%" onClick="ModalLoad('extraLargeModal','Image','{{ path('app_crop01', {"type": "image", "reportinput": "config_value" }) }}');" title='Ajouter une Image'>Modifier</a>
|
||||
<img id="config_value_img" src="{{asset("uploads/image/"~config.value)}}" style="width:100%;margin:auto;display:block;">
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ form_row(form.help) }}
|
||||
|
@ -77,7 +77,6 @@
|
||||
{% endif %}
|
||||
{% elseif config.type=="hero" %}
|
||||
{%if not config.value is empty %}
|
||||
qsdfqsdf
|
||||
<img src="{{asset("uploads/hero/"~config.value)}}" style="max-width:100%">
|
||||
{% endif %}
|
||||
{% elseif config.type=="image" %}
|
||||
|
@ -329,7 +329,7 @@
|
||||
{% set source="thumbori_"~page.illustration %}
|
||||
{% set class=" grid-item-size-2 grid-item-size-page" %}
|
||||
|
||||
<a href="{{ path("app_webzine_view",{"idcat":webzine.id,"id":page.id}) }}">
|
||||
<a href="{{ path("app_webzine_view",{"by":"home","idcat":webzine.id,"id":page.id}) }}">
|
||||
<div id="webzine{{webzine.id}}" class="grid-item grid-item-size {{class}} cssfilter no-cache-bg" data-width="{{page.width}}" data-background-image="/{{ appAlias }}/uploads/webzine/{{source}}" data-height="{{page.height}}" style="height:auto;background-position: center ; background-size: cover; background-image: url(/{{ appAlias }}/uploads/webzine/{{source}}");">
|
||||
</div>
|
||||
</a>
|
||||
@ -359,25 +359,30 @@
|
||||
</div>
|
||||
|
||||
<!-- ADDMODAL ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
||||
<div id="addmodal" class="modal" tabindex="-1" role="dialog" style="z-index:100000">
|
||||
<div class="modal-dialog modal-md" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Ajouter</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
{% if app.user %}
|
||||
<div id="addmodal" class="modal" tabindex="-1" role="dialog" style="z-index:100000">
|
||||
<div class="modal-dialog modal-md" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Ajouter</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body" style="display:flex; flex-direction: column;">
|
||||
<a href={{ path("app_illustration_submit",{"by":"user","userid":app.user.id}) }} class="btn btn-link" title="Créer une Illustration">
|
||||
Ajouter une illustration
|
||||
</a>
|
||||
|
||||
<a href={{ path("app_webzine_submit",{"by":"user","userid":app.user.id}) }} class="btn btn-link" title="Créer une Illustration">
|
||||
Ajouter un Webzine
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<a href={{ path("app_illustration_submit",{"by":"user","userid":app.user.id}) }} class="btn btn-link" title="Créer une Illustration">
|
||||
Ajouter une illustration
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
|
@ -291,7 +291,7 @@
|
||||
{% set source="thumbori_"~page.illustration %}
|
||||
{% set class=" grid-item-size-2 grid-item-size-page" %}
|
||||
|
||||
<a href="{{ path("app_webzine_view",{"idcat":webzine.id,"id":page.id}) }}">
|
||||
<a href="{{ path("app_webzine_view",{"idcat":webzine.id,"id":page.id,"by":"user"}) }}">
|
||||
<div id="webzine{{webzine.id}}" class="grid-item grid-item-size {{class}} cssfilter no-cache-bg" data-width="{{page.width}}" data-background-image="/{{ appAlias }}/uploads/webzine/{{source}}" data-height="{{page.height}}" style="height:auto;background-position: center ; background-size: cover; background-image: url(/{{ appAlias }}/uploads/webzine/{{source}}");">
|
||||
</div>
|
||||
</a>
|
||||
@ -355,25 +355,30 @@
|
||||
</div>
|
||||
|
||||
<!-- ADDMODAL ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
||||
<div id="addmodal" class="modal" tabindex="-1" role="dialog" style="z-index:100000">
|
||||
<div class="modal-dialog modal-md" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Ajouter</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<a href={{ path("app_illustration_submit",{"by":"user","userid":app.user.id}) }} class="btn btn-link" title="Créer une Illustration">
|
||||
Ajouter une illustration
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if app.user %}
|
||||
<div id="addmodal" class="modal" tabindex="-1" role="dialog" style="z-index:100000">
|
||||
<div class="modal-dialog modal-md" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Ajouter</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body" style="display:flex; flex-direction: column;">
|
||||
<a href={{ path("app_illustration_submit",{"by":"user","userid":app.user.id}) }} class="btn btn-link" title="Créer une Illustration">
|
||||
Ajouter une illustration
|
||||
</a>
|
||||
|
||||
<a href={{ path("app_webzine_submit",{"by":"user","userid":app.user.id}) }} class="btn btn-link" title="Créer une Illustration">
|
||||
Ajouter un Webzine
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
|
@ -35,7 +35,7 @@
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_webzine",{"by":"admin"})}}">
|
||||
<a href="{{path("app_admin_webzine",{"by":"admin","userid":-1})}}">
|
||||
<i class="fas fa-book-open fa-fw"></i> Webzine
|
||||
</a>
|
||||
</li>
|
||||
|
@ -173,6 +173,19 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-pencil-alt fa-fw"></i> Webzine
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{% if mode=="profil" %}
|
||||
{{ render(path("app_user_webzine")) }}
|
||||
{% else %}
|
||||
{{ render(path("app_admin_webzine",{by:mode,userid:user.id})) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@ -20,10 +20,16 @@
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
|
||||
{% if by=="console" %}
|
||||
<a class="btn btn-secondary" href={{ path('app_webzine') }}>Annuler</a>
|
||||
{% if by=="admin" %}
|
||||
<a class="btn btn-secondary" href={{ path('app_admin_webzine',{'by':by,'userid':-1}) }}>Annuler</a>
|
||||
{% elseif by=="update" %}
|
||||
<a class="btn btn-secondary" href={{ path('app_user_update',{id:userid}) }}>Annuler</a>
|
||||
{% elseif by=="profil" %}
|
||||
<a class="btn btn-secondary" href={{ path('app_user_profil') }}>Annuler</a>
|
||||
{% elseif by=="illustration" %}
|
||||
<a class="btn btn-secondary" href={{ path('app_webzine_view',{'by':"user","idcat":webzine.id,"id":webzine.webzinepages[0].id}) }}>Annuler</a>
|
||||
{% else %}
|
||||
<a class="btn btn-secondary" href={{ path('app_home') }}>Annuler</a>
|
||||
<a class="btn btn-secondary" href={{ path('app_home_user',{'userpseudo':app.user.pseudo}) }}>Annuler</a>
|
||||
{% endif %}
|
||||
|
||||
{% if mode=="update" %}
|
||||
@ -63,6 +69,7 @@
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ form_row(form.user) }}
|
||||
{{ form_row(form.name) }}
|
||||
{{ form_row(form.set) }}
|
||||
{{ form_row(form.order) }}
|
||||
|
@ -5,7 +5,7 @@
|
||||
WEBZINES
|
||||
</h1>
|
||||
|
||||
<p><a class="btn btn-success" href={{ path('app_webzine_submit',{by:'console'}) }}>Ajouter</a></p>
|
||||
<p><a class="btn btn-success" href={{ path('app_webzine_submit',{by:"admin",userid:-1}) }}>Ajouter</a></p>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
@ -19,6 +19,7 @@ WEBZINES
|
||||
<tr>
|
||||
<th width="70px" class="no-sort">Action</th>
|
||||
<th width="70px" class="no-sort">Miniature</th>
|
||||
<th width="100px">Utilisateur</th>
|
||||
<th width="100px">Serie</th>
|
||||
<th>Nom</th>
|
||||
</tr>
|
||||
@ -27,9 +28,9 @@ WEBZINES
|
||||
{% for webzine in webzines %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{path("app_webzine_update",{id:webzine.id,by:'console'})}}"><i class="fa fa-file"></i></a>
|
||||
<a href="{{path("app_webzine_update",{id:webzine.id,by:'admin'})}}"><i class="fa fa-file"></i></a>
|
||||
{% if webzine.id >=0 %}
|
||||
<a href="{{path("app_webzine_delete",{id:webzine.id,by:'console'})}}" data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?"><i class="fa fa-trash"></i></a>
|
||||
<a href="{{path("app_webzine_delete",{id:webzine.id,by:'admin'})}}" data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?"><i class="fa fa-trash"></i></a>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
@ -41,6 +42,7 @@ WEBZINES
|
||||
<div style="width:90px; height:{{ height }}px;background-position: center ; background-size: cover; background-image: url(/{{ appAlias }}/uploads/webzine/{{source}}");">
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ webzine.user.username }}</td>
|
||||
<td>{{ webzine.set }} #{{ webzine.order| format_number({min_integer_digit:'2'})}}</td>
|
||||
<td>{{ webzine.name }}</td>
|
||||
</tr>
|
||||
|
51
templates/Webzine/listrender.html.twig
Normal file
51
templates/Webzine/listrender.html.twig
Normal file
@ -0,0 +1,51 @@
|
||||
|
||||
<p><a class="btn btn-success" href={{ path('app_webzine_submit',{by:by,userid:userid}) }}>Ajouter</a></p>
|
||||
|
||||
|
||||
<div class="dataTable_wrapper">
|
||||
<table class="table table-striped table-bordered table-hover" id="webzines" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70px" class="no-sort">Action</th>
|
||||
<th width="70px" class="no-sort">Miniature</th>
|
||||
<th width="100px">Serie</th>
|
||||
<th>Nom</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for webzine in webzines %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{path("app_webzine_update",{id:webzine.id,by:by})}}"><i class="fa fa-file"></i></a>
|
||||
{% if webzine.id >=0 %}
|
||||
<a href="{{path("app_webzine_delete",{id:webzine.id,by:by})}}" data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?"><i class="fa fa-trash"></i></a>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{% if not webzine.webzinepages is empty %}
|
||||
{% set source="thumbori_"~webzine.webzinepages[0].illustration %}
|
||||
{% set height=30*90/21 %}
|
||||
|
||||
<div style="width:90px; height:{{ height }}px;background-position: center ; background-size: cover; background-image: url(/{{ appAlias }}/uploads/webzine/{{source}}");">
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ webzine.set }} #{{ webzine.order| format_number({min_integer_digit:'2'})}}</td>
|
||||
<td>{{ webzine.name }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#webzines').DataTable({
|
||||
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 10,
|
||||
order: [[ 2, "desc" ]]
|
||||
});
|
||||
});
|
||||
</script>
|
@ -49,10 +49,10 @@
|
||||
|
||||
</style>
|
||||
{% if not prev is empty %}
|
||||
<a id="bigleft" href="{{ path("app_webzine_view",{"idcat":prev[0].webzine.id,"id":prev[0].id})}}"><i class="fas fa-chevron-left fa-3x"></i></a>
|
||||
<a id="bigleft" href="{{ path("app_webzine_view",{"by":by,"idcat":prev[0].webzine.id,"id":prev[0].id})}}"><i class="fas fa-chevron-left fa-3x"></i></a>
|
||||
{% endif %}
|
||||
{% if not next is empty %}
|
||||
<a id="bigright" href="{{ path("app_webzine_view",{"idcat":next[0].webzine.id,"id":next[0].id})}}"><i class="fas fa-chevron-right fa-3x"></i></a>
|
||||
<a id="bigright" href="{{ path("app_webzine_view",{"by":by,"idcat":next[0].webzine.id,"id":next[0].id})}}"><i class="fas fa-chevron-right fa-3x"></i></a>
|
||||
{% endif %}
|
||||
|
||||
<img style="display:none;" id="webzine_webzine_img" src="/{{ appAlias }}/uploads/webzine/{{page.illustration}}">
|
||||
@ -60,12 +60,17 @@
|
||||
|
||||
<div class="container mb-5">
|
||||
<div class="text-center menuview" style="font-size:25px">
|
||||
<a id="up" href="{{ path("app_home")}}#webzine{{webzine.id}}"><i class="fa fa-home" aria-hidden="true"></i></a>
|
||||
{% if by=="home" %}
|
||||
<a id="up" href="{{ path("app_home")}}#webzine{{webzine.id}}"><i class="fa fa-home" aria-hidden="true"></i></a>
|
||||
{% else %}
|
||||
<a id="up" href="{{ path("app_home_user",{userpseudo:webzine.user.slug})}}#webzine{{webzine.id}}"><i class="fa fa-home" aria-hidden="true"></i></a>
|
||||
{% endif %}
|
||||
|
||||
<a download="{{ webzine.name }}-{{page.order}}.{{ pathinfo.extension }}" href="/{{ appAlias }}/uploads/webzine/{{page.illustration}}"><i class="fa fa-download" aria-hidden="true"></i></a>
|
||||
|
||||
{% if is_granted("ROLE_ADMIN") %}
|
||||
<a id="update" href="{{ path("app_webzine_update",{"id":webzine.id})}}"><i class="fa fa-file" aria-hidden="true"></i></a>
|
||||
<a id="delete" href="{{ path("app_webzine_delete",{"id":webzine.id})}}" data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet entregistrement ?"><i class="fa fa-trash" aria-hidden="true"></i></a>
|
||||
{% if is_granted("ROLE_ADMIN") or (is_granted("ROLE_USER") and webzine.user.id==app.user.id) %}
|
||||
<a id="update" href="{{ path("app_webzine_update",{"by":"illustration","id":webzine.id})}}"><i class="fa fa-file" aria-hidden="true"></i></a>
|
||||
<a id="delete" href="{{ path("app_webzine_delete",{"by":"illustration","id":webzine.id})}}" data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet entregistrement ?"><i class="fa fa-trash" aria-hidden="true"></i></a>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
@ -76,7 +81,7 @@
|
||||
|
||||
{% for page in webzine.webzinepages %}
|
||||
{% set height=30*90/21 %}
|
||||
<a href="{{ path("app_webzine_view",{"idcat":webzine.id,"id":page.id}) }}">
|
||||
<a href="{{ path("app_webzine_view",{"by":by,"idcat":webzine.id,"id":page.id}) }}">
|
||||
<div style="display: inline-block; width:90px; height:{{height}}px;background-position: center ; background-size: cover; background-image: url(/{{ appAlias }}/uploads/webzine/thumbori_{{page.illustration}}"></div>
|
||||
</a>
|
||||
{% endfor %}
|
||||
@ -86,7 +91,7 @@
|
||||
<h3 class="mt-3">Dans la même série</h3>
|
||||
{% for set in sets %}
|
||||
{% if not set.webzinepages is empty %}
|
||||
<a href="{{ path("app_webzine_view",{"idcat":set.id,"id":set.webzinepages[0].id}) }}">
|
||||
<a href="{{ path("app_webzine_view",{"by":by,"idcat":set.id,"id":set.webzinepages[0].id}) }}">
|
||||
<div style="display: inline-block; width:90px; height:{{height}}px;background-position: center ; background-size: cover; background-image: url(/{{ appAlias }}/uploads/webzine/thumbori_{{set.webzinepages[0].illustration}}"></div>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user