2023-02-01 09:03:27 +01:00
|
|
|
{% set widgetname="itemessential" %}
|
2023-01-23 09:46:34 +01:00
|
|
|
{% extends 'Pagewidget/widget.twig' %}
|
|
|
|
|
|
|
|
{% block widgetaction %}
|
|
|
|
{% if canadd %}
|
|
|
|
<i class="fas fa-text-height" title="Changer taille des items" onClick="changeWidget({{ entity.id }},'modedesktop',{{modedesktop}})"></i>
|
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
|
|
{% block widgetbody %}
|
|
|
|
<div class="items-list">
|
|
|
|
{% for bookmark in bookmarks %}
|
|
|
|
{% set havebookmark=true %}
|
|
|
|
{% if bookmark.item %}
|
|
|
|
{% set bookmarktitle = bookmark.item.title %}
|
|
|
|
{% set bookmarksubtitle = bookmark.item.subtitle %}
|
|
|
|
{% set bookmarkbackgroundcolor = bookmark.item.color ? bookmark.item.color : app.session.get('colorbgbodydark')|raw %}
|
|
|
|
{% set bookmarktarget = bookmark.item.target %}
|
|
|
|
{% set bookmarkurl = ( bookmark.item.protected and not app.user ? path("app_login") : bookmark.item.url|replace({'#login#': username}) ) %}
|
|
|
|
{% set bookmarkcontent = bookmark.item.content %}
|
|
|
|
{% set bookmarkicon = (bookmark.item.icon ? bookmark.item.icon.label : "icon/icon_pin.png") %}
|
2023-01-12 16:14:31 +01:00
|
|
|
{% else %}
|
2023-01-23 09:46:34 +01:00
|
|
|
{% set bookmarktitle = bookmark.title %}
|
|
|
|
{% set bookmarksubtitle = bookmark.subtitle %}
|
|
|
|
{% set bookmarkbackgroundcolor = bookmark.color ? bookmark.color : app.session.get('colorbgbodydark')|raw %}
|
|
|
|
{% set bookmarktarget = bookmark.target %}
|
|
|
|
{% set bookmarkurl = bookmark.url|replace({'#login#': username}) %}
|
|
|
|
{% set bookmarkcontent = null %}
|
|
|
|
{% set bookmarkicon = bookmark.icon ? bookmark.icon.label : "icon/icon_pin.png" %}
|
2023-01-12 16:14:31 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2023-01-23 09:46:34 +01:00
|
|
|
<div class="item {{itemsize}}" style="background-color: {{ bookmarkbackgroundcolor }};" data-idcategory="bookmark" data-title="{{bookmarktitle|lower}}">
|
|
|
|
<div class="item-container">
|
|
|
|
<div class="item-content">
|
|
|
|
{% if bookmarktarget == 'frame' %}
|
|
|
|
<a class="item-link" onClick="showItemframe('bookmark{{ bookmark.id }}','{{ bookmarkurl }}')">
|
|
|
|
{% else %}
|
|
|
|
<a class="item-link" href="{{ bookmarkurl }}" target="{{bookmarktarget }}">
|
|
|
|
{% endif %}
|
|
|
|
<img height="35" src="{{ path('app_minio_image',{file:bookmarkicon}) }}">
|
|
|
|
|
|
|
|
<div class="item-title">
|
|
|
|
<h3 >{{ bookmarktitle }}</h3>
|
|
|
|
<div class="item-subtitle">{{ bookmarksubtitle|nl2br }}</div>
|
2023-01-12 16:14:31 +01:00
|
|
|
</div>
|
2023-01-23 09:46:34 +01:00
|
|
|
</a>
|
2023-01-12 16:14:31 +01:00
|
|
|
|
2023-01-23 09:46:34 +01:00
|
|
|
<div class="item-action">
|
|
|
|
{% if canadd %}
|
|
|
|
{% if bookmark.item %}
|
|
|
|
<a style="display:none" onClick="delBookmark({{ bookmark.id }},{{ entity.id }},true)"><i class="item-heart fas fa-heart-crack"></i></a>
|
|
|
|
{% else %}
|
|
|
|
<a style="display:none" onClick="modBookmark({{ bookmark.id }},{{ entity.id }},true)"><i class="item-mod fas fa-file"></i></a>
|
|
|
|
<a style="display:none" onClick="delBookmark({{ bookmark.id }},{{ entity.id }},true)"><i class="item-trash fas fa-trash"></i></a>
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
2023-01-12 16:14:31 +01:00
|
|
|
|
2023-01-23 09:46:34 +01:00
|
|
|
{% if bookmarkcontent %}
|
|
|
|
<a style="display:none"><i class="item-info fas fa-circle-info"></i></a>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-01-12 16:14:31 +01:00
|
|
|
|
2023-01-23 09:46:34 +01:00
|
|
|
<div class="item-description hide">{{ bookmarkcontent|raw }}</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
{% for item in items %}
|
|
|
|
<div class="item {{itemsize}}" style="background-color: {{ item.color ? item.color : "var(--colorbgbodydark)" }};" data-idcategory="{{item.itemcategory.id}}" data-title="{{item.title|lower}}">
|
|
|
|
<div class="item-container">
|
|
|
|
<div class="item-content">
|
|
|
|
{% set url=item.url|replace({'#login#': username}) %}
|
|
|
|
{% if item.protected and not app.user %}
|
|
|
|
{% set url=path('app_login') %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if item.target == 'frame' %}
|
|
|
|
<a class="item-link" onClick="showItemframe({{ item.id }},'{{ url }}')">
|
|
|
|
{% else %}
|
|
|
|
<a class="item-link" href="{{ url }}" target="{{ item.target }}">
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if item.icon %}
|
|
|
|
<img height="35" src="{{ path('app_minio_image',{file:item.icon.label}) }}">
|
|
|
|
{% else %}
|
|
|
|
<img height="35" src="{{ path('app_minio_image',{file:"icon/icon_pin.png"}) }}">
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<div class="item-title">
|
|
|
|
<h3 >{{ item.title }}</h3>
|
|
|
|
<div class="item-subtitle">{{ item.subtitle|nl2br }}</div>
|
2023-01-12 16:14:31 +01:00
|
|
|
</div>
|
2023-01-23 09:46:34 +01:00
|
|
|
</a>
|
2023-01-12 16:14:31 +01:00
|
|
|
|
2023-01-23 09:46:34 +01:00
|
|
|
<div class="item-action">
|
|
|
|
{% if canadd %}
|
|
|
|
<a style="display:none" onClick="heartBookmark({{ item.id }})"><i class="item-heart fa fa-heart"></i></a>
|
|
|
|
{% endif %}
|
2023-01-12 16:14:31 +01:00
|
|
|
|
|
|
|
{% if item.content %}
|
2023-01-23 09:46:34 +01:00
|
|
|
<a style="display:none"><i class="item-info fas fa-circle-info"></i></a>
|
2023-01-12 16:14:31 +01:00
|
|
|
{% endif %}
|
2023-01-23 09:46:34 +01:00
|
|
|
</div>
|
2023-01-12 16:14:31 +01:00
|
|
|
</div>
|
|
|
|
|
2023-01-23 09:46:34 +01:00
|
|
|
<div class="item-description hide">{{ item.content|raw }}</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
<div class="item {{ itemsize }}" style="background-color: var(--colorbgbodydark);" data-idcategory="bookmark">
|
|
|
|
<div class="item-container">
|
|
|
|
<div class="item-content">
|
|
|
|
<a class="item-link" href="{{path("app_all_page_application")}}">
|
|
|
|
<img height="35" src="{{ path('app_minio_image',{file:"icon/icon_add.png"}) }}">
|
|
|
|
<div class="item-title">
|
|
|
|
<h3 >Voir Plus</h3>
|
|
|
|
<div class="item-subtitle">Voir toutes les Applications</div>
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
<div class="item-action">
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-01-12 16:14:31 +01:00
|
|
|
</div>
|
2023-01-23 09:46:34 +01:00
|
|
|
</div>
|
2023-01-12 16:14:31 +01:00
|
|
|
</div>
|
2023-01-23 09:46:34 +01:00
|
|
|
{% endblock %}
|
2023-01-12 16:14:31 +01:00
|
|
|
|
|
|
|
|