Compare commits

...

2 Commits

1 changed files with 115 additions and 5 deletions

View File

@ -102,17 +102,127 @@
{% endif %}
{% if search %}
<div class="input-group">
<div class="input-group" style="margin-top:10px">
<span class="input-group-addon" id="basic-addon1"><i class="fa fa-search"></i></span>
<input onKeyup="searchItem({{ entity.id}},$(this).val());" type="text" id="searchitems" name="searchitems" class="form-control" placeholder="Recherche" aria-describedby="basic-addon1">
</div>
{% endif %}
{% if (bookmarks is not empty or (canadd and access!="config")) and (withbookmark==0 or withbookmark==2) %}
{% if (bookmarks is not empty or (canadd and access!="config")) and withbookmark==0 %}
<div class="bookmark-container">
<h3 class="grid-title bookmark-container" data-idcategory="bookmark" style="{{ colorbodyfont }}">Favoris</h3>
<div class="grid clearfix">
<div class="grid-sizer {{ stylegrid }}" data-idcategory="bookmark"></div>
<div class="grid-gutter-sizer {{ stylegrid }}-gutter-sizer"></div>
{% for bookmark in bookmarks if not bookmark.item %}
<div class="grid-item {{ stylegrid }}" data-idcategory="bookmark" data-title="{{ bookmark.title|lower }}">
<div class="grid-item-content" style="background-color: {{ bookmark.color ? "#"~bookmark.color : '#'~colormain }};">
<a style="cursor:pointer" onClick="modBookmark({{ bookmark.id }})" class="item-update"><i style="color: #FFF" class="fa fa-file" title="Modifier le favori"></i></a>
<a style="cursor:pointer" onClick="delBookmark({{ bookmark.id }})" class="item-heart"><i style="color: #FFF" class="fa fa-trash" title="Supprimer le favori"></i></a>
{% if bookmark.target == 'frame' %}
<a class="linktosonde" data-sonde="{{ bookmark.title }}" style="cursor:pointer" onClick="showFrameitem('bookmark{{ bookmark.id }}','{{ bookmark.url|replace({'#login#': username}) }}')">
{% elseif bookmark.target == "_self" %}
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url|replace({'#login#': username}) }}" target="{% if access=="user" %}_top{% else %}{{ bookmark.target }}{% endif %}">
{% else %}
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url|replace({'#login#': username}) }}" target="{{ bookmark.target }}">
{% endif %}
<div class="item-link clearfix">
<div class="grid-item-logo" title="{{ bookmark.subtitle|nl2br }}">
{% if bookmark.icon %}
<img class="grid-item-img" src="/{{ alias }}/{{ bookmark.icon.label }}">
{% else %}
<img class="grid-item-img" src="/{{ alias }}/uploads/icon/icon_pin.png">
{% endif %}
</div>
<div class="grid-item-title">
<h2>{{ bookmark.title }}</h2>
<span>{{ bookmark.subtitle|nl2br }}</<span>
</div>
</div>
</a>
</div>
</div>
{%endfor%}
{% if (canadd and access!="config") %}
<div class="grid-item {{ stylegrid }}">
<div title="Ajouter un Favori" onClick="addBookmark({{ entity.id }},true)" class="grid-item-content" style="background-color: #{{color['main']}};cursor:pointer;">
<div class="item-link clearfix">
<div class="grid-item-logo">
<img class="grid-item-img imageshadow" height="110" src="/{{ alias }}/uploads/icon/icon_add.png">
</div>
<div class="grid-item-title">
<h2>Ajouter</h2>
<span>Ajouter un Favori</<span>
</div>
</div>
</div>
</div>
{% endif %}
</div>
{% set haveressource=false %}
{% for bookmark in bookmarks if bookmark.item %}
{% if loop.first %}
{% set haveressource=true %}
<h3 class="grid-title bookmark-container" data-idcategory="bookmark" style="{{ colorbodyfont }}">Mes Ressources</h3>
<div class="grid clearfix">
<div class="grid-sizer {{ stylegrid }}" data-idcategory="bookmark"></div>
<div class="grid-gutter-sizer {{ stylegrid }}-gutter-sizer"></div>
{%endif%}
<div class="grid-item {{ stylegrid }}" data-idcategory="bookmark" data-title="{{ bookmark.item.title|lower }}">
<div class="grid-item-content" style="background-color: {{ bookmark.color ? "#"~bookmark.color : '#'~colormain }};">
{% if bookmark.item.content %}
<a style="cursor:pointer" class="item-preview"><i style="color: #FFF" class="fa fa-info" title="Informations sur ce service"></i></a>
{% endif %}
{% if canadd %}
<a style="cursor:pointer" onClick="delBookmark({{ bookmark.id }})" class="item-heart"><i style="color: #FFF" class="fa fa-trash" title="Supprimer des favoris"></i></a>
{% endif %}
{% if bookmark.item.target == 'frame' %}
<a class="linktosonde" data-sonde="{{ bookmark.item.title }}" style="cursor:pointer" onClick="showFrameitem('bookmark{{ bookmark.item.id }}','{{ bookmark.item.url|replace({'#login#': username}) }}')">
{% elseif bookmark.target == "_self" %}
<a class="linktosonde" data-sonde="{{ bookmark.item.title }}" href="{{ bookmark.item.url|replace({'#login#': username}) }}" target="{% if access=="user" %}_top{% else %}{{ bookmark.item.target }}{% endif %}">
{% else %}
<a class="linktosonde" data-sonde="{{ bookmark.item.title }}" href="{{ bookmark.item.url|replace({'#login#': username}) }}" target="{{ bookmark.item.target }}">
{% endif %}
<div class="item-link clearfix">
<div class="grid-item-logo" title="{{ bookmark.item.subtitle|nl2br }}">
{% if bookmark.item.icon %}
<img class="grid-item-img" src="/{{ alias }}/{{ bookmark.item.icon.label }}">
{% else %}
<img class="grid-item-img" src="/{{ alias }}/uploads/icon/icon_pin.png">
{% endif %}
</div>
<div class="grid-item-title">
<h2>{{ bookmark.item.title }}</h2>
<span>{{ bookmark.item.subtitle|nl2br }}</<span>
</div>
</div>
</a>
<div class="grid-item-body" style="display:none">
{{ bookmark.item.content|raw }}
</div>
</div>
</div>
{%endfor%}
{% if haveressource %}
</div>
{%endif%}
</div>
{% endif %}
{% if (bookmarks is not empty or (canadd and access!="config")) and withbookmark==2 %}
<div class="bookmark-container">
{% if items is not empty %}
<h3 class="grid-title bookmark-container" data-idcategory="bookmark" style="{{ colorbodyfont }}">Favoris</h3>
{% endif %}
<div class="grid clearfix">
<div class="grid-sizer {{ stylegrid }}" data-idcategory="bookmark"></div>
<div class="grid-gutter-sizer {{ stylegrid }}-gutter-sizer"></div>