Compare commits

..

No commits in common. "3eedb4d086a31aa2d9e7fcc40cdb3c569745108d" and "362047c295d26c7ef6c163616fe73157582474df" have entirely different histories.

11 changed files with 93 additions and 145 deletions

View File

@ -286,7 +286,7 @@ class RegistrationController extends Controller
array_push($to,$emailmodo["email"]);
}
$url = $this->generateUrl('cadoles_core_config_registration', [], UrlGeneratorInterface::ABSOLUTE_URL);
$url = $this->generateUrl('cadoles_core_config_registration', '', UrlGeneratorInterface::ABSOLUTE_URL);
$mail_params=array(
"subject" => $appname." : Inscription à valider",
"body_html"=>"Un utilisateur dont le mail nest pas en liste blanche souhaite sinscrire au ".$appname.".\nMerci dapprouver son inscription pour finaliser celle-ci.<br><br>Veuillez vérifier cette inscription à cette adresse:<br><a href='$url'>$url</a>",

View File

@ -33,7 +33,7 @@ class RegistrationType extends AbstractType
$builder->add('submit',
SubmitType::class, array(
"label" => ($options["mode"]=="delete"?"Confirmer la Suppression":($options["mode"]=="submit"?"Confirmer":"Sauvegarder et envoyer le mail")),
"label" => ($options["mode"]=="delete"?"Confirmer la Suppression":"Confirmer"),
"attr" => ($options["mode"]=="delete"?array("class" => "btn btn-danger"):array("class" => "btn btn-success"))
)
);
@ -41,7 +41,7 @@ class RegistrationType extends AbstractType
if($options["mode"]=="send") {
$builder->add('save',
SubmitType::class, array(
"label" => "Sauvegarder sans envoyer le mail",
"label" => "Sauvegarder",
"attr" => array("class" => "btn btn-success")
)
);

View File

@ -89,6 +89,20 @@
</div>
{% endif %}
<div id="diviconsel" class="col-md-12 text-left" style="height:140px; padding:20px; text-align:center; background-color: {{ group.color ? "#"~group.color : '#000000' }};">
{% if group.icon %}
<img src="/{{ alias }}/{{ group.icon.label }}" height="100" />
{% endif %}
</div>
<div class="col-md-12" style="text-align:center;padding:0px">
{{ form_row(form.idicon) }}
<a class="btn btn-success" data-toggle="modal" data-target="#selicon" title='Ajouter' style="width:100%">Selectionner un Icône</a>
<a class="btn btn-danger" onClick="delIcon()" title='Détacher' style="width:100%">Détacher l'Icône</a>
</div>
</div>
<div class="col-sm-6">
{% if form.fgcancreatepage is defined %}
<div class="panel panel-primary">
<div class="panel-heading">
@ -109,24 +123,7 @@
{{ form_widget(form.fgcancreateproject) }}
</div>
</div>
{% endif %}
</div>
<div class="col-sm-6">
<div id="diviconsel" class="col-md-12 text-left" style="height:140px; padding:20px; text-align:center; background-color: {{ group.color ? "#"~group.color : '#000000' }};">
{% if group.icon %}
<img src="/{{ alias }}/{{ group.icon.label }}" height="100" />
{% endif %}
</div>
<div style="text-align:center;padding:0px">
{{ form_row(form.idicon) }}
<a class="btn btn-success" onClick="selectIcon()" title='Ajouter' style="width:100%">Selectionner un Icône</a>
<a class="btn btn-danger" onClick="delIcon()" title='Détacher' style="width:100%">Détacher l'Icône</a>
</div>
<br>
{% if form.fgcancreatepage is defined %}
<div class="panel panel-primary">
<div class="panel-heading">
<i class="fa fa-pencil fa-fw"></i> Elements du Portail
@ -146,6 +143,46 @@
{% endif %}
</div>
</div>
<div id="selicon" class="modal fade bs-item-modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">SELECTIONNER UN ICONE</h4>
</div>
<div class="modal-body">
<div class="form-group row clearfix">
<div class="col-md-12" style="margin-bottom:15px">
<a onclick="$('#selicon').modal('hide');" class="btn btn-default">Annuler</a>
{% if access=="user" %}
<a href="{{ path('cadoles_portal_user_icon') }}" target="_parent" class="btn btn-default">Gérer mes Icônes</a>
{% endif %}
</div>
<div class="col-md-12">
{% if iconsuser is not empty %}
<h3>Mes Icônes</h3>
{% for icon in iconsuser %}
<a style="cursor:pointer" onClick="selIcon({{ icon.id }})">
<img id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="/{{ alias }}/{{ icon.label }}" style="padding:2px; margin-bottom:2px; background-color: #{{ color["main"]}}">
</a>
{% endfor %}
<h3>Icônes Communs</h3>
{% endif %}
{% for icon in icons %}
<a style="cursor:pointer" onClick="selIcon({{ icon.id }})">
<img id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="/{{ alias }}/{{ icon.label }}" style="padding:2px; margin-bottom:2px; background-color: #{{ color["main"]}}">
</a>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
</div>
{{ form_end(form) }}
{% endblock %}
@ -208,21 +245,13 @@
hideshow();
});
function selIcon(idicon,label) {
function selIcon(idicon) {
$("#group_idicon").val(idicon);
$("#diviconsel img").remove();
url="/{{ alias }}/"+label;
$("#diviconsel").append("<img src='"+url+"'>");
$("#icon-"+idicon).clone().appendTo($("#diviconsel"));
$("#diviconsel img").attr("height","100px");
$("#mymodal").modal("hide");
}
function selectIcon() {
$("#mymodal").find(".modal-title").html("SELECTIONNER UN ICONE");
var url="{{ path('cadoles_portal_user_icon_select') }}";
$("#mymodal").find("#framemodal").attr("src",url);
$("#mymodal").modal("show");
$('#selicon').modal('hide');
}
function delIcon() {

View File

@ -7,7 +7,7 @@
{% if not usersnotin is empty %}
<h3>Les utilisateurs suivants existent déjà dans {{ app.session.get('appname') }}</h3>
Pour les ajouter à votre groupe cliquez sur le symbole bleu “+” situé à gauche de leur nom<br>
Vous pouvez les ajouter dès maintenant à votre groupe<br>
<div class="dataTable_wrapper">
<table class="table table-striped table-bordered table-hover" id="dataTablesnotin" style="width:100%">

View File

@ -19,10 +19,8 @@ class IconController extends Controller
private $labeldata = 'icon';
private $labeldatas = 'icons';
public function listAction(Request $request,$access="config")
public function listAction($access="config")
{
$inframe=$request->get("inframe");
$em = $this->getDoctrine()->getManager();
if($access=="config")
$icons=$this->getDoctrine()->getRepository("CadolesPortalBundle:Icon")->findBy(["user"=>null]);
@ -30,19 +28,16 @@ class IconController extends Controller
$icons=$this->getDoctrine()->getRepository("CadolesPortalBundle:Icon")->findBy(["user"=>$this->getUser()]);
return $this->render($this->labelentity.':list.html.twig',[
'useheader' => !($inframe),
'useheader' => true,
'usemenu' => false,
'usesidebar' => ($access=="config"),
'access' => $access,
$this->labeldatas => $icons,
'inframe' => $inframe
$this->labeldatas => $icons
]);
}
public function submitAction(Request $request,$access="config")
{
$inframe=$request->get("inframe");
// Initialisation de l'enregistrement
$data = new Icon();
@ -67,26 +62,23 @@ class IconController extends Controller
$em->flush();
// Retour à la liste
return $this->redirectToRoute('cadoles_portal_'.$access.'_icon',['inframe'=>$inframe]);
return $this->redirectToRoute('cadoles_portal_'.$access.'_icon');
}
// Affichage du formulaire
return $this->render($this->labelentity.':edit.html.twig', [
'useheader' => !($inframe),
'useheader' => true,
'usemenu' => false,
'usesidebar' => ($access=="config"),
'access' => $access,
$this->labeldata => $data,
'mode' => 'submit',
'form' => $form->createView(),
'inframe' => $inframe,
]);
}
public function updateAction($id,Request $request,$access="config")
{
$inframe=$request->get("inframe");
// Récupération de l'enregistrement courant
$data=$this->getData($id);
@ -111,13 +103,13 @@ class IconController extends Controller
$em->flush();
// Retour à la liste
return $this->redirectToRoute('cadoles_portal_'.$access.'_icon',['inframe'=>$inframe]);
return $this->redirectToRoute('cadoles_portal_'.$access.'_icon');
}
// Affichage du formulaire
return $this->render($this->labelentity.':edit.html.twig', [
'useheader' => !($inframe),
'useheader' => true,
'usemenu' => false,
'usesidebar' => ($access=="config"),
'access' => $access,
@ -125,14 +117,11 @@ class IconController extends Controller
'mode' => 'update',
'form' => $form->createView(),
'refresh' => false,
'inframe' => $inframe
]);
}
public function deleteAction($id,Request $request,$access="config")
{
$inframe=$request->get("inframe");
// Récupération de l'enregistrement courant
$data=$this->getData($id);
@ -143,25 +132,9 @@ class IconController extends Controller
$em->remove($data);
$em->flush();
return $this->redirectToRoute('cadoles_portal_'.$access.'_icon',['inframe'=>$inframe]);
return $this->redirectToRoute('cadoles_portal_'.$access.'_icon');
}
public function selectAction($access="config") {
// Affichage du formulaire
$icons=$this->getDoctrine()->getRepository("CadolesPortalBundle:Icon")->findBy(["user"=>null]);
$iconsuser=null;
if($access=="user") $iconsuser=$this->getDoctrine()->getRepository("CadolesPortalBundle:Icon")->findBy(["user"=>$this->getUser()]);
return $this->render($this->labelentity.':select.html.twig',[
'useheader' => false,
'usemenu' => false,
'usesidebar' => false,
'access' => $access,
$this->labeldatas => $icons,
'iconsuser' => $iconsuser
]);
}
public function iconAction()
{

View File

@ -59,10 +59,6 @@ cadoles_portal_config_icon_delete:
path: /config/icon/delete/{id}
defaults: { _controller: CadolesPortalBundle:Icon:delete, access: config }
cadoles_portal_config_icon_select:
path: /config/icon/select
defaults: { _controller: CadolesPortalBundle:Icon:select, access: config }
cadoles_portal_config_icon_icon:
path: /config/icon/icon
defaults: { _controller: CadolesPortalBundle:Icon:icon, access: config }
@ -83,10 +79,6 @@ cadoles_portal_user_icon_delete:
path: /user/icon/delete/{id}
defaults: { _controller: CadolesPortalBundle:Icon:delete, access: user }
cadoles_portal_user_icon_select:
path: /user/icon/select
defaults: { _controller: CadolesPortalBundle:Icon:select, access: user }
cadoles_portal_user_icon_icon:
path: /user/icon/icon
defaults: { _controller: CadolesPortalBundle:Icon:icon, access: user }

View File

@ -2,7 +2,6 @@
{% block pagewrapper %}
{{ form_start(form) }}
{% if not inframe %}
<h1 class="page-header">
{% if mode=="update" %}
Modification Icône
@ -10,12 +9,11 @@
Création Icône
{% endif %}
</h1>
{%endif%}
{{ form_widget(form.submit) }}
<a class="btn btn-default" href={{ path('cadoles_portal_'~access~'_icon',{'inframe':inframe}) }}>Annuler</a>
<a class="btn btn-default" href={{ path('cadoles_portal_'~access~'_icon') }}>Annuler</a>
{% if mode=="update" %}
<a href={{ path('cadoles_portal_'~access~'_icon_delete',{'id':icon.id,'inframe':inframe}) }}
<a href={{ path('cadoles_portal_'~access~'_icon_delete',{'id':icon.id}) }}
class="btn btn-danger pull-right"
data-method="delete" data-csrf="_token:{{ 'csrf' }}"
data-confirm="Êtes-vous sûr de vouloir supprimer cet icône ?">

View File

@ -1,20 +1,13 @@
{% extends '@CadolesCore/base.html.twig' %}
{% block pagewrapper %}
{% if not inframe %}
<h1 class="page-header">Gestion des Icônes</h1>
{% endif %}
<p>
<a class="btn btn-success" href={{ path('cadoles_portal_'~access~'_icon_submit',{'inframe': inframe}) }}>Ajouter</a>
{% if inframe %}
<a class="btn btn-default" href={{ path('cadoles_portal_'~access~'_icon_select') }}>Fermer</a>
{% endif %}
</p>
<p><a class="btn btn-success" href={{ path('cadoles_portal_'~access~'_icon_submit') }}>Ajouter</a></p>
<div class="row">
{% for icon in icons %}
<a href="{{ path('cadoles_portal_'~access~'_icon_update', {id : icon.id, 'inframe': inframe}) }}"><img class="icon" height="90" src="/{{ alias }}/{{ icon.label }}" style="padding:10px; margin-bottom:2px; background-color: #{{color["main"]}}"></a>
<a href="{{ path('cadoles_portal_'~access~'_icon_update', {id : icon.id}) }}"><img class="icon" height="90" src="/{{ alias }}/{{ icon.label }}" style="padding:10px; margin-bottom:2px; background-color: #{{color["main"]}}"></a>
{% endfor %}
</div>
{% endblock %}

View File

@ -1,32 +0,0 @@
{% extends '@CadolesCore/base.html.twig' %}
{% block pagewrapper %}
<div class="row">
<div class="col-md-12" style="margin-bottom:15px">
<a onclick="window.parent.$('#mymodal').modal('hide');" class="btn btn-default">Fermer</a>
{% if access=="user" %}
<a href="{{ path('cadoles_portal_user_icon',{'inframe':true}) }}" class="btn btn-default">Gérer mes Icônes</a>
{% endif %}
</div>
<div class="col-md-12">
{% if iconsuser is not empty %}
<h3>Mes Icônes</h3>
{% for icon in iconsuser %}
<a style="cursor:pointer" onClick="window.parent.selIcon({{ icon.id }},'{{icon.label}}')">
<img id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="/{{ alias }}/{{ icon.label }}" style="padding:2px; margin-bottom:2px; background-color: #{{ color["main"]}}">
</a>
{% endfor %}
<h3>Icônes Communs</h3>
{% endif %}
{% for icon in icons %}
<a style="cursor:pointer" onClick="window.parent.selIcon({{ icon.id }},'{{icon.label}}')">
<img id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="/{{ alias }}/{{ icon.label }}" style="padding:2px; margin-bottom:2px; background-color: #{{ color["main"]}}">
</a>
{% endfor %}
</div>
</div>
{% endblock %}

View File

@ -160,11 +160,11 @@
{% endif %}
{% if entity.border %}
{% set stylewidgetbody = stylewidgetbody ~ "padding:10px;" %}
{% set stylewidgetbody = stylewidgetbody ~ "padding:10px" %}
{% endif %}
{% if not entity.opened %}
{% set stylewidgetbody = stylewidgetbody ~ "display:none;" %}
{% set stylewidgetbody = stylewidgetbody ~ "display:none" %}
{% endif %}
{{ stylewidgetbody }}

View File

@ -28,27 +28,22 @@
</div>
{% endif %}
<div class="widgetheader" style="{{ stylewidgetheader }}">
{% if entity.icon %}
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
{% else %}
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
{% endif %}
<span class="title">{{ entity.name }}</span>
</div>
<div class="widgetbody" style="{{ stylewidgetbody }}">
<div class="widgetheader" style="{{ stylewidgetheader }}; padding-top:10px;">
{% set style = "margin: auto; display: inherit;background-color:transparent;" %}
{% if icon %}
<img src="/{{ alias }}{{ icon }}" class="avatar big" style="{{ style }}" />
{% else %}
<img src="/{{ alias }}/uploads/icon/icon_users.png" class="avatar big" style="{{ style }}" />
{% endif %}
</div>
<div style="text-align: center;">
<div class="widgetbody" style="{{ stylewidgetbody }}">
<div style="text-align: center; margin-top:50px;">
{%if usage=="group" %}<small>Groupe<br></small>{% endif %}
<span style="font-size:120%">{{ title }}</span><br>
<span style="font-size:120%">{{ title }}</span><br><br>
{{ description | raw }}
{%if usage=="group" %}