replacement mot clé #login# par username (fixes #21)
This commit is contained in:
parent
c08719deda
commit
4f3efd5776
|
@ -428,6 +428,7 @@ class PagewidgetController extends Controller
|
||||||
// Récupération des paramétres du widget
|
// Récupération des paramétres du widget
|
||||||
$modedesktop=0;
|
$modedesktop=0;
|
||||||
$iditemcategory=null;
|
$iditemcategory=null;
|
||||||
|
$withbookmark=true;
|
||||||
$search=false;
|
$search=false;
|
||||||
$menu=false;
|
$menu=false;
|
||||||
$menuall=true;
|
$menuall=true;
|
||||||
|
@ -1974,15 +1975,17 @@ class PagewidgetController extends Controller
|
||||||
|
|
||||||
$mygroups=[];
|
$mygroups=[];
|
||||||
$this->getDoctrine()->getRepository("CadolesPortalBundle:Page")->getPagesUser($user,null,$default,$pagesuser,$pagesadmin,$groupsshared);
|
$this->getDoctrine()->getRepository("CadolesPortalBundle:Page")->getPagesUser($user,null,$default,$pagesuser,$pagesadmin,$groupsshared);
|
||||||
foreach($groupsshared as $groupshared) {
|
if(is_array($groupsshared)) {
|
||||||
|
foreach($groupsshared as $groupshared) {
|
||||||
|
|
||||||
$title=$groupshared->getLabel();
|
$title=$groupshared->getLabel();
|
||||||
$idpage=$groupshared->pagesshared[0]->getId();
|
$idpage=$groupshared->pagesshared[0]->getId();
|
||||||
$icon=null;
|
$icon=null;
|
||||||
if($groupshared->getIcon())
|
if($groupshared->getIcon())
|
||||||
$icon="/".$groupshared->getIcon()->getLabel();
|
$icon="/".$groupshared->getIcon()->getLabel();
|
||||||
|
|
||||||
array_push($mygroups,["title"=>$title,"icon"=>$icon,"id"=>$idpage]);
|
array_push($mygroups,["title"=>$title,"icon"=>$icon,"id"=>$idpage]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
|
|
|
@ -56,6 +56,7 @@
|
||||||
|
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
{{ form_row(form.url) }}
|
{{ form_row(form.url) }}
|
||||||
|
<em>le mot clé #login# sera remplacé par le login de l'utilisateur</em><br><br>
|
||||||
{{ form_row(form.target) }}
|
{{ form_row(form.target) }}
|
||||||
{{ form_row(form.color) }}
|
{{ form_row(form.color) }}
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,7 @@
|
||||||
|
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
{{ form_row(form.url) }}
|
{{ form_row(form.url) }}
|
||||||
|
<em>le mot clé #login# sera remplacé par le login de l'utilisateur</em><br><br>
|
||||||
{{ form_row(form.target) }}
|
{{ form_row(form.target) }}
|
||||||
{{ form_row(form.itemcategory) }}
|
{{ form_row(form.itemcategory) }}
|
||||||
{{ form_row(form.roles) }}
|
{{ form_row(form.roles) }}
|
||||||
|
|
|
@ -55,6 +55,7 @@
|
||||||
|
|
||||||
{{ form_row(form.name) }}
|
{{ form_row(form.name) }}
|
||||||
{{ form_row(form.url) }}
|
{{ form_row(form.url) }}
|
||||||
|
<em>le mot clé #login# sera remplacé par le login de l'utilisateur</em><br><br>
|
||||||
{{ form_row(form.roworder) }}
|
{{ form_row(form.roworder) }}
|
||||||
{{ form_row(form.maxwidth) }}
|
{{ form_row(form.maxwidth) }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,6 +5,12 @@
|
||||||
#pageiframe { margin: 0px -30px;}
|
#pageiframe { margin: 0px -30px;}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% if app.user %}
|
||||||
|
{% set username = app.user.username %}
|
||||||
|
{% else %}
|
||||||
|
{% set username = "" %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% block pagewrapper %}
|
{% block pagewrapper %}
|
||||||
{% if access=="config" %}
|
{% if access=="config" %}
|
||||||
<div class="pagemenu">
|
<div class="pagemenu">
|
||||||
|
@ -16,7 +22,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div id="pageiframe" style="{% if entity.maxwidth>0%} max-width:{{ entity.maxwidth }}px; margin:auto; {% endif %}">
|
<div id="pageiframe" style="{% if entity.maxwidth>0%} max-width:{{ entity.maxwidth }}px; margin:auto; {% endif %}">
|
||||||
<iframe src="{{entity.url}}" id="frameContent" style="border:none;" width="100%" height="100%"></iframe>
|
<iframe src="{{entity.url|replace({'#login#': username})}}" id="frameContent" style="border:none;" width="100%" height="100%"></iframe>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,13 @@
|
||||||
{% set colorbodyfont = "color: #" ~ entity.colorbodyfont %}
|
{% set colorbodyfont = "color: #" ~ entity.colorbodyfont %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if app.user %}
|
||||||
|
{% set username = app.user.username %}
|
||||||
|
{% else %}
|
||||||
|
{% set username = "" %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate or canadd %}
|
{% if canupdate or canadd %}
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
|
@ -64,11 +71,11 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if bookmark.target == 'frame' %}
|
{% if bookmark.target == 'frame' %}
|
||||||
<a class="linktosonde" data-sonde="{{ bookmark.title }}" style="cursor:pointer" onClick="showFrameitem('bookmark{{ bookmark.id }}','{{ bookmark.url }}')">
|
<a class="linktosonde" data-sonde="{{ bookmark.title }}" style="cursor:pointer" onClick="showFrameitem('bookmark{{ bookmark.id }}','{{ bookmark.url|replace({'#login#': username}) }}')">
|
||||||
{% elseif bookmark.target == "_self" %}
|
{% elseif bookmark.target == "_self" %}
|
||||||
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url }}" target="{% if access=="user" %}_top{% else %}{{ bookmark.target }}{% endif %}">
|
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url|replace({'#login#': username}) }}" target="{% if access=="user" %}_top{% else %}{{ bookmark.target }}{% endif %}">
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url }}" target="{{ bookmark.target }}">
|
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url|replace({'#login#': username}) }}" target="{{ bookmark.target }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="item-link clearfix">
|
<div class="item-link clearfix">
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
{% if usage=="group" and firstcalendar is defined %}
|
{% if usage=="group" and firstcalendar is defined %}
|
||||||
{% set url= path('cadoles_portal_'~access~'_calendar_view',{id:firstcalendar}) %}
|
{% set url= path('cadoles_portal_'~access~'_calendar_view',{id:firstcalendar}) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a onClick="showFrameitem('calendar','{{url }}',true)" style="{{ stylewidgetmenu }}"><i class="fa fa-calendar fa-fw"></i></a>
|
<a onClick="showFrameitem('calendar','{{ url }}',true)" style="{{ stylewidgetmenu }}"><i class="fa fa-calendar fa-fw"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,9 @@
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
{% if url is defined %}
|
||||||
<div style="cursor:pointer; text-align: right; margin-top:20px;"><a onClick="showFrameitem('calendar','{{url }}',true)" style="{{ stylewidgetbody }}">Voir mes Agendas</a></div>
|
<div style="cursor:pointer; text-align: right; margin-top:20px;"><a onClick="showFrameitem('calendar','{{url }}',true)" style="{{ stylewidgetbody }}">Voir mes Agendas</a></div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -27,6 +27,12 @@
|
||||||
{% set colorbodyfont = "color: #" ~ entity.colorbodyfont %}
|
{% set colorbodyfont = "color: #" ~ entity.colorbodyfont %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if app.user %}
|
||||||
|
{% set username = app.user.username %}
|
||||||
|
{% else %}
|
||||||
|
{% set username = "" %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate or canadd %}
|
{% if canupdate or canadd %}
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
|
@ -100,11 +106,11 @@
|
||||||
<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="modBookmark({{ bookmark.id }})" class="item-update"><i style="color: #FFF" class="fa fa-file" title="Modifier le favori"></i></a>
|
||||||
|
|
||||||
{% if bookmark.target == 'frame' %}
|
{% if bookmark.target == 'frame' %}
|
||||||
<a class="linktosonde" data-sonde="{{ bookmark.title }}" style="cursor:pointer" onClick="showFrameitem('bookmark{{ bookmark.id }}','{{ bookmark.url }}')">
|
<a class="linktosonde" data-sonde="{{ bookmark.title }}" style="cursor:pointer" onClick="showFrameitem('bookmark{{ bookmark.id }}','{{ bookmark.url|replace({'#login#': username}) }}')">
|
||||||
{% elseif bookmark.target == "_self" %}
|
{% elseif bookmark.target == "_self" %}
|
||||||
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url }}" target="{% if access=="user" %}_top{% else %}{{ bookmark.target }}{% endif %}">
|
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url|replace({'#login#': username}) }}" target="{% if access=="user" %}_top{% else %}{{ bookmark.target }}{% endif %}">
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url }}" target="{{ bookmark.target }}">
|
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url|replace({'#login#': username}) }}" target="{{ bookmark.target }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="item-link clearfix">
|
<div class="item-link clearfix">
|
||||||
|
@ -209,11 +215,11 @@
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if item.target == 'frame' %}
|
{% if item.target == 'frame' %}
|
||||||
<a class="linktosonde" data-sonde="{{ item.title }}" style="cursor:pointer" onClick="showFrameitem({{ item.id }},'{{ item.url }}')">
|
<a class="linktosonde" data-sonde="{{ item.title }}" style="cursor:pointer" onClick="showFrameitem({{ item.id }},'{{ item.url|replace({'#login#': username}) }}')">
|
||||||
{% elseif item.target == "_self" %}
|
{% elseif item.target == "_self" %}
|
||||||
<a class="linktosonde" data-sonde="{{ item.title }}" href="{{ item.url }}" target="{% if access=="user" %}_top{% else %}{{ item.target }}{% endif %}">
|
<a class="linktosonde" data-sonde="{{ item.title }}" href="{{ item.url|replace({'#login#': username}) }}" target="{% if access=="user" %}_top{% else %}{{ item.target }}{% endif %}">
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="linktosonde" data-sonde="{{ item.title }}" href="{{ item.url }}" target="{{ item.target }}">
|
<a class="linktosonde" data-sonde="{{ item.title }}" href="{{ item.url|replace({'#login#': username}) }}" target="{{ item.target }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,12 @@
|
||||||
{% set colorbodyfont = "color: #" ~ entity.colorbodyfont %}
|
{% set colorbodyfont = "color: #" ~ entity.colorbodyfont %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if app.user %}
|
||||||
|
{% set username = app.user.username %}
|
||||||
|
{% else %}
|
||||||
|
{% set username = "" %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate or canadd %}
|
{% if canupdate or canadd %}
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
|
@ -65,11 +71,11 @@
|
||||||
<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="modBookmark({{ bookmark.id }})" class="item-update"><i style="color: #FFF" class="fa fa-file" title="Modifier le favori"></i></a>
|
||||||
|
|
||||||
{% if bookmark.target == 'frame' %}
|
{% if bookmark.target == 'frame' %}
|
||||||
<a class="linktosonde" data-sonde="{{ bookmark.title }}" style="cursor:pointer" onClick="showFrameitem('bookmark{{ bookmark.id }}','{{ bookmark.url }}')">
|
<a class="linktosonde" data-sonde="{{ bookmark.title }}" style="cursor:pointer" onClick="showFrameitem('bookmark{{ bookmark.id }}','{{ bookmark.url|replace({'#login#': username}) }}')">
|
||||||
{% elseif bookmark.target == "_self" %}
|
{% elseif bookmark.target == "_self" %}
|
||||||
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url }}" target="{% if access=="user" %}_top{% else %}{{ bookmark.target }}{% endif %}">
|
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url|replace({'#login#': username}) }}" target="{% if access=="user" %}_top{% else %}{{ bookmark.target }}{% endif %}">
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url }}" target="{{ bookmark.target }}">
|
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url|replace({'#login#': username}) }}" target="{{ bookmark.target }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="item-link clearfix">
|
<div class="item-link clearfix">
|
||||||
|
@ -113,11 +119,11 @@
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if item.target == 'frame' %}
|
{% if item.target == 'frame' %}
|
||||||
<a class="linktosonde" data-sonde="{{ item.title }}" style="cursor:pointer" onClick="showFrameitem({{ item.id }},'{{ item.url }}')">
|
<a class="linktosonde" data-sonde="{{ item.title }}" style="cursor:pointer" onClick="showFrameitem({{ item.id }},'{{ item.url|replace({'#login#': username}) }}')">
|
||||||
{% elseif item.target == "_self" %}
|
{% elseif item.target == "_self" %}
|
||||||
<a class="linktosonde" data-sonde="{{ item.title }}" href="{{ item.url }}" target="{% if access=="user" %}_top{% else %}{{ item.target }}{% endif %}">
|
<a class="linktosonde" data-sonde="{{ item.title }}" href="{{ item.url|replace({'#login#': username}) }}" target="{% if access=="user" %}_top{% else %}{{ item.target }}{% endif %}">
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="linktosonde" data-sonde="{{ item.title }}" href="{{ item.url }}" target="{{ item.target }}">
|
<a class="linktosonde" data-sonde="{{ item.title }}" href="{{ item.url|replace({'#login#': username}) }}" target="{{ item.target }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,12 @@
|
||||||
{% set stylelink = "color:#" ~ color['fontcolorhover'] %}
|
{% set stylelink = "color:#" ~ color['fontcolorhover'] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if app.user %}
|
||||||
|
{% set username = app.user.username %}
|
||||||
|
{% else %}
|
||||||
|
{% set username = "" %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
|
@ -31,11 +37,11 @@
|
||||||
|
|
||||||
<div class="widgetheader" style="{{ stylewidgetbodyimage }}; height:100%;">
|
<div class="widgetheader" style="{{ stylewidgetbodyimage }}; height:100%;">
|
||||||
{% if target == 'frame' %}
|
{% if target == 'frame' %}
|
||||||
<a class="linktosonde" data-sonde="{{ entity.name }}" style="cursor:pointer; {{ stylelink }}" onClick="showFrameitem('link{{ entity.id }}','{{ url }}')">
|
<a class="linktosonde" data-sonde="{{ entity.name }}" style="cursor:pointer; {{ stylelink }}" onClick="showFrameitem('link{{ entity.id }}','{{ url|replace({'#login#': username}) }}')">
|
||||||
{% elseif target == "_self" %}
|
{% elseif target == "_self" %}
|
||||||
<a class="linktosonde" data-sonde="{{ entity.name }}" style="{{ stylelink }}"href="{{ url }}" target="{% if access=="user" %}_top{% else %}{{ target }}{% endif %}">
|
<a class="linktosonde" data-sonde="{{ entity.name }}" style="{{ stylelink }}"href="{{ url|replace({'#login#': username}) }}" target="{% if access=="user" %}_top{% else %}{{ target }}{% endif %}">
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="linktosonde" data-sonde="{{ entity.name }}" style="{{ stylelink }}" href="{{ url }}" target="{{ target }}">
|
<a class="linktosonde" data-sonde="{{ entity.name }}" style="{{ stylelink }}" href="{{ url|replace({'#login#': username}) }}" target="{{ target }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if entity.icon %}
|
{% if entity.icon %}
|
||||||
<img src="/{{ alias }}/{{ entity.icon.label }}" style="max-height: 100%; width: auto; display: block; margin: auto; padding-top: 10px;" />
|
<img src="/{{ alias }}/{{ entity.icon.label }}" style="max-height: 100%; width: auto; display: block; margin: auto; padding-top: 10px;" />
|
||||||
|
|
|
@ -17,6 +17,12 @@
|
||||||
{% set stylelink = "color:#" ~ color['fontcolorhover'] ~ ";" %}
|
{% set stylelink = "color:#" ~ color['fontcolorhover'] ~ ";" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if app.user %}
|
||||||
|
{% set username = app.user.username %}
|
||||||
|
{% else %}
|
||||||
|
{% set username = "" %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate or canadd %}
|
{% if canupdate or canadd %}
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
|
@ -44,11 +50,11 @@
|
||||||
|
|
||||||
{% if slide.url is not empty %}
|
{% if slide.url is not empty %}
|
||||||
{% if slide.target == 'frame' %}
|
{% if slide.target == 'frame' %}
|
||||||
<a class="slicklink" style="{{ stylelink }} cursor:pointer" onClick="showFrameitem('slide{{ slide.id }}','{{ slide.url }}')">
|
<a class="slicklink" style="{{ stylelink }} cursor:pointer" onClick="showFrameitem('slide{{ slide.id }}','{{ slide.url|replace({'#login#': username}) }}')">
|
||||||
{% elseif slide.target == "_self" %}
|
{% elseif slide.target == "_self" %}
|
||||||
<a class="slicklink" style="{{ stylelink }}" href="{{ slide.url }}" target="{% if access=="user" %}_top{% else %}{{ slide.target }}{% endif %}">
|
<a class="slicklink" style="{{ stylelink }}" href="{{ slide.url|replace({'#login#': username}) }}" target="{% if access=="user" %}_top{% else %}{{ slide.target }}{% endif %}">
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="slicklink" style="{{ stylelink }}" href="{{ slide.url }}" target="{{ slide.target }}">
|
<a class="slicklink" style="{{ stylelink }}" href="{{ slide.url|replace({'#login#': username}) }}" target="{{ slide.target }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<i class="fa fa-link"></i></a>
|
<i class="fa fa-link"></i></a>
|
||||||
|
|
|
@ -11,6 +11,12 @@
|
||||||
{% set stylewidgetbodyframe = constants.mystylewidgetbodyframe(entity) %}
|
{% set stylewidgetbodyframe = constants.mystylewidgetbodyframe(entity) %}
|
||||||
{% set stylewidgetbodyimage = constants.mystylewidgetbodyimage(entity) %}
|
{% set stylewidgetbodyimage = constants.mystylewidgetbodyimage(entity) %}
|
||||||
|
|
||||||
|
{% if app.user %}
|
||||||
|
{% set username = app.user.username %}
|
||||||
|
{% else %}
|
||||||
|
{% set username = "" %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||||||
{% if canupdate %}
|
{% if canupdate %}
|
||||||
<div class="widgetmenu">
|
<div class="widgetmenu">
|
||||||
|
@ -30,10 +36,10 @@
|
||||||
<span class="title">{{ entity.name }}</span>
|
<span class="title">{{ entity.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="widgetbody" style="{{ stylewidgetbodyframe }}">
|
<div class="widgetbody" style="{{ stylewidgetbodyframe }}">
|
||||||
<img src="{{ url }}" width="100%" >
|
<img src="{{ url|replace({'#login#': username}) }}" width="100%" >
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="widgetheader" style="{{ stylewidgetbodyimage }} width:100%; background-image: url({{url}}); background-size:cover; background-position:center;")></div>
|
<div class="widgetheader" style="{{ stylewidgetbodyimage }} width:100%; background-image: url({{ url|replace({'#login#': username}) }}); background-size:cover; background-position:center;")></div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||||
|
@ -46,7 +52,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="widgetbody" style="{{ stylewidgetbodyframe }}">
|
<div class="widgetbody" style="{{ stylewidgetbodyframe }}">
|
||||||
<iframe src="{{ url }}" class="{% if entity.autoajust %}frameajust {% endif %}" style="{{ stylewidgetbodyframe }}"></iframe>
|
<iframe src="{{ url|replace({'#login#': username}) }}" class="{% if entity.autoajust %}frameajust {% endif %}" style="{{ stylewidgetbodyframe }}"></iframe>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -59,6 +59,7 @@
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
{{ form_row(form.roworder) }}
|
{{ form_row(form.roworder) }}
|
||||||
{{ form_row(form.url) }}
|
{{ form_row(form.url) }}
|
||||||
|
<em>le mot clé #login# sera remplacé par le login de l'utilisateur</em><br><br>
|
||||||
{{ form_row(form.target) }}
|
{{ form_row(form.target) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue