Compare commits
97 Commits
54158df23f
...
master
Author | SHA1 | Date | |
---|---|---|---|
461324fe3f | |||
594122ed07 | |||
c5333887cc | |||
629d77175a | |||
1a54b9a3f9 | |||
d0d8183f7a | |||
4f2fa1db4f | |||
75d935aa57 | |||
27e23fffaf | |||
df8bcfc1a1 | |||
2b86aa4e2f | |||
57f96132f4 | |||
aac017c263 | |||
702d060503 | |||
c6d349696e | |||
d0d933f28e | |||
1249b7be21 | |||
6081e6a692 | |||
01da55e6d6 | |||
95e51c4d53 | |||
9157b78671 | |||
e66f8999ed | |||
41915a0547 | |||
c7586c86d5 | |||
6a8e102fc6 | |||
eedaa86dcf | |||
1d448e70c7 | |||
63c710c4fd | |||
ac37691536 | |||
13e5bfb428 | |||
ed75b5f5c3 | |||
f361110766 | |||
a5fbe134cc | |||
7dc7d708d3 | |||
7ecfa45d75 | |||
7380823897 | |||
911bea2b5d | |||
13c24bd1ee | |||
fac25a036e | |||
d61c2fc94d | |||
3e9e581116 | |||
14283a731e | |||
5271f992a7 | |||
e3188b1732 | |||
fa62b8aa36 | |||
3ba041b207 | |||
465bfd0374 | |||
2a2dfc55bb | |||
24e2fb3c2e | |||
ebd9a5a0a6 | |||
16eb147e5b | |||
e4cb40fae8 | |||
9d40aa6575 | |||
4399db9498 | |||
295c4bd4f7 | |||
27bcb3fbe7 | |||
d3c8a95336 | |||
2679d8f629 | |||
8ed97d8d96 | |||
2b4d048f9d | |||
20c131db2e | |||
72c5e49cf6 | |||
635f44a894 | |||
33841459d9 | |||
150e624fca | |||
f621ebea82 | |||
ccdacac7c5 | |||
0805750c33 | |||
ff7183ef5b | |||
67d026a8a0 | |||
cf255183bd | |||
743ffa7910 | |||
261129755d | |||
c150c15bc7 | |||
3fc0a1b809 | |||
1209c90388 | |||
d65a003422 | |||
04272afa3d | |||
4aa766759c | |||
dbade2fce4 | |||
ae4debf6b9 | |||
4ecfa70106 | |||
dd46b9ba01 | |||
5aefa64fce | |||
9a8105edb9 | |||
26d31f4fce | |||
0102239e09 | |||
e9242e4b0c | |||
0886f96cf4 | |||
ecfce10e3b | |||
cf85ca9023 | |||
8738cdeec5 | |||
569f3a5860 | |||
4c707c5899 | |||
b2c78b523a | |||
57606ce0d5 | |||
490d8112fa |
@ -2,6 +2,7 @@
|
|||||||
<creole>
|
<creole>
|
||||||
<files>
|
<files>
|
||||||
<file filelist='ninegate' name='/etc/eole/eole-db.d/ninegate-db.yml' rm='True' mkdir='True'/>
|
<file filelist='ninegate' name='/etc/eole/eole-db.d/ninegate-db.yml' rm='True' mkdir='True'/>
|
||||||
|
<file filelist='ninegate_nginx' name='/etc/nginx/web.d/ninegate.conf' source='ninegate-nginx.conf' rm='True' mkdir='True' />
|
||||||
</files>
|
</files>
|
||||||
|
|
||||||
<containers>
|
<containers>
|
||||||
@ -9,6 +10,7 @@
|
|||||||
<package>ninegate-apps</package>
|
<package>ninegate-apps</package>
|
||||||
|
|
||||||
<file filelist='ninegate' name='/etc/apache2/sites-available/ninegate' source='ninegate-apache.conf' rm="True"/>
|
<file filelist='ninegate' name='/etc/apache2/sites-available/ninegate' source='ninegate-apache.conf' rm="True"/>
|
||||||
|
<file filelist='ninegate' name='/lib/systemd/system/wssninegate.service' source='ninegate.service'/>
|
||||||
<file filelist="ninegate" name="/var/www/html/ninegate/app/config/parameters.yml" source="ninegate-parameters.yml" rm="True"/>
|
<file filelist="ninegate" name="/var/www/html/ninegate/app/config/parameters.yml" source="ninegate-parameters.yml" rm="True"/>
|
||||||
<file filelist="ninegate" name="/var/www/html/ninegate/app/config/template.yml" source="ninegate-template.yml" rm="True"/>
|
<file filelist="ninegate" name="/var/www/html/ninegate/app/config/template.yml" source="ninegate-template.yml" rm="True"/>
|
||||||
<file filelist="ninegate" name="/var/www/html/ninegate/scripts/ninegate-postservice-00.sh" source="ninegate-postservice-00.sh" rm="True" mode="700" />
|
<file filelist="ninegate" name="/var/www/html/ninegate/scripts/ninegate-postservice-00.sh" source="ninegate-postservice-00.sh" rm="True" mode="700" />
|
||||||
@ -18,16 +20,12 @@
|
|||||||
<file filelist='ninegate-migration' name='/var/www/html/envole-migration/config/config-db-ninegate.php' source='ninegate-migration.php' mkdir='True'/>
|
<file filelist='ninegate-migration' name='/var/www/html/envole-migration/config/config-db-ninegate.php' source='ninegate-migration.php' mkdir='True'/>
|
||||||
|
|
||||||
<service method='apache' servicelist='ninegate'>ninegate</service>
|
<service method='apache' servicelist='ninegate'>ninegate</service>
|
||||||
|
<service servicelist="ninegate">wssninegate</service>
|
||||||
<service_access service='ninegate_websocket'>
|
|
||||||
<port port_type="SymLinkOption">ninegate_websocket_portexterne</port>
|
|
||||||
</service_access>
|
|
||||||
|
|
||||||
</container>
|
</container>
|
||||||
</containers>
|
</containers>
|
||||||
|
|
||||||
<variables>
|
<variables>
|
||||||
<family name='Ninegate'>
|
<family name='Ninegate' icon='home'>
|
||||||
<variable type='oui/non' name='activer_cadolesldap' description='Activer Annuaire Cadoles' hidden='True' exists='False'/>
|
<variable type='oui/non' name='activer_cadolesldap' description='Activer Annuaire Cadoles' hidden='True' exists='False'/>
|
||||||
<variable type='string' name='cadolesldap_pwdadmin' description="Mot de passe du compte admin durant l'instance" hidden='True' exists='False'/>
|
<variable type='string' name='cadolesldap_pwdadmin' description="Mot de passe du compte admin durant l'instance" hidden='True' exists='False'/>
|
||||||
<variable type='string' name='cadolesldap_organization' description="Nom de l'organisation principale" hidden='True' exists='False'/>
|
<variable type='string' name='cadolesldap_organization' description="Nom de l'organisation principale" hidden='True' exists='False'/>
|
||||||
@ -39,6 +37,7 @@
|
|||||||
<variable name="ninegate_test_ninegate" type="oui/non" hidden='True' exists='False'><value>non</value></variable>
|
<variable name="ninegate_test_ninegate" type="oui/non" hidden='True' exists='False'><value>non</value></variable>
|
||||||
<variable name="activer_adminer" type="oui/non" description="Activer Adminer" hidden='True' exists='False'><value>non</value></variable>
|
<variable name="activer_adminer" type="oui/non" description="Activer Adminer" hidden='True' exists='False'><value>non</value></variable>
|
||||||
<variable name="activer_balado" type="oui/non" description="Activer Balado" hidden='True' exists='False'><value>non</value></variable>
|
<variable name="activer_balado" type="oui/non" description="Activer Balado" hidden='True' exists='False'><value>non</value></variable>
|
||||||
|
<variable name="activer_cdt" type="oui/non" description="Activer CdT" hidden='True' exists='False'><value>non</value></variable>
|
||||||
<variable name="activer_dokuwiki" type="oui/non" description="Activer Dokuwiki" hidden='True' exists='False'><value>non</value></variable>
|
<variable name="activer_dokuwiki" type="oui/non" description="Activer Dokuwiki" hidden='True' exists='False'><value>non</value></variable>
|
||||||
<variable name="activer_econnect" type="oui/non" description="Activer eConnect" hidden='True' exists='False'><value>non</value></variable>
|
<variable name="activer_econnect" type="oui/non" description="Activer eConnect" hidden='True' exists='False'><value>non</value></variable>
|
||||||
<variable name="activer_ead_web" type="oui/non" description="Activer EAD" hidden='True' exists='False'><value>non</value></variable>
|
<variable name="activer_ead_web" type="oui/non" description="Activer EAD" hidden='True' exists='False'><value>non</value></variable>
|
||||||
@ -65,6 +64,7 @@
|
|||||||
<variable name="activer_roundcube" type="oui/non" description="Activer Roundcube" hidden='True' exists='False'><value>non</value></variable>
|
<variable name="activer_roundcube" type="oui/non" description="Activer Roundcube" hidden='True' exists='False'><value>non</value></variable>
|
||||||
<variable name="activer_sacoche" type="oui/non" description="Activer Sacoche" hidden='True' exists='False'><value>non</value></variable>
|
<variable name="activer_sacoche" type="oui/non" description="Activer Sacoche" hidden='True' exists='False'><value>non</value></variable>
|
||||||
<variable name="activer_wordpress" type="oui/non" description="Activer Wordpress" hidden='True' exists='False'><value>non</value></variable>
|
<variable name="activer_wordpress" type="oui/non" description="Activer Wordpress" hidden='True' exists='False'><value>non</value></variable>
|
||||||
|
<variable name="activer_revprox" type="oui/non" description="Activer le reverse proxy Nginx" hidden='True' exists='False'><value>non</value></variable>
|
||||||
|
|
||||||
|
|
||||||
<variable name="activer_sondepiwik_local" type="oui/non" description="Activer Sonde Piwik" hidden='True' exists='False'><value>non</value></variable>
|
<variable name="activer_sondepiwik_local" type="oui/non" description="Activer Sonde Piwik" hidden='True' exists='False'><value>non</value></variable>
|
||||||
@ -78,8 +78,6 @@
|
|||||||
<variable name='ninegate_test_conf_ldap' type='oui/non' hidden='True'/>
|
<variable name='ninegate_test_conf_ldap' type='oui/non' hidden='True'/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<variable type='oui/non' name='activer_ninegate' description='Activer Ninegate'><value>oui</value></variable>
|
<variable type='oui/non' name='activer_ninegate' description='Activer Ninegate'><value>oui</value></variable>
|
||||||
|
|
||||||
<variable type='string' name='ninegate_masteridentity' description="Maître de l'Identité" mandatory='True'><value>LDAP</value></variable>
|
<variable type='string' name='ninegate_masteridentity' description="Maître de l'Identité" mandatory='True'><value>LDAP</value></variable>
|
||||||
@ -90,6 +88,7 @@
|
|||||||
<variable type='string' name='ninegate_ssoreqgroup' description="Attribut SSO associé à la notion de groupe" mandatory='True'><value>user_groups</value></variable>
|
<variable type='string' name='ninegate_ssoreqgroup' description="Attribut SSO associé à la notion de groupe" mandatory='True'><value>user_groups</value></variable>
|
||||||
<variable type='oui/non' name='ninegate_ssosynchroitem' description="Associer automatiquement les items en fonction d'un attribut SSO"><value>non</value></variable>
|
<variable type='oui/non' name='ninegate_ssosynchroitem' description="Associer automatiquement les items en fonction d'un attribut SSO"><value>non</value></variable>
|
||||||
<variable type='string' name='ninegate_ssoreqitem' description="Attribut SSO associé à la notion d'item" mandatory='True'><value></value></variable>
|
<variable type='string' name='ninegate_ssoreqitem' description="Attribut SSO associé à la notion d'item" mandatory='True'><value></value></variable>
|
||||||
|
<variable type='string' name='ninegate_typesso' description="Mode de connexion SSO (Client ou Proxy)" mandatory='True'><value>client</value></variable>
|
||||||
|
|
||||||
<variable type='oui/non' name='ninegate_syncldap' description="Synchroniser Ninegate vers votre Annuaire CadolesLDAP"><value>non</value></variable>
|
<variable type='oui/non' name='ninegate_syncldap' description="Synchroniser Ninegate vers votre Annuaire CadolesLDAP"><value>non</value></variable>
|
||||||
<variable type='string' name='ninegate_ldaptemplate' description="Modèle d'annuaire"><value>scribe</value></variable>
|
<variable type='string' name='ninegate_ldaptemplate' description="Modèle d'annuaire"><value>scribe</value></variable>
|
||||||
@ -197,6 +196,13 @@
|
|||||||
<variable type='string' name='ninegate_widbalado_url' description='URL complète de votre Balado' mandatory='True' />
|
<variable type='string' name='ninegate_widbalado_url' description='URL complète de votre Balado' mandatory='True' />
|
||||||
<variable type='string' name='ninegate_widbalado_syncenvole' description='URL Posh-Profil pour synchronisation Balado' mandatory='True' />
|
<variable type='string' name='ninegate_widbalado_syncenvole' description='URL Posh-Profil pour synchronisation Balado' mandatory='True' />
|
||||||
|
|
||||||
|
<!-- CDT -->
|
||||||
|
<variable type="oui/non" name='ninegate_activate_widcdt' description='Activer CdT' mandatory='True'>
|
||||||
|
<value>non</value>
|
||||||
|
</variable>
|
||||||
|
<variable type='string' name='ninegate_widcdt_url' description='URL complète de votre CdT' mandatory='True' />
|
||||||
|
<variable type='string' name='ninegate_widcdt_syncenvole' description='URL Posh-Profil pour synchronisation CdT' mandatory='True' />
|
||||||
|
|
||||||
<!-- DOKUWIKI -->
|
<!-- DOKUWIKI -->
|
||||||
<variable type="oui/non" name='ninegate_activate_widdokuwiki' description='Activer Dokuwiki' mandatory='True'>
|
<variable type="oui/non" name='ninegate_activate_widdokuwiki' description='Activer Dokuwiki' mandatory='True'>
|
||||||
<value>non</value>
|
<value>non</value>
|
||||||
@ -213,7 +219,6 @@
|
|||||||
<variable type="oui/non" name='ninegate_activate_widead' description='Activer EAD' mandatory='True'>
|
<variable type="oui/non" name='ninegate_activate_widead' description='Activer EAD' mandatory='True'>
|
||||||
<value>non</value>
|
<value>non</value>
|
||||||
</variable>
|
</variable>
|
||||||
<variable type='string' name='ninegate_widead_url' description='URL complète de votre EAD' mandatory='True' />
|
|
||||||
|
|
||||||
<!-- EOE -->
|
<!-- EOE -->
|
||||||
<variable type="oui/non" name='ninegate_activate_wideoe' description='Activer EOE' mandatory='True'>
|
<variable type="oui/non" name='ninegate_activate_wideoe' description='Activer EOE' mandatory='True'>
|
||||||
@ -374,19 +379,6 @@
|
|||||||
<variable type='string' name='ninegate_widwordpress_url' description='URL complète de votre Wordpress' mandatory='True' />
|
<variable type='string' name='ninegate_widwordpress_url' description='URL complète de votre Wordpress' mandatory='True' />
|
||||||
<variable type='string' name='ninegate_widwordpress_syncenvole' description='URL Posh-Profil pour synchronisation Wordpress' mandatory='True' />
|
<variable type='string' name='ninegate_widwordpress_syncenvole' description='URL Posh-Profil pour synchronisation Wordpress' mandatory='True' />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- WEBSOCKET -->
|
|
||||||
<variable type='string' name='ninegate_websocket_url' description='Host du serveur Websocket' mandatory='True' />
|
|
||||||
<variable type='string' name='ninegate_websocket_portexterne' description='Port de commuinication externe du serveur Websocket' mandatory='True' >
|
|
||||||
<value>5555</value>
|
|
||||||
</variable>
|
|
||||||
<variable type='string' name='ninegate_websocket_portinterne' description='Port de commuinication interne du serveur Websocket' mandatory='True'>
|
|
||||||
<value>5556</value>
|
|
||||||
</variable>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- EMAIL -->
|
<!-- EMAIL -->
|
||||||
<variable type='string' name='ninegate_noreply' description='Adresse mail utilisé pour le noreply' mandatory='True' />
|
<variable type='string' name='ninegate_noreply' description='Adresse mail utilisé pour le noreply' mandatory='True' />
|
||||||
<variable type="oui/non" name='ninegate_activer_localmail' description="Utiliser le serveur d'envoi de mail local" mandatory='True'>
|
<variable type="oui/non" name='ninegate_activer_localmail' description="Utiliser le serveur d'envoi de mail local" mandatory='True'>
|
||||||
@ -398,9 +390,9 @@
|
|||||||
<variable type='string' name='ninegate_smtppwd' description='Fichier contenant le mot de passe associé du compte SMTP' />
|
<variable type='string' name='ninegate_smtppwd' description='Fichier contenant le mot de passe associé du compte SMTP' />
|
||||||
<variable type='string' name='ninegate_smtpencryption' description='Type Encryptage du serveur SMTP' />
|
<variable type='string' name='ninegate_smtpencryption' description='Type Encryptage du serveur SMTP' />
|
||||||
<variable type='string' name='ninegate_smtpauthmode' description='Mode Authentification du serveur SMTP' />
|
<variable type='string' name='ninegate_smtpauthmode' description='Mode Authentification du serveur SMTP' />
|
||||||
|
</family>
|
||||||
|
|
||||||
|
<family name='EoleDB' icon='database' mode='expert'>
|
||||||
|
|
||||||
<!-- EOLEDB -->
|
<!-- EOLEDB -->
|
||||||
<variable type='string' name='ninegate_db_mode' description='Serveur de bases de données à utiliser' mode='expert'/>
|
<variable type='string' name='ninegate_db_mode' description='Serveur de bases de données à utiliser' mode='expert'/>
|
||||||
<variable type='string' name='ninegate_dbserver' description='Adresse du serveur de base de données' mode='expert'/>
|
<variable type='string' name='ninegate_dbserver' description='Adresse du serveur de base de données' mode='expert'/>
|
||||||
@ -416,6 +408,7 @@
|
|||||||
<separator name="ninegate_activate_portal">Paramètres associés aux modules à activer</separator>
|
<separator name="ninegate_activate_portal">Paramètres associés aux modules à activer</separator>
|
||||||
<separator name="ninegate_activate_widadminer">Paramètres associés à Adminer</separator>
|
<separator name="ninegate_activate_widadminer">Paramètres associés à Adminer</separator>
|
||||||
<separator name="ninegate_activate_widbalado">Paramètres associés à Balado</separator>
|
<separator name="ninegate_activate_widbalado">Paramètres associés à Balado</separator>
|
||||||
|
<separator name="ninegate_activate_widcdt">Paramètres associés à CdT</separator>
|
||||||
<separator name="ninegate_activate_widdokuwiki">Paramètres associés à Dokuwiki</separator>
|
<separator name="ninegate_activate_widdokuwiki">Paramètres associés à Dokuwiki</separator>
|
||||||
<separator name="ninegate_activate_wideconnect">Paramètres associés à eConnect</separator>
|
<separator name="ninegate_activate_wideconnect">Paramètres associés à eConnect</separator>
|
||||||
<separator name="ninegate_activate_widead">Paramètres associés à EAD</separator>
|
<separator name="ninegate_activate_widead">Paramètres associés à EAD</separator>
|
||||||
@ -443,9 +436,9 @@
|
|||||||
<separator name="ninegate_activate_widroundcube">Paramètres associés à Roundcube</separator>
|
<separator name="ninegate_activate_widroundcube">Paramètres associés à Roundcube</separator>
|
||||||
<separator name="ninegate_activate_widsacoche">Paramètres associés à Sacoche</separator>
|
<separator name="ninegate_activate_widsacoche">Paramètres associés à Sacoche</separator>
|
||||||
<separator name="ninegate_activate_widwordpress">Paramètres associés à Wordpress</separator>
|
<separator name="ninegate_activate_widwordpress">Paramètres associés à Wordpress</separator>
|
||||||
<separator name="ninegate_websocket_url">Paramètres associés au Serveur WEBSOCKET</separator>
|
<separator name="ninegate_activate_websocket">Paramètres associés au Serveur WEBSOCKET</separator>
|
||||||
<separator name="ninegate_noreply">Paramètres associés aux Mails</separator>
|
<separator name="ninegate_noreply">Paramètres associés aux Mails</separator>
|
||||||
<separator name="ninegate_db_mode">Paramètres associés à la Base de Données</separator>
|
<separator name="ninegate_db_mode">Paramètres EoleDB associés à Ninegate</separator>
|
||||||
</separators>
|
</separators>
|
||||||
</variables>
|
</variables>
|
||||||
|
|
||||||
@ -455,6 +448,11 @@
|
|||||||
<target type='variable'>activer_ninegate</target>
|
<target type='variable'>activer_ninegate</target>
|
||||||
</condition>
|
</condition>
|
||||||
|
|
||||||
|
<condition name='hidden_if_in' source='activer_revprox'>
|
||||||
|
<param>non</param>
|
||||||
|
<target type='filelist'>nineboard_nginx</target>
|
||||||
|
</condition>
|
||||||
|
|
||||||
<condition name='hidden_if_in' source='activer_ninegate'>
|
<condition name='hidden_if_in' source='activer_ninegate'>
|
||||||
<param>non</param>
|
<param>non</param>
|
||||||
|
|
||||||
@ -466,6 +464,7 @@
|
|||||||
<target type='variable'>ninegate_ssoreqgroup</target>
|
<target type='variable'>ninegate_ssoreqgroup</target>
|
||||||
<target type='variable'>ninegate_ssosynchroitem</target>
|
<target type='variable'>ninegate_ssosynchroitem</target>
|
||||||
<target type='variable'>ninegate_ssoreqitem</target>
|
<target type='variable'>ninegate_ssoreqitem</target>
|
||||||
|
<target type='variable'>ninegate_typesso</target>
|
||||||
|
|
||||||
<target type='variable'>ninegate_syncldap</target>
|
<target type='variable'>ninegate_syncldap</target>
|
||||||
<target type='variable'>ninegate_ldaptemplate</target>
|
<target type='variable'>ninegate_ldaptemplate</target>
|
||||||
@ -530,6 +529,7 @@
|
|||||||
<target type='variable'>ninegate_dbpass</target>
|
<target type='variable'>ninegate_dbpass</target>
|
||||||
|
|
||||||
<target type='filelist'>ninegate</target>
|
<target type='filelist'>ninegate</target>
|
||||||
|
<target type='filelist'>ninegate_nginx</target>
|
||||||
<target type='filelist'>ninegate-migration</target>
|
<target type='filelist'>ninegate-migration</target>
|
||||||
|
|
||||||
<target type='servicelist'>ninegate</target>
|
<target type='servicelist'>ninegate</target>
|
||||||
@ -568,6 +568,14 @@
|
|||||||
<target type='variable'>ninegate_ssoreqitem</target>
|
<target type='variable'>ninegate_ssoreqitem</target>
|
||||||
</condition>
|
</condition>
|
||||||
|
|
||||||
|
<condition name='hidden_if_in' source='ninegate_mode_auth'>
|
||||||
|
<param>SQL</param>
|
||||||
|
<param>LDAP</param>
|
||||||
|
<param>SAML</param>
|
||||||
|
|
||||||
|
<target type='variable'>ninegate_typesso</target>
|
||||||
|
</condition>
|
||||||
|
|
||||||
<condition name='hidden_if_in' source='ninegate_syncldap'>
|
<condition name='hidden_if_in' source='ninegate_syncldap'>
|
||||||
<param>non</param>
|
<param>non</param>
|
||||||
|
|
||||||
@ -717,6 +725,7 @@
|
|||||||
|
|
||||||
<target type='variable'>ninegate_activate_widadminer</target>
|
<target type='variable'>ninegate_activate_widadminer</target>
|
||||||
<target type='variable'>ninegate_activate_widbalado</target>
|
<target type='variable'>ninegate_activate_widbalado</target>
|
||||||
|
<target type='variable'>ninegate_activate_widcdt</target>
|
||||||
<target type='variable'>ninegate_activate_widdokuwiki</target>
|
<target type='variable'>ninegate_activate_widdokuwiki</target>
|
||||||
<target type='variable'>ninegate_activate_wideconnect</target>
|
<target type='variable'>ninegate_activate_wideconnect</target>
|
||||||
<target type='variable'>ninegate_activate_widead</target>
|
<target type='variable'>ninegate_activate_widead</target>
|
||||||
@ -766,6 +775,7 @@
|
|||||||
<param>non</param>
|
<param>non</param>
|
||||||
|
|
||||||
<target type='variable'>ninegate_widbalado_syncenvole</target>
|
<target type='variable'>ninegate_widbalado_syncenvole</target>
|
||||||
|
<target type='variable'>ninegate_widcdt_syncenvole</target>
|
||||||
<target type='variable'>ninegate_widgepi_syncenvole</target>
|
<target type='variable'>ninegate_widgepi_syncenvole</target>
|
||||||
<target type='variable'>ninegate_widlimesurvey_syncenvole</target>
|
<target type='variable'>ninegate_widlimesurvey_syncenvole</target>
|
||||||
<target type='variable'>ninegate_widmoodle_syncenvole</target>
|
<target type='variable'>ninegate_widmoodle_syncenvole</target>
|
||||||
@ -784,30 +794,12 @@
|
|||||||
<condition name='hidden_if_in' source='poshprofil_typesynchro'>
|
<condition name='hidden_if_in' source='poshprofil_typesynchro'>
|
||||||
<param>Annuaire</param>
|
<param>Annuaire</param>
|
||||||
<target type='variable'>ninegate_widbalado_syncenvole</target>
|
<target type='variable'>ninegate_widbalado_syncenvole</target>
|
||||||
|
<target type='variable'>ninegate_widcdt_syncenvole</target>
|
||||||
<target type='variable'>ninegate_widgepi_syncenvole</target>
|
<target type='variable'>ninegate_widgepi_syncenvole</target>
|
||||||
<target type='variable'>ninegate_widnextcloud_syncenvole</target>
|
<target type='variable'>ninegate_widnextcloud_syncenvole</target>
|
||||||
<target type='variable'>ninegate_widsacoche_syncenvole</target>
|
<target type='variable'>ninegate_widsacoche_syncenvole</target>
|
||||||
</condition>
|
</condition>
|
||||||
|
|
||||||
|
|
||||||
<!-- AFFICHAGE EN FONCTION DU MODULE WEBSOCKET -->
|
|
||||||
<condition name='hidden_if_in' source='ninegate_activate_websocket'>
|
|
||||||
<param>non</param>
|
|
||||||
|
|
||||||
<target type='variable'>ninegate_websocket_url</target>
|
|
||||||
<target type='variable'>ninegate_websocket_portinterne</target>
|
|
||||||
<target type='variable'>ninegate_websocket_portexterne</target>
|
|
||||||
<target type='servicelist'>ninegate_websocket</target>
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<fill name='calc_multi_condition' target='ninegate_websocket_url'>
|
|
||||||
<param>oui</param>
|
|
||||||
<param type='eole' name='condition_1' hidden='False'>activer_apache</param>
|
|
||||||
<param type='eole' name='match' hidden='False'>web_url</param>
|
|
||||||
<param name='default_mismatch'>None</param>
|
|
||||||
</fill>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- AFFICHAGE EN FONCTION DU WIDGET ADMINER -->
|
<!-- AFFICHAGE EN FONCTION DU WIDGET ADMINER -->
|
||||||
<fill name='calc_multi_condition' target='ninegate_activate_widadminer'>
|
<fill name='calc_multi_condition' target='ninegate_activate_widadminer'>
|
||||||
<param>oui</param>
|
<param>oui</param>
|
||||||
@ -832,7 +824,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- AFFICHAGE EN FONCTION DU WIDGET BALADAO -->
|
<!-- AFFICHAGE EN FONCTION DU WIDGET BALADO -->
|
||||||
<fill name='calc_multi_condition' target='ninegate_activate_widbalado'>
|
<fill name='calc_multi_condition' target='ninegate_activate_widbalado'>
|
||||||
<param>oui</param>
|
<param>oui</param>
|
||||||
<param type='eole' name='condition_1' hidden='False'>activer_balado</param>
|
<param type='eole' name='condition_1' hidden='False'>activer_balado</param>
|
||||||
@ -863,6 +855,39 @@
|
|||||||
</fill>
|
</fill>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- AFFICHAGE EN FONCTION DU WIDGET CDT -->
|
||||||
|
<fill name='calc_multi_condition' target='ninegate_activate_widcdt'>
|
||||||
|
<param>oui</param>
|
||||||
|
<param type='eole' name='condition_1' hidden='False'>activer_cdt</param>
|
||||||
|
<param name='match'>oui</param>
|
||||||
|
<param name='mismatch'>non</param>
|
||||||
|
<param name='default_mismatch'>non</param>
|
||||||
|
</fill>
|
||||||
|
|
||||||
|
<condition name='hidden_if_in' source='ninegate_activate_widcdt'>
|
||||||
|
<param>non</param>
|
||||||
|
|
||||||
|
<target type='variable'>ninegate_widcdt_url</target>
|
||||||
|
<target type='variable'>ninegate_widcdt_syncenvole</target>
|
||||||
|
</condition>
|
||||||
|
|
||||||
|
<fill name='calc_multi_condition' target='ninegate_widcdt_url'>
|
||||||
|
<param>oui</param>
|
||||||
|
<param type='eole' name='condition_1' hidden='False'>activer_cdt</param>
|
||||||
|
<param name='match'>/cdt</param>
|
||||||
|
<param name='default_mismatch'>None</param>
|
||||||
|
</fill>
|
||||||
|
|
||||||
|
<fill name='calc_multi_condition' target='ninegate_widcdt_syncenvole'>
|
||||||
|
<param>oui</param>
|
||||||
|
<param type='eole' name='condition_1' hidden='False'>activer_cdt</param>
|
||||||
|
<param name='match'>/posh-profil</param>
|
||||||
|
<param name='default_mismatch'>None</param>
|
||||||
|
</fill>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- AFFICHAGE EN FONCTION DU WIDGET DOKUWIKI -->
|
<!-- AFFICHAGE EN FONCTION DU WIDGET DOKUWIKI -->
|
||||||
<fill name='calc_multi_condition' target='ninegate_activate_widdokuwiki'>
|
<fill name='calc_multi_condition' target='ninegate_activate_widdokuwiki'>
|
||||||
<param>oui</param>
|
<param>oui</param>
|
||||||
@ -919,18 +944,6 @@
|
|||||||
<param name='default_mismatch'>non</param>
|
<param name='default_mismatch'>non</param>
|
||||||
</fill>
|
</fill>
|
||||||
|
|
||||||
<condition name='hidden_if_in' source='ninegate_activate_widead'>
|
|
||||||
<param>non</param>
|
|
||||||
|
|
||||||
<target type='variable'>ninegate_widead_url</target>
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<fill name='concat' target='ninegate_widead_url'>
|
|
||||||
<param>https://</param>
|
|
||||||
<param type='eole'>web_url</param>
|
|
||||||
<param>:4200</param>
|
|
||||||
</fill>
|
|
||||||
|
|
||||||
<!-- AFFICHAGE EN FONCTION DU WIDGET EOE -->
|
<!-- AFFICHAGE EN FONCTION DU WIDGET EOE -->
|
||||||
<fill name='calc_multi_condition' target='ninegate_activate_wideoe'>
|
<fill name='calc_multi_condition' target='ninegate_activate_wideoe'>
|
||||||
<param>oui</param>
|
<param>oui</param>
|
||||||
@ -1651,6 +1664,10 @@
|
|||||||
<param>['CAS', 'SAML', 'SQL', 'LDAP']</param>
|
<param>['CAS', 'SAML', 'SQL', 'LDAP']</param>
|
||||||
</check>
|
</check>
|
||||||
|
|
||||||
|
<check name='valid_enum' target='ninegate_typesso'>
|
||||||
|
<param>['client', 'proxy']</param>
|
||||||
|
</check>
|
||||||
|
|
||||||
<check name='valid_enum' target='ninegate_moderegistration'>
|
<check name='valid_enum' target='ninegate_moderegistration'>
|
||||||
<param>['none', 'byuser', 'byadmin']</param>
|
<param>['none', 'byuser', 'byadmin']</param>
|
||||||
</check>
|
</check>
|
||||||
|
1
src/ninegate-1.0/.gitignore
vendored
@ -2,6 +2,7 @@
|
|||||||
/app/config/parameters.yml
|
/app/config/parameters.yml
|
||||||
/app/config/template.yml
|
/app/config/template.yml
|
||||||
/src/Cadoles/CoreBundle/Command/data/core-init-01.sql
|
/src/Cadoles/CoreBundle/Command/data/core-init-01.sql
|
||||||
|
/src/Cadoles/CoreBundle/Command/LocalCommand.php
|
||||||
/build/
|
/build/
|
||||||
/phpunit.xml
|
/phpunit.xml
|
||||||
/var/*
|
/var/*
|
||||||
|
@ -127,16 +127,16 @@ gos_web_socket:
|
|||||||
firewall: main
|
firewall: main
|
||||||
shared_config: true
|
shared_config: true
|
||||||
server:
|
server:
|
||||||
port: %websocket_port% #The port the socket server will listen on
|
port: 443 #The port the socket server will listen on
|
||||||
host: %websocket_host% #The host ip to bind to
|
host: %weburl%/wssninegate #The host ip to bind to
|
||||||
|
|
||||||
router:
|
router:
|
||||||
resources:
|
resources:
|
||||||
- "@CadolesWebsocketBundle/Resources/config/topic.yml"
|
- "@CadolesWebsocketBundle/Resources/config/topic.yml"
|
||||||
pushers:
|
pushers:
|
||||||
wamp:
|
wamp:
|
||||||
host: %websocket_host%
|
host: 0.0.0.0
|
||||||
port: %websocket_portinterne%
|
port: 5556
|
||||||
|
|
||||||
# ckeditor configuration
|
# ckeditor configuration
|
||||||
ivory_ck_editor:
|
ivory_ck_editor:
|
||||||
@ -147,7 +147,7 @@ ivory_ck_editor:
|
|||||||
language: fr
|
language: fr
|
||||||
toolbar: "my_toolbar_1"
|
toolbar: "my_toolbar_1"
|
||||||
uiColor: "#ffffff"
|
uiColor: "#ffffff"
|
||||||
extraPlugins: ["html5video","pastebase64"]
|
extraPlugins: ["html5video"]
|
||||||
light_config:
|
light_config:
|
||||||
language: fr
|
language: fr
|
||||||
toolbar: "my_toolbar_2"
|
toolbar: "my_toolbar_2"
|
||||||
|
46
src/ninegate-1.0/scripts/LocalCommand.php
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
<?php
|
||||||
|
namespace Cadoles\CoreBundle\Command;
|
||||||
|
|
||||||
|
use Symfony\Component\Console\Command\Command;
|
||||||
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
use Symfony\Component\Finder\Finder;
|
||||||
|
use Symfony\Component\Filesystem\Filesystem;
|
||||||
|
|
||||||
|
class LocalCommand extends Command
|
||||||
|
{
|
||||||
|
private $container;
|
||||||
|
private $em;
|
||||||
|
private $output;
|
||||||
|
private $filesystem;
|
||||||
|
private $rootlog;
|
||||||
|
|
||||||
|
protected function configure()
|
||||||
|
{
|
||||||
|
$this
|
||||||
|
->setName('Core:Local')
|
||||||
|
->setDescription('Lauch Local Script')
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function execute(InputInterface $input, OutputInterface $output)
|
||||||
|
{
|
||||||
|
$this->container = $this->getApplication()->getKernel()->getContainer();
|
||||||
|
$this->em = $this->container->get('doctrine')->getEntityManager();
|
||||||
|
$this->output = $output;
|
||||||
|
$this->filesystem = new Filesystem();
|
||||||
|
$this->rootlog = $this->container->get('kernel')->getRootDir()."/../var/logs/";
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private function writelnred($string) {
|
||||||
|
$this->output->writeln('<fg=red>'.$string.'</>');
|
||||||
|
$this->filesystem->appendToFile($this->rootlog.'cron.log', $string."\n");
|
||||||
|
}
|
||||||
|
private function writeln($string) {
|
||||||
|
$this->output->writeln($string);
|
||||||
|
$this->filesystem->appendToFile($this->rootlog.'cron.log', $string."\n");
|
||||||
|
}
|
||||||
|
}
|
@ -49,6 +49,11 @@ rm -f /var/www/html/ninegate/var/logs/dev.log
|
|||||||
# Copie des polices du projet dans le rep web
|
# Copie des polices du projet dans le rep web
|
||||||
cp -rf src/Cadoles/CoreBundle/Resources/public/fonts web/
|
cp -rf src/Cadoles/CoreBundle/Resources/public/fonts web/
|
||||||
|
|
||||||
|
# Copie de la commande local de base si elle la commande n'existe pas
|
||||||
|
if [ ! -f src/Cadoles/CoreBundle/Command/LocalCommand.php ]; then
|
||||||
|
cp -rf scripts/LocalCommand.php src/Cadoles/CoreBundle/Command/LocalCommand.php
|
||||||
|
fi
|
||||||
|
|
||||||
# Nettoyage du cache
|
# Nettoyage du cache
|
||||||
echo
|
echo
|
||||||
echo CACHE = Refresh
|
echo CACHE = Refresh
|
||||||
@ -66,6 +71,9 @@ php bin/console Portal:InitData --env=prod
|
|||||||
# Passage des scripts
|
# Passage des scripts
|
||||||
php bin/console Core:Script --env=prod
|
php bin/console Core:Script --env=prod
|
||||||
|
|
||||||
|
# Passage des scripts locaux
|
||||||
|
php bin/console Core:Local --env=prod
|
||||||
|
|
||||||
# Generation des assets
|
# Generation des assets
|
||||||
echo ASSET = Dump
|
echo ASSET = Dump
|
||||||
bin/console assetic:dump --env=prod --quiet
|
bin/console assetic:dump --env=prod --quiet
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
websocket_url=$(CreoleGet adresse_ip_eth0 non)
|
|
||||||
websocket_portinterne=$(CreoleGet ninegate_websocket_portinterne non)
|
|
||||||
|
|
||||||
# Server Websocket
|
# Server Websocket
|
||||||
if [[ "$1" != "restartifdown" ]]; then
|
if [[ "$1" != "restartifdown" ]]; then
|
||||||
echo WEBSOCKET = STOP
|
echo WEBSOCKET = STOP
|
||||||
pid="$(pgrep -a -f gos:websocket | grep $websocket_portinterne)"
|
pid="$(pgrep -a -f gos:websocket | grep 5556)"
|
||||||
if [ -n "${pid}" ]; then
|
if [ -n "${pid}" ]; then
|
||||||
IFS=' ' read -r -a array <<< "$pid"
|
IFS=' ' read -r -a array <<< "$pid"
|
||||||
kill -9 ${array[0]};
|
kill -9 ${array[0]};
|
||||||
@ -13,7 +11,7 @@ if [[ "$1" != "restartifdown" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Port LISTEN ?
|
# Port LISTEN ?
|
||||||
pid="$(pgrep -a -f gos:websocket | grep $websocket_portinterne)"
|
pid="$(pgrep -a -f gos:websocket | grep 5556)"
|
||||||
restart="yes"
|
restart="yes"
|
||||||
if [ "$1" == "restartifdown" ] && [ -n "${pid}" ] ; then
|
if [ "$1" == "restartifdown" ] && [ -n "${pid}" ] ; then
|
||||||
restart="no"
|
restart="no"
|
||||||
@ -22,5 +20,5 @@ fi
|
|||||||
if [ "$restart" == "yes" ] && [ "$1" != "stop" ] ; then
|
if [ "$restart" == "yes" ] && [ "$1" != "stop" ] ; then
|
||||||
echo WEBSOCKET = START
|
echo WEBSOCKET = START
|
||||||
cd /var/www/html/ninegate
|
cd /var/www/html/ninegate
|
||||||
bin/console gos:websocket:server --port $websocket_portinterne -a $websocket_url --no-debug -n -q --env=prod & disown
|
systemctl restart wssninegate
|
||||||
fi
|
fi
|
@ -30,7 +30,10 @@ class SecurityController extends Controller
|
|||||||
|
|
||||||
// Init Client CAS
|
// Init Client CAS
|
||||||
\phpCAS::setDebug("/var/log/phpcas/phpCAS-ninegate.log");
|
\phpCAS::setDebug("/var/log/phpcas/phpCAS-ninegate.log");
|
||||||
@\phpCAS::client(CAS_VERSION_2_0, $this->getParameter('cas_host'), $this->getParameter('cas_port'), is_null($this->getParameter('cas_path')) ? '' : $this->getParameter('cas_path'), false);
|
if($this->getParameter("cas_type")=="client")
|
||||||
|
@\phpCAS::client(CAS_VERSION_2_0, $this->getParameter('cas_host'), $this->getParameter('cas_port'), is_null($this->getParameter('cas_path')) ? '' : $this->getParameter('cas_path'), false);
|
||||||
|
else
|
||||||
|
@\phpCAS::proxy(CAS_VERSION_2_0, $this->getParameter('cas_host'), $this->getParameter('cas_port'), is_null($this->getParameter('cas_path')) ? '' : $this->getParameter('cas_path'), false);
|
||||||
\phpCAS::setNoCasServerValidation();
|
\phpCAS::setNoCasServerValidation();
|
||||||
|
|
||||||
|
|
||||||
@ -75,19 +78,37 @@ class SecurityController extends Controller
|
|||||||
if($masteridentity=="LDAP") {
|
if($masteridentity=="LDAP") {
|
||||||
// Normalement la synchronisation des comptes aurait du générer le compte en base c'est donc pas normal
|
// Normalement la synchronisation des comptes aurait du générer le compte en base c'est donc pas normal
|
||||||
// Peut-être juste relancer une synchronisation
|
// Peut-être juste relancer une synchronisation
|
||||||
throw $this->createNotFoundException('Permission denied. Need to synchronize LDAP ? Contact your administrator');
|
// On tente une synchronisation via methode SSO
|
||||||
|
$masteridentity="SSO";
|
||||||
|
// throw $this->createNotFoundException('Permission denied. Need to synchronize LDAP ? Contact your administrator');
|
||||||
}
|
}
|
||||||
|
|
||||||
if($masteridentity=="SSO") {
|
if($masteridentity=="SSO") {
|
||||||
if(empty($email)) $email = $username."@nomail.com";
|
if(empty($email)) $email = $username."@nomail.com";
|
||||||
|
|
||||||
|
// On s'assure qu'il n'y a pas déjà un utilisateur avec le même mail
|
||||||
|
$usermail = $em->getRepository('CadolesCoreBundle:User')->findOneBy(array("email"=>$email));
|
||||||
|
if($usermail) {
|
||||||
|
return $this->render('CadolesCoreBundle:Registration:info.html.twig', [
|
||||||
|
'useheader' => true,
|
||||||
|
'usemenu' => false,
|
||||||
|
'usesidebar' => false,
|
||||||
|
'infotitle' => "Première connexion",
|
||||||
|
'info' => "Votre compte ne peut être activé car votre adresse mel est déjà utilisée par un autre compte utilisateur.<br>Nous sommes désolés du désagrément et vous invitons à contacter un administrateur.",
|
||||||
|
'mode' => "error",
|
||||||
|
'redirectto' => "",
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
// Là c'est normal que potentiellement il n'existe pas il faut donc l'autogénérer
|
// Là c'est normal que potentiellement il n'existe pas il faut donc l'autogénérer
|
||||||
$user = new User();
|
$user = new User();
|
||||||
|
|
||||||
// On calcule le niveau01 de l'utilisateur
|
// On calcule le niveau01 de l'utilisateur
|
||||||
$niveau01=$em->getRepository('CadolesCoreBundle:Niveau01')->calculateNiveau01($attributes);
|
$niveau01=$em->getRepository('CadolesCoreBundle:Niveau01')->calculateNiveau01($attributes);
|
||||||
if(!$niveau01)
|
if(!$niveau01) {
|
||||||
throw $this->createNotFoundException('Permission denied. No Organisation Niveau 01 match');
|
$niveau01=$em->getRepository('CadolesCoreBundle:Niveau01')->findAll()[0];
|
||||||
|
//throw $this->createNotFoundException('Permission denied. No Organisation Niveau 01 match');
|
||||||
|
}
|
||||||
|
|
||||||
$user->setUsername($username);
|
$user->setUsername($username);
|
||||||
$user->setEmail($email);
|
$user->setEmail($email);
|
||||||
@ -104,6 +125,7 @@ class SecurityController extends Controller
|
|||||||
$user->setAvatar("noavatar.png");
|
$user->setAvatar("noavatar.png");
|
||||||
$user->setVisible(true);
|
$user->setVisible(true);
|
||||||
$user->setAuthlevel("simple");
|
$user->setAuthlevel("simple");
|
||||||
|
$user->setBelongingpopulation("agent");
|
||||||
$user->setRole("ROLE_USER");
|
$user->setRole("ROLE_USER");
|
||||||
|
|
||||||
if(in_array($username,$this->getParameter("ldap_usersadmin")))
|
if(in_array($username,$this->getParameter("ldap_usersadmin")))
|
||||||
@ -194,7 +216,10 @@ class SecurityController extends Controller
|
|||||||
public function logoutAction() {
|
public function logoutAction() {
|
||||||
// Init Client CAS
|
// Init Client CAS
|
||||||
\phpCAS::setDebug(false);
|
\phpCAS::setDebug(false);
|
||||||
@\phpCAS::client(CAS_VERSION_2_0, $this->getParameter('cas_host'), $this->getParameter('cas_port'), is_null($this->getParameter('cas_path')) ? '' : $this->getParameter('cas_path'), true);
|
if($this->getParameter("cas_type")=="client")
|
||||||
|
@\phpCAS::client(CAS_VERSION_2_0, $this->getParameter('cas_host'), $this->getParameter('cas_port'), is_null($this->getParameter('cas_path')) ? '' : $this->getParameter('cas_path'), true);
|
||||||
|
else
|
||||||
|
@\phpCAS::proxy(CAS_VERSION_2_0, $this->getParameter('cas_host'), $this->getParameter('cas_port'), is_null($this->getParameter('cas_path')) ? '' : $this->getParameter('cas_path'), true);
|
||||||
\phpCAS::setNoCasServerValidation();
|
\phpCAS::setNoCasServerValidation();
|
||||||
|
|
||||||
|
|
||||||
@ -208,7 +233,10 @@ class SecurityController extends Controller
|
|||||||
|
|
||||||
// Init Client CAS
|
// Init Client CAS
|
||||||
\phpCAS::setDebug("/var/log/phpcas/phpCAS-ninegate.log");
|
\phpCAS::setDebug("/var/log/phpcas/phpCAS-ninegate.log");
|
||||||
@\phpCAS::client(CAS_VERSION_2_0, $this->getParameter('cas_host'), $this->getParameter('cas_port'), is_null($this->getParameter('cas_path')) ? '' : $this->getParameter('cas_path'), false);
|
if($this->getParameter("cas_type")=="client")
|
||||||
|
@\phpCAS::client(CAS_VERSION_2_0, $this->getParameter('cas_host'), $this->getParameter('cas_port'), is_null($this->getParameter('cas_path')) ? '' : $this->getParameter('cas_path'), false);
|
||||||
|
else
|
||||||
|
@\phpCAS::proxy(CAS_VERSION_2_0, $this->getParameter('cas_host'), $this->getParameter('cas_port'), is_null($this->getParameter('cas_path')) ? '' : $this->getParameter('cas_path'), false);
|
||||||
\phpCAS::setNoCasServerValidation();
|
\phpCAS::setNoCasServerValidation();
|
||||||
|
|
||||||
|
|
||||||
@ -294,4 +322,29 @@ class SecurityController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function imapunreadAction() {
|
||||||
|
if($this->getParameter("active_imapunread")&&$this->getParameter("cas_type")=="proxy") {
|
||||||
|
$ip=$this->getParameter("imapundread_ip");
|
||||||
|
|
||||||
|
// Init Client CAS
|
||||||
|
\phpCAS::setDebug("/var/log/phpcas/phpCAS-ninegate.log");
|
||||||
|
@\phpCAS::proxy(CAS_VERSION_2_0, $this->getParameter('cas_host'), $this->getParameter('cas_port'), is_null($this->getParameter('cas_path')) ? '' : $this->getParameter('cas_path'), false);
|
||||||
|
\phpCAS::setNoCasServerValidation();
|
||||||
|
\phpCAS::forceAuthentication();
|
||||||
|
|
||||||
|
|
||||||
|
$pt= \phpCAS::retrievePT('imap://'.$ip,$t,$f);
|
||||||
|
$a = \phpCAS::serviceMail("{".$ip.":993/imap/ssl/novalidate-cert}","imap://".$ip,0, $errc,$err,$pt);
|
||||||
|
$unseen = imap_status($a, "{".$ip.":993/imap/ssl/novalidate-cert}INBOX", SA_UNSEEN);
|
||||||
|
|
||||||
|
$count=$unseen->unseen;
|
||||||
|
$response = new Response(json_encode($count));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$response = new Response(json_encode(""));
|
||||||
|
|
||||||
|
$response->headers->set('Content-Type', 'application/json');
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,3 +10,7 @@ cas_sp.test:
|
|||||||
path: /test
|
path: /test
|
||||||
defaults: { _controller: CadolesCASBundle:Security:test }
|
defaults: { _controller: CadolesCASBundle:Security:test }
|
||||||
|
|
||||||
|
cas_sp.imapunread:
|
||||||
|
path: /imapunread
|
||||||
|
defaults: { _controller: CadolesCASBundle:Security:imapunread }
|
||||||
|
|
||||||
|
@ -138,6 +138,7 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$usergroup->setUser($user);
|
$usergroup->setUser($user);
|
||||||
$usergroup->setGroup($group);
|
$usergroup->setGroup($group);
|
||||||
$usergroup->setKeyvalue($key);
|
$usergroup->setKeyvalue($key);
|
||||||
|
$usergroup->setRolegroup(0);
|
||||||
$em->persist($usergroup);
|
$em->persist($usergroup);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
$em->clear();
|
$em->clear();
|
||||||
@ -227,9 +228,17 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$this->addModeration($profil,'cadoles_portal_config_flux',1);
|
$this->addModeration($profil,'cadoles_portal_config_flux',1);
|
||||||
$this->addModeration($profil,'cadoles_portal_config_notice',1);
|
$this->addModeration($profil,'cadoles_portal_config_notice',1);
|
||||||
$this->addModeration($profil,'cadoles_portal_config_icon',1);
|
$this->addModeration($profil,'cadoles_portal_config_icon',1);
|
||||||
|
$this->addModeration($profil,'cadoles_portal_config_syncbalado',0);
|
||||||
|
$this->addModeration($profil,'cadoles_portal_config_synccdt',0);
|
||||||
|
$this->addModeration($profil,'cadoles_portal_config_syncgepiannu',0);
|
||||||
|
$this->addModeration($profil,'cadoles_portal_config_syncgepisiecle',0);
|
||||||
$this->addModeration($profil,'cadoles_portal_config_synclimesurvey',0);
|
$this->addModeration($profil,'cadoles_portal_config_synclimesurvey',0);
|
||||||
$this->addModeration($profil,'cadoles_portal_config_syncmoodle',0);
|
$this->addModeration($profil,'cadoles_portal_config_syncmoodle',0);
|
||||||
|
$this->addModeration($profil,'cadoles_portal_config_syncnextcloud',0);
|
||||||
|
$this->addModeration($profil,'cadoles_portal_config_syncsacoche',0);
|
||||||
|
$this->addModeration($profil,'cadoles_portal_config_syncpiwik',0);
|
||||||
$this->addModeration($profil,'cadoles_portal_config_syncwordpress',0);
|
$this->addModeration($profil,'cadoles_portal_config_syncwordpress',0);
|
||||||
|
|
||||||
$this->addModeration($profil,'cadoles_core_config_statistic',1);
|
$this->addModeration($profil,'cadoles_core_config_statistic',1);
|
||||||
$this->addModeration($profil,'cadoles_core_config_mailing',1);
|
$this->addModeration($profil,'cadoles_core_config_mailing',1);
|
||||||
$this->addModeration($profil,'cadoles_core_config_importuser',0);
|
$this->addModeration($profil,'cadoles_core_config_importuser',0);
|
||||||
|
@ -287,7 +287,7 @@ class OnlyCommand extends Command
|
|||||||
$this->em->flush();
|
$this->em->flush();
|
||||||
|
|
||||||
// On ajoute le propriétaire en tant que membre du groupe
|
// On ajoute le propriétaire en tant que membre du groupe
|
||||||
$this->addMember($group,$user,true);
|
$this->addMember($group,$user,100);
|
||||||
|
|
||||||
// On controle que le groupe a bien page / calendrier / blog / project
|
// On controle que le groupe a bien page / calendrier / blog / project
|
||||||
$this->ctrlFgcanshare($group,$user,$pagetemplate);
|
$this->ctrlFgcanshare($group,$user,$pagetemplate);
|
||||||
@ -318,7 +318,7 @@ class OnlyCommand extends Command
|
|||||||
// On s'assure qu'il n'es pas déjà rattaché
|
// On s'assure qu'il n'es pas déjà rattaché
|
||||||
$usergroup=$this->em->getRepository("CadolesCoreBundle:UserGroup")->findOneBy(["user"=>$user,"group"=>$group]);
|
$usergroup=$this->em->getRepository("CadolesCoreBundle:UserGroup")->findOneBy(["user"=>$user,"group"=>$group]);
|
||||||
if(!$usergroup) {
|
if(!$usergroup) {
|
||||||
$this->addMember($group,$user,false);
|
$this->addMember($group,$user,0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -578,12 +578,12 @@ class OnlyCommand extends Command
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private function addMember($group,$user,$fgmanager) {
|
private function addMember($group,$user,$role) {
|
||||||
$key = Uuid::uuid4();
|
$key = Uuid::uuid4();
|
||||||
$usergroup=new Usergroup;
|
$usergroup=new UserGroup();
|
||||||
$usergroup->setUser($user);
|
$usergroup->setUser($user);
|
||||||
$usergroup->setGroup($group);
|
$usergroup->setGroup($group);
|
||||||
$usergroup->setFgmanager($fgmanager);
|
$usergroup->setRolegroup($role);
|
||||||
$usergroup->setKeyvalue($key);
|
$usergroup->setKeyvalue($key);
|
||||||
$this->em->persist($usergroup);
|
$this->em->persist($usergroup);
|
||||||
$this->em->flush();
|
$this->em->flush();
|
||||||
|
@ -380,6 +380,46 @@ class PurgeFileCommand extends Command
|
|||||||
if($result) $find=true;
|
if($result) $find=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Si pas trouvé on la cherche dans les projecttask
|
||||||
|
if(!$find) {
|
||||||
|
$result = $this->em
|
||||||
|
->getRepository("CadolesPortalBundle:Projecttask")->createQueryBuilder('projecttask')
|
||||||
|
->where('projecttask.description LIKE :tofind')
|
||||||
|
->setParameter('tofind', '%'.$tofind.'%')
|
||||||
|
->getQuery()->getResult();
|
||||||
|
if($result) $find=true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Si pas trouvé on la cherche dans les projectcomment
|
||||||
|
if(!$find) {
|
||||||
|
$result = $this->em
|
||||||
|
->getRepository("CadolesPortalBundle:Projectcomment")->createQueryBuilder('projectcomment')
|
||||||
|
->where('projectcomment.description LIKE :tofind')
|
||||||
|
->setParameter('tofind', '%'.$tofind.'%')
|
||||||
|
->getQuery()->getResult();
|
||||||
|
if($result) $find=true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Si pas trouvé on la cherche dans les blogcomment
|
||||||
|
if(!$find) {
|
||||||
|
$result = $this->em
|
||||||
|
->getRepository("CadolesPortalBundle:Blogcomment")->createQueryBuilder('blogcomment')
|
||||||
|
->where('blogcomment.description LIKE :tofind')
|
||||||
|
->setParameter('tofind', '%'.$tofind.'%')
|
||||||
|
->getQuery()->getResult();
|
||||||
|
if($result) $find=true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Si pas trouvé on la cherche dans les alert
|
||||||
|
if(!$find) {
|
||||||
|
$result = $this->em
|
||||||
|
->getRepository("CadolesPortalBundle:Alert")->createQueryBuilder('alert')
|
||||||
|
->where('alert.content LIKE :tofind')
|
||||||
|
->setParameter('tofind', '%'.$tofind.'%')
|
||||||
|
->getQuery()->getResult();
|
||||||
|
if($result) $find=true;
|
||||||
|
}
|
||||||
|
|
||||||
// Si pas trouvé on supprime
|
// Si pas trouvé on supprime
|
||||||
if(!$find) {
|
if(!$find) {
|
||||||
$this->writeln($name);
|
$this->writeln($name);
|
||||||
|
@ -239,6 +239,7 @@ class ScribeToNinegateCommand extends Command
|
|||||||
$member= new UserGroup();
|
$member= new UserGroup();
|
||||||
$member->setGroup($group);
|
$member->setGroup($group);
|
||||||
$member->setUser($user);
|
$member->setUser($user);
|
||||||
|
$member->setRolegroup(0);
|
||||||
|
|
||||||
$this->em->persist($member);
|
$this->em->persist($member);
|
||||||
$this->em->flush();
|
$this->em->flush();
|
||||||
|
@ -49,7 +49,7 @@ class ScriptCommand extends Command
|
|||||||
|
|
||||||
$script=$this->em->getRepository("CadolesCoreBundle:Script")->findOneBy(["name"=>"visibletrue"]);
|
$script=$this->em->getRepository("CadolesCoreBundle:Script")->findOneBy(["name"=>"visibletrue"]);
|
||||||
if(!$script) {
|
if(!$script) {
|
||||||
$this->writelnred("== SCRIPT = visibletrue");
|
$this->writeln("== SCRIPT = visibletrue");
|
||||||
$this->visibletrue();
|
$this->visibletrue();
|
||||||
|
|
||||||
$script=new Script();
|
$script=new Script();
|
||||||
@ -61,7 +61,7 @@ class ScriptCommand extends Command
|
|||||||
|
|
||||||
$script=$this->em->getRepository("CadolesCoreBundle:Script")->findOneBy(["name"=>"setusersniveau"]);
|
$script=$this->em->getRepository("CadolesCoreBundle:Script")->findOneBy(["name"=>"setusersniveau"]);
|
||||||
if(!$script) {
|
if(!$script) {
|
||||||
$this->writelnred("== SCRIPT = setusersniveau");
|
$this->writeln("== SCRIPT = setusersniveau");
|
||||||
$this->setusersniveau();
|
$this->setusersniveau();
|
||||||
|
|
||||||
$script=new Script();
|
$script=new Script();
|
||||||
@ -73,7 +73,7 @@ class ScriptCommand extends Command
|
|||||||
|
|
||||||
$script=$this->em->getRepository("CadolesCoreBundle:Script")->findOneBy(["name"=>"setfgcancreateproject"]);
|
$script=$this->em->getRepository("CadolesCoreBundle:Script")->findOneBy(["name"=>"setfgcancreateproject"]);
|
||||||
if(!$script) {
|
if(!$script) {
|
||||||
$this->writelnred("== SCRIPT = setfgcancreateproject");
|
$this->writeln("== SCRIPT = setfgcancreateproject");
|
||||||
$this->setfgcancreateproject();
|
$this->setfgcancreateproject();
|
||||||
|
|
||||||
$script=new Script();
|
$script=new Script();
|
||||||
@ -85,7 +85,7 @@ class ScriptCommand extends Command
|
|||||||
|
|
||||||
$script=$this->em->getRepository("CadolesCoreBundle:Script")->findOneBy(["name"=>"createproject"]);
|
$script=$this->em->getRepository("CadolesCoreBundle:Script")->findOneBy(["name"=>"createproject"]);
|
||||||
if(!$script) {
|
if(!$script) {
|
||||||
$this->writelnred("== SCRIPT = createproject");
|
$this->writeln("== SCRIPT = createproject");
|
||||||
$this->createproject();
|
$this->createproject();
|
||||||
|
|
||||||
$script=new Script();
|
$script=new Script();
|
||||||
@ -97,7 +97,7 @@ class ScriptCommand extends Command
|
|||||||
|
|
||||||
$script=$this->em->getRepository("CadolesCoreBundle:Script")->findOneBy(["name"=>"createthumbmini"]);
|
$script=$this->em->getRepository("CadolesCoreBundle:Script")->findOneBy(["name"=>"createthumbmini"]);
|
||||||
if(!$script) {
|
if(!$script) {
|
||||||
$this->writelnred("== SCRIPT = createthumbmini");
|
$this->writeln("== SCRIPT = createthumbmini");
|
||||||
$this->createthumbmini();
|
$this->createthumbmini();
|
||||||
|
|
||||||
$script=new Script();
|
$script=new Script();
|
||||||
@ -109,7 +109,7 @@ class ScriptCommand extends Command
|
|||||||
|
|
||||||
$script=$this->em->getRepository("CadolesCoreBundle:Script")->findOneBy(["name"=>"createwidgetproject"]);
|
$script=$this->em->getRepository("CadolesCoreBundle:Script")->findOneBy(["name"=>"createwidgetproject"]);
|
||||||
if(!$script) {
|
if(!$script) {
|
||||||
$this->writelnred("== SCRIPT = createwidgetproject");
|
$this->writeln("== SCRIPT = createwidgetproject");
|
||||||
$this->createwidgetproject();
|
$this->createwidgetproject();
|
||||||
|
|
||||||
$script=new Script();
|
$script=new Script();
|
||||||
@ -121,7 +121,7 @@ class ScriptCommand extends Command
|
|||||||
|
|
||||||
$script=$this->em->getRepository("CadolesCoreBundle:Script")->findOneBy(["name"=>"renamegroup"]);
|
$script=$this->em->getRepository("CadolesCoreBundle:Script")->findOneBy(["name"=>"renamegroup"]);
|
||||||
if(!$script) {
|
if(!$script) {
|
||||||
$this->writelnred("== SCRIPT = renamegroup");
|
$this->writeln("== SCRIPT = renamegroup");
|
||||||
$this->renamegroup();
|
$this->renamegroup();
|
||||||
|
|
||||||
$script=new Script();
|
$script=new Script();
|
||||||
@ -132,6 +132,68 @@ class ScriptCommand extends Command
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$script=$this->em->getRepository("CadolesCoreBundle:Script")->findOneBy(["name"=>"rolegroup"]);
|
||||||
|
if(!$script) {
|
||||||
|
$this->writeln("== SCRIPT = rolegroup");
|
||||||
|
$this->rolegroup();
|
||||||
|
|
||||||
|
$script=new Script();
|
||||||
|
$script->setName("rolegroup");
|
||||||
|
$this->em->persist($script);
|
||||||
|
$this->em->flush();
|
||||||
|
$this->writeln("");
|
||||||
|
}
|
||||||
|
|
||||||
|
$script=$this->em->getRepository("CadolesCoreBundle:Script")->findOneBy(["name"=>"userdefaultmissing"]);
|
||||||
|
if(!$script) {
|
||||||
|
$this->writeln("== SCRIPT = userdefaultmissing");
|
||||||
|
$this->userdefaultmissing();
|
||||||
|
|
||||||
|
$script=new Script();
|
||||||
|
$script->setName("userdefaultmissing");
|
||||||
|
$this->em->persist($script);
|
||||||
|
$this->em->flush();
|
||||||
|
$this->writeln("");
|
||||||
|
}
|
||||||
|
|
||||||
|
$script=$this->em->getRepository("CadolesCoreBundle:Script")->findOneBy(["name"=>"updateorthographe01"]);
|
||||||
|
if(!$script) {
|
||||||
|
$this->writeln("== SCRIPT = updateorthographe01");
|
||||||
|
$this->updateorthographe01();
|
||||||
|
|
||||||
|
$script=new Script();
|
||||||
|
$script->setName("updateorthographe01");
|
||||||
|
$this->em->persist($script);
|
||||||
|
$this->em->flush();
|
||||||
|
$this->writeln("");
|
||||||
|
}
|
||||||
|
|
||||||
|
$script=$this->em->getRepository("CadolesCoreBundle:Script")->findOneBy(["name"=>"updateorthographe02"]);
|
||||||
|
if(!$script) {
|
||||||
|
$this->writeln("== SCRIPT = updateorthographe02");
|
||||||
|
$this->updateorthographe02();
|
||||||
|
|
||||||
|
$script=new Script();
|
||||||
|
$script->setName("updateorthographe02");
|
||||||
|
$this->em->persist($script);
|
||||||
|
$this->em->flush();
|
||||||
|
$this->writeln("");
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->container->getParameter('ldap_template')=="scribe") {
|
||||||
|
$script=$this->em->getRepository("CadolesCoreBundle:Script")->findOneBy(["name"=>"purgepageprofil"]);
|
||||||
|
if(!$script) {
|
||||||
|
$this->writeln("== SCRIPT = purgepageprofil");
|
||||||
|
$this->purgepageprofil();
|
||||||
|
|
||||||
|
$script=new Script();
|
||||||
|
$script->setName("purgepageprofil");
|
||||||
|
$this->em->persist($script);
|
||||||
|
$this->em->flush();
|
||||||
|
$this->writeln("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -289,11 +351,116 @@ class ScriptCommand extends Command
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function rolegroup(){
|
||||||
|
|
||||||
|
$usergroups = $this->em->getRepository('CadolesCoreBundle:UserGroup')->findAll();
|
||||||
|
foreach($usergroups as $usergroup) {
|
||||||
|
if(!$usergroup->getRolegroup()) {
|
||||||
|
$role=0;
|
||||||
|
if($usergroup->getFgmanager()) {
|
||||||
|
$role=50;
|
||||||
|
if($usergroup->getUser()==$usergroup->getGroup()->getOwner()) $role=100;
|
||||||
|
}
|
||||||
|
|
||||||
|
$usergroup->setRolegroup($role);
|
||||||
|
$this->em->persist($usergroup);
|
||||||
|
$this->em->flush();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function userdefaultmissing(){
|
||||||
|
$users = $this->em->getRepository('CadolesCoreBundle:User')->findAll();
|
||||||
|
foreach($users as $user) {
|
||||||
|
if($user->getVisible()=="") {
|
||||||
|
$user->setVisible(true);
|
||||||
|
$this->em->persist($user);
|
||||||
|
$this->em->flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
if($user->getAuthlevel()=="") {
|
||||||
|
$user->setAuthlevel("simple");
|
||||||
|
$this->em->persist($user);
|
||||||
|
$this->em->flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
if($user->getBelongingpopulation()=="") {
|
||||||
|
$user->setBelongingpopulation("agent");
|
||||||
|
$this->em->persist($user);
|
||||||
|
$this->em->flush();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function updateorthographe01(){
|
||||||
|
$config=$this->em->getRepository('CadolesCoreBundle:Config')->find("fgforceconnect");
|
||||||
|
if($config) {
|
||||||
|
$config->setHelp("Forcer la connexion afin de rendre votre site privé");
|
||||||
|
$this->em->persist($config);
|
||||||
|
$this->em->flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
$config=$this->em->getRepository('CadolesCoreBundle:Config')->find("fontfacebody");
|
||||||
|
if($config) {
|
||||||
|
$config->setHelp("Police générale de votre site");
|
||||||
|
$this->em->persist($config);
|
||||||
|
$this->em->flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
$config=$this->em->getRepository('CadolesCoreBundle:Config')->find("permgroup");
|
||||||
|
if($config) {
|
||||||
|
$config->setHelp("Détermine quel rôle aura la permission de créer des groupes de travail");
|
||||||
|
$this->em->persist($config);
|
||||||
|
$this->em->flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
$config=$this->em->getRepository('CadolesCoreBundle:Config')->find("permannu");
|
||||||
|
if($config) {
|
||||||
|
$config->setHelp("Détermine quel rôle aura la permission de voir l'annuaire");
|
||||||
|
$this->em->persist($config);
|
||||||
|
$this->em->flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
$config=$this->em->getRepository('CadolesCoreBundle:Config')->find("labelbookmarkuser");
|
||||||
|
if($config) {
|
||||||
|
$config->setHelp("Titre de la section des items créés par l'utilisateur, et qui ne sont listés que dans cette section.");
|
||||||
|
$this->em->persist($config);
|
||||||
|
$this->em->flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
$config=$this->em->getRepository('CadolesCoreBundle:Config')->find("labelbookmarkitem");
|
||||||
|
if($config) {
|
||||||
|
$config->setHelp("Titre sur la section des items créés par l'administrateur ou le modérateur, mis à la disposition de l'utilisateur, et sélectionnés par ce dernier pour apparaitre dans cette section plutôt que dans leur catégorie d'origine.");
|
||||||
|
$this->em->persist($config);
|
||||||
|
$this->em->flush();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function updateorthographe02(){
|
||||||
|
$entityItem = $this->em->getRepository('CadolesPortalBundle:Item')->find(-398);
|
||||||
|
if($entityItem) {
|
||||||
|
if($entityItem->getSubtitle()!="Messagerie") {
|
||||||
|
$entityItem->setSubtitle("Messagerie");
|
||||||
|
$entityItem->setContent("Messagerie permettant la communication sécurisée par méls. La messagerie n’a pas pour but d’envoyer des gros fichiers mais plutôt de communiquer des informations, des liens.");
|
||||||
|
$this->em->persist($entityItem);
|
||||||
|
$this->em->flush();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function purgepageprofil() {
|
||||||
|
$page=$this->em->getRepository('CadolesPortalBundle:Page')->findOneBy(['name'=>'PROFIL - Enseignants']);
|
||||||
|
if($page) {
|
||||||
|
$this->em->remove($page);
|
||||||
|
$this->em->flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
$page=$this->em->getRepository('CadolesPortalBundle:Page')->findOneBy(['name'=>'PROFIL - Administratifs']);
|
||||||
|
if($page) {
|
||||||
|
$this->em->remove($page);
|
||||||
|
$this->em->flush();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ class SynchroCommand extends Command
|
|||||||
$ldapfilter="(|(&(uid=*)(ENTPersonProfils=enseignant))(&(uid=*)(typeadmin=0))(&(uid=*)(typeadmin=2)))";
|
$ldapfilter="(|(&(uid=*)(ENTPersonProfils=enseignant))(&(uid=*)(typeadmin=0))(&(uid=*)(typeadmin=2)))";
|
||||||
$label="PROFIL - Enseignants";
|
$label="PROFIL - Enseignants";
|
||||||
$this->writeln(" - $label");
|
$this->writeln(" - $label");
|
||||||
if(!$simulate) $this->addmodGroup($label,$ldapfilter,$scribe_group);
|
if(!$simulate) $this->addmodGroup($label,$ldapfilter,false);
|
||||||
|
|
||||||
// Responsables
|
// Responsables
|
||||||
$ldapfilter="(&(uid=*)(ENTPersonProfils=responsable))";
|
$ldapfilter="(&(uid=*)(ENTPersonProfils=responsable))";
|
||||||
@ -140,7 +140,20 @@ class SynchroCommand extends Command
|
|||||||
$ldapfilter="(&(uid=*)(ENTPersonProfils=administratif))";
|
$ldapfilter="(&(uid=*)(ENTPersonProfils=administratif))";
|
||||||
$label="PROFIL - Administratifs";
|
$label="PROFIL - Administratifs";
|
||||||
$this->writeln(" - $label");
|
$this->writeln(" - $label");
|
||||||
if(!$simulate) $this->addmodGroup($label,$ldapfilter,$scribe_group);
|
if(!$simulate) $this->addmodGroup($label,$ldapfilter,false);
|
||||||
|
|
||||||
|
// Niveaux
|
||||||
|
$this->writeln('');
|
||||||
|
$this->writeln('== NIVEAUX ==========================================');
|
||||||
|
$results = $this->ldap->search("type=Niveau", ['cn','description','gidNumber'], $this->ldap_basedn);
|
||||||
|
foreach($results as $result) {
|
||||||
|
$cn=$result["cn"];
|
||||||
|
$ldapfilter="(&(type=Niveau)(cn=$cn))";
|
||||||
|
|
||||||
|
$label="NIVEAU - ".$result["cn"];
|
||||||
|
$this->writeln(" - $label");
|
||||||
|
if(!$simulate) $this->addmodGroup($label,$ldapfilter,false);
|
||||||
|
}
|
||||||
|
|
||||||
// Classes
|
// Classes
|
||||||
$this->writeln('');
|
$this->writeln('');
|
||||||
@ -155,6 +168,32 @@ class SynchroCommand extends Command
|
|||||||
if(!$simulate) $this->addmodGroup($label,$ldapfilter,$scribe_group);
|
if(!$simulate) $this->addmodGroup($label,$ldapfilter,$scribe_group);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Elèves des Classes
|
||||||
|
$this->writeln('');
|
||||||
|
$this->writeln('== ELEVES DES CLASSES ==========================================');
|
||||||
|
$results = $this->ldap->search("type=Classe", ['cn','description','gidNumber'], $this->ldap_basedn);
|
||||||
|
foreach($results as $result) {
|
||||||
|
$cn=$result["cn"];
|
||||||
|
$ldapfilter="(&(type=Classe)(cn=$cn))";
|
||||||
|
|
||||||
|
$label="ELEVES - ".$result["cn"];
|
||||||
|
$this->writeln(" - $label");
|
||||||
|
if(!$simulate) $this->addmodGroup($label,$ldapfilter,false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Professeurs des Classes
|
||||||
|
$this->writeln('');
|
||||||
|
$this->writeln('== PROFESSEURS DES CLASSES ==========================================');
|
||||||
|
$results = $this->ldap->search("type=Classe", ['cn','description','gidNumber'], $this->ldap_basedn);
|
||||||
|
foreach($results as $result) {
|
||||||
|
$cn=$result["cn"];
|
||||||
|
$ldapfilter="(|(&(type=Equipe)(cn=profs-$cn))(&(ENTPersonProfils=Administratif)(divcod=$cn)))";
|
||||||
|
|
||||||
|
$label="PROFESSEURS - ".$result["cn"];
|
||||||
|
$this->writeln(" - $label");
|
||||||
|
if(!$simulate) $this->addmodGroup($label,$ldapfilter,false);
|
||||||
|
}
|
||||||
|
|
||||||
// Options
|
// Options
|
||||||
$this->writeln('');
|
$this->writeln('');
|
||||||
$this->writeln('== OPTIONS ==========================================');
|
$this->writeln('== OPTIONS ==========================================');
|
||||||
@ -899,6 +938,7 @@ class SynchroCommand extends Command
|
|||||||
$member= new UserGroup();
|
$member= new UserGroup();
|
||||||
$member->setGroup($group);
|
$member->setGroup($group);
|
||||||
$member->setUser($user);
|
$member->setUser($user);
|
||||||
|
$member->setRolegroup(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Si modèle scribe
|
// Si modèle scribe
|
||||||
@ -907,7 +947,7 @@ class SynchroCommand extends Command
|
|||||||
if($ldap_template=="scribe"&&$scribe_master) {
|
if($ldap_template=="scribe"&&$scribe_master) {
|
||||||
$ldapfilter="(|(&(uid=".$user->getUsername().")(ENTPersonProfils=enseignant))(&(uid=".$user->getUsername().")(typeadmin=0))(&(uid=".$user->getUsername().")(typeadmin=2)))";
|
$ldapfilter="(|(&(uid=".$user->getUsername().")(ENTPersonProfils=enseignant))(&(uid=".$user->getUsername().")(typeadmin=0))(&(uid=".$user->getUsername().")(typeadmin=2)))";
|
||||||
$results = $this->ldap->search($ldapfilter, ['uid'], $this->ldap_basedn);
|
$results = $this->ldap->search($ldapfilter, ['uid'], $this->ldap_basedn);
|
||||||
if($results) $member->setFgmanager(true);
|
if($results) $member->setRolegroup(50);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->em->persist($member);
|
$this->em->persist($member);
|
||||||
|
@ -326,10 +326,9 @@ class ConfigController extends Controller
|
|||||||
$fields["niveau02"]["perm"]=1;
|
$fields["niveau02"]["perm"]=1;
|
||||||
$fields["niveau02"]["label"]=$session->get('labelniveau02');
|
$fields["niveau02"]["label"]=$session->get('labelniveau02');
|
||||||
}
|
}
|
||||||
if(!array_key_exists("group",$fields)) {
|
if(!array_key_exists("group",$fields)) $fields["group"]["perm"]=1;
|
||||||
$fields["group"]["perm"]=1;
|
$fields["group"]["label"]="Groupes (caché uniquement pour le rôle Utilisateur) ";
|
||||||
$fields["group"]["label"]="Groupes";
|
|
||||||
}
|
|
||||||
if(!array_key_exists("job",$fields)) {
|
if(!array_key_exists("job",$fields)) {
|
||||||
$fields["job"]["perm"]=1;
|
$fields["job"]["perm"]=1;
|
||||||
$fields["job"]["label"]="Métier";
|
$fields["job"]["label"]="Métier";
|
||||||
@ -346,10 +345,8 @@ class ConfigController extends Controller
|
|||||||
$fields["telephonenumber"]["perm"]=1;
|
$fields["telephonenumber"]["perm"]=1;
|
||||||
$fields["telephonenumber"]["label"]="Téléphone";
|
$fields["telephonenumber"]["label"]="Téléphone";
|
||||||
}
|
}
|
||||||
if(!array_key_exists("visitedate",$fields)) {
|
if(!array_key_exists("visitedate",$fields)) $fields["visitedate"]["perm"]=1;
|
||||||
$fields["visitedate"]["perm"]=1;
|
$fields["visitedate"]["label"]="Visite (caché uniquement pour les rôles Animateur et Utilisateur) ";
|
||||||
$fields["visitedate"]["label"]="Visite";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!$session->get('viewniveau02'))
|
if(!$session->get('viewniveau02'))
|
||||||
unset($fields["niveau02"]);
|
unset($fields["niveau02"]);
|
||||||
|
@ -59,17 +59,18 @@ class CoreController extends Controller
|
|||||||
|
|
||||||
// Chargement des chartes à signer
|
// Chargement des chartes à signer
|
||||||
if($user) {
|
if($user) {
|
||||||
|
|
||||||
$notices=$em->getRepository("CadolesPortalBundle:Notice")->getNoticeToRead($user);
|
$notices=$em->getRepository("CadolesPortalBundle:Notice")->getNoticeToRead($user);
|
||||||
if(! $notices->isEmpty()) {
|
if(! $notices->isEmpty()) {
|
||||||
$notices=$em->getRepository("CadolesPortalBundle:Notice")->getNoticeUser($user,false);
|
$notices=$em->getRepository("CadolesPortalBundle:Notice")->getNoticeUser($user,false);
|
||||||
|
|
||||||
return $this->render('CadolesPortalBundle:Notice:mustread.html.twig',[
|
return $this->render('CadolesPortalBundle:Notice:mustread.html.twig',[
|
||||||
'useheader' => true,
|
'useheader' => true,
|
||||||
'usemenu' => false,
|
'usemenu' => false,
|
||||||
'usesidebar' => false,
|
'usesidebar' => false,
|
||||||
'maxwidth' => true,
|
'maxwidth' => true,
|
||||||
'mustread' => true,
|
'mustread' => true,
|
||||||
'notices' => $notices
|
'notices' => $notices,
|
||||||
|
'id' => $id,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,8 +86,8 @@ class CoreController extends Controller
|
|||||||
switch($key) {
|
switch($key) {
|
||||||
case "firstname": if($user->getFirstname()=="") $toprofil=true; break;
|
case "firstname": if($user->getFirstname()=="") $toprofil=true; break;
|
||||||
case "visible": if($user->getVisible()=="") $toprofil=true; break;
|
case "visible": if($user->getVisible()=="") $toprofil=true; break;
|
||||||
case "authlevel": if($user->getAuthlevel()=="") $toprofil=true; break;
|
//case "authlevel": if($user->getAuthlevel()=="") $toprofil=true; break;
|
||||||
case "belongingpopulation": if($user->getBelongingpopulation()=="") $toprofil=true; break;
|
//case "belongingpopulation": if($user->getBelongingpopulation()=="") $toprofil=true; break;
|
||||||
case "job": if($user->getJob()=="") $toprofil=true; break;
|
case "job": if($user->getJob()=="") $toprofil=true; break;
|
||||||
case "position": if($user->getPosition()=="") $toprofil=true; break;
|
case "position": if($user->getPosition()=="") $toprofil=true; break;
|
||||||
case "niveau02": if($user->geNiveau02()=="") $toprofil=true; break;
|
case "niveau02": if($user->geNiveau02()=="") $toprofil=true; break;
|
||||||
|
@ -300,7 +300,9 @@ class FileController extends Controller
|
|||||||
|
|
||||||
$urlsource= $fulldirectory."/".$oldname;
|
$urlsource= $fulldirectory."/".$oldname;
|
||||||
$urldestination = $fulldirectory."/".$data["subdirectory"];
|
$urldestination = $fulldirectory."/".$data["subdirectory"];
|
||||||
|
|
||||||
if($urlsource!=$urldestination) {
|
if($urlsource!=$urldestination) {
|
||||||
|
|
||||||
if($fs->exists($urldestination)) {
|
if($fs->exists($urldestination)) {
|
||||||
$form->addError(new FormError('Ce nom existe déjà'));
|
$form->addError(new FormError('Ce nom existe déjà'));
|
||||||
$this->get('session')->getFlashBag()->clear();
|
$this->get('session')->getFlashBag()->clear();
|
||||||
@ -525,12 +527,14 @@ class FileController extends Controller
|
|||||||
$output=array();
|
$output=array();
|
||||||
$directory=$request->request->get('directory');
|
$directory=$request->request->get('directory');
|
||||||
|
|
||||||
|
|
||||||
// Récupération du répertoire source et le nom du fichier
|
// Récupération du répertoire source et le nom du fichier
|
||||||
$racine=$this->get('kernel')->getRootDir()."/../uploads/file";
|
$racine=$this->get('kernel')->getRootDir()."/../uploads/file";
|
||||||
$dirsource =$request->request->get('dirsource');
|
$directory = $request->request->get('directory');
|
||||||
$namesource =$request->request->get('namesource');
|
$dirsource = $request->request->get('dirsource');
|
||||||
$dirdestination =$request->request->get('dirdestination');
|
$namesource = $request->request->get('namesource');
|
||||||
$namedestination =$request->request->get('namedestination');
|
$dirdestination = $request->request->get('dirdestination');
|
||||||
|
$namedestination = $request->request->get('namedestination');
|
||||||
|
|
||||||
|
|
||||||
$canupdate =$this->getPermission($access,$directory);
|
$canupdate =$this->getPermission($access,$directory);
|
||||||
@ -539,8 +543,19 @@ class FileController extends Controller
|
|||||||
$fs = new Filesystem();
|
$fs = new Filesystem();
|
||||||
|
|
||||||
// Déplacer le fichier
|
// Déplacer le fichier
|
||||||
$urlsource=$racine."/".$dirsource."/".$namesource;
|
$urlsource=str_replace("//","/",$racine."/".$dirsource."/".$namesource);
|
||||||
$urldestination=$racine."/".$dirdestination."/".$namedestination;
|
$urldestination=str_replace("//","/",$racine."/".$dirdestination."/".$namedestination);
|
||||||
|
|
||||||
|
// Controle de cohérance du déplacement
|
||||||
|
$fgerror=false;
|
||||||
|
if(empty($racine)) $fgerror=true;
|
||||||
|
if(empty($dirsource)) $fgerror=true;
|
||||||
|
if(empty($directory)) $fgerror=true;
|
||||||
|
if($urlsource==$urldestination) $fgerror=true;
|
||||||
|
if(stripos($urldestination,$urlsource)!==false) $fgerror=true;
|
||||||
|
if($fgerror) return new JsonResponse(array('message' => 'Interdit'), 400);
|
||||||
|
|
||||||
|
|
||||||
if($fs->exists($urlsource)) {
|
if($fs->exists($urlsource)) {
|
||||||
if(is_dir($urlsource)) {
|
if(is_dir($urlsource)) {
|
||||||
$fs->mirror($urlsource,$urldestination);
|
$fs->mirror($urlsource,$urldestination);
|
||||||
@ -720,8 +735,9 @@ class FileController extends Controller
|
|||||||
|
|
||||||
// On s'assure que l'utilisateur à la permission de voir
|
// On s'assure que l'utilisateur à la permission de voir
|
||||||
$page=$widget->getPage();
|
$page=$widget->getPage();
|
||||||
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$page,$cansee,$canupdate);
|
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$page,$cansee,$canupdate,$canadd);
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
||||||
|
return $canadd;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "projecttask":
|
case "projecttask":
|
||||||
@ -734,6 +750,7 @@ class FileController extends Controller
|
|||||||
$user=$this->getUser();
|
$user=$this->getUser();
|
||||||
$em->getRepository("CadolesPortalBundle:Project")->getPermission($user,$project,$cansee,$canupdate,$canadd);
|
$em->getRepository("CadolesPortalBundle:Project")->getPermission($user,$project,$cansee,$canupdate,$canadd);
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
||||||
|
return $canupdate;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "calendarevent":
|
case "calendarevent":
|
||||||
@ -744,13 +761,12 @@ class FileController extends Controller
|
|||||||
// On s'assure que l'utilisateur à la permission de voir
|
// On s'assure que l'utilisateur à la permission de voir
|
||||||
$calendar=$calendarevent->getCalendar();
|
$calendar=$calendarevent->getCalendar();
|
||||||
$user=$this->getUser();
|
$user=$this->getUser();
|
||||||
$em->getRepository("CadolesPortalBundle:Calendar")->getPermission($user,$calendar,$cansee,$canupdate);
|
$em->getRepository("CadolesPortalBundle:Calendar")->getPermission($user,$calendar,$cansee,$canupdate,$canadd);
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
||||||
|
return $canadd;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else $canupdate=true;
|
else $canupdate=true;
|
||||||
|
|
||||||
return $canupdate;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -139,16 +139,16 @@ class GroupController extends Controller
|
|||||||
case 6 :
|
case 6 :
|
||||||
$qb->orderBy('table.owner',$order[0]["dir"]);
|
$qb->orderBy('table.owner',$order[0]["dir"]);
|
||||||
break;
|
break;
|
||||||
case 7 :
|
case 8 :
|
||||||
$qb->orderBy('table.fgcancreatepage',$order[0]["dir"]);
|
$qb->orderBy('table.fgcancreatepage',$order[0]["dir"]);
|
||||||
break;
|
break;
|
||||||
case 8 :
|
case 9 :
|
||||||
$qb->orderBy('table.fgcancreatecalendar',$order[0]["dir"]);
|
$qb->orderBy('table.fgcancreatecalendar',$order[0]["dir"]);
|
||||||
break;
|
break;
|
||||||
case 9 :
|
case 10 :
|
||||||
$qb->orderBy('table.fgcancreateblog',$order[0]["dir"]);
|
$qb->orderBy('table.fgcancreateblog',$order[0]["dir"]);
|
||||||
break;
|
break;
|
||||||
case 10 :
|
case 11 :
|
||||||
$qb->orderBy('table.fgcancreateproject',$order[0]["dir"]);
|
$qb->orderBy('table.fgcancreateproject',$order[0]["dir"]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -175,30 +175,35 @@ class GroupController extends Controller
|
|||||||
if(!$data->getFgall()) $action .="<a href='".$this->generateUrl('cadoles_core_config_group_users', array('id'=>$data->getId()))."'><i class='fa fa-users fa-2x fa-fw'></i></a>";
|
if(!$data->getFgall()) $action .="<a href='".$this->generateUrl('cadoles_core_config_group_users', array('id'=>$data->getId()))."'><i class='fa fa-users fa-2x fa-fw'></i></a>";
|
||||||
|
|
||||||
if($data->getFgcanshare())
|
if($data->getFgcanshare())
|
||||||
$action.="<a href='".$this->generateUrl('cadoles_core_'.$access.'_group_statistic', array('id'=>$data->getId()))."'><i class='fa fa-bar-chart-o fa-fw fa-2x'></i></a>";
|
$action.="<a href='".$this->generateUrl('cadoles_core_'.$access.'_group_statistic', array('id'=>$data->getId()))."'><i class='fa fa-chart-area fa-fw fa-2x'></i></a>";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$fgproprio=($user==$data->getOwner());
|
$fgcanupdate=($user==$data->getOwner());
|
||||||
$fgmanager=false;
|
$fgcanmanage=false;
|
||||||
$usergroup=$this->getDoctrine()->getRepository("CadolesCoreBundle:UserGroup")->findOneBy(["user"=>$this->getUser(),"group"=>$data]);
|
$usergroup=$this->getDoctrine()->getRepository("CadolesCoreBundle:UserGroup")->findOneBy(["user"=>$this->getUser(),"group"=>$data]);
|
||||||
if($usergroup) $fgmanager=$usergroup->getFgmanager();
|
if($usergroup) $fgcanmanage=($usergroup->getRolegroup()>=90);
|
||||||
|
|
||||||
// Modification possible uniquement si l'utilisateur est propriétaire du groupe
|
// Modification possible uniquement si l'utilisateur est propriétaire du groupe
|
||||||
if($fgproprio) {
|
if($fgcanupdate) {
|
||||||
$action .="<a href='".$this->generateUrl('cadoles_core_'.$access.'_group_update', array('id'=>$data->getId()))."'><i class='fa fa-file fa-2x fa-fw'></i></a>";
|
$action .="<a href='".$this->generateUrl('cadoles_core_'.$access.'_group_update', array('id'=>$data->getId()))."'><i class='fa fa-file fa-2x fa-fw'></i></a>";
|
||||||
$action .="<a href='".$this->generateUrl('cadoles_core_'.$access.'_group_delete', array('id'=>$data->getId()))."'><i class='fa fa-trash fa-2x fa-fw'></i></a>";
|
$action .="<a href='".$this->generateUrl('cadoles_core_'.$access.'_group_delete', array('id'=>$data->getId()))."'><i class='fa fa-trash fa-2x fa-fw'></i></a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gestion des utilisateurs du groupe uniquement pour le proprio ou les managers
|
// Gestion des utilisateurs du groupe uniquement pour le proprio ou les managers
|
||||||
if($fgproprio||$fgmanager) {
|
if($fgcanupdate||$fgcanmanage) {
|
||||||
$action .="<a href='".$this->generateUrl('cadoles_core_'.$access.'_group_users', array('id'=>$data->getId()))."'><i class='fa fa-users fa-2x fa-fw'></i></a>";
|
$action .="<a href='".$this->generateUrl('cadoles_core_'.$access.'_group_users', array('id'=>$data->getId()))."'><i class='fa fa-users fa-2x fa-fw'></i></a>";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$action.="<a href='".$this->generateUrl('cadoles_core_'.$access.'_group_out', array('id'=>$data->getId()))."'><i class='fa fa-sign-out fa-fw fa-2x'></i></a>";
|
// On ne peut se désinscrire que si le groupe est ouvert et qu'il n'est pas lié à un groupe ldap ou sso
|
||||||
|
$fgcanleave=true;
|
||||||
|
if($data->getFgtemplate() or $data->getFgall()) $fgcanleave=false;
|
||||||
|
elseif(!$data->getFgcanshare() && !$data->getFgopen()) $fgcanleave=false;
|
||||||
|
elseif($data->getFgcanshare() && !$this->get('session')->get('permunsubscribe') && !$data->getFgopen()) $fgcanleave=false;
|
||||||
|
if($fgcanleave) $action.="<a href='".$this->generateUrl('cadoles_core_'.$access.'_group_out', array('id'=>$data->getId()))."'><i class='fa fa-sign-out-alt fa-fw fa-2x'></i></a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if($data->getFgcanshare())
|
if($data->getFgcanshare())
|
||||||
$action.="<a href='".$this->generateUrl('cadoles_core_'.$access.'_group_statistic', array('id'=>$data->getId()))."'><i class='fa fa-bar-chart-o fa-fw fa-2x'></i></a>";
|
$action.="<a href='".$this->generateUrl('cadoles_core_'.$access.'_group_statistic', array('id'=>$data->getId()))."'><i class='fa fa-chart-area fa-fw fa-2x'></i></a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -217,6 +222,12 @@ class GroupController extends Controller
|
|||||||
$userinfo.="<br>".$data->getOwner()->getUsername();
|
$userinfo.="<br>".$data->getOwner()->getUsername();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$visitecpt="";
|
||||||
|
$visitelast=null;
|
||||||
|
foreach($data->getUsers() as $usergroup) {
|
||||||
|
$visitecpt+=$usergroup->getVisitecpt();
|
||||||
|
$visitelast=($usergroup->getVisitedate()>$visitelast?$usergroup->getVisitedate():$visitelast);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
array_push($output["data"],array(
|
array_push($output["data"],array(
|
||||||
@ -227,6 +238,7 @@ class GroupController extends Controller
|
|||||||
$filtre,
|
$filtre,
|
||||||
($data->getFgcanshare()?"oui":"non"),
|
($data->getFgcanshare()?"oui":"non"),
|
||||||
$userinfo,
|
$userinfo,
|
||||||
|
($visitelast?$visitelast->format("d/m/Y H:i")."<br>":"")."nb = ".$visitecpt,
|
||||||
($data->getFgcancreatepage()?"oui":"non"),
|
($data->getFgcancreatepage()?"oui":"non"),
|
||||||
($data->getFgcancreatecalendar()?"oui":"non"),
|
($data->getFgcancreatecalendar()?"oui":"non"),
|
||||||
($data->getFgcancreateblog()?"oui":"non"),
|
($data->getFgcancreateblog()?"oui":"non"),
|
||||||
@ -358,12 +370,10 @@ class GroupController extends Controller
|
|||||||
if($group->getLdapfilter()==""&&$group->getAttributes()=="")
|
if($group->getLdapfilter()==""&&$group->getAttributes()=="")
|
||||||
$action.="<a style='cursor:pointer' onClick='addUsers(".$data->getId().")'><i class='fa fa-plus fa-fw'></i></a>";
|
$action.="<a style='cursor:pointer' onClick='addUsers(".$data->getId().")'><i class='fa fa-plus fa-fw'></i></a>";
|
||||||
|
|
||||||
$fgmanager="<input type='checkbox' class='switch' onChange='switchManager(".$data->getId().");'>";
|
|
||||||
|
|
||||||
// Avatar
|
// Avatar
|
||||||
$avatar="<img onClick='seeUser(".$data->getId().")' src='/".$this->container->getParameter('alias')."/uploads/avatar/".$data->getAvatar()."' style='width:30px;background-color:#337ab7;margin:auto;display:block;cursor:pointer;'>";
|
$avatar="<img onClick='seeUser(".$data->getId().")' src='/".$this->container->getParameter('alias')."/uploads/avatar/".$data->getAvatar()."' style='width:30px;background-color:#337ab7;margin:auto;display:block;cursor:pointer;'>";
|
||||||
|
|
||||||
array_push($output["data"],array("DT_RowId"=>"user".$data->getId(),$action,$avatar,$data->getUsername(),$data->getEmail(),"",$fgmanager));
|
array_push($output["data"],array("DT_RowId"=>"user".$data->getId(),$action,$avatar,$data->getUsername(),$data->getEmail(),"",""));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retour
|
// Retour
|
||||||
@ -482,6 +492,14 @@ class GroupController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
$datas=$qb->setFirstResult($start)->setMaxResults($length)->getQuery()->getResult();
|
$datas=$qb->setFirstResult($start)->setMaxResults($length)->getQuery()->getResult();
|
||||||
|
$user=$this->getUser();
|
||||||
|
|
||||||
|
$config=$em->getRepository('CadolesCoreBundle:Config')->find("datausers");
|
||||||
|
$fields=$config->getValue();
|
||||||
|
$fields=json_decode($fields,true);
|
||||||
|
if(!is_array($fields)) $fields=[];
|
||||||
|
if(!array_key_exists("visite",$fields)) $fields["visite"]["perm"]=0;
|
||||||
|
$fgviewvisite=($fields["visite"]["perm"]==1);
|
||||||
|
|
||||||
foreach($datas as $data) {
|
foreach($datas as $data) {
|
||||||
// Propriétaire
|
// Propriétaire
|
||||||
@ -497,22 +515,32 @@ class GroupController extends Controller
|
|||||||
$avatar="<img onClick='seeUser(".$data->getId().")' src='/".$this->container->getParameter('alias')."/uploads/avatar/".$data->getAvatar()."' style='width:30px;background-color:#337ab7;margin:auto;display:block;cursor:pointer'>";
|
$avatar="<img onClick='seeUser(".$data->getId().")' src='/".$this->container->getParameter('alias')."/uploads/avatar/".$data->getAvatar()."' style='width:30px;background-color:#337ab7;margin:auto;display:block;cursor:pointer'>";
|
||||||
|
|
||||||
// Flag manager
|
// Flag manager
|
||||||
$fgmanager="";
|
$rolegroup="";
|
||||||
if($fgcanshare) {
|
if($fgcanshare) {
|
||||||
|
if($fgproprio) $rolegroup="Propriétaire du groupe";
|
||||||
|
elseif($user==$usergroup->getUser()) $rolegroup="Gestionnaire";
|
||||||
|
else {
|
||||||
|
$selectuser=($usergroup->getRolegroup()==0?"selected='selected'":"");
|
||||||
|
$selectwritter=($usergroup->getRolegroup()==50?"selected='selected'":"");
|
||||||
|
$selectmanager=($usergroup->getRolegroup()==90?"selected='selected'":"");
|
||||||
|
|
||||||
$checked=($usergroup->getFgmanager()?"checked":"");
|
$rolegroup='<select id="roleuser-'.$data->getId().'" name="user[visible]" onChange="changeRole('.$data->getId().');"><option value="0" '.$selectuser.'>Utilisateur</option><option value="50" '.$selectwritter.'>Collaborateur</option><option value="90" '.$selectmanager.'>Gestionnaire</option></select>';
|
||||||
$fgmanager="<input type='checkbox' class='switch' onChange='switchManager(".$data->getId().");' $checked>";
|
}
|
||||||
if($fgproprio) $fgmanager="Propriétaire du groupe";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Visite
|
// Visite
|
||||||
$visite="";
|
if($fgviewvisite) {
|
||||||
if($usergroup->getVisitedate()) {
|
$visite="";
|
||||||
$visite=$usergroup->getVisitedate()->format("d/m/Y H:i")."<br>nb = ".$usergroup->getVisitecpt();
|
if($usergroup->getVisitedate()) {
|
||||||
|
$visite=$usergroup->getVisitedate()->format("d/m/Y H:i")."<br>nb = ".$usergroup->getVisitecpt();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
if($fgviewvisite)
|
||||||
|
$tmp=array("DT_RowId"=>"user".$data->getId(),$action,$avatar,$data->getUsername(),$data->getEmail(),$visite,$rolegroup);
|
||||||
|
else
|
||||||
|
$tmp=array("DT_RowId"=>"user".$data->getId(),$action,$avatar,$data->getUsername(),$data->getEmail(),$rolegroup);
|
||||||
|
|
||||||
array_push($output["data"],array("DT_RowId"=>"user".$data->getId(),$action,$avatar,$data->getUsername(),$data->getEmail(),$visite,$fgmanager));
|
array_push($output["data"],$tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retour
|
// Retour
|
||||||
@ -545,11 +573,12 @@ class GroupController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
$key = Uuid::uuid4();
|
$key = Uuid::uuid4();
|
||||||
$usergroup=new Usergroup;
|
$usergroup=new UserGroup();
|
||||||
$user=$em->getRepository("CadolesCoreBundle:User")->find($userid);
|
$user=$em->getRepository("CadolesCoreBundle:User")->find($userid);
|
||||||
$usergroup->setUser($user);
|
$usergroup->setUser($user);
|
||||||
$usergroup->setGroup($group);
|
$usergroup->setGroup($group);
|
||||||
$usergroup->setKeyvalue($key);
|
$usergroup->setKeyvalue($key);
|
||||||
|
$usergroup->setRolegroup(0);
|
||||||
$em->persist($usergroup);
|
$em->persist($usergroup);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
@ -559,7 +588,7 @@ class GroupController extends Controller
|
|||||||
$websocket = $this->container->get('cadoles.websocket.pushmessage')->send($key->toString(),$userid,$groupid,$message);
|
$websocket = $this->container->get('cadoles.websocket.pushmessage')->send($key->toString(),$userid,$groupid,$message);
|
||||||
|
|
||||||
// Notification mail auprès de la personne inscrite
|
// Notification mail auprès de la personne inscrite
|
||||||
if($group->getFgcanshare()) {
|
if($group->getFgcanshare()&&$this->get('session')->get('fgnotifgroup')) {
|
||||||
$idpage =$group->getPages()->first()->getId();
|
$idpage =$group->getPages()->first()->getId();
|
||||||
$url = $this->generateUrl('cadoles_core_redirect', ["route"=>"cadoles_core_home","id"=>$idpage], UrlGeneratorInterface::ABSOLUTE_URL);
|
$url = $this->generateUrl('cadoles_core_redirect', ["route"=>"cadoles_core_home","id"=>$idpage], UrlGeneratorInterface::ABSOLUTE_URL);
|
||||||
$texthtml="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel()."<br>Suivez le lien suivant pour y accéder = <a href='$url'>$url</a>";
|
$texthtml="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel()."<br>Suivez le lien suivant pour y accéder = <a href='$url'>$url</a>";
|
||||||
@ -613,7 +642,7 @@ class GroupController extends Controller
|
|||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
// Notification mail auprès des managers
|
// Notification mail auprès des managers
|
||||||
if($group->getFgcanshare()) {
|
if($group->getFgcanshare()&&$this->get('session')->get('fgnotifgroup')) {
|
||||||
$text=$user->getUsername()." a été désinscrit du groupe de travail : ".$group->getLabel();
|
$text=$user->getUsername()." a été désinscrit du groupe de travail : ".$group->getLabel();
|
||||||
$template="template";
|
$template="template";
|
||||||
$mail_params=array(
|
$mail_params=array(
|
||||||
@ -621,10 +650,11 @@ class GroupController extends Controller
|
|||||||
"body_html"=>nl2br($text),
|
"body_html"=>nl2br($text),
|
||||||
"body_text"=>$text
|
"body_text"=>$text
|
||||||
);
|
);
|
||||||
$managers=$em->getRepository("CadolesCoreBundle:Usergroup")->findBy(array("group"=>$groupid,"fgmanager"=>true));
|
$usergroups=$em->getRepository("CadolesCoreBundle:Usergroup")->findBy(array("group"=>$groupid));
|
||||||
$to=array();
|
$to=array();
|
||||||
foreach($managers as $manager) {
|
foreach($usergroups as $usergroup) {
|
||||||
array_push($to,$manager->getUser()->getEmail());
|
if($usergroup->getRolegroup()>=90)
|
||||||
|
array_push($to,$usergroup->getUser()->getEmail());
|
||||||
}
|
}
|
||||||
|
|
||||||
$from = $this->getParameter('noreply');;
|
$from = $this->getParameter('noreply');;
|
||||||
@ -658,7 +688,7 @@ class GroupController extends Controller
|
|||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
// Notification mail auprès des managers
|
// Notification mail auprès des managers
|
||||||
if($group->getFgcanshare()) {
|
if($group->getFgcanshare()&&$this->get('session')->get('fgnotifgroup')) {
|
||||||
$text=$user->getUsername()." a été désinscrit du groupe de travail : ".$group->getLabel();
|
$text=$user->getUsername()." a été désinscrit du groupe de travail : ".$group->getLabel();
|
||||||
$template="template";
|
$template="template";
|
||||||
$mail_params=array(
|
$mail_params=array(
|
||||||
@ -666,10 +696,11 @@ class GroupController extends Controller
|
|||||||
"body_html"=>nl2br($text),
|
"body_html"=>nl2br($text),
|
||||||
"body_text"=>$text
|
"body_text"=>$text
|
||||||
);
|
);
|
||||||
$managers=$em->getRepository("CadolesCoreBundle:Usergroup")->findBy(array("group"=>$group,"fgmanager"=>true));
|
$usergroups=$em->getRepository("CadolesCoreBundle:Usergroup")->findBy(array("group"=>$group));
|
||||||
$to=array();
|
$to=array();
|
||||||
foreach($managers as $manager) {
|
foreach($usergroups as $usergroup) {
|
||||||
array_push($to,$manager->getUser()->getEmail());
|
if($usergroup->getRolegroup()>=90)
|
||||||
|
array_push($to,$usergroup->getUser()->getEmail());
|
||||||
}
|
}
|
||||||
|
|
||||||
$from = $this->getParameter('noreply');;
|
$from = $this->getParameter('noreply');;
|
||||||
@ -683,7 +714,7 @@ class GroupController extends Controller
|
|||||||
return $this->redirect($this->generateUrl("cadoles_core_user_group"));
|
return $this->redirect($this->generateUrl("cadoles_core_user_group"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function switchmanagerAction(Request $request,$access="config")
|
public function changeroleAction(Request $request,$access="config")
|
||||||
{
|
{
|
||||||
// S'assurer que c'est un appel ajax
|
// S'assurer que c'est un appel ajax
|
||||||
if (!$request->isXmlHttpRequest()) {
|
if (!$request->isXmlHttpRequest()) {
|
||||||
@ -695,12 +726,13 @@ class GroupController extends Controller
|
|||||||
$output=array();
|
$output=array();
|
||||||
$userid=$request->request->get('user');
|
$userid=$request->request->get('user');
|
||||||
$groupid=$request->request->get('group');
|
$groupid=$request->request->get('group');
|
||||||
|
$role=$request->request->get('role');
|
||||||
|
|
||||||
$group=$em->getRepository("CadolesCoreBundle:Group")->find($groupid);
|
$group=$em->getRepository("CadolesCoreBundle:Group")->find($groupid);
|
||||||
$this->canManager($group,$access);
|
$this->canManager($group,$access);
|
||||||
|
|
||||||
$data = $em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(array("user"=>$userid,"group"=>$groupid));
|
$data = $em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(array("user"=>$userid,"group"=>$groupid));
|
||||||
if($data) $data->setFgmanager(!$data->getFgmanager());
|
if($data) $data->setRolegroup($role);
|
||||||
|
|
||||||
$em->persist($data);
|
$em->persist($data);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
@ -856,7 +888,7 @@ class GroupController extends Controller
|
|||||||
$this->ctrlFgcanshare($data,$access);
|
$this->ctrlFgcanshare($data,$access);
|
||||||
|
|
||||||
// Si le propriétaire change de main on prévient le nouveau propriétaire
|
// Si le propriétaire change de main on prévient le nouveau propriétaire
|
||||||
if($data->getOwner()&&$data->getOwner()!=$oldowner) {
|
if($data->getOwner()&&$data->getOwner()!=$oldowner&&$this->get('session')->get('fgnotifgroup')) {
|
||||||
// Email à destination de l'inscript pour le prévenir qu'un administrateur doit valider
|
// Email à destination de l'inscript pour le prévenir qu'un administrateur doit valider
|
||||||
$text="On vient de vous tranférer la propriété du groupe ".$data->getLabel();
|
$text="On vient de vous tranférer la propriété du groupe ".$data->getLabel();
|
||||||
$template="template";
|
$template="template";
|
||||||
@ -999,6 +1031,14 @@ class GroupController extends Controller
|
|||||||
// idreturn ?
|
// idreturn ?
|
||||||
$idreturn=$request->get("idreturn");
|
$idreturn=$request->get("idreturn");
|
||||||
|
|
||||||
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
$config=$em->getRepository('CadolesCoreBundle:Config')->find("datausers");
|
||||||
|
$fields=$config->getValue();
|
||||||
|
$fields=json_decode($fields,true);
|
||||||
|
if(!is_array($fields)) $fields=[];
|
||||||
|
if(!array_key_exists("visite",$fields)) $fields["visite"]["perm"]=0;
|
||||||
|
$fgviewvisite=($fields["visite"]["perm"]==1);
|
||||||
|
|
||||||
// Affichage du formulaire
|
// Affichage du formulaire
|
||||||
return $this->render($this->labelentity.':users.html.twig', [
|
return $this->render($this->labelentity.':users.html.twig', [
|
||||||
'useheader' => true,
|
'useheader' => true,
|
||||||
@ -1007,9 +1047,65 @@ class GroupController extends Controller
|
|||||||
'access' => $access,
|
'access' => $access,
|
||||||
$this->labeldata => $data,
|
$this->labeldata => $data,
|
||||||
'idreturn' => $idreturn,
|
'idreturn' => $idreturn,
|
||||||
|
'fgviewvisite' => $fgviewvisite,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function groupexportAction(Request $request, $access="config")
|
||||||
|
{
|
||||||
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
$dir = $this->get('kernel')->getRootDir() . '/../uploads/export/';
|
||||||
|
$file = "exportgroup.csv";
|
||||||
|
|
||||||
|
$fs = new Filesystem();
|
||||||
|
$fs->mkdir($dir);
|
||||||
|
|
||||||
|
$csvh = fopen($dir.$file, 'w');
|
||||||
|
$d = ';'; // this is the default but i like to be explicit
|
||||||
|
$e = '"'; // this is the default but i like to be explicit
|
||||||
|
|
||||||
|
// Entête de colonne
|
||||||
|
$data=["id","Label","Ouvert","Groupe de Travail","Propriétaire","Date Visite","Cpt Visite","Création Page","Création Calendriers","Création Blogs","Création Projets"];
|
||||||
|
fputcsv($csvh, $data, $d, $e);
|
||||||
|
|
||||||
|
// Liste des utilisateurs en fonction du role de l'utilisateur en cours
|
||||||
|
$groups=$em->getRepository("CadolesCoreBundle:Group")->findAll();
|
||||||
|
|
||||||
|
foreach($groups as $group) {
|
||||||
|
$data = [
|
||||||
|
"id"=>$group->getId(),
|
||||||
|
"label"=>$group->getLabel(),
|
||||||
|
"fgopen"=>($group->getFgopen()?"oui":"non"),
|
||||||
|
"fgcanshare"=>($group->getFgcanshare()?"oui":"non"),
|
||||||
|
"owner"=>($group->getOwner()?$group->getOwner()->getUsername():""),
|
||||||
|
"visitedate"=>"",
|
||||||
|
"visitecpt"=>"",
|
||||||
|
"fgcancreatepage"=>($group->getFgcancreatepage()?"oui":"non"),
|
||||||
|
"fgcancreatecalendar"=>($group->getFgcancreatecalendar()?"oui":"non"),
|
||||||
|
"fgcancreateblog"=>($group->getFgcancreateblog()?"oui":"non"),
|
||||||
|
"fgcancreateproject"=>($group->getFgcancreateproject()?"oui":"non"),
|
||||||
|
];
|
||||||
|
|
||||||
|
$visitecpt="";
|
||||||
|
$visitelast=null;
|
||||||
|
foreach($group->getUsers() as $usergroup) {
|
||||||
|
$visitecpt+=$usergroup->getVisitecpt();
|
||||||
|
$visitelast=($usergroup->getVisitedate()>$visitelast?$usergroup->getVisitedate():$visitelast);
|
||||||
|
}
|
||||||
|
|
||||||
|
$data["visitedate"]=($visitelast?$visitelast->format("d/m/Y H:i"):"");
|
||||||
|
$data["visitecpt"]=$visitecpt;
|
||||||
|
|
||||||
|
fputcsv($csvh, $data, $d, $e);
|
||||||
|
}
|
||||||
|
fclose($csvh);
|
||||||
|
|
||||||
|
$response = new BinaryFileResponse($dir.$file);
|
||||||
|
$response->setContentDisposition(ResponseHeaderBag::DISPOSITION_ATTACHMENT);
|
||||||
|
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
public function usergroupexportAction($id,Request $request, $access="config")
|
public function usergroupexportAction($id,Request $request, $access="config")
|
||||||
{
|
{
|
||||||
// Récupération de l'enregistrement courant
|
// Récupération de l'enregistrement courant
|
||||||
@ -1131,11 +1227,51 @@ class GroupController extends Controller
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function invitationAction($id,Request $request, $access="config")
|
||||||
|
{
|
||||||
|
// Récupération de l'enregistrement courant
|
||||||
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
$group=$this->getData($id);
|
||||||
|
$this->canManager($group,$access);
|
||||||
|
|
||||||
|
$invitations=$group->getInvitations();
|
||||||
|
if(!is_array($invitations)) $invitations=[];
|
||||||
|
|
||||||
|
foreach($invitations as $key => $mail) {
|
||||||
|
$user=$em->getRepository("CadolesCoreBundle:User")->findOneBy(["email"=>$mail]);
|
||||||
|
// Si l'utilisateur est inscript plus la peine de le suivre
|
||||||
|
if($user) {
|
||||||
|
$listinvitations[$key]=["email"=>$mail,"statut"=>"","relance"=>false];
|
||||||
|
$usergroup=$em->getRepository("CadolesCoreBundle:UserGroup")->findOneBy(["user"=>$user,"group"=>$group]);
|
||||||
|
if($usergroup)
|
||||||
|
$listinvitations[$key]["statut"]="Inscrit dans le groupe";
|
||||||
|
else
|
||||||
|
$listinvitations[$key]["statut"]="Inscrit sur ".$this->get('session')->get('appname')." mais pas dans le groupe";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$listinvitations[$key]=["email"=>$mail,"statut"=>"Non inscrit sur ".$this->get('session')->get('appname'),"relance"=>true];
|
||||||
|
$user=$em->getRepository("CadolesCoreBundle:Registration")->findOneBy(["email"=>$mail]);
|
||||||
|
if($user) {
|
||||||
|
$listinvitations[$key]["statut"]=$user->getStatut()->getLabel();
|
||||||
|
$listinvitations[$key]["relance"]=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->render('CadolesCoreBundle:Group:invitations.html.twig',[
|
||||||
|
'useheader' => false,
|
||||||
|
'usemenu' => false,
|
||||||
|
'usesidebar' => false,
|
||||||
|
'id' => $id,
|
||||||
|
'invitations' => $listinvitations,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
protected function canManager($group,$access) {
|
protected function canManager($group,$access) {
|
||||||
if($access!="config") {
|
if($access!="config") {
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$ismanager=$em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(["group"=>$group,"user"=>$this->getUser(),"fgmanager"=>true]);
|
$user=$em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(["group"=>$group,"user"=>$this->getUser()]);
|
||||||
if(!$ismanager)
|
if(!$user||$user->getRolegroup()<90)
|
||||||
throw $this->createNotFoundException('Permission denied');
|
throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1151,19 +1287,27 @@ class GroupController extends Controller
|
|||||||
|
|
||||||
protected function ctrlOwner($group) {
|
protected function ctrlOwner($group) {
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
// Le propriétaire passe manager
|
||||||
|
$usergroups=$em->getRepository("CadolesCoreBundle:Usergroup")->findBy(["group"=>$group,"rolegroup"=>"100"]);
|
||||||
|
foreach($usergroups as $usergroup) {
|
||||||
|
$usergroup->setRolegroup(90);
|
||||||
|
$em->persist($usergroup);
|
||||||
|
$em->flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Le propriétaire prend son role dans le groupe
|
||||||
if($group->getOwner()) {
|
if($group->getOwner()) {
|
||||||
$usergroup=$em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(["group"=>$group,"user"=>$group->getOwner()]);
|
$usergroup=$em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(["group"=>$group,"user"=>$group->getOwner()]);
|
||||||
if(!$usergroup) {
|
if(!$usergroup) {
|
||||||
$key = Uuid::uuid4();
|
$key = Uuid::uuid4();
|
||||||
$usergroup=new Usergroup;
|
$usergroup=new UserGroup();
|
||||||
$usergroup->setUser($group->getOwner());
|
$usergroup->setUser($group->getOwner());
|
||||||
$usergroup->setGroup($group);
|
$usergroup->setGroup($group);
|
||||||
$usergroup->setKeyvalue($key);
|
$usergroup->setKeyvalue($key);
|
||||||
}
|
}
|
||||||
$usergroup->setFgmanager(true);
|
$usergroup->setRolegroup(100);
|
||||||
$em->persist($usergroup);
|
$em->persist($usergroup);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,6 +23,10 @@ class MailController extends Controller
|
|||||||
throw $this->createNotFoundException('Unable to find '.$this->labeldata);
|
throw $this->createNotFoundException('Unable to find '.$this->labeldata);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// On récupère la liste des email invités
|
||||||
|
$invitations=$group->getInvitations();
|
||||||
|
if(!is_array($invitations)) $invitations=[];
|
||||||
|
|
||||||
// Création du formulaire
|
// Création du formulaire
|
||||||
$form = $this->createForm(MailType::class);
|
$form = $this->createForm(MailType::class);
|
||||||
|
|
||||||
@ -34,7 +38,7 @@ class MailController extends Controller
|
|||||||
|
|
||||||
// Sujet
|
// Sujet
|
||||||
$url = $this->generateUrl('cadoles_core_registration',[], UrlGeneratorInterface::ABSOLUTE_URL)."?group=".$group->getId();
|
$url = $this->generateUrl('cadoles_core_registration',[], UrlGeneratorInterface::ABSOLUTE_URL)."?group=".$group->getId();
|
||||||
$message = "Bonjour,<br><br>En tant que responsable du projet <b>'".$group->getLabel()."'</b>, je vous ai invité à rejoindre cette communauté de travail<br><br>";
|
$message = "Bonjour,<br><br>En tant que responsable du groupe <b>'".$group->getLabel()."'</b>, je vous ai invité à rejoindre cette communauté de travail<br><br>";
|
||||||
$message.= "Merci de bien vouloir tout d’abord vous inscrire sur <b>".$this->get('session')->get('appname')."</b> en suivant le lien suivant<br>";
|
$message.= "Merci de bien vouloir tout d’abord vous inscrire sur <b>".$this->get('session')->get('appname')."</b> en suivant le lien suivant<br>";
|
||||||
$message.= "<a href='$url'>$url</a><br><br>";
|
$message.= "<a href='$url'>$url</a><br><br>";
|
||||||
$message.= "Une fois le processus d'inscription complété, vous serez automatiquement rattaché à notre groupe de travail<br><br>";
|
$message.= "Une fois le processus d'inscription complété, vous serez automatiquement rattaché à notre groupe de travail<br><br>";
|
||||||
@ -64,8 +68,15 @@ class MailController extends Controller
|
|||||||
if($usergroup) array_push($usersin,$user);
|
if($usergroup) array_push($usersin,$user);
|
||||||
else array_push($usersnotin,$user);
|
else array_push($usersnotin,$user);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
// On enregistre l'invitation si elle n'existe pas déjà
|
||||||
|
if(!in_array($mail,$invitations)) {
|
||||||
|
array_push($invitations,$mail);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$text=$form->get("message")->getData();
|
$text=$form->get("message")->getData();
|
||||||
$subject=$form->get("subject")->getData();
|
$subject=$form->get("subject")->getData();
|
||||||
$template="template";
|
$template="template";
|
||||||
@ -78,6 +89,17 @@ class MailController extends Controller
|
|||||||
$fromName = $this->getUser()->getFirstname()." ".$this->getUser()->getLastname();
|
$fromName = $this->getUser()->getFirstname()." ".$this->getUser()->getLastname();
|
||||||
$message = $this->container->get('cadoles.core.service.mail');
|
$message = $this->container->get('cadoles.core.service.mail');
|
||||||
$message->sendEmail($template, $mail_params, $to, $from, $fromName);
|
$message->sendEmail($template, $mail_params, $to, $from, $fromName);
|
||||||
|
|
||||||
|
// Sauvegarde des invitation
|
||||||
|
$group->setInvitations($invitations);
|
||||||
|
$em->persist($group);
|
||||||
|
$em->flush();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$email=$request->get("email");
|
||||||
|
if($email) {
|
||||||
|
$form->get('destinataire')->setData($email);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($closed && (!empty($usersin)||!empty($usersnotin))) {
|
if($closed && (!empty($usersin)||!empty($usersnotin))) {
|
||||||
|
@ -331,8 +331,15 @@ class PermmodoprofilController extends Controller
|
|||||||
$this->addModeration($profil,'cadoles_portal_config_flux',1);
|
$this->addModeration($profil,'cadoles_portal_config_flux',1);
|
||||||
$this->addModeration($profil,'cadoles_portal_config_notice',1);
|
$this->addModeration($profil,'cadoles_portal_config_notice',1);
|
||||||
$this->addModeration($profil,'cadoles_portal_config_icon',1);
|
$this->addModeration($profil,'cadoles_portal_config_icon',1);
|
||||||
|
$this->addModeration($profil,'cadoles_portal_config_syncbalado',0);
|
||||||
|
$this->addModeration($profil,'cadoles_portal_config_synccdt',0);
|
||||||
|
$this->addModeration($profil,'cadoles_portal_config_syncgepiannu',0);
|
||||||
|
$this->addModeration($profil,'cadoles_portal_config_syncgepisiecle',0);
|
||||||
$this->addModeration($profil,'cadoles_portal_config_synclimesurvey',0);
|
$this->addModeration($profil,'cadoles_portal_config_synclimesurvey',0);
|
||||||
$this->addModeration($profil,'cadoles_portal_config_syncmoodle',0);
|
$this->addModeration($profil,'cadoles_portal_config_syncmoodle',0);
|
||||||
|
$this->addModeration($profil,'cadoles_portal_config_syncnextcloud',0);
|
||||||
|
$this->addModeration($profil,'cadoles_portal_config_syncsacoche',0);
|
||||||
|
$this->addModeration($profil,'cadoles_portal_config_syncpiwik',0);
|
||||||
$this->addModeration($profil,'cadoles_portal_config_syncwordpress',0);
|
$this->addModeration($profil,'cadoles_portal_config_syncwordpress',0);
|
||||||
$this->addModeration($profil,'cadoles_core_config_statistic',1);
|
$this->addModeration($profil,'cadoles_core_config_statistic',1);
|
||||||
$this->addModeration($profil,'cadoles_core_config_mailing',1);
|
$this->addModeration($profil,'cadoles_core_config_mailing',1);
|
||||||
|
@ -212,7 +212,7 @@ class RegistrationController extends Controller
|
|||||||
// Sur erreur
|
// Sur erreur
|
||||||
$this->getErrorForm(null,$form,$request,$data,"submit",$idstatut);
|
$this->getErrorForm(null,$form,$request,$data,"submit",$idstatut);
|
||||||
|
|
||||||
// Sur validation(z)
|
// Sur validation
|
||||||
if ($form->get('submit')->isClicked() && $form->isValid()) {
|
if ($form->get('submit')->isClicked() && $form->isValid()) {
|
||||||
|
|
||||||
$data = $form->getData();
|
$data = $form->getData();
|
||||||
@ -342,6 +342,8 @@ class RegistrationController extends Controller
|
|||||||
// A voir retour sur un écran d'info indiquant si validation par admion ou s'il doit matter ses email
|
// A voir retour sur un écran d'info indiquant si validation par admion ou s'il doit matter ses email
|
||||||
$this->get('session')->set('registrationinfo', $info);
|
$this->get('session')->set('registrationinfo', $info);
|
||||||
$this->get('session')->set('registrationmode', "info");
|
$this->get('session')->set('registrationmode', "info");
|
||||||
|
$this->get('session')->set('registrationredirectto', null);
|
||||||
|
|
||||||
return $this->redirectToRoute('cadoles_core_registration_info');
|
return $this->redirectToRoute('cadoles_core_registration_info');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -360,12 +362,16 @@ class RegistrationController extends Controller
|
|||||||
{
|
{
|
||||||
$info = $this->get('session')->get('registrationinfo');
|
$info = $this->get('session')->get('registrationinfo');
|
||||||
$mode = $this->get('session')->get('registrationmode');
|
$mode = $this->get('session')->get('registrationmode');
|
||||||
|
$redirectto = $this->get('session')->get('registrationredirectto');
|
||||||
|
|
||||||
|
|
||||||
return $this->render($this->labelentity.':info.html.twig', [
|
return $this->render($this->labelentity.':info.html.twig', [
|
||||||
'useheader' => true,
|
'useheader' => true,
|
||||||
'usemenu' => false,
|
'usemenu' => false,
|
||||||
'usesidebar' => false,
|
'usesidebar' => false,
|
||||||
'info' => $info,
|
'info' => $info,
|
||||||
'mode' => $mode
|
'mode' => $mode,
|
||||||
|
'redirectto' => $redirectto,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -467,6 +473,7 @@ class RegistrationController extends Controller
|
|||||||
{
|
{
|
||||||
$moderegistration = $this->getParameter('moderegistration');
|
$moderegistration = $this->getParameter('moderegistration');
|
||||||
$masteridentity = $this->getParameter('masteridentity');
|
$masteridentity = $this->getParameter('masteridentity');
|
||||||
|
|
||||||
if($moderegistration=="none"||$masteridentity!="SQL")
|
if($moderegistration=="none"||$masteridentity!="SQL")
|
||||||
throw $this->createNotFoundException('Permission denied');
|
throw $this->createNotFoundException('Permission denied');
|
||||||
|
|
||||||
@ -489,6 +496,7 @@ class RegistrationController extends Controller
|
|||||||
|
|
||||||
$this->get('session')->set('registrationinfo', $info);
|
$this->get('session')->set('registrationinfo', $info);
|
||||||
$this->get('session')->set('registrationmode', $mode);
|
$this->get('session')->set('registrationmode', $mode);
|
||||||
|
$this->get('session')->set('registrationredirectto', null);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$url=$this->getUrlLogin();
|
$url=$this->getUrlLogin();
|
||||||
@ -509,6 +517,7 @@ class RegistrationController extends Controller
|
|||||||
$user->setPasswordDirect($data[0]->getPassword());
|
$user->setPasswordDirect($data[0]->getPassword());
|
||||||
$user->setVisible($data[0]->getVisible());
|
$user->setVisible($data[0]->getVisible());
|
||||||
$user->setMotivation($data[0]->getMotivation());
|
$user->setMotivation($data[0]->getMotivation());
|
||||||
|
$user->setNote($data[0]->getNote());
|
||||||
|
|
||||||
$user->setNiveau01($data[0]->getNiveau01());
|
$user->setNiveau01($data[0]->getNiveau01());
|
||||||
$user->setSiren($data[0]->getNiveau01()->getSiren());
|
$user->setSiren($data[0]->getNiveau01()->getSiren());
|
||||||
@ -538,16 +547,24 @@ class RegistrationController extends Controller
|
|||||||
|
|
||||||
// Si invitation à un groupe : on le rattache directement à ce groupe
|
// Si invitation à un groupe : on le rattache directement à ce groupe
|
||||||
$groupid=$data[0]->getGroupid();
|
$groupid=$data[0]->getGroupid();
|
||||||
|
|
||||||
$userid=$user->getId();
|
$userid=$user->getId();
|
||||||
if($groupid) {
|
if($groupid) {
|
||||||
$group=$em->getRepository("CadolesCoreBundle:Group")->find($groupid);
|
$group=$em->getRepository("CadolesCoreBundle:Group")->find($groupid);
|
||||||
if($group) {
|
if($group) {
|
||||||
|
$idpage =$group->getPages()->first()->getId();
|
||||||
|
$url = $this->generateUrl('cadoles_core_redirect', ["route"=>"cadoles_core_home","id"=>$idpage], UrlGeneratorInterface::ABSOLUTE_URL);
|
||||||
|
$info="<p>Votre compte est à présent activé</p><p>Vous allez être redirigé vers la mire de connexion puis vers votre groupe de travail</p><p><a href='".$url."'>Connexion</a>";
|
||||||
|
$this->get('session')->set('registrationinfo', $info);
|
||||||
|
$this->get('session')->set('registrationredirectto', $url);
|
||||||
|
|
||||||
$key = Uuid::uuid4();
|
$key = Uuid::uuid4();
|
||||||
$usergroup=new Usergroup;
|
$usergroup=new UserGroup();
|
||||||
$user=$em->getRepository("CadolesCoreBundle:User")->find($userid);
|
$user=$em->getRepository("CadolesCoreBundle:User")->find($userid);
|
||||||
$usergroup->setUser($user);
|
$usergroup->setUser($user);
|
||||||
$usergroup->setGroup($group);
|
$usergroup->setGroup($group);
|
||||||
$usergroup->setKeyvalue($key);
|
$usergroup->setKeyvalue($key);
|
||||||
|
$usergroup->setRolegroup(0);
|
||||||
$em->persist($usergroup);
|
$em->persist($usergroup);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
@ -686,6 +703,7 @@ class RegistrationController extends Controller
|
|||||||
$mode="info";
|
$mode="info";
|
||||||
$this->get('session')->set('registrationinfo', $info);
|
$this->get('session')->set('registrationinfo', $info);
|
||||||
$this->get('session')->set('registrationmode', $mode);
|
$this->get('session')->set('registrationmode', $mode);
|
||||||
|
$this->get('session')->set('registrationredirectto', null);
|
||||||
return $this->redirectToRoute('cadoles_core_registration_info');
|
return $this->redirectToRoute('cadoles_core_registration_info');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -700,9 +718,8 @@ class RegistrationController extends Controller
|
|||||||
|
|
||||||
public function resetpwd02Action($key,Request $request)
|
public function resetpwd02Action($key,Request $request)
|
||||||
{
|
{
|
||||||
$moderegistration = $this->getParameter('moderegistration');
|
|
||||||
$masteridentity = $this->getParameter('masteridentity');
|
$masteridentity = $this->getParameter('masteridentity');
|
||||||
if($moderegistration=="none"||$masteridentity!="SQL")
|
if($masteridentity!="SQL")
|
||||||
throw $this->createNotFoundException('Permission denied');
|
throw $this->createNotFoundException('Permission denied');
|
||||||
|
|
||||||
$now=new \DateTime();
|
$now=new \DateTime();
|
||||||
@ -723,6 +740,7 @@ class RegistrationController extends Controller
|
|||||||
$mode="danger";
|
$mode="danger";
|
||||||
$this->get('session')->set('registrationinfo', $info);
|
$this->get('session')->set('registrationinfo', $info);
|
||||||
$this->get('session')->set('registrationmode', $mode);
|
$this->get('session')->set('registrationmode', $mode);
|
||||||
|
$this->get('session')->set('registrationredirectto', null);
|
||||||
return $this->redirectToRoute('cadoles_core_registration_info');
|
return $this->redirectToRoute('cadoles_core_registration_info');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -782,6 +800,7 @@ class RegistrationController extends Controller
|
|||||||
$mode="success";
|
$mode="success";
|
||||||
$this->get('session')->set('registrationinfo', $info);
|
$this->get('session')->set('registrationinfo', $info);
|
||||||
$this->get('session')->set('registrationmode', $mode);
|
$this->get('session')->set('registrationmode', $mode);
|
||||||
|
$this->get('session')->set('registrationredirectto', null);
|
||||||
return $this->redirectToRoute('cadoles_core_registration_info');
|
return $this->redirectToRoute('cadoles_core_registration_info');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -872,7 +891,7 @@ class RegistrationController extends Controller
|
|||||||
$niveau01=strtolower($data->getNiveau01()->getLabel());
|
$niveau01=strtolower($data->getNiveau01()->getLabel());
|
||||||
if(stripos($niveau01,"autre")===0) {
|
if(stripos($niveau01,"autre")===0) {
|
||||||
if(!$data->getNiveau01other()) {
|
if(!$data->getNiveau01other()) {
|
||||||
$form->addError(new FormError("Merci d'indiquer votre ".$this->getParameter("labelniveau01")));
|
$form->addError(new FormError("Merci de compléter le champ 'Autre ".$this->getParameter("labelniveau01")."'"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,6 +46,7 @@ class SondeController extends Controller
|
|||||||
elseif($route=="cadoles_portal_user_page_view") {
|
elseif($route=="cadoles_portal_user_page_view") {
|
||||||
if($usage=="group") $usagesonde="collaboratif";
|
if($usage=="group") $usagesonde="collaboratif";
|
||||||
elseif($usage=="user") $usagesonde="collaboratif";
|
elseif($usage=="user") $usagesonde="collaboratif";
|
||||||
|
elseif($usage=="accueil") $usagesonde="accueil";
|
||||||
else $usagesonde="portail";
|
else $usagesonde="portail";
|
||||||
}
|
}
|
||||||
elseif(stripos($route,"cadoles_portal_user_calendar")!==false)
|
elseif(stripos($route,"cadoles_portal_user_calendar")!==false)
|
||||||
|
@ -366,8 +366,8 @@ class UserController extends Controller
|
|||||||
// Initialisation de l'enregistrement
|
// Initialisation de l'enregistrement
|
||||||
$data = new User();
|
$data = new User();
|
||||||
$data->setVisible(true);
|
$data->setVisible(true);
|
||||||
$data->setBelongingpopulation("authlevel");
|
|
||||||
$data->setAuthlevel("simple");
|
$data->setAuthlevel("simple");
|
||||||
|
$data->setBelongingpopulation("agent");
|
||||||
$fields=$this->getDefaultDatauser();
|
$fields=$this->getDefaultDatauser();
|
||||||
|
|
||||||
// Création du formulaire
|
// Création du formulaire
|
||||||
@ -419,6 +419,7 @@ class UserController extends Controller
|
|||||||
$datagroup = $group;
|
$datagroup = $group;
|
||||||
$usergroup->setGroup($datagroup);
|
$usergroup->setGroup($datagroup);
|
||||||
$usergroup->setKeyvalue($key);
|
$usergroup->setKeyvalue($key);
|
||||||
|
$usergroup->setRolegroup(0);
|
||||||
$em->persist($usergroup);
|
$em->persist($usergroup);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
}
|
}
|
||||||
@ -428,7 +429,7 @@ class UserController extends Controller
|
|||||||
$websocket = $this->container->get('cadoles.websocket.pushmessage')->send($key->toString(),$iduser,$idgroup,$message);
|
$websocket = $this->container->get('cadoles.websocket.pushmessage')->send($key->toString(),$iduser,$idgroup,$message);
|
||||||
|
|
||||||
// Notification mail auprès de la personne inscrite
|
// Notification mail auprès de la personne inscrite
|
||||||
if($group->getFgcanshare()) {
|
if($group->getFgcanshare()&&$this->get('session')->get('fgnotifgroup')) {
|
||||||
$idpage =$group->getPages()->first()->getId();
|
$idpage =$group->getPages()->first()->getId();
|
||||||
$url = $this->generateUrl('cadoles_core_redirect', ["route"=>"cadoles_core_home","id"=>$idpage], UrlGeneratorInterface::ABSOLUTE_URL);
|
$url = $this->generateUrl('cadoles_core_redirect', ["route"=>"cadoles_core_home","id"=>$idpage], UrlGeneratorInterface::ABSOLUTE_URL);
|
||||||
$texthtml="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel()."<br>Suivez le lien suivant pour y accéder = <a href='$url'>$url</a>";
|
$texthtml="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel()."<br>Suivez le lien suivant pour y accéder = <a href='$url'>$url</a>";
|
||||||
@ -488,6 +489,7 @@ class UserController extends Controller
|
|||||||
$oldpassword=$data->getPassword();
|
$oldpassword=$data->getPassword();
|
||||||
$fields=$this->getDefaultDatauser();
|
$fields=$this->getDefaultDatauser();
|
||||||
|
|
||||||
|
|
||||||
// Si un acces modo via console d'admin on s'assure qu'il a les droit dessus sinon retour à la liste
|
// Si un acces modo via console d'admin on s'assure qu'il a les droit dessus sinon retour à la liste
|
||||||
if($this->isGranted('ROLE_MODO')&&$access=="config") {
|
if($this->isGranted('ROLE_MODO')&&$access=="config") {
|
||||||
$niveau01=$data->getNiveau01();
|
$niveau01=$data->getNiveau01();
|
||||||
@ -569,6 +571,7 @@ class UserController extends Controller
|
|||||||
$datagroup = $group;
|
$datagroup = $group;
|
||||||
$usergroup->setGroup($datagroup);
|
$usergroup->setGroup($datagroup);
|
||||||
$usergroup->setKeyvalue($key);
|
$usergroup->setKeyvalue($key);
|
||||||
|
$usergroup->setRolegroup(0);
|
||||||
$em->persist($usergroup);
|
$em->persist($usergroup);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
}
|
}
|
||||||
@ -578,7 +581,7 @@ class UserController extends Controller
|
|||||||
$websocket = $this->container->get('cadoles.websocket.pushmessage')->send($key->toString(),$id,$idgroup,$message);
|
$websocket = $this->container->get('cadoles.websocket.pushmessage')->send($key->toString(),$id,$idgroup,$message);
|
||||||
|
|
||||||
// Notification mail auprès de la personne inscrite
|
// Notification mail auprès de la personne inscrite
|
||||||
if($group->getFgcanshare()) {
|
if($group->getFgcanshare()&&$this->get('session')->get('fgnotifgroup')) {
|
||||||
$idpage =$group->getPages()->first()->getId();
|
$idpage =$group->getPages()->first()->getId();
|
||||||
$url = $this->generateUrl('cadoles_core_redirect', ["route"=>"cadoles_core_home","id"=>$idpage], UrlGeneratorInterface::ABSOLUTE_URL);
|
$url = $this->generateUrl('cadoles_core_redirect', ["route"=>"cadoles_core_home","id"=>$idpage], UrlGeneratorInterface::ABSOLUTE_URL);
|
||||||
$texthtml="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel()."<br>Suivez le lien suivant pour y accéder = <a href='$url'>$url</a>";
|
$texthtml="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel()."<br>Suivez le lien suivant pour y accéder = <a href='$url'>$url</a>";
|
||||||
@ -621,7 +624,7 @@ class UserController extends Controller
|
|||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
// Notification mail auprès des managers
|
// Notification mail auprès des managers
|
||||||
if($group->getFgcanshare()) {
|
if($group->getFgcanshare()&&$this->get('session')->get('fgnotifgroup')) {
|
||||||
$text=$data->getUsername()." a été désinscrit du groupe de travail : ".$group->getLabel();
|
$text=$data->getUsername()." a été désinscrit du groupe de travail : ".$group->getLabel();
|
||||||
$template="template";
|
$template="template";
|
||||||
$mail_params=array(
|
$mail_params=array(
|
||||||
@ -629,12 +632,14 @@ class UserController extends Controller
|
|||||||
"body_html"=>nl2br($text),
|
"body_html"=>nl2br($text),
|
||||||
"body_text"=>$text
|
"body_text"=>$text
|
||||||
);
|
);
|
||||||
$managers=$em->getRepository("CadolesCoreBundle:Usergroup")->findBy(array("group"=>$group,"fgmanager"=>true));
|
$usergroups=$em->getRepository("CadolesCoreBundle:Usergroup")->findBy(array("group"=>$group));
|
||||||
$to=array();
|
$to=array();
|
||||||
foreach($managers as $manager) {
|
foreach($usergroups as $usergroup) {
|
||||||
array_push($to,$manager->getUser()->getEmail());
|
if($usergroup->getRolegroup()>=90)
|
||||||
|
array_push($to,$usergroup->getUser()->getEmail());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$from = $this->getParameter('noreply');;
|
$from = $this->getParameter('noreply');;
|
||||||
$fromName = $this->get('session')->get('appname');
|
$fromName = $this->get('session')->get('appname');
|
||||||
$message = $this->container->get('cadoles.core.service.mail');
|
$message = $this->container->get('cadoles.core.service.mail');
|
||||||
@ -837,12 +842,15 @@ class UserController extends Controller
|
|||||||
public function viewAction($id, Request $request)
|
public function viewAction($id, Request $request)
|
||||||
{
|
{
|
||||||
$user=$this->getData($id);
|
$user=$this->getData($id);
|
||||||
|
$fields=$this->getDefaultDatausers();
|
||||||
|
|
||||||
return $this->render('CadolesCoreBundle:User:view.html.twig', [
|
return $this->render('CadolesCoreBundle:User:view.html.twig', [
|
||||||
'useheader' => false,
|
'useheader' => false,
|
||||||
'usemenu' => false,
|
'usemenu' => false,
|
||||||
'usesidebar' => false,
|
'usesidebar' => false,
|
||||||
"user" => $user
|
'user' => $user,
|
||||||
|
'fields' => $fields,
|
||||||
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -918,7 +926,7 @@ class UserController extends Controller
|
|||||||
public function exportuserAction(Request $request) {
|
public function exportuserAction(Request $request) {
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$dir = $this->get('kernel')->getRootDir() . '/../uploads/export/';
|
$dir = $this->get('kernel')->getRootDir() . '/../uploads/export/';
|
||||||
$file = "export.csv";
|
$file = "exportuser.csv";
|
||||||
|
|
||||||
$fs = new Filesystem();
|
$fs = new Filesystem();
|
||||||
$fs->mkdir($dir);
|
$fs->mkdir($dir);
|
||||||
@ -928,7 +936,7 @@ class UserController extends Controller
|
|||||||
$e = '"'; // this is the default but i like to be explicit
|
$e = '"'; // this is the default but i like to be explicit
|
||||||
|
|
||||||
// Entête de colonne
|
// Entête de colonne
|
||||||
$data=["id","Login","Nom","Prénom","Email","Téléphone",$this->getParameter("labelniveau01"),$this->getParameter("labelniveau02"),"Métier","Fonction","Nom Usage","Autres Prénom","Sexe","Adresse","Date Naissance","Pays Naissance","Ville Naissance"];
|
$data=["id","Login","Nom","Prénom","Email","Téléphone",$this->getParameter("labelniveau01"),$this->getParameter("labelniveau02"),"Métier","Fonction","Nom Usage","Autres Prénom","Sexe","Adresse","Date Naissance","Pays Naissance","Ville Naissance","Date Visite","Cpt Visite","Groupes"];
|
||||||
fputcsv($csvh, $data, $d, $e);
|
fputcsv($csvh, $data, $d, $e);
|
||||||
|
|
||||||
// Liste des utilisateurs en fonction du role de l'utilisateur en cours
|
// Liste des utilisateurs en fonction du role de l'utilisateur en cours
|
||||||
@ -950,6 +958,17 @@ class UserController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach($users as $user) {
|
foreach($users as $user) {
|
||||||
|
$groups="";
|
||||||
|
$fgfirst=true;
|
||||||
|
foreach($user->getGroups() as $key => $usergroup) {
|
||||||
|
if(!$fgfirst) $groups.=" - ";
|
||||||
|
$groups.=$usergroup->getGroup()->getLabel();
|
||||||
|
if($fgfirst) $fgfirst=false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$visite = ($user->getVisitedate()?$user->getVisitedate()->format("d/m/Y H:i"):"");
|
||||||
|
$cptvisite = ($user->getVisitedate()?$user->getVisitecpt():"");
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
"id"=>$user->getId(),
|
"id"=>$user->getId(),
|
||||||
"username"=>$user->getUsername(),
|
"username"=>$user->getUsername(),
|
||||||
@ -968,6 +987,9 @@ class UserController extends Controller
|
|||||||
"birthdate"=>($user->getBirthdate()?$user->getBirthdate()->format("d/m/Y"):""),
|
"birthdate"=>($user->getBirthdate()?$user->getBirthdate()->format("d/m/Y"):""),
|
||||||
"birthcountry"=>($user->getBirthcountry()?$user->getBirthcountry()->getLabel():""),
|
"birthcountry"=>($user->getBirthcountry()?$user->getBirthcountry()->getLabel():""),
|
||||||
"birthplace"=>($user->getBirthplace()?$user->getBirthplace()->getLabel():""),
|
"birthplace"=>($user->getBirthplace()?$user->getBirthplace()->getLabel():""),
|
||||||
|
"visite"=>$visite,
|
||||||
|
"cptvisite"=>$cptvisite,
|
||||||
|
"groups"=>$groups,
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -1272,7 +1294,7 @@ class UserController extends Controller
|
|||||||
$toupdate=true;
|
$toupdate=true;
|
||||||
$preference[$key][$id]=$value;
|
$preference[$key][$id]=$value;
|
||||||
}
|
}
|
||||||
if($value&&$preference[$key][$id]!=$value) {
|
if($preference[$key][$id]!=$value) {
|
||||||
$toupdate=true;
|
$toupdate=true;
|
||||||
$preference[$key][$id]=$value;
|
$preference[$key][$id]=$value;
|
||||||
}
|
}
|
||||||
@ -1435,6 +1457,75 @@ class UserController extends Controller
|
|||||||
$fields["visite"]["perm"]=1;
|
$fields["visite"]["perm"]=1;
|
||||||
$fields["visite"]["label"]="Visite";
|
$fields["visite"]["label"]="Visite";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return $fields;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getDefaultDatausers()
|
||||||
|
{
|
||||||
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
$session=$this->get('session');
|
||||||
|
$config=$em->getRepository('CadolesCoreBundle:Config')->find("datausers");
|
||||||
|
$fields=$config->getValue();
|
||||||
|
|
||||||
|
$fields=json_decode($fields, true);
|
||||||
|
if(!is_array($fields)) $fields=[];
|
||||||
|
|
||||||
|
// Valeur par défaut 0=caché / 3=visible
|
||||||
|
if(!array_key_exists("avatar",$fields)) {
|
||||||
|
$fields["avatar"]["perm"]=1;
|
||||||
|
$fields["avatar"]["label"]="Avatar";
|
||||||
|
}
|
||||||
|
if(!array_key_exists("login",$fields)) {
|
||||||
|
$fields["login"]["perm"]=1;
|
||||||
|
$fields["login"]["label"]="Login";
|
||||||
|
}
|
||||||
|
if(!array_key_exists("lastname",$fields)) {
|
||||||
|
$fields["lastname"]["perm"]=1;
|
||||||
|
$fields["lastname"]["label"]="Nom";
|
||||||
|
}
|
||||||
|
if(!array_key_exists("firstname",$fields)) {
|
||||||
|
$fields["firstname"]["perm"]=1;
|
||||||
|
$fields["firstname"]["label"]="Prenom";
|
||||||
|
}
|
||||||
|
if(!array_key_exists("email",$fields)) {
|
||||||
|
$fields["email"]["perm"]=1;
|
||||||
|
$fields["email"]["label"]="Email";
|
||||||
|
}
|
||||||
|
if(!array_key_exists("niveau01",$fields)) {
|
||||||
|
$fields["niveau01"]["perm"]=1;
|
||||||
|
$fields["niveau01"]["label"]=$session->get('labelniveau01');
|
||||||
|
}
|
||||||
|
if(!array_key_exists("niveau02",$fields)) {
|
||||||
|
$fields["niveau02"]["perm"]=1;
|
||||||
|
$fields["niveau02"]["label"]=$session->get('labelniveau02');
|
||||||
|
}
|
||||||
|
if(!array_key_exists("group",$fields)) $fields["group"]["perm"]=1;
|
||||||
|
$fields["group"]["label"]="Groupes (caché uniquement pour le rôle Utilisateur) ";
|
||||||
|
|
||||||
|
if(!array_key_exists("job",$fields)) {
|
||||||
|
$fields["job"]["perm"]=1;
|
||||||
|
$fields["job"]["label"]="Métier";
|
||||||
|
}
|
||||||
|
if(!array_key_exists("position",$fields)) {
|
||||||
|
$fields["position"]["perm"]=1;
|
||||||
|
$fields["position"]["label"]="Fonction";
|
||||||
|
}
|
||||||
|
if(!array_key_exists("role",$fields)) {
|
||||||
|
$fields["role"]["perm"]=1;
|
||||||
|
$fields["role"]["label"]="Rôles";
|
||||||
|
}
|
||||||
|
if(!array_key_exists("telephonenumber",$fields)) {
|
||||||
|
$fields["telephonenumber"]["perm"]=1;
|
||||||
|
$fields["telephonenumber"]["label"]="Téléphone";
|
||||||
|
}
|
||||||
|
if(!array_key_exists("visitedate",$fields)) $fields["visitedate"]["perm"]=1;
|
||||||
|
$fields["visitedate"]["label"]="Visite (caché uniquement pour les rôles Animateur et Utilisateur) ";
|
||||||
|
|
||||||
|
if(!$session->get('viewniveau02'))
|
||||||
|
unset($fields["niveau02"]);
|
||||||
|
|
||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1469,7 +1560,7 @@ class UserController extends Controller
|
|||||||
$niveau01=strtolower($data->getNiveau01()->getLabel());
|
$niveau01=strtolower($data->getNiveau01()->getLabel());
|
||||||
if(stripos($niveau01,"autre")===0) {
|
if(stripos($niveau01,"autre")===0) {
|
||||||
if(!$data->getNiveau01other()) {
|
if(!$data->getNiveau01other()) {
|
||||||
$form->addError(new FormError("Merci d'indiquer votre ".$this->getParameter("labelniveau01")));
|
$form->addError(new FormError("Merci de compléter le champ 'Autre ".$this->getParameter("labelniveau01")."'"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -207,6 +207,25 @@ class WhitelistController extends Controller
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function ajaxiswhitelistAction(Request $request)
|
||||||
|
{
|
||||||
|
// S'assurer que c'est un appel ajax
|
||||||
|
if (!$request->isXmlHttpRequest()) {
|
||||||
|
return new JsonResponse(array('message' => 'Interdit'), 400);
|
||||||
|
}
|
||||||
|
$email=$request->request->get('email');
|
||||||
|
$email=explode("@",$email);
|
||||||
|
$domaine=end($email);
|
||||||
|
|
||||||
|
// Rechercher le mail dans la liste blanche
|
||||||
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
$whitelist=$em->getRepository($this->labelentity)->findOneBy(["label"=>$domaine]);
|
||||||
|
if($whitelist)
|
||||||
|
return new Response("OK", 200);
|
||||||
|
else
|
||||||
|
return new Response("KO", 200);
|
||||||
|
}
|
||||||
|
|
||||||
protected function getDatas()
|
protected function getDatas()
|
||||||
{
|
{
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
@ -103,6 +103,11 @@ class Group
|
|||||||
*/
|
*/
|
||||||
private $idonlyoffice;
|
private $idonlyoffice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(name="invitations", type="array", nullable=true)
|
||||||
|
*/
|
||||||
|
private $invitations;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity="Cadoles\PortalBundle\Entity\Icon", inversedBy="groups")
|
* @ORM\ManyToOne(targetEntity="Cadoles\PortalBundle\Entity\Icon", inversedBy="groups")
|
||||||
* @ORM\JoinColumn(nullable=true, onDelete="SET NULL")
|
* @ORM\JoinColumn(nullable=true, onDelete="SET NULL")
|
||||||
@ -1085,4 +1090,28 @@ class Group
|
|||||||
{
|
{
|
||||||
return $this->email;
|
return $this->email;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set invitations
|
||||||
|
*
|
||||||
|
* @param array $invitations
|
||||||
|
*
|
||||||
|
* @return Group
|
||||||
|
*/
|
||||||
|
public function setInvitations($invitations)
|
||||||
|
{
|
||||||
|
$this->invitations = $invitations;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get invitations
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getInvitations()
|
||||||
|
{
|
||||||
|
return $this->invitations;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,10 +27,10 @@ class Registration implements UserInterface, \Serializable
|
|||||||
private $id;
|
private $id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="string", length=25, unique=true)
|
* @ORM\Column(type="string", length=128, unique=true)
|
||||||
* @Assert\Length(
|
* @Assert\Length(
|
||||||
* min = "5",
|
* min = "5",
|
||||||
* max = "25",
|
* max = "128",
|
||||||
* minMessage = "Votre nom doit faire au moins {{ limit }} caractères",
|
* minMessage = "Votre nom doit faire au moins {{ limit }} caractères",
|
||||||
* maxMessage = "Votre nom ne peut pas être plus long que {{ limit }} caractères"
|
* maxMessage = "Votre nom ne peut pas être plus long que {{ limit }} caractères"
|
||||||
* )
|
* )
|
||||||
@ -68,7 +68,7 @@ class Registration implements UserInterface, \Serializable
|
|||||||
private $passwordad;
|
private $passwordad;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="string", length=60, unique=true)
|
* @ORM\Column(type="string", length=128, unique=true)
|
||||||
*/
|
*/
|
||||||
private $email;
|
private $email;
|
||||||
|
|
||||||
@ -143,6 +143,11 @@ class Registration implements UserInterface, \Serializable
|
|||||||
*/
|
*/
|
||||||
private $motivation;
|
private $motivation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(name="note", type="text", nullable=true)
|
||||||
|
*/
|
||||||
|
private $note;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="integer", length=60, nullable=true)
|
* @ORM\Column(type="integer", length=60, nullable=true)
|
||||||
*/
|
*/
|
||||||
@ -840,4 +845,28 @@ class Registration implements UserInterface, \Serializable
|
|||||||
{
|
{
|
||||||
return $this->passwordad;
|
return $this->passwordad;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set note
|
||||||
|
*
|
||||||
|
* @param string $note
|
||||||
|
*
|
||||||
|
* @return Registration
|
||||||
|
*/
|
||||||
|
public function setNote($note)
|
||||||
|
{
|
||||||
|
$this->note = $note;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get note
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getNote()
|
||||||
|
{
|
||||||
|
return $this->note;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,10 +30,10 @@ class User implements UserInterface, \Serializable
|
|||||||
private $id;
|
private $id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="string", length=50, unique=true)
|
* @ORM\Column(type="string", length=128, unique=true)
|
||||||
* @Assert\Length(
|
* @Assert\Length(
|
||||||
* min = "5",
|
* min = "5",
|
||||||
* max = "25",
|
* max = "128",
|
||||||
* minMessage = "Votre nom doit faire au moins {{ limit }} caractères",
|
* minMessage = "Votre nom doit faire au moins {{ limit }} caractères",
|
||||||
* maxMessage = "Votre nom ne peut pas être plus long que {{ limit }} caractères"
|
* maxMessage = "Votre nom ne peut pas être plus long que {{ limit }} caractères"
|
||||||
* )
|
* )
|
||||||
@ -71,7 +71,7 @@ class User implements UserInterface, \Serializable
|
|||||||
private $passwordad;
|
private $passwordad;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="string", length=60, unique=true)
|
* @ORM\Column(type="string", length=128, unique=true)
|
||||||
*/
|
*/
|
||||||
private $email;
|
private $email;
|
||||||
|
|
||||||
@ -196,6 +196,11 @@ class User implements UserInterface, \Serializable
|
|||||||
*/
|
*/
|
||||||
private $motivation;
|
private $motivation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(name="note", type="text", nullable=true)
|
||||||
|
*/
|
||||||
|
private $note;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(name="preference", type="array", nullable=true)
|
* @ORM\Column(name="preference", type="array", nullable=true)
|
||||||
*/
|
*/
|
||||||
@ -2059,4 +2064,28 @@ class User implements UserInterface, \Serializable
|
|||||||
{
|
{
|
||||||
return $this->passwordad;
|
return $this->passwordad;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set note
|
||||||
|
*
|
||||||
|
* @param string $note
|
||||||
|
*
|
||||||
|
* @return User
|
||||||
|
*/
|
||||||
|
public function setNote($note)
|
||||||
|
{
|
||||||
|
$this->note = $note;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get note
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getNote()
|
||||||
|
{
|
||||||
|
return $this->note;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,9 +37,15 @@ class UserGroup
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="boolean", options={"default" : false})
|
* @ORM\Column(type="boolean", options={"default" : false})
|
||||||
|
* CE CHAMP N'EST PLUS UTILSE
|
||||||
*/
|
*/
|
||||||
private $fgmanager = false;
|
private $fgmanager = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="integer", length=60, nullable=true)
|
||||||
|
*/
|
||||||
|
private $rolegroup;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="string", length=60, nullable=true)
|
* @ORM\Column(type="string", length=60, nullable=true)
|
||||||
*/
|
*/
|
||||||
@ -208,4 +214,28 @@ class UserGroup
|
|||||||
{
|
{
|
||||||
return $this->visitecpt;
|
return $this->visitecpt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set rolegroup
|
||||||
|
*
|
||||||
|
* @param integer $rolegroup
|
||||||
|
*
|
||||||
|
* @return UserGroup
|
||||||
|
*/
|
||||||
|
public function setRolegroup($rolegroup)
|
||||||
|
{
|
||||||
|
$this->rolegroup = $rolegroup;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get rolegroup
|
||||||
|
*
|
||||||
|
* @return integer
|
||||||
|
*/
|
||||||
|
public function getRolegroup()
|
||||||
|
{
|
||||||
|
return $this->rolegroup;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,12 +13,15 @@
|
|||||||
class sessionListener {
|
class sessionListener {
|
||||||
protected $container;
|
protected $container;
|
||||||
protected $em;
|
protected $em;
|
||||||
|
protected $token_storage;
|
||||||
|
protected $session;
|
||||||
|
|
||||||
public function __construct($container, EntityManager $em, TokenStorageInterface $token_storage)
|
public function __construct($container, EntityManager $em, TokenStorageInterface $token_storage,Session $session)
|
||||||
{
|
{
|
||||||
$this->container = $container;
|
$this->container = $container;
|
||||||
$this->em = $em;
|
$this->em = $em;
|
||||||
$this->token_storage = $token_storage;
|
$this->token_storage = $token_storage;
|
||||||
|
$this->session = $session;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function haveRole($curentuser,$roles,$tohave,$route) {
|
public function haveRole($curentuser,$roles,$tohave,$route) {
|
||||||
@ -44,9 +47,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function onDomainParse(Event $event) {
|
public function onDomainParse(Event $event) {
|
||||||
$session = new Session();
|
$session = $this->session;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$configs = $this->em->getRepository("CadolesCoreBundle:Config")->findAll();
|
$configs = $this->em->getRepository("CadolesCoreBundle:Config")->findAll();
|
||||||
foreach($configs as $config) {
|
foreach($configs as $config) {
|
||||||
@ -93,6 +94,7 @@
|
|||||||
$app["activate_widwordpress"] =$this->container->getParameter('activate_widwordpress');
|
$app["activate_widwordpress"] =$this->container->getParameter('activate_widwordpress');
|
||||||
|
|
||||||
$app["widbalado_activate_syncenvole"] =$this->container->getParameter('widbalado_activate_syncenvole');
|
$app["widbalado_activate_syncenvole"] =$this->container->getParameter('widbalado_activate_syncenvole');
|
||||||
|
$app["widcdt_activate_syncenvole"] =$this->container->getParameter('widcdt_activate_syncenvole');
|
||||||
$app["widgepi_activate_syncenvole"] =$this->container->getParameter('widgepi_activate_syncenvole');
|
$app["widgepi_activate_syncenvole"] =$this->container->getParameter('widgepi_activate_syncenvole');
|
||||||
$app["widnextcloud_activate_syncenvole"] =$this->container->getParameter('widnextcloud_activate_syncenvole');
|
$app["widnextcloud_activate_syncenvole"] =$this->container->getParameter('widnextcloud_activate_syncenvole');
|
||||||
$app["widpiwik_activate_syncenvole"] =$this->container->getParameter('widpiwik_activate_syncenvole');
|
$app["widpiwik_activate_syncenvole"] =$this->container->getParameter('widpiwik_activate_syncenvole');
|
||||||
|
@ -181,6 +181,7 @@ class syncUser implements EventSubscriber
|
|||||||
$data->setUser($user);
|
$data->setUser($user);
|
||||||
$data->setGroup($fgall[0]);
|
$data->setGroup($fgall[0]);
|
||||||
$data->setKeyvalue($key);
|
$data->setKeyvalue($key);
|
||||||
|
$data->setRolegroup(0);
|
||||||
$this->em->persist($data);
|
$this->em->persist($data);
|
||||||
$this->em->flush();
|
$this->em->flush();
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ class MailType extends AbstractType
|
|||||||
'mapped'=> false,
|
'mapped'=> false,
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'attr' => array("class" => "form-control", "style" => "margin-bottom:15px"),
|
'attr' => array("class" => "form-control", "style" => "margin-bottom:15px"),
|
||||||
'config' => ["height" => "150px",'filebrowserUploadRoute' => 'cadoles_portal_user_pagewidget_upload']
|
'config' => ["height" => "150px"]
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ class MailingType extends AbstractType
|
|||||||
'mapped'=> false,
|
'mapped'=> false,
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'attr' => array("class" => "form-control", "style" => "margin-bottom:15px"),
|
'attr' => array("class" => "form-control", "style" => "margin-bottom:15px"),
|
||||||
'config' => ["height" => "400px",'filebrowserUploadRoute' => 'cadoles_portal_user_pagewidget_upload']
|
'config' => ["height" => "400px"]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -45,6 +45,15 @@ class RegistrationType extends AbstractType
|
|||||||
"attr" => array("class" => "btn btn-success")
|
"attr" => array("class" => "btn btn-success")
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$builder->add('note',
|
||||||
|
TextareaType::class, array(
|
||||||
|
"label" => "Notes Administrateur",
|
||||||
|
"required" => false,
|
||||||
|
"disabled" => ($options["mode"]=="delete"?true:false),
|
||||||
|
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px; height: 130px")
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
# Obligatoire
|
# Obligatoire
|
||||||
@ -87,7 +96,7 @@ class RegistrationType extends AbstractType
|
|||||||
|
|
||||||
$builder->add('niveau01other',
|
$builder->add('niveau01other',
|
||||||
TextType::class, array(
|
TextType::class, array(
|
||||||
"label" =>"Autre ".$session->get('labelniveau01'),
|
"label" =>"Autre ".$session->get('labelniveau01'). " *",
|
||||||
"disabled" => ($options["mode"]=="delete"?true:false),
|
"disabled" => ($options["mode"]=="delete"?true:false),
|
||||||
"required" => false,
|
"required" => false,
|
||||||
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px")
|
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px")
|
||||||
@ -101,7 +110,8 @@ class RegistrationType extends AbstractType
|
|||||||
"type" => PasswordType::class,
|
"type" => PasswordType::class,
|
||||||
"required" => ($options["mode"]=="submit"?true:false),
|
"required" => ($options["mode"]=="submit"?true:false),
|
||||||
"first_options" => array("label" => "Mot de Passe","attr" => array("class" => "form-control", "style" => "margin-bottom:15px", "autocomplete" => "new-password")),
|
"first_options" => array("label" => "Mot de Passe","attr" => array("class" => "form-control", "style" => "margin-bottom:15px", "autocomplete" => "new-password")),
|
||||||
"second_options" => array('label' => 'Confirmer Mot de Passe',"attr" => array("class" => "form-control", "style" => "margin-bottom:15px"))
|
"second_options" => array('label' => 'Confirmer Mot de Passe',"attr" => array("class" => "form-control", "style" => "margin-bottom:15px")),
|
||||||
|
"invalid_message" => "Mot de passe non valide"
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -45,7 +45,8 @@ class ResetpwdType extends AbstractType
|
|||||||
"required" => ($options["mode"]=="submit"?true:false),
|
"required" => ($options["mode"]=="submit"?true:false),
|
||||||
"options" => array("always_empty" => true),
|
"options" => array("always_empty" => true),
|
||||||
"first_options" => array("label" => "Votre nouveau Mot de Passe","attr" => array("class" => "form-control", "style" => "margin-bottom:15px")),
|
"first_options" => array("label" => "Votre nouveau Mot de Passe","attr" => array("class" => "form-control", "style" => "margin-bottom:15px")),
|
||||||
"second_options" => array('label' => 'Confirmer votre nouveau Mot de Passe',"attr" => array("class" => "form-control", "style" => "margin-bottom:15px"))
|
"second_options" => array('label' => 'Confirmer votre nouveau Mot de Passe',"attr" => array("class" => "form-control", "style" => "margin-bottom:15px")),
|
||||||
|
"invalid_message" => "Mot de passe non valide"
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -86,6 +86,15 @@ class UserType extends AbstractType
|
|||||||
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px;$readonly","onfocus" => $onfocus, "onchange" => $onchange),
|
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px;$readonly","onfocus" => $onfocus, "onchange" => $onchange),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$builder->add('note',
|
||||||
|
TextareaType::class, array(
|
||||||
|
"label" => "Notes Administrateur",
|
||||||
|
"required" => false,
|
||||||
|
"disabled" => ($options["mode"]=="delete"?true:false),
|
||||||
|
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px; height: 130px")
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$perm=$options["perm"];
|
$perm=$options["perm"];
|
||||||
@ -132,7 +141,8 @@ class UserType extends AbstractType
|
|||||||
"required" => ($options["mode"]=="submit"?true:false),
|
"required" => ($options["mode"]=="submit"?true:false),
|
||||||
"options" => array("always_empty" => true),
|
"options" => array("always_empty" => true),
|
||||||
"first_options" => array("label" => "Mot de Passe","attr" => array("class" => "form-control", "style" => "margin-bottom:15px", "autocomplete" => "new-password")),
|
"first_options" => array("label" => "Mot de Passe","attr" => array("class" => "form-control", "style" => "margin-bottom:15px", "autocomplete" => "new-password")),
|
||||||
"second_options" => array('label' => 'Confirmer Mot de Passe',"attr" => array("class" => "form-control", "style" => "margin-bottom:15px"))
|
"second_options" => array('label' => 'Confirmer Mot de Passe',"attr" => array("class" => "form-control", "style" => "margin-bottom:15px")),
|
||||||
|
"invalid_message" => "Mot de passe non valide"
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -63,6 +63,7 @@ class GroupRepository extends \Doctrine\ORM\EntityRepository
|
|||||||
$usergroup->setUser($user);
|
$usergroup->setUser($user);
|
||||||
$usergroup->setGroup($retgroup);
|
$usergroup->setGroup($retgroup);
|
||||||
$usergroup->setKeyvalue($key);
|
$usergroup->setKeyvalue($key);
|
||||||
|
$usergroup->setRolegroup(0);
|
||||||
|
|
||||||
$this->_em->persist($usergroup);
|
$this->_em->persist($usergroup);
|
||||||
$this->_em->flush();
|
$this->_em->flush();
|
||||||
|
@ -194,6 +194,10 @@ cadoles_core_ajax_item_list:
|
|||||||
path: /ajax/item/list
|
path: /ajax/item/list
|
||||||
defaults: { _controller: CadolesCoreBundle:Ajax:itemlist }
|
defaults: { _controller: CadolesCoreBundle:Ajax:itemlist }
|
||||||
|
|
||||||
|
cadoles_core_ajax_iswhitelist:
|
||||||
|
path: /ajax/iswhitelist
|
||||||
|
defaults: { _controller: CadolesCoreBundle:Whitelist:ajaxiswhitelist }
|
||||||
|
|
||||||
#== Home Config ==========================================================================================================
|
#== Home Config ==========================================================================================================
|
||||||
cadoles_core_config:
|
cadoles_core_config:
|
||||||
path: /config/home
|
path: /config/home
|
||||||
@ -490,14 +494,22 @@ cadoles_core_config_group_ajax_usergroup_del:
|
|||||||
path: /config/group/ajax/usergroupdel
|
path: /config/group/ajax/usergroupdel
|
||||||
defaults: { _controller: CadolesCoreBundle:Group:usergroupdel, access: config }
|
defaults: { _controller: CadolesCoreBundle:Group:usergroupdel, access: config }
|
||||||
|
|
||||||
cadoles_core_config_group_ajax_switchmanager:
|
cadoles_core_config_group_ajax_changerole:
|
||||||
path: /config/group/ajax/switchmanager
|
path: /config/group/ajax/changerole
|
||||||
defaults: { _controller: CadolesCoreBundle:Group:switchmanager, access: config }
|
defaults: { _controller: CadolesCoreBundle:Group:changerole, access: config }
|
||||||
|
|
||||||
|
cadoles_core_config_group_export:
|
||||||
|
path: /config/group/export
|
||||||
|
defaults: { _controller: CadolesCoreBundle:Group:groupexport }
|
||||||
|
|
||||||
cadoles_core_config_group_usergroup_export:
|
cadoles_core_config_group_usergroup_export:
|
||||||
path: /config/group/users/export/{id}
|
path: /config/group/users/export/{id}
|
||||||
defaults: { _controller: CadolesCoreBundle:Group:usergroupexport, access: config }
|
defaults: { _controller: CadolesCoreBundle:Group:usergroupexport, access: config }
|
||||||
|
|
||||||
|
cadoles_core_config_group_invitation:
|
||||||
|
path: /config/group/invitation/{id}
|
||||||
|
defaults: { _controller: CadolesCoreBundle:Group:invitation, access: config }
|
||||||
|
|
||||||
#-- Access user
|
#-- Access user
|
||||||
cadoles_core_user_group:
|
cadoles_core_user_group:
|
||||||
path: /user/group
|
path: /user/group
|
||||||
@ -547,14 +559,18 @@ cadoles_core_user_group_ajax_usergroup_del:
|
|||||||
path: /user/group/ajax/usergroupdel
|
path: /user/group/ajax/usergroupdel
|
||||||
defaults: { _controller: CadolesCoreBundle:Group:usergroupdel, access: user }
|
defaults: { _controller: CadolesCoreBundle:Group:usergroupdel, access: user }
|
||||||
|
|
||||||
cadoles_core_user_group_ajax_switchmanager:
|
cadoles_core_user_group_ajax_changerole:
|
||||||
path: /user/group/ajax/switchmanager
|
path: /user/group/ajax/changerole
|
||||||
defaults: { _controller: CadolesCoreBundle:Group:switchmanager, access: user }
|
defaults: { _controller: CadolesCoreBundle:Group:changerole, access: user }
|
||||||
|
|
||||||
cadoles_core_user_group_usergroup_export:
|
cadoles_core_user_group_usergroup_export:
|
||||||
path: /user/group/users/export/{id}
|
path: /user/group/users/export/{id}
|
||||||
defaults: { _controller: CadolesCoreBundle:Group:usergroupexport, access: user }
|
defaults: { _controller: CadolesCoreBundle:Group:usergroupexport, access: user }
|
||||||
|
|
||||||
|
cadoles_core_user_group_invitation:
|
||||||
|
path: /user/group/invitation/{id}
|
||||||
|
defaults: { _controller: CadolesCoreBundle:Group:invitation, access: user }
|
||||||
|
|
||||||
|
|
||||||
#== Whitelist ============================================================================================================
|
#== Whitelist ============================================================================================================
|
||||||
cadoles_core_config_whitelist:
|
cadoles_core_config_whitelist:
|
||||||
|
@ -26,7 +26,7 @@ services:
|
|||||||
cadoles.core.session.listener:
|
cadoles.core.session.listener:
|
||||||
public: true
|
public: true
|
||||||
class: Cadoles\CoreBundle\EventListener\sessionListener
|
class: Cadoles\CoreBundle\EventListener\sessionListener
|
||||||
arguments: ['@service_container','@doctrine.orm.entity_manager',"@security.token_storage"]
|
arguments: ['@service_container','@doctrine.orm.entity_manager',"@security.token_storage","@session"]
|
||||||
tags:
|
tags:
|
||||||
- { name: kernel.event_listener, event: kernel.request, method: onDomainParse }
|
- { name: kernel.event_listener, event: kernel.request, method: onDomainParse }
|
||||||
|
|
||||||
|
12
src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/public/css/jquery-ui.multidatespicker.css
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
/* jQuery UI Datepicker moving pixels fix */
|
||||||
|
table.ui-datepicker-calendar {border-collapse: separate;}
|
||||||
|
.ui-datepicker-calendar td {border: 1px solid transparent;}
|
||||||
|
|
||||||
|
/* jQuery UI Datepicker hide datepicker helper */
|
||||||
|
#ui-datepicker-div {display:none;}
|
||||||
|
|
||||||
|
/* jQuery UI Datepicker emphasis on selected dates */
|
||||||
|
.ui-datepicker .ui-datepicker-calendar .ui-state-highlight a {
|
||||||
|
background: #743620 none;
|
||||||
|
color: white;
|
||||||
|
}
|
@ -60,6 +60,17 @@ body {
|
|||||||
height: 20px;
|
height: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 991px) {
|
||||||
|
.header .title{
|
||||||
|
font-size: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header small {
|
||||||
|
font-size:14px;
|
||||||
|
top: 25px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 767px) {
|
@media (max-width: 767px) {
|
||||||
.header { display: none }
|
.header { display: none }
|
||||||
#menu-header { display: none }
|
#menu-header { display: none }
|
||||||
@ -110,6 +121,25 @@ body {
|
|||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#navbar-nameuser {
|
||||||
|
position: absolute;
|
||||||
|
top: 50px;
|
||||||
|
right: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-top-links #navbar-nameuser {
|
||||||
|
position: relative;
|
||||||
|
top: -8px;
|
||||||
|
right: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 991px) {
|
||||||
|
.navbar-top-links #navbar-nameuser {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@media (max-width: 767px) {
|
@media (max-width: 767px) {
|
||||||
.navbar-default .navbar-header #title {
|
.navbar-default .navbar-header #title {
|
||||||
display: none;
|
display: none;
|
||||||
@ -337,12 +367,12 @@ span.item-drag {
|
|||||||
|
|
||||||
.grid-item .item-link img {
|
.grid-item .item-link img {
|
||||||
display: block;
|
display: block;
|
||||||
max-width: 100%;
|
margin: 10px;
|
||||||
//max-height: 110px;
|
height: 105px;
|
||||||
height: auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.grid-item .grid-item-title {
|
.grid-item .grid-item-title {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
@ -735,6 +765,11 @@ a.item-heart {
|
|||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.widget-ckeditor img {
|
||||||
|
height:auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.frameitem {
|
.frameitem {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0px;
|
right: 0px;
|
||||||
|
498
src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/public/js/jquery-ui.multidatespicker.js
vendored
Normal file
@ -0,0 +1,498 @@
|
|||||||
|
/*
|
||||||
|
* MultiDatesPicker v1.6.4
|
||||||
|
* http://multidatespickr.sourceforge.net/
|
||||||
|
*
|
||||||
|
* Copyright 2014, Luca Lauretta
|
||||||
|
* Dual licensed under the MIT or GPL version 2 licenses.
|
||||||
|
*/
|
||||||
|
(function( $ ){
|
||||||
|
$.extend($.ui, { multiDatesPicker: { version: "1.6.4" } });
|
||||||
|
|
||||||
|
$.fn.multiDatesPicker = function(method) {
|
||||||
|
var mdp_arguments = arguments;
|
||||||
|
var ret = this;
|
||||||
|
var today_date = new Date();
|
||||||
|
var day_zero = new Date(0);
|
||||||
|
var mdp_events = {};
|
||||||
|
|
||||||
|
function removeDate(date, type) {
|
||||||
|
if(!type) type = 'picked';
|
||||||
|
date = dateConvert.call(this, date);
|
||||||
|
for(var i = 0; i < this.multiDatesPicker.dates[type].length; i++)
|
||||||
|
if(!methods.compareDates(this.multiDatesPicker.dates[type][i], date))
|
||||||
|
return this.multiDatesPicker.dates[type].splice(i, 1).pop();
|
||||||
|
}
|
||||||
|
function removeIndex(index, type) {
|
||||||
|
if(!type) type = 'picked';
|
||||||
|
return this.multiDatesPicker.dates[type].splice(index, 1).pop();
|
||||||
|
}
|
||||||
|
function addDate(date, type, no_sort) {
|
||||||
|
if(!type) type = 'picked';
|
||||||
|
date = dateConvert.call(this, date);
|
||||||
|
|
||||||
|
// @todo: use jQuery UI datepicker method instead
|
||||||
|
date.setHours(0);
|
||||||
|
date.setMinutes(0);
|
||||||
|
date.setSeconds(0);
|
||||||
|
date.setMilliseconds(0);
|
||||||
|
|
||||||
|
if (methods.gotDate.call(this, date, type) === false) {
|
||||||
|
this.multiDatesPicker.dates[type].push(date);
|
||||||
|
if(!no_sort) this.multiDatesPicker.dates[type].sort(methods.compareDates);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function sortDates(type) {
|
||||||
|
if(!type) type = 'picked';
|
||||||
|
this.multiDatesPicker.dates[type].sort(methods.compareDates);
|
||||||
|
}
|
||||||
|
function dateConvert(date, desired_type, date_format) {
|
||||||
|
if(!desired_type) desired_type = 'object';/*
|
||||||
|
if(!date_format && (typeof date == 'string')) {
|
||||||
|
date_format = $(this).datepicker('option', 'dateFormat');
|
||||||
|
if(!date_format) date_format = $.datepicker._defaults.dateFormat;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
return methods.dateConvert.call(this, date, desired_type, date_format);
|
||||||
|
}
|
||||||
|
|
||||||
|
var methods = {
|
||||||
|
init : function( options ) {
|
||||||
|
var $this = $(this);
|
||||||
|
this.multiDatesPicker.changed = false;
|
||||||
|
|
||||||
|
var mdp_events = {
|
||||||
|
beforeShow: function(input, inst) {
|
||||||
|
this.multiDatesPicker.changed = false;
|
||||||
|
if(this.multiDatesPicker.originalBeforeShow)
|
||||||
|
this.multiDatesPicker.originalBeforeShow.call(this, input, inst);
|
||||||
|
},
|
||||||
|
onSelect : function(dateText, inst) {
|
||||||
|
var $this = $(this);
|
||||||
|
this.multiDatesPicker.changed = true;
|
||||||
|
|
||||||
|
if (dateText) {
|
||||||
|
$this.multiDatesPicker('toggleDate', dateText);
|
||||||
|
this.multiDatesPicker.changed = true;
|
||||||
|
// @todo: this will be optimized when I'll move methods to the singleton.
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.multiDatesPicker.mode == 'normal' && this.multiDatesPicker.pickableRange) {
|
||||||
|
if(this.multiDatesPicker.dates.picked.length > 0) {
|
||||||
|
var min_date = this.multiDatesPicker.dates.picked[0],
|
||||||
|
max_date = new Date(min_date.getTime());
|
||||||
|
|
||||||
|
methods.sumDays(max_date, this.multiDatesPicker.pickableRange-1);
|
||||||
|
|
||||||
|
// counts the number of disabled dates in the range
|
||||||
|
if(this.multiDatesPicker.adjustRangeToDisabled) {
|
||||||
|
var c_disabled,
|
||||||
|
disabled = this.multiDatesPicker.dates.disabled.slice(0);
|
||||||
|
do {
|
||||||
|
c_disabled = 0;
|
||||||
|
for(var i = 0; i < disabled.length; i++) {
|
||||||
|
if(disabled[i].getTime() <= max_date.getTime()) {
|
||||||
|
if((min_date.getTime() <= disabled[i].getTime()) && (disabled[i].getTime() <= max_date.getTime()) ) {
|
||||||
|
c_disabled++;
|
||||||
|
}
|
||||||
|
disabled.splice(i, 1);
|
||||||
|
i--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
max_date.setDate(max_date.getDate() + c_disabled);
|
||||||
|
} while(c_disabled != 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(this.multiDatesPicker.maxDate && (max_date > this.multiDatesPicker.maxDate))
|
||||||
|
max_date = this.multiDatesPicker.maxDate;
|
||||||
|
|
||||||
|
$this
|
||||||
|
.datepicker("option", "minDate", min_date)
|
||||||
|
.datepicker("option", "maxDate", max_date);
|
||||||
|
} else {
|
||||||
|
$this
|
||||||
|
.datepicker("option", "minDate", this.multiDatesPicker.minDate)
|
||||||
|
.datepicker("option", "maxDate", this.multiDatesPicker.maxDate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(this.multiDatesPicker.originalOnSelect && dateText)
|
||||||
|
this.multiDatesPicker.originalOnSelect.call(this, dateText, inst);
|
||||||
|
|
||||||
|
},
|
||||||
|
beforeShowDay : function(date) {
|
||||||
|
var $this = $(this),
|
||||||
|
gotThisDate = $this.multiDatesPicker('gotDate', date) !== false,
|
||||||
|
isDisabledCalendar = $this.datepicker('option', 'disabled'),
|
||||||
|
isDisabledDate = $this.multiDatesPicker('gotDate', date, 'disabled') !== false,
|
||||||
|
areAllSelected = this.multiDatesPicker.maxPicks <= this.multiDatesPicker.dates.picked.length;
|
||||||
|
|
||||||
|
var bsdReturn = [true, '', null];
|
||||||
|
if(this.multiDatesPicker.originalBeforeShowDay)
|
||||||
|
bsdReturn = this.multiDatesPicker.originalBeforeShowDay.call(this, date);
|
||||||
|
|
||||||
|
bsdReturn[1] = gotThisDate ? 'ui-state-highlight '+bsdReturn[1] : bsdReturn[1];
|
||||||
|
bsdReturn[0] = bsdReturn[0] && !(isDisabledCalendar || isDisabledDate || (areAllSelected && !bsdReturn[1]));
|
||||||
|
return bsdReturn;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// value have to be extracted before datepicker is initiated
|
||||||
|
if($this.val()) var inputDates = $this.val()
|
||||||
|
|
||||||
|
if(options) {
|
||||||
|
// value have to be extracted before datepicker is initiated
|
||||||
|
//if(options.altField) var inputDates = $(options.altField).val();
|
||||||
|
if(options.separator) this.multiDatesPicker.separator = options.separator;
|
||||||
|
if(!this.multiDatesPicker.separator) this.multiDatesPicker.separator = ', ';
|
||||||
|
|
||||||
|
this.multiDatesPicker.originalBeforeShow = options.beforeShow;
|
||||||
|
this.multiDatesPicker.originalOnSelect = options.onSelect;
|
||||||
|
this.multiDatesPicker.originalBeforeShowDay = options.beforeShowDay;
|
||||||
|
this.multiDatesPicker.originalOnClose = options.onClose;
|
||||||
|
|
||||||
|
// datepicker init
|
||||||
|
$this.datepicker(options);
|
||||||
|
|
||||||
|
this.multiDatesPicker.minDate = $.datepicker._determineDate(this, options.minDate, null);
|
||||||
|
this.multiDatesPicker.maxDate = $.datepicker._determineDate(this, options.maxDate, null);
|
||||||
|
if(options.addDates) methods.addDates.call(this, options.addDates);
|
||||||
|
|
||||||
|
if(options.addDisabledDates)
|
||||||
|
methods.addDates.call(this, options.addDisabledDates, 'disabled');
|
||||||
|
|
||||||
|
methods.setMode.call(this, options);
|
||||||
|
} else {
|
||||||
|
$this.datepicker();
|
||||||
|
}
|
||||||
|
$this.datepicker('option', mdp_events);
|
||||||
|
|
||||||
|
// adds any dates found in the input or alt field
|
||||||
|
if(inputDates) $this.multiDatesPicker('value', inputDates);
|
||||||
|
|
||||||
|
// generates the new string of added dates
|
||||||
|
var inputs_values = $this.multiDatesPicker('value');
|
||||||
|
|
||||||
|
// fills the input field back with all the dates in the calendar
|
||||||
|
$this.val(inputs_values);
|
||||||
|
|
||||||
|
// Fixes the altField filled with defaultDate by default
|
||||||
|
var altFieldOption = $this.datepicker('option', 'altField');
|
||||||
|
if (altFieldOption) $(altFieldOption).val(inputs_values);
|
||||||
|
|
||||||
|
// Updates the calendar view
|
||||||
|
$this.datepicker('refresh');
|
||||||
|
},
|
||||||
|
compareDates : function(date1, date2) {
|
||||||
|
date1 = dateConvert.call(this, date1);
|
||||||
|
date2 = dateConvert.call(this, date2);
|
||||||
|
// return > 0 means date1 is later than date2
|
||||||
|
// return == 0 means date1 is the same day as date2
|
||||||
|
// return < 0 means date1 is earlier than date2
|
||||||
|
var diff = date1.getFullYear() - date2.getFullYear();
|
||||||
|
if(!diff) {
|
||||||
|
diff = date1.getMonth() - date2.getMonth();
|
||||||
|
if(!diff)
|
||||||
|
diff = date1.getDate() - date2.getDate();
|
||||||
|
}
|
||||||
|
return diff;
|
||||||
|
},
|
||||||
|
sumDays : function( date, n_days ) {
|
||||||
|
var origDateType = typeof date;
|
||||||
|
obj_date = dateConvert.call(this, date);
|
||||||
|
obj_date.setDate(obj_date.getDate() + n_days);
|
||||||
|
return dateConvert.call(this, obj_date, origDateType);
|
||||||
|
},
|
||||||
|
dateConvert : function( date, desired_format, dateFormat ) {
|
||||||
|
var from_format = typeof date;
|
||||||
|
var $this = $(this);
|
||||||
|
|
||||||
|
if(from_format == desired_format) {
|
||||||
|
if(from_format == 'object') {
|
||||||
|
try {
|
||||||
|
date.getTime();
|
||||||
|
} catch (e) {
|
||||||
|
$.error('Received date is in a non supported format!');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(typeof date == 'undefined') date = new Date(0);
|
||||||
|
|
||||||
|
if(desired_format != 'string' && desired_format != 'object' && desired_format != 'number')
|
||||||
|
$.error('Date format "'+ desired_format +'" not supported!');
|
||||||
|
|
||||||
|
if(!dateFormat) {
|
||||||
|
// thanks to bibendus83 -> http://sourceforge.net/tracker/index.php?func=detail&aid=3213174&group_id=358205&atid=1495382
|
||||||
|
var dp_dateFormat = $this.datepicker('option', 'dateFormat');
|
||||||
|
if (dp_dateFormat) {
|
||||||
|
dateFormat = dp_dateFormat;
|
||||||
|
} else {
|
||||||
|
dateFormat = $.datepicker._defaults.dateFormat;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// converts to object as a neutral format
|
||||||
|
switch(from_format) {
|
||||||
|
case 'object': break;
|
||||||
|
case 'string': date = $.datepicker.parseDate(dateFormat, date); break;
|
||||||
|
case 'number': date = new Date(date); break;
|
||||||
|
default: $.error('Conversion from "'+ desired_format +'" format not allowed on jQuery.multiDatesPicker');
|
||||||
|
}
|
||||||
|
// then converts to the desired format
|
||||||
|
switch(desired_format) {
|
||||||
|
case 'object': return date;
|
||||||
|
case 'string': return $.datepicker.formatDate(dateFormat, date);
|
||||||
|
case 'number': return date.getTime();
|
||||||
|
default: $.error('Conversion to "'+ desired_format +'" format not allowed on jQuery.multiDatesPicker');
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
gotDate : function( date, type ) {
|
||||||
|
if(!type) type = 'picked';
|
||||||
|
for(var i = 0; i < this.multiDatesPicker.dates[type].length; i++) {
|
||||||
|
if(methods.compareDates.call(this, this.multiDatesPicker.dates[type][i], date) === 0) {
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
value : function( value ) {
|
||||||
|
if(value && typeof value == 'string') {
|
||||||
|
methods.addDates.call(this, value.split(this.multiDatesPicker.separator));
|
||||||
|
} else {
|
||||||
|
var dates = methods.getDates.call(this, 'string');
|
||||||
|
return dates.length
|
||||||
|
? dates.join(this.multiDatesPicker.separator)
|
||||||
|
: "";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getDates : function( format, type ) {
|
||||||
|
if(!format) format = 'string';
|
||||||
|
if(!type) type = 'picked';
|
||||||
|
switch (format) {
|
||||||
|
case 'object':
|
||||||
|
return this.multiDatesPicker.dates[type];
|
||||||
|
case 'string':
|
||||||
|
case 'number':
|
||||||
|
var o_dates = new Array();
|
||||||
|
for(var i in this.multiDatesPicker.dates[type])
|
||||||
|
o_dates.push(
|
||||||
|
dateConvert.call(
|
||||||
|
this,
|
||||||
|
this.multiDatesPicker.dates[type][i],
|
||||||
|
format
|
||||||
|
)
|
||||||
|
);
|
||||||
|
return o_dates;
|
||||||
|
|
||||||
|
default: $.error('Format "'+format+'" not supported!');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
addDates : function( dates, type ) {
|
||||||
|
if(dates.length > 0) {
|
||||||
|
if(!type) type = 'picked';
|
||||||
|
switch(typeof dates) {
|
||||||
|
case 'object':
|
||||||
|
case 'array':
|
||||||
|
if(dates.length) {
|
||||||
|
for(var i = 0; i < dates.length; i++)
|
||||||
|
addDate.call(this, dates[i], type, true);
|
||||||
|
sortDates.call(this, type);
|
||||||
|
break;
|
||||||
|
} // else does the same as 'string'
|
||||||
|
case 'string':
|
||||||
|
case 'number':
|
||||||
|
addDate.call(this, dates, type);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$.error('Date format "'+ typeof dates +'" not allowed on jQuery.multiDatesPicker');
|
||||||
|
}
|
||||||
|
//$(this).datepicker('refresh');
|
||||||
|
} else {
|
||||||
|
$.error('Empty array of dates received.');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
removeDates : function( dates, type ) {
|
||||||
|
if(!type) type = 'picked';
|
||||||
|
var removed = [];
|
||||||
|
if (Object.prototype.toString.call(dates) === '[object Array]') {
|
||||||
|
for(var i in dates.sort(function(a,b){return b-a})) {
|
||||||
|
removed.push(removeDate.call(this, dates[i], type));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
removed.push(removeDate.call(this, dates, type));
|
||||||
|
}
|
||||||
|
return removed;
|
||||||
|
},
|
||||||
|
removeIndexes : function( indexes, type ) {
|
||||||
|
if(!type) type = 'picked';
|
||||||
|
var removed = [];
|
||||||
|
if (Object.prototype.toString.call(indexes) === '[object Array]') {
|
||||||
|
for(var i in indexes.sort(function(a,b){return b-a})) {
|
||||||
|
removed.push(removeIndex.call(this, indexes[i], type));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
removed.push(removeIndex.call(this, indexes, type));
|
||||||
|
}
|
||||||
|
return removed;
|
||||||
|
},
|
||||||
|
resetDates : function ( type ) {
|
||||||
|
if(!type) type = 'picked';
|
||||||
|
this.multiDatesPicker.dates[type] = [];
|
||||||
|
},
|
||||||
|
toggleDate : function( date, type ) {
|
||||||
|
if(!type) type = 'picked';
|
||||||
|
|
||||||
|
switch(this.multiDatesPicker.mode) {
|
||||||
|
case 'daysRange':
|
||||||
|
this.multiDatesPicker.dates[type] = []; // deletes all picked/disabled dates
|
||||||
|
var end = this.multiDatesPicker.autoselectRange[1];
|
||||||
|
var begin = this.multiDatesPicker.autoselectRange[0];
|
||||||
|
if(end < begin) { // switch
|
||||||
|
end = this.multiDatesPicker.autoselectRange[0];
|
||||||
|
begin = this.multiDatesPicker.autoselectRange[1];
|
||||||
|
}
|
||||||
|
for(var i = begin; i < end; i++)
|
||||||
|
methods.addDates.call(this, methods.sumDays.call(this,date, i), type);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if(methods.gotDate.call(this, date) === false) // adds dates
|
||||||
|
methods.addDates.call(this, date, type);
|
||||||
|
else // removes dates
|
||||||
|
methods.removeDates.call(this, date, type);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
setMode : function( options ) {
|
||||||
|
var $this = $(this);
|
||||||
|
if(options.mode) this.multiDatesPicker.mode = options.mode;
|
||||||
|
|
||||||
|
switch(this.multiDatesPicker.mode) {
|
||||||
|
case 'normal':
|
||||||
|
for(option in options)
|
||||||
|
switch(option) {
|
||||||
|
case 'maxPicks':
|
||||||
|
case 'minPicks':
|
||||||
|
case 'pickableRange':
|
||||||
|
case 'adjustRangeToDisabled':
|
||||||
|
this.multiDatesPicker[option] = options[option];
|
||||||
|
break;
|
||||||
|
//default: $.error('Option ' + option + ' ignored for mode "'.options.mode.'".');
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'daysRange':
|
||||||
|
case 'weeksRange':
|
||||||
|
var mandatory = 1;
|
||||||
|
for(option in options)
|
||||||
|
switch(option) {
|
||||||
|
case 'autoselectRange':
|
||||||
|
mandatory--;
|
||||||
|
case 'pickableRange':
|
||||||
|
case 'adjustRangeToDisabled':
|
||||||
|
this.multiDatesPicker[option] = options[option];
|
||||||
|
break;
|
||||||
|
//default: $.error('Option ' + option + ' does not exist for setMode on jQuery.multiDatesPicker');
|
||||||
|
}
|
||||||
|
if(mandatory > 0) $.error('Some mandatory options not specified!');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
if(options.pickableRange) {
|
||||||
|
$this.datepicker("option", "maxDate", options.pickableRange);
|
||||||
|
$this.datepicker("option", "minDate", this.multiDatesPicker.minDate);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
if(mdp_events.onSelect)
|
||||||
|
mdp_events.onSelect();
|
||||||
|
},
|
||||||
|
destroy: function(){
|
||||||
|
this.multiDatesPicker = null;
|
||||||
|
$(this).datepicker('destroy');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
this.each(function() {
|
||||||
|
var $this = $(this);
|
||||||
|
if (!this.multiDatesPicker) {
|
||||||
|
this.multiDatesPicker = {
|
||||||
|
dates: {
|
||||||
|
picked: [],
|
||||||
|
disabled: []
|
||||||
|
},
|
||||||
|
mode: 'normal',
|
||||||
|
adjustRangeToDisabled: true
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
if(methods[method]) {
|
||||||
|
var exec_result = methods[method].apply(this, Array.prototype.slice.call(mdp_arguments, 1));
|
||||||
|
switch(method) {
|
||||||
|
case 'removeDates':
|
||||||
|
case 'removeIndexes':
|
||||||
|
case 'resetDates':
|
||||||
|
case 'toggleDate':
|
||||||
|
case 'addDates':
|
||||||
|
var altField = $this.datepicker('option', 'altField');
|
||||||
|
// @todo: should use altFormat for altField
|
||||||
|
var dates_string = methods.value.call(this);
|
||||||
|
if (altField !== undefined && altField != "") {
|
||||||
|
$(altField).val(dates_string);
|
||||||
|
}
|
||||||
|
$this.val(dates_string);
|
||||||
|
|
||||||
|
$.datepicker._refreshDatepicker(this);
|
||||||
|
}
|
||||||
|
switch(method) {
|
||||||
|
case 'removeDates':
|
||||||
|
case 'getDates':
|
||||||
|
case 'gotDate':
|
||||||
|
case 'sumDays':
|
||||||
|
case 'compareDates':
|
||||||
|
case 'dateConvert':
|
||||||
|
case 'value':
|
||||||
|
ret = exec_result;
|
||||||
|
}
|
||||||
|
return exec_result;
|
||||||
|
} else if( typeof method === 'object' || ! method ) {
|
||||||
|
return methods.init.apply(this, mdp_arguments);
|
||||||
|
} else {
|
||||||
|
$.error('Method ' + method + ' does not exist on jQuery.multiDatesPicker');
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
};
|
||||||
|
|
||||||
|
var PROP_NAME = 'multiDatesPicker';
|
||||||
|
var dpuuid = new Date().getTime();
|
||||||
|
var instActive;
|
||||||
|
|
||||||
|
$.multiDatesPicker = {version: false};
|
||||||
|
//$.multiDatesPicker = new MultiDatesPicker(); // singleton instance
|
||||||
|
$.multiDatesPicker.initialized = false;
|
||||||
|
$.multiDatesPicker.uuid = new Date().getTime();
|
||||||
|
$.multiDatesPicker.version = $.ui.multiDatesPicker.version;
|
||||||
|
|
||||||
|
// allows MDP not to hide everytime a date is picked
|
||||||
|
$.multiDatesPicker._hideDatepicker = $.datepicker._hideDatepicker;
|
||||||
|
$.datepicker._hideDatepicker = function(){
|
||||||
|
var target = this._curInst.input[0];
|
||||||
|
var mdp = target.multiDatesPicker;
|
||||||
|
if(!mdp || (this._curInst.inline === false && !mdp.changed)) {
|
||||||
|
return $.multiDatesPicker._hideDatepicker.apply(this, arguments);
|
||||||
|
} else {
|
||||||
|
mdp.changed = false;
|
||||||
|
$.datepicker._refreshDatepicker(target);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Workaround for #4055
|
||||||
|
// Add another global to avoid noConflict issues with inline event handlers
|
||||||
|
window['DP_jQuery_' + dpuuid] = $;
|
||||||
|
})( jQuery );
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
@ -49,6 +49,12 @@
|
|||||||
|
|
||||||
.header.reduit .avatar {height: 25px; }
|
.header.reduit .avatar {height: 25px; }
|
||||||
|
|
||||||
|
.header.reduit #navbar-nameuser
|
||||||
|
{
|
||||||
|
top: 14px;
|
||||||
|
right: 210px;
|
||||||
|
}
|
||||||
|
|
||||||
/* ===================== FIN MODE REDUIT ==========================*/
|
/* ===================== FIN MODE REDUIT ==========================*/
|
||||||
|
|
||||||
/* fix defaut d'affichage sur toogle switch */
|
/* fix defaut d'affichage sur toogle switch */
|
||||||
@ -57,7 +63,11 @@ body {
|
|||||||
background: linear-gradient(180deg, var(--main), white,50%);
|
background: linear-gradient(180deg, var(--main), white,50%);
|
||||||
}
|
}
|
||||||
|
|
||||||
body.eleves, body.grp-National_1 {
|
#navbar-nameuser a {
|
||||||
|
color: var(--main, #004d9a) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
body.eleves, body.grp-National_1, body.grp-eleves {
|
||||||
--colorbody: #ffffff;
|
--colorbody: #ffffff;
|
||||||
--main: #169b62;
|
--main: #169b62;
|
||||||
--mainR: 22;
|
--mainR: 22;
|
||||||
@ -77,7 +87,7 @@ body.eleves, body.grp-National_1 {
|
|||||||
/* responsables #MAUVE #7D4E5B
|
/* responsables #MAUVE #7D4E5B
|
||||||
*/
|
*/
|
||||||
|
|
||||||
body.responsables, body.grp-National_2 {
|
body.responsables, body.grp-National_2,body.grp-responsables {
|
||||||
--colorbody: #ffffff;
|
--colorbody: #ffffff;
|
||||||
--main: #7d4e5b;
|
--main: #7d4e5b;
|
||||||
--mainR: 125;
|
--mainR: 125;
|
||||||
@ -96,7 +106,7 @@ body.responsables, body.grp-National_2 {
|
|||||||
|
|
||||||
|
|
||||||
/* professeurs, enseignants1d #BLEU1 #5770BE */
|
/* professeurs, enseignants1d #BLEU1 #5770BE */
|
||||||
body.professeurs, body.enseignants1d, body.grp-National_3 {
|
body.professeurs, body.enseignants1d, body.grp-National_3, body.grp-professeurs {
|
||||||
--colorbody: #ffffff;
|
--colorbody: #ffffff;
|
||||||
--main: #5770be;
|
--main: #5770be;
|
||||||
--mainR: 87;
|
--mainR: 87;
|
||||||
@ -114,7 +124,7 @@ body.professeurs, body.enseignants1d, body.grp-National_3 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* administratifs, admin #ORANGE #FF6F4C */
|
/* administratifs, admin #ORANGE #FF6F4C */
|
||||||
body.administratifs, body.admin, body.grp-National_4 , body.grp-National_5, body.grp-National_6 {
|
body.administratifs, body.admin, body.grp-National_4 , body.grp-National_5, body.grp-National_6 , body.grp-administratifs, {
|
||||||
--colorbody: #ffffff;
|
--colorbody: #ffffff;
|
||||||
--main: #ff6f4c;
|
--main: #ff6f4c;
|
||||||
--mainR: 255;
|
--mainR: 255;
|
||||||
@ -278,7 +288,9 @@ div.header > a.title > span {
|
|||||||
}
|
}
|
||||||
.nav.navbar-top-links.navbar-right > li a:hover {
|
.nav.navbar-top-links.navbar-right > li a:hover {
|
||||||
color: var(--fontcolorhover, white) !important;
|
color: var(--fontcolorhover, white) !important;
|
||||||
background: var(--fontcolorhoverdark, black) !important;
|
background: var(--light, black) !important;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding-top: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
@ -0,0 +1,26 @@
|
|||||||
|
{% set logo = "" %}
|
||||||
|
|
||||||
|
{% set header = "header.jpg" %}
|
||||||
|
{% set heightheader = "" %}
|
||||||
|
|
||||||
|
{% set colormain = "" %}
|
||||||
|
{% set fontcolorhover = "" %}
|
||||||
|
{% set colorbody = "" %}
|
||||||
|
|
||||||
|
{% set fontfacetitle = "" %}
|
||||||
|
{% set fontfacebody = "" %}
|
||||||
|
|
||||||
|
{{
|
||||||
|
render(url("cadoles_core_theme_setconfig",
|
||||||
|
{
|
||||||
|
'logo':logo,
|
||||||
|
'header': header,
|
||||||
|
'heightheader': heightheader,
|
||||||
|
'colormain': colormain,
|
||||||
|
'fontcolorhover': fontcolorhover,
|
||||||
|
'colorbody': colorbody,
|
||||||
|
'fontfacetitle': fontfacetitle,
|
||||||
|
'fontfacebody': fontfacebody
|
||||||
|
}
|
||||||
|
))
|
||||||
|
}}
|
After Width: | Height: | Size: 30 KiB |
@ -0,0 +1,3 @@
|
|||||||
|
name: White
|
||||||
|
author: Arnaud Fornerot
|
||||||
|
version: 1.0
|
After Width: | Height: | Size: 286 KiB |
@ -0,0 +1,25 @@
|
|||||||
|
.header{
|
||||||
|
background-image: url(header.jpg) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header .title {
|
||||||
|
color: var(--main);
|
||||||
|
}
|
||||||
|
|
||||||
|
.header .title:hover {
|
||||||
|
color: var(--light);
|
||||||
|
}
|
||||||
|
|
||||||
|
.header a {
|
||||||
|
color: var(--main);
|
||||||
|
}
|
||||||
|
|
||||||
|
.header a:hover {
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid-item .grid-item-title h2 {
|
||||||
|
font-weight: bold;
|
||||||
|
text-transform: initial;
|
||||||
|
font-size:110% !important;
|
||||||
|
}
|
@ -4,6 +4,8 @@
|
|||||||
<form>
|
<form>
|
||||||
<h1 class="page-header">Configuration Générale</h1>
|
<h1 class="page-header">Configuration Générale</h1>
|
||||||
|
|
||||||
|
Attention, selon la configuration du portail, certains paramètres sont forcés au niveau du serveur et donc certains réglages peuvent être inopérants dans cette interface.
|
||||||
|
<br><br>
|
||||||
<div class="panel panel-primary">
|
<div class="panel panel-primary">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<i class="fa fa-table fa-fw"></i> Liste des Configurations
|
<i class="fa fa-table fa-fw"></i> Liste des Configurations
|
||||||
@ -17,6 +19,7 @@
|
|||||||
<th width="90px">Action</th>
|
<th width="90px">Action</th>
|
||||||
<th width="70px">Ordre</th>
|
<th width="70px">Ordre</th>
|
||||||
<th width="200px">Clé</th>
|
<th width="200px">Clé</th>
|
||||||
|
<th>Description</th>
|
||||||
<th>Valeur</th>
|
<th>Valeur</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -38,6 +41,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>{{ config.order }}</td>
|
<td>{{ config.order }}</td>
|
||||||
<td>{{ config.id }}</td>
|
<td>{{ config.id }}</td>
|
||||||
|
<td>{{ config.help|raw }}</td>
|
||||||
<td>
|
<td>
|
||||||
{% if config.type == "boolean" %}
|
{% if config.type == "boolean" %}
|
||||||
{% if config.value == "0" %}
|
{% if config.value == "0" %}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
{% block pagewrapper %}
|
{% block pagewrapper %}
|
||||||
{{ form_start(form) }}
|
{{ form_start(form) }}
|
||||||
<h1 class="page-header">Modification Configuration Générale</h1>
|
<h1 class="page-header">Modification Configuration Générale = {{config.id}}</h1>
|
||||||
|
|
||||||
{{ form_widget(form.submit) }} <a class="btn btn-default" href={{ path('cadoles_core_config_commun') }}>Annuler</a>
|
{{ form_widget(form.submit) }} <a class="btn btn-default" href={{ path('cadoles_core_config_commun') }}>Annuler</a>
|
||||||
|
|
||||||
|
@ -49,5 +49,24 @@
|
|||||||
|
|
||||||
$(window).load(function () {
|
$(window).load(function () {
|
||||||
$('#largeimg').imgAreaSelect({ aspectRatio: '1:1', onSelectChange: preview });
|
$('#largeimg').imgAreaSelect({ aspectRatio: '1:1', onSelectChange: preview });
|
||||||
|
|
||||||
|
|
||||||
|
var selection = new Object();
|
||||||
|
if($('#largeimg').height()<$('#largeimg').width()) {
|
||||||
|
selection.width = $('#largeimg').height();
|
||||||
|
selection.height = $('#largeimg').height();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
selection.width = $('#largeimg').width();
|
||||||
|
selection.height = $('#largeimg').width();
|
||||||
|
}
|
||||||
|
|
||||||
|
selection.x1=0;
|
||||||
|
selection.x2=0;
|
||||||
|
selection.y1=0;
|
||||||
|
selection.y2=0;
|
||||||
|
|
||||||
|
preview($('#largeimg'),selection);
|
||||||
|
|
||||||
});
|
});
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -175,7 +175,7 @@
|
|||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a style="cursor:pointer;" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Modification Répertoire','{{ path('cadoles_core_'~access~'_file_rename',{'id': directory,'subdirectory':subdirectory,'oldname':dir.name}) }}');" class="item-update">
|
<a style="cursor:pointer;" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Modification Répertoire','{{ path('cadoles_core_'~access~'_file_rename',{'id': directory,'subdirectory':subdirectory,'oldname':dir.name}) }}');" class="item-update">
|
||||||
<i class="fa fa-file" title="Modifier le dossier"></i>
|
<i class="fa fa-file" title="Renommer le dossier"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a style="cursor:pointer;" onClick="trashFile('{{ directory }}','{{subdirectory}}','{{dir.name|e('js')|raw }}')" class="item-delete">
|
<a style="cursor:pointer;" onClick="trashFile('{{ directory }}','{{subdirectory}}','{{dir.name|e('js')|raw }}')" class="item-delete">
|
||||||
@ -218,7 +218,7 @@
|
|||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a style="cursor:pointer;" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Modification Fichier','{{ path('cadoles_core_'~access~'_file_rename',{'id': directory,'subdirectory':subdirectory,'oldname':file.name}) }}');" class="item-update">
|
<a style="cursor:pointer;" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Modification Fichier','{{ path('cadoles_core_'~access~'_file_rename',{'id': directory,'subdirectory':subdirectory,'oldname':file.name}) }}');" class="item-update">
|
||||||
<i class="fa fa-file" title="Modifier le fichier"></i>
|
<i class="fa fa-file" title="Renommer le fichier"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a style="cursor:pointer;" onClick="trashFile('{{ directory }}','{{subdirectory}}','{{file.name|e('js')|raw }}')" class="item-delete">
|
<a style="cursor:pointer;" onClick="trashFile('{{ directory }}','{{subdirectory}}','{{file.name|e('js')|raw }}')" class="item-delete">
|
||||||
@ -291,6 +291,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
{% if canupdate and not fgtrash %}
|
||||||
$('.file').on('dragstart', function (s) {
|
$('.file').on('dragstart', function (s) {
|
||||||
dirsource=$(this).data("dir");
|
dirsource=$(this).data("dir");
|
||||||
namesource=$(this).data("name");
|
namesource=$(this).data("name");
|
||||||
@ -313,11 +314,17 @@
|
|||||||
dirdestination=$(this).data("dir")+"/"+$(this).data("name");
|
dirdestination=$(this).data("dir")+"/"+$(this).data("name");
|
||||||
namedestination=namesource;
|
namedestination=namesource;
|
||||||
|
|
||||||
// Si la source est la meme que la destination on ne fait rien
|
urlsource=dirsource+"/"+namesource;
|
||||||
if(dirdestination+"/"+namedestination==dirsource+"/"+namesource) return false;
|
urlsource=urlsource.replace("//","/");
|
||||||
|
urldestination=dirdestination+"/"+namedestination;
|
||||||
|
urldestination=urldestination.replace("//","/");
|
||||||
|
|
||||||
|
// Si la source est la meme que la destination on ne fait rien
|
||||||
|
if(urlsource==urldestination) return false;
|
||||||
|
|
||||||
|
// Si la source est dans la destination on ne fait rien
|
||||||
|
//if(urldestination.includes(urlsource)) return false;
|
||||||
|
|
||||||
console.log(dirsource+"/"+namesource);
|
|
||||||
console.log(dirdestination+"/"+namedestination);
|
|
||||||
// On déplace l'element
|
// On déplace l'element
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
@ -336,11 +343,9 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -366,6 +371,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{% if canupdate %}
|
||||||
// Trasher un fichier
|
// Trasher un fichier
|
||||||
function trashFile(directory,subdirectory,filename) {
|
function trashFile(directory,subdirectory,filename) {
|
||||||
var r = confirm("Confirmez-vous la mise à la poubelle de ce fichier ? Vous pourrez le récupèrer si besoin.");
|
var r = confirm("Confirmez-vous la mise à la poubelle de ce fichier ? Vous pourrez le récupèrer si besoin.");
|
||||||
@ -422,6 +428,7 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
// Affichage des frames associés aux items de bureau
|
// Affichage des frames associés aux items de bureau
|
||||||
|
@ -46,7 +46,8 @@
|
|||||||
|
|
||||||
$('document').ready(function(){
|
$('document').ready(function(){
|
||||||
{% if toclose %}
|
{% if toclose %}
|
||||||
parent.location.reload();
|
href=parent.location.href;
|
||||||
|
parent.location.href=href;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
$("#form_subdirectory").focus();
|
$("#form_subdirectory").focus();
|
||||||
|
|
||||||
|
@ -4,11 +4,11 @@
|
|||||||
{{ form_start(form) }}
|
{{ form_start(form) }}
|
||||||
<h1 class="page-header">
|
<h1 class="page-header">
|
||||||
{% if mode=="update" %}
|
{% if mode=="update" %}
|
||||||
Modification Groupe
|
Modification Groupe = {{ group.label }}
|
||||||
{% elseif mode=="submit" %}
|
{% elseif mode=="submit" %}
|
||||||
Création Groupe
|
Création Groupe
|
||||||
{% elseif mode=="delete" %}
|
{% elseif mode=="delete" %}
|
||||||
Suppression Groupe
|
Suppression Groupe = {{ group.label }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
@ -0,0 +1,52 @@
|
|||||||
|
{% extends '@CadolesCore/base.html.twig' %}
|
||||||
|
|
||||||
|
{% block pagewrapper %}
|
||||||
|
<a class="btn btn-default" onClick="closeModal()">Fermer</a>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
<table class="table table-striped table-bordered table-hover" id="dataTablesnotin" style="width:100%">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Action</th>
|
||||||
|
<th>Email</th>
|
||||||
|
<th>Statut</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
{% for invitation in invitations %}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{% if invitation.relance %}
|
||||||
|
<a style='cursor:pointer' onClick='showMail("{{invitation.email}}")'><i class='fa fa-envelope fa-fw'></i></a>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
<td>{{invitation.email}}</td>
|
||||||
|
<td>{{invitation.statut}}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block localjavascript %}
|
||||||
|
$(document).ready(function() {
|
||||||
|
});
|
||||||
|
|
||||||
|
function showMail(email) {
|
||||||
|
window.parent.$("#mymodal").hide();
|
||||||
|
|
||||||
|
$("#mymodal").find(".modal-title").html("INVITATION");
|
||||||
|
var url="{{ path('cadoles_core_mail_invitationgroup',{id:id,email:'xxx'}) }}";
|
||||||
|
url=url.replace('xxx',email);
|
||||||
|
window.parent.$("#mymodal").find("#framemodal").attr("src",url);
|
||||||
|
window.parent.$("#mymodal").modal().show();
|
||||||
|
}
|
||||||
|
|
||||||
|
function closeModal() {
|
||||||
|
url=window.parent.location;
|
||||||
|
window.parent.location=url;
|
||||||
|
}
|
||||||
|
|
||||||
|
{% endblock %}
|
@ -9,17 +9,21 @@
|
|||||||
{%endif%}
|
{%endif%}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
<p>
|
||||||
{% set permgroup = app.session.get('permgroup') %}
|
{% set permgroup = app.session.get('permgroup') %}
|
||||||
{% if is_granted('ROLE_ADMIN') or (is_granted('ROLE_MODO') and (permgroup=="ROLE_MODO" or permgroup=="ROLE_ANIM" or permgroup=="ROLE_USER")) or (is_granted('ROLE_ANIM') and (permgroup=="ROLE_ANIM" or permgroup=="ROLE_USER")) or (is_granted('ROLE_USER') and permgroup=="ROLE_USER") %}
|
{% if is_granted('ROLE_ADMIN') or (is_granted('ROLE_MODO') and (permgroup=="ROLE_MODO" or permgroup=="ROLE_ANIM" or permgroup=="ROLE_USER")) or (is_granted('ROLE_ANIM') and (permgroup=="ROLE_ANIM" or permgroup=="ROLE_USER")) or (is_granted('ROLE_USER') and permgroup=="ROLE_USER") %}
|
||||||
<p><a class="btn btn-success" href={{ path('cadoles_core_'~access~'_group_submit') }}>
|
<a class="btn btn-success" href={{ path('cadoles_core_'~access~'_group_submit') }}>
|
||||||
{% if access=="config" %}
|
{% if access=="config" %}
|
||||||
Ajouter
|
Ajouter
|
||||||
{% else %}
|
{% else %}
|
||||||
Créer un Groupe de Travail
|
Créer un Groupe de Travail
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</a></p>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{%if access=="config" %}
|
||||||
|
<a class="btn btn-success" href={{ path('cadoles_core_config_group_export') }}>Exporter CSV</a>
|
||||||
|
{% endif %}
|
||||||
|
</p>
|
||||||
|
|
||||||
<div class="panel panel-primary">
|
<div class="panel panel-primary">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
@ -39,6 +43,7 @@
|
|||||||
{% if portal_activate %}
|
{% if portal_activate %}
|
||||||
<th>Groupe de Travail</th>
|
<th>Groupe de Travail</th>
|
||||||
<th class="text-center">Propriétaire</th>
|
<th class="text-center">Propriétaire</th>
|
||||||
|
<th class="no-sort">Visite</th>
|
||||||
{% if access=="config" %}
|
{% if access=="config" %}
|
||||||
<th>Création Pages</th>
|
<th>Création Pages</th>
|
||||||
<th>Création Calendriers</th>
|
<th>Création Calendriers</th>
|
||||||
|
@ -9,9 +9,15 @@
|
|||||||
<a class="btn btn-default" href={{ path('cadoles_core_home',{'id':idreturn}) }}>Fermer</a>
|
<a class="btn btn-default" href={{ path('cadoles_core_home',{'id':idreturn}) }}>Fermer</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if moderegistration!="none" and masteridentity=="SQL"%}
|
{% if moderegistration!="none" and masteridentity=="SQL" and group.fgcanshare %}
|
||||||
<a class="btn btn-primary" style="cursor:pointer" onClick="showMail();">Inviter des personnes non listées ci-dessous</a>
|
<a class="btn btn-primary" style="cursor:pointer" onClick="showMail();">Inviter des personnes non listées ci-dessous</a>
|
||||||
|
<a class="btn btn-primary" style="cursor:pointer" onClick="showInvitations();">Suivi des Invitations</a>
|
||||||
{%endif%}
|
{%endif%}
|
||||||
|
|
||||||
|
{% if group.fgcanshare %}
|
||||||
|
<button class="btn btn-default pull-right" style="margin-left:10px" data-toggle="modal" data-target="#modalperm">Matrice des permissions</button>
|
||||||
|
{%endif%}
|
||||||
|
|
||||||
<a class="btn btn-default pull-right" href={{ path('cadoles_core_'~access~'_group_usergroup_export',{'id':group.id}) }}>Exporter CSV</a>
|
<a class="btn btn-default pull-right" href={{ path('cadoles_core_'~access~'_group_usergroup_export',{'id':group.id}) }}>Exporter CSV</a>
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
@ -30,9 +36,11 @@
|
|||||||
<th width="70px" class="no-sort">Avatar</th>
|
<th width="70px" class="no-sort">Avatar</th>
|
||||||
<th width="200px">Login</th>
|
<th width="200px">Login</th>
|
||||||
<th>Email</th>
|
<th>Email</th>
|
||||||
|
{% if fgviewvisite %}
|
||||||
<th class="no-sort no-visible">Visite</th>
|
<th class="no-sort no-visible">Visite</th>
|
||||||
|
{% endif %}
|
||||||
{% if group.fgcanshare %}
|
{% if group.fgcanshare %}
|
||||||
<th class="no-sort no-visible">Manager</th>
|
<th class="no-sort no-visible">Permissions</th>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -57,9 +65,11 @@
|
|||||||
<th width="70px" class="no-sort">Avatar</th>
|
<th width="70px" class="no-sort">Avatar</th>
|
||||||
<th width="200px">Login</th>
|
<th width="200px">Login</th>
|
||||||
<th>Email</th>
|
<th>Email</th>
|
||||||
|
{% if fgviewvisite %}
|
||||||
<th class="no-sort">Visite</th>
|
<th class="no-sort">Visite</th>
|
||||||
|
{% endif %}
|
||||||
{% if group.fgcanshare %}
|
{% if group.fgcanshare %}
|
||||||
<th class="no-sort">Manager</th>
|
<th class="no-sort">Permissions</th>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -69,6 +79,333 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="modalperm" 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">×</button>
|
||||||
|
<h4 class="modal-title">MATRICE DES PERMISSIONS</h4>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="dataTable_wrapper">
|
||||||
|
<table class="table table-striped table-bordered table-hover" id="dataTablesnotin" style="width:100%; text-align:center; zoom:80%">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Permissions</th>
|
||||||
|
<th style="text-align:center">Propriétaire<br>***</th>
|
||||||
|
<th style="text-align:center">Gestionnaire<br>**</th>
|
||||||
|
<th style="text-align:center">Collaborateur<br>*</th>
|
||||||
|
<th style="text-align:center">Utilisateur<br> </th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" style="font-weight: bold;">GROUPE</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Modifier le groupe</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Supprimer le groupe</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Changer le propriétaire du groupe</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Affecter des utilisateurs au groupe</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Désaffecter des utilisateurs au groupe</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Inviter des utilisateurs dans le groupe</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Visualiser les statistiques du groupe</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">S’inscrire par soi-même sur les groupes ouverts</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Se désinscrire par soi-même </td>
|
||||||
|
<td></td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" style="font-weight: bold;">PAGE</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Créer / Modifier / Supprimer / Partager des Pages sur le groupe</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Placer en favoris une page du groupe</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" style="font-weight: bold;">WIDGET</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Widget Favoris = Ajouter / Modifier / Supprimer Lien</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Widget Fichier = Ajouter / Modifier / Supprimer Fichiers</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Widget Lien = Modifier Lien</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Widget Editeur = Modifier Texte</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Widget Carrousel = Créer / Modifier / Supprimer Image</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Widget Gallerie Images = Créer / Modifier / Supprimer Image</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Widget Chat = Ajouter commentaires</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Widget Chat = Modifier / Supprimer Commentaires des membres du groupe</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Widget Chat = Masquer Commentaires des membres du groupe</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" style="font-weight: bold;">BLOG</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Créer / Modifier / Supprimer / Partager un blog sur le groupe</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Créer des articles sur les blogs du groupe</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Modifier / Supprimer ses articles sur les blogs du groupe</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Modifier / Supprimer des articles de blog des autres membres du groupe</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Ajouter des commentaires sur les articles du blog</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Modifier / Supprimer ses propres commentaires</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Modifier / Supprimer les commentaires des autres membre du groupe de ses articles</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Modifier / Supprimer les commentaires des autres membre du groupe sur l'ensemble du blog</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" style="font-weight: bold;">PROJET</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Créer / Modifier / Supprimer / Partager des projets sur le groupe</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Créer des taches sur les projets du groupe</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Modifier / Supprimer ses propres tâches</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Affecter des tâches aux autres membres du groupe</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Modifier / Supprimer des Tâches à des autres membres du groupe</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Ajouter des commentaires sur les tâches</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Modifier / Supprimer ses propres commentaires de tâches</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Modifier / Supprimer les commentaires des autres membre du groupe de ses taches</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Modifier / Supprimer les commentaires des taches sur l'ensemble du projet</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" style="font-weight: bold;">CALENDRIER</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Créer / Modifier / Supprimer / Partager un calendrier sur le groupe</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Créer des évènements sur les calendriers du groupe</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:left;">Créer / Modifier / Supprimer / Partager des évènements sur les calendriers du groupe</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td>x</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block localjavascript %}
|
{% block localjavascript %}
|
||||||
@ -151,15 +488,17 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function switchManager(id) {
|
function changeRole(id) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
url: "{{ path('cadoles_core_'~access~'_group_ajax_switchmanager') }}",
|
url: "{{ path('cadoles_core_'~access~'_group_ajax_changerole') }}",
|
||||||
data: {
|
data: {
|
||||||
"group": {{ group.id }},
|
"group": {{ group.id }},
|
||||||
"user": id,
|
"user": id,
|
||||||
|
"role": $("#roleuser-"+id).val(),
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function showMail() {
|
function showMail() {
|
||||||
@ -168,4 +507,11 @@
|
|||||||
$("#mymodal").find("#framemodal").attr("src",url);
|
$("#mymodal").find("#framemodal").attr("src",url);
|
||||||
$("#mymodal").modal().show();
|
$("#mymodal").modal().show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showInvitations() {
|
||||||
|
$("#mymodal").find(".modal-title").html("SUVI DES INVITATIONS");
|
||||||
|
var url="{{ path('cadoles_core_'~access~'_group_invitation',{id:group.id}) }}";
|
||||||
|
$("#mymodal").find("#framemodal").attr("src",url);
|
||||||
|
$("#mymodal").modal().show();
|
||||||
|
}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
{% set permannu = app.session.get('permannu') %}
|
{% set permannu = app.session.get('permannu') %}
|
||||||
|
|
||||||
{% if fgheader %}
|
{% if fgheader %}
|
||||||
<li id="menu-header"><a onclick="switchHeader()" title="Cacher / Affichier Bannière " style="cursor:pointer"><i class="fa fa-chevron-up fa-fw"></i></a>
|
<li id="menu-header"><a onclick="switchHeader()" title="Cacher / Afficher Bannière " style="cursor:pointer"><i class="fa fa-chevron-up fa-fw"></i></a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li id="menu-header"><a onclick="switchHeader()" title="Cacher / Affichier Bannière " style="cursor:pointer"><i class="fa fa-chevron-down fa-fw"></i></a>
|
<li id="menu-header"><a onclick="switchHeader()" title="Cacher / Afficher Bannière " style="cursor:pointer"><i class="fa fa-chevron-down fa-fw"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if is_granted('ROLE_ADMIN') or (is_granted('ROLE_MODO') and (permannu=="ROLE_MODO" or permannu=="ROLE_ANIM" or permannu=="ROLE_USER")) or (is_granted('ROLE_ANIM') and (permannu=="ROLE_ANIM" or permannu=="ROLE_USER")) or (is_granted('ROLE_USER') and permannu=="ROLE_USER") %}
|
{% if is_granted('ROLE_ADMIN') or (is_granted('ROLE_MODO') and (permannu=="ROLE_MODO" or permannu=="ROLE_ANIM" or permannu=="ROLE_USER")) or (is_granted('ROLE_ANIM') and (permannu=="ROLE_ANIM" or permannu=="ROLE_USER")) or (is_granted('ROLE_USER') and permannu=="ROLE_USER") %}
|
||||||
|
@ -4,11 +4,11 @@
|
|||||||
{{ form_start(form) }}
|
{{ form_start(form) }}
|
||||||
<h1 class="page-header">
|
<h1 class="page-header">
|
||||||
{% if mode=="update" %}
|
{% if mode=="update" %}
|
||||||
Modification {{ labelniveau01 }}
|
Modification {{ labelniveau01 }} = {{niveau01.label}}
|
||||||
{% elseif mode=="submit" %}
|
{% elseif mode=="submit" %}
|
||||||
Création {{ labelniveau01 }}
|
Création {{ labelniveau01 }}
|
||||||
{% elseif mode=="delete" %}
|
{% elseif mode=="delete" %}
|
||||||
Suppression {{ labelniveau01 }}
|
Suppression {{ labelniveau01 }} = {{niveau01.label}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
@ -4,11 +4,11 @@
|
|||||||
{{ form_start(form) }}
|
{{ form_start(form) }}
|
||||||
<h1 class="page-header">
|
<h1 class="page-header">
|
||||||
{% if mode=="update" %}
|
{% if mode=="update" %}
|
||||||
Modification {{ labelniveau02 }}
|
Modification {{ labelniveau02 }} = {{niveau02.label}}
|
||||||
{% elseif mode=="submit" %}
|
{% elseif mode=="submit" %}
|
||||||
Création {{ labelniveau02 }}
|
Création {{ labelniveau02 }}
|
||||||
{% elseif mode=="delete" %}
|
{% elseif mode=="delete" %}
|
||||||
Suppression {{ labelniveau02 }}
|
Suppression {{ labelniveau02 }} = {{niveau02.label}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
@ -4,11 +4,11 @@
|
|||||||
{{ form_start(form) }}
|
{{ form_start(form) }}
|
||||||
<h1 class="page-header">
|
<h1 class="page-header">
|
||||||
{% if mode=="update" %}
|
{% if mode=="update" %}
|
||||||
Modification Profil de Modération
|
Modification Profil de Modération = {{ permmodoprofil.name }}
|
||||||
{% elseif mode=="submit" %}
|
{% elseif mode=="submit" %}
|
||||||
Création Profil de Modération
|
Création Profil de Modération
|
||||||
{% elseif mode=="delete" %}
|
{% elseif mode=="delete" %}
|
||||||
Suppression Profil de Modération
|
Suppression Profil de Modération = {{ permmodoprofil.name }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
@ -5,11 +5,11 @@
|
|||||||
{% if moderegistration!="none" %}
|
{% if moderegistration!="none" %}
|
||||||
<h1 class="page-header">
|
<h1 class="page-header">
|
||||||
{% if mode=="send" %}
|
{% if mode=="send" %}
|
||||||
Confirmation à l'Utilisateur
|
Confirmation à l'Utilisateur = {{ registration.username }}
|
||||||
{% elseif mode=="submit" %}
|
{% elseif mode=="submit" %}
|
||||||
Inscription
|
Inscription
|
||||||
{% elseif mode=="delete" %}
|
{% elseif mode=="delete" %}
|
||||||
Suppression Inscription
|
Suppression Inscription = {{ registration.username }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
@ -21,7 +21,11 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if mode!="submit" %}
|
{% if mode!="submit" %}
|
||||||
{% if mode=="send" %} {{ form_widget(form.save) }} {%endif%}
|
{% if mode=="send" %}
|
||||||
|
{{ form_widget(form.save) }}
|
||||||
|
<a class="btn btn-default" href="mailto:{{registration.email}}?subject= {{app.session.get('appname')}} : à propos de votre inscription">Envoyer un mail</a>
|
||||||
|
{%endif%}
|
||||||
|
|
||||||
<a class="btn btn-default" href={{ path('cadoles_core_config_registration') }}>Annuler</a>
|
<a class="btn btn-default" href={{ path('cadoles_core_config_registration') }}>Annuler</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
@ -56,6 +60,19 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
{% if mode=="send" %}
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="panel panel-primary">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<i class="fa fa-key fa-fw"></i> Notes Administrateur
|
||||||
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
{{ form_widget(form.note) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{%endif%}
|
||||||
|
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<div class="panel panel-primary">
|
<div class="panel panel-primary">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
@ -90,7 +107,13 @@
|
|||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
{% if form.firstname is defined %} {{ form_row(form.firstname) }} {% endif %}
|
{% if form.firstname is defined %} {{ form_row(form.firstname) }} {% endif %}
|
||||||
{{ form_row(form.lastname) }}
|
{{ form_row(form.lastname) }}
|
||||||
{% if form.email is defined %} {{ form_row(form.email) }} {% endif %}
|
{% if form.email is defined %}
|
||||||
|
{{ form_row(form.email) }}
|
||||||
|
<div class='alert alert-info alert-email' style='display:none; font-size: 80%;padding: 5px;margin-top: -10px;'>
|
||||||
|
Votre mail ne fait pas partie des mails professonniels pré-inscrits dans {{app.session.get("appname")}}.<br>
|
||||||
|
S'il s'agit de votre mail professionnel vous devez compléter le formulaire "Motivations" pour que l'administrateur de {{app.session.get("appname")}} valide votre demannde d'inscription.
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
{% if form.visible is defined %} {{ form_row(form.visible) }} {% endif %}
|
{% if form.visible is defined %} {{ form_row(form.visible) }} {% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -196,6 +219,29 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(document.body).on("focusout","#registration_email",function(){
|
||||||
|
$.ajax({
|
||||||
|
method: "POST",
|
||||||
|
url: "{{ path('cadoles_core_ajax_iswhitelist') }}",
|
||||||
|
data: {
|
||||||
|
email:$("#registration_email").val(),
|
||||||
|
},
|
||||||
|
success: function(data) {
|
||||||
|
if(data=="KO") {
|
||||||
|
$("#registration_motivation").attr("required","required");
|
||||||
|
$(".alert-email").show();
|
||||||
|
$("label[for='registration_motivation']").text("Motivation *");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$("#registration_motivation").removeAttr("required");
|
||||||
|
$(".alert-email").hide();
|
||||||
|
$("label[for='registration_motivation']").text("Motivation");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
function hideshow() {
|
function hideshow() {
|
||||||
if($("#registration_birthcountry").val()==269)
|
if($("#registration_birthcountry").val()==269)
|
||||||
$("#blockcity").show();
|
$("#blockcity").show();
|
||||||
@ -207,10 +253,12 @@
|
|||||||
niveau01=$("#registration_niveau01 option:selected").text().toLowerCase();
|
niveau01=$("#registration_niveau01 option:selected").text().toLowerCase();
|
||||||
if(niveau01.startsWith("autre")) {
|
if(niveau01.startsWith("autre")) {
|
||||||
$("#niveau01other").show();
|
$("#niveau01other").show();
|
||||||
|
$("#registration_niveau01other").attr("required","required");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$("#registration_niveau01other").val("");
|
$("#registration_niveau01other").val("");
|
||||||
$("#niveau01other").hide();
|
$("#niveau01other").hide();
|
||||||
|
$("#registration_niveau01other").removeAttr("required");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,13 +1,25 @@
|
|||||||
{% extends '@CadolesCore/base.html.twig' %}
|
{% extends '@CadolesCore/base.html.twig' %}
|
||||||
|
|
||||||
{% block pagewrapper %}
|
{% block pagewrapper %}
|
||||||
<h1 class="page-header">Inscriptions</h1>
|
<h1 class="page-header">{%if infotitle is defined%}{{infotitle}}{%else%}Inscriptions{%endif%}</h1>
|
||||||
|
|
||||||
<div style="padding-top:50px;max-width: 1000px; margin:auto; font-size:18px;">
|
<div style="padding-top:50px;max-width: 1000px; margin:auto; font-size:18px;">
|
||||||
<div class='alert alert-{{ mode }}' style='margin: 5px 0px'>
|
<div class='alert alert-{{ mode }}' style='margin: 5px 0px'>
|
||||||
{% autoescape %}
|
{% autoescape %}
|
||||||
<p>{{ info|raw }}</p>
|
<p>{{ info|raw }}</p>
|
||||||
{% endautoescape %}
|
{% endautoescape %}
|
||||||
|
|
||||||
|
{% if mode=="error" %}
|
||||||
|
{% if mode_auth == "SAML" %}
|
||||||
|
<a class="btn btn-primary" href="{{ path("lightsaml_sp.logout") }}">Déconnexion</a>
|
||||||
|
{% elseif mode_auth == "CAS" %}
|
||||||
|
<a class="btn btn-primary" href="{{ path("cas_sp.logout") }}">Déconnexion</a>
|
||||||
|
{% elseif mode_auth == "SQL" %}
|
||||||
|
<a class="btn btn-primary" href="{{ path("cadoles_core_logout") }}">Déconnexion</a>
|
||||||
|
{% elseif mode_auth == "LDAP" %}
|
||||||
|
<a class="btn btn-primary" href="{{ path("cadoles_core_ldap_logout") }}">Déconnexion</a>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -18,7 +30,9 @@
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
// Redirection vers la mire d'authentification
|
// Redirection vers la mire d'authentification
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
{% if mode_auth == "SAML" %}
|
{% if redirectto is defined and redirectto is not null %}
|
||||||
|
window.location.href="{{ redirectto }}";
|
||||||
|
{% elseif mode_auth == "SAML" %}
|
||||||
window.location.href="{{ path("lightsaml_sp.login") }}";
|
window.location.href="{{ path("lightsaml_sp.login") }}";
|
||||||
{% elseif mode_auth == "CAS" %}
|
{% elseif mode_auth == "CAS" %}
|
||||||
window.location.href="{{ path("cas_sp.login") }}";
|
window.location.href="{{ path("cas_sp.login") }}";
|
||||||
@ -32,6 +46,5 @@
|
|||||||
}, 6000);
|
}, 6000);
|
||||||
});
|
});
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<div class="panel panel-primary">
|
<div class="panel panel-primary">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<i class="fa fa-table fa-fw"></i> Compteur de visites journalière
|
<i class="fa fa-table fa-fw"></i> Compteur de visites journalières
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
<div class="panel panel-primary">
|
<div class="panel panel-primary">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<i class="fa fa-table fa-fw"></i> Compteur de visites journalière des groupes de travail
|
<i class="fa fa-table fa-fw"></i> Compteur de visites journalières des groupes de travail
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
@ -27,7 +27,7 @@
|
|||||||
<div class="col col-md-6">
|
<div class="col col-md-6">
|
||||||
<div class="panel panel-primary">
|
<div class="panel panel-primary">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<i class="fa fa-table fa-fw"></i> Evolution du nombre de message dans les tchat
|
<i class="fa fa-table fa-fw"></i> Évolution du nombre de message dans les chats
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
@ -39,7 +39,7 @@
|
|||||||
<div class="col col-md-6">
|
<div class="col col-md-6">
|
||||||
<div class="panel panel-primary">
|
<div class="panel panel-primary">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<i class="fa fa-table fa-fw"></i> Evolution du nombre d'articles de blog
|
<i class="fa fa-table fa-fw"></i> Évolution du nombre d'articles de blog
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<h1 class="page-header">
|
<h1 class="page-header">
|
||||||
{% if mode=="update" %}
|
{% if mode=="update" %}
|
||||||
{% if access=="config" %}
|
{% if access=="config" %}
|
||||||
Modification Utilisateur
|
Modification Utilisateur = {{ user.username}}
|
||||||
{% else %}
|
{% else %}
|
||||||
Profil
|
Profil
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -63,6 +63,19 @@
|
|||||||
<a class="btn btn-info" style="width:100%; margin-bottom:15px;" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Avatar','{{ path('cadoles_core_crop01') }}');" title='Ajouter un avatar'>Modifier</a>
|
<a class="btn btn-info" style="width:100%; margin-bottom:15px;" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Avatar','{{ path('cadoles_core_crop01') }}');" title='Ajouter un avatar'>Modifier</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% if access=="config" %}
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="panel panel-primary">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<i class="fa fa-key fa-fw"></i> Notes Administrateur
|
||||||
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
{{ form_widget(form.note) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{%endif%}
|
||||||
|
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<div class="panel panel-primary">
|
<div class="panel panel-primary">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
@ -169,12 +182,21 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
{% for group in user.groups %}
|
{% for group in user.groups %}
|
||||||
<tr id="linkgroup{{ group.group.id }}">
|
<tr id="linkgroup{{ group.group.id }}">
|
||||||
{% if access=="config" and not group.group.fgall and group.group.ldapfilter=="" and group.group.attributes =="" %}
|
{% set canleave = true %}
|
||||||
<td><a style="cursor:pointer" title="Se Désinscrire"><i class="fa fa-sign-out fa-fw" onclick="removeLinkGroup({{ group.group.id }})"></i></a></td>
|
{% if group.group.fgtemplate or group.group.fgall or group.group.owner==user %}
|
||||||
{% elseif (group.group.fgopen or group.group.fgcanshare) and group.group.owner!=app.user and not group.group.fgall and group.group.ldapfilter=="" and group.group.attributes =="" %}
|
{% set canleave = false %}
|
||||||
<td><a style="cursor:pointer" title="Se Désinscrire"><i class="fa fa-sign-out fa-fw" onclick="removeLinkGroup({{ group.group.id }})"></i></a></td>
|
{% elseif access!="config" %}
|
||||||
|
{% if not group.group.fgcanshare and not group.group.fgopen %}
|
||||||
|
{% set canleave = false %}
|
||||||
|
{% elseif group.group.fgcanshare and not app.session.get('permunsubscribe') and not group.group.fgopen %}
|
||||||
|
{% set canleave = false %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if canleave %}
|
||||||
|
<td><a style="cursor:pointer" title="Se Désinscrire"><i class="fa fa-sign-out-alt fa-fw" onclick="removeLinkGroup({{ group.group.id }})"></i></a></td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td></td>
|
<td></td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
|
@ -42,10 +42,10 @@ td { font-size: 10px; }
|
|||||||
{% if viewniveau02 %}
|
{% if viewniveau02 %}
|
||||||
<th class="no-sort {% if fields["niveau02"] is defined and fields["niveau02"].perm==0 %}no-visible{% endif %}">{{ labelniveau02 }}</th>
|
<th class="no-sort {% if fields["niveau02"] is defined and fields["niveau02"].perm==0 %}no-visible{% endif %}">{{ labelniveau02 }}</th>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<th class="no-sort {% if fields["group"] is defined and fields["group"].perm==0 %}no-visible{% endif %}">Groupes</th>
|
<th class="no-sort {% if fields["group"] is defined and fields["group"].perm==0 and is_granted('ROLE_USER') %}no-visible{% endif %}">Groupes</th>
|
||||||
<th class="{% if fields["job"] is defined and fields["job"].perm==0 %}no-visible{% endif %}">Métier</th>
|
<th class="{% if fields["job"] is defined and fields["job"].perm==0 %}no-visible{% endif %}">Métier</th>
|
||||||
<th class="{% if fields["position"] is defined and fields["position"].perm==0 %}no-visible{% endif %}">Fonction</th>
|
<th class="{% if fields["position"] is defined and fields["position"].perm==0 %}no-visible{% endif %}">Fonction</th>
|
||||||
<th class="{% if fields["visitedate"] is defined and fields["visitedate"].perm==0 %}no-visible{% endif %}">Visite</th>
|
<th class="{% if fields["visitedate"] is defined and fields["visitedate"].perm==0 and (is_granted('ROLE_USER') or is_granted('ROLE_ANIM')) %}no-visible{% endif %}">Visite</th>
|
||||||
<th class="{% if fields["role"] is defined and fields["role"].perm==0 %}no-visible{% endif %}">Rôle</th>
|
<th class="{% if fields["role"] is defined and fields["role"].perm==0 %}no-visible{% endif %}">Rôle</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -11,28 +11,32 @@
|
|||||||
<br>L'utilisateur souhaite masquer ses informations personnelles.
|
<br>L'utilisateur souhaite masquer ses informations personnelles.
|
||||||
{% else %}
|
{% else %}
|
||||||
{%if user.lastname %}<b>Nom</b> = {{ user.lastname }}<br>{%endif%}
|
{%if user.lastname %}<b>Nom</b> = {{ user.lastname }}<br>{%endif%}
|
||||||
{%if user.firstname %}<b>Prénom</b> = {{ user.firstname }}<br>{%endif%}
|
{%if user.firstname and not fields["firstname"]["perm"]==0 %}<b>{{fields["firstname"]["label"]}}</b> = {{ user.firstname }}<br>{%endif%}
|
||||||
{%if user.email %}<b>Email</b> = <a href='mailto:{{ user.email }}'>{{ user.email }}</a><br>{%endif%}
|
{%if user.email %}<b>Email</b> = <a href='mailto:{{ user.email }}'>{{ user.email }}</a><br>{%endif%}
|
||||||
{%if user.telephonenumber %}<b>Téléphone</b> = {{ user.telephonenumber }}<br>{%endif%}
|
{%if user.telephonenumber and not fields["telephonenumber"]["perm"]==0 %}<b>{{fields["telephonenumber"]["label"]}}</b> = {{ user.telephonenumber }}<br>{%endif%}
|
||||||
{%if user.niveau01 %}<b>{{ labelniveau01 }}</b> = {{ user.niveau01.label }}<br>{%endif%}
|
{%if user.niveau01 %}<b>{{ labelniveau01 }}</b> = {{ user.niveau01.label }}<br>{%endif%}
|
||||||
{%if viewniveau02 and user.niveau02%}<b>{{ labelniveau02 }}</b> = {{ user.niveau02.label }}<br>{% endif %}
|
{%if viewniveau02 and user.niveau02%}<b>{{ labelniveau02 }}</b> = {{ user.niveau02.label }}<br>{% endif %}
|
||||||
{%if user.job %}<b>Métier</b> = {{ user.job }}<br>{%endif%}
|
{%if user.job and not fields["job"]["perm"]==0 %}<b>{{fields["position"]["job"]}}</b> = {{ user.job }}<br>{%endif%}
|
||||||
{%if user.position %}<b>Fonction</b> = {{ user.position }}<br>{%endif%}
|
{%if user.position and not fields["position"]["perm"]==0 %}<b>{{fields["position"]["label"]}}</b> = {{ user.position }}<br>{%endif%}
|
||||||
{%if user.postaladress %}<b>Adresse</b> = {{ user.postaladress }}<br>{%endif%}
|
{%if user.postaladress and not fields["postaladress"]["perm"]==0 %}<b>{{fields["postaladress"]["label"]}}</b> = {{ user.postaladress }}<br>{%endif%}
|
||||||
{%if user.visitedate %}<b>Date de dernière visite</b> = {{ user.visitedate|date('d/m/Y H:i') }}<br>{%endif%}
|
|
||||||
{%if user.visitecpt %}<b>Nombre de visites</b> = {{ user.visitecpt }}<br>{%endif%}
|
|
||||||
<br>
|
|
||||||
{% set fgtitle=false %}
|
|
||||||
{% for usergroup in user.groups %}
|
|
||||||
{% if usergroup.group.fgcanshare %}
|
|
||||||
{% if not fgtitle %}
|
|
||||||
<br><b>Groupes de Travail</b><br>
|
|
||||||
{% set fgtitle=true %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{{ usergroup.group.label }}<br>
|
{%if user.visitedate and (not fields["visitedate"]["perm"]==0 or (not is_granted('ROLE_USER') and not is_granted('ROLE_ANIM'))) %}<b>Date de dernière visite</b> = {{ user.visitedate|date('d/m/Y H:i') }}<br>{%endif%}
|
||||||
{% endif %}
|
{%if user.visitecpt and (not fields["visitedate"]["perm"]==0 or (not is_granted('ROLE_USER') and not is_granted('ROLE_ANIM'))) %}<b>Nombre de visites</b> = {{ user.visitecpt }}<br>{%endif%}
|
||||||
{% endfor %}
|
|
||||||
|
{% if not fields["group"].perm==0 or not is_granted('ROLE_USER') %}
|
||||||
|
<br>
|
||||||
|
{% set fgtitle=false %}
|
||||||
|
{% for usergroup in user.groups %}
|
||||||
|
{% if usergroup.group.fgcanshare %}
|
||||||
|
{% if not fgtitle %}
|
||||||
|
<br><b>Groupes de Travail</b><br>
|
||||||
|
{% set fgtitle=true %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{{ usergroup.group.label }}<br>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
@ -4,11 +4,11 @@
|
|||||||
{{ form_start(form) }}
|
{{ form_start(form) }}
|
||||||
<h1 class="page-header">
|
<h1 class="page-header">
|
||||||
{% if mode=="update" %}
|
{% if mode=="update" %}
|
||||||
Modification Liste Blanche
|
Modification Liste Blanche = {{ whitelist.label }}
|
||||||
{% elseif mode=="submit" %}
|
{% elseif mode=="submit" %}
|
||||||
Création Liste Blanche
|
Création Liste Blanche
|
||||||
{% elseif mode=="delete" %}
|
{% elseif mode=="delete" %}
|
||||||
Suppression Liste Blanche
|
Suppression Liste Blanche = {{ whitelist.label }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
@ -84,6 +84,10 @@
|
|||||||
{{ include('@CadolesCore/Include/menu.html.twig') }}
|
{{ include('@CadolesCore/Include/menu.html.twig') }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
{% if app.user %}
|
||||||
|
<div id="navbar-nameuser"><a href="{{ path('cadoles_core_user') }}" title="Profil">{{ app.user.firstname }} {{ app.user.lastname }}</a></div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -106,6 +110,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul class="nav navbar-top-links navbar-right">
|
<ul class="nav navbar-top-links navbar-right">
|
||||||
|
{% if app.user %}
|
||||||
|
<a id="navbar-nameuser" href="{{ path('cadoles_core_user') }}" title="Profil">{{ app.user.firstname }} {{ app.user.lastname }}</a>
|
||||||
|
{% endif %}
|
||||||
{% if mustread is not defined %}
|
{% if mustread is not defined %}
|
||||||
{{ include('@CadolesCore/Include/menu.html.twig') }}
|
{{ include('@CadolesCore/Include/menu.html.twig') }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -81,6 +81,7 @@ class samlUserCreatorService implements UserCreatorInterface
|
|||||||
$user->setAvatar("noavatar.png");
|
$user->setAvatar("noavatar.png");
|
||||||
$user->setVisible(true);
|
$user->setVisible(true);
|
||||||
$user->setAuthlevel("simple");
|
$user->setAuthlevel("simple");
|
||||||
|
$user->setBelongingpopulation("agent");
|
||||||
$user->setRole("ROLE_USER");
|
$user->setRole("ROLE_USER");
|
||||||
|
|
||||||
// Création
|
// Création
|
||||||
|
@ -145,7 +145,7 @@ class CronCommand extends ContainerAwareCommand
|
|||||||
if($cron->getRepeatcall()>0) $cron->setRepeatexec($cron->getRepeatexec()+1);
|
if($cron->getRepeatcall()>0) $cron->setRepeatexec($cron->getRepeatexec()+1);
|
||||||
|
|
||||||
// Envoyer un mail à l'ensemble des administrateurs
|
// Envoyer un mail à l'ensemble des administrateurs
|
||||||
$this->sendMailerror();
|
$this->sendMailerror($cron);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ class CronCommand extends ContainerAwareCommand
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function sendMailerror() {
|
private function sendMailerror($cron) {
|
||||||
$appname="";
|
$appname="";
|
||||||
$config = $this->em->getRepository("CadolesCoreBundle:Config")->findOneBy(["id"=>"appname"]);
|
$config = $this->em->getRepository("CadolesCoreBundle:Config")->findOneBy(["id"=>"appname"]);
|
||||||
if($config) $appname = $config->getValue();
|
if($config) $appname = $config->getValue();
|
||||||
@ -184,8 +184,8 @@ class CronCommand extends ContainerAwareCommand
|
|||||||
|
|
||||||
$mail_params=array(
|
$mail_params=array(
|
||||||
"subject" => $appname." : ERREUR SUR EXECUTION JOB",
|
"subject" => $appname." : ERREUR SUR EXECUTION JOB",
|
||||||
"body_html"=> "ATTENTION UN JOB EST EN ERREUR. MERCI DE VERIFIER LES LOGS.",
|
"body_html"=> "ATTENTION UN JOB EST EN ERREUR. MERCI DE VERIFIER LES LOGS.<br>Command = ".$cron->getCommand()."<br>Description = ".$cron->getDescription(),
|
||||||
"body_text"=> "ATTENTION UN JOB EST EN ERREUR. MERCI DE VERIFIER LES LOGS."
|
"body_text"=> "ATTENTION UN JOB EST EN ERREUR. MERCI DE VERIFIER LES LOGS.\nCommand = ".$cron->getCommand()."\nDescription = ".$cron->getDescription()
|
||||||
);
|
);
|
||||||
|
|
||||||
$message = $this->container->get('cadoles.core.service.mail');
|
$message = $this->container->get('cadoles.core.service.mail');
|
||||||
|
@ -200,7 +200,8 @@ class ApiController extends Controller
|
|||||||
$bookmarks=null;
|
$bookmarks=null;
|
||||||
$items=null;
|
$items=null;
|
||||||
$itemcategorys=null;
|
$itemcategorys=null;
|
||||||
$weburl="https://".$this->getParameter("weburl")."/".$this->getParameter("alias")."/";
|
# fixe #31884 "https://" => "//"
|
||||||
|
$weburl="//".$this->getParameter("weburl")."/".$this->getParameter("alias")."/";
|
||||||
|
|
||||||
$em->getRepository("CadolesPortalBundle:Item")->getUserItems($user,$bookmarks,$items,$itemcategorys,null,$ssoitems,3);
|
$em->getRepository("CadolesPortalBundle:Item")->getUserItems($user,$bookmarks,$items,$itemcategorys,null,$ssoitems,3);
|
||||||
|
|
||||||
@ -673,10 +674,10 @@ $api('$id',data);";
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function sessionAction($id="",$access="config") {
|
public function sessionAction($id="",$access="config") {
|
||||||
// Masteridentity
|
// mode_auth
|
||||||
$masteridentity=$this->getParameter("masteridentity");
|
$mode_auth=$this->getParameter("mode_auth");
|
||||||
if($masteridentity!="SSO") {
|
if($mode_auth!="CAS") {
|
||||||
$output["error"]="Le bundle Edispatcher ne fonctionne qu'en mode MasterIdentity=SSO";
|
$output["error"]="Le bundle Edispatcher ne fonctionne qu'en mode mode_auth=CAS";
|
||||||
return new Response(json_encode($output), 400);
|
return new Response(json_encode($output), 400);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -729,6 +730,7 @@ $api('$id',data);";
|
|||||||
$user->setAvatar("noavatar.png");
|
$user->setAvatar("noavatar.png");
|
||||||
$user->setVisible(true);
|
$user->setVisible(true);
|
||||||
$user->setAuthlevel("simple");
|
$user->setAuthlevel("simple");
|
||||||
|
$user->setBelongingpopulation("agent");
|
||||||
$user->setRole("ROLE_USER");
|
$user->setRole("ROLE_USER");
|
||||||
|
|
||||||
if(in_array($username,$this->getParameter("ldap_usersadmin")))
|
if(in_array($username,$this->getParameter("ldap_usersadmin")))
|
||||||
|
@ -24,7 +24,7 @@ class Datasource
|
|||||||
private $id;
|
private $id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="string", length=50, unique=true)
|
* @ORM\Column(type="string", length=128, unique=true)
|
||||||
*/
|
*/
|
||||||
private $username;
|
private $username;
|
||||||
|
|
||||||
|
@ -12,6 +12,10 @@ div.header {
|
|||||||
position: relative !important;
|
position: relative !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#navbar-nameuser a {
|
||||||
|
color: var(--main, #004d9a) !important;
|
||||||
|
}
|
||||||
|
|
||||||
div.header > a > span {
|
div.header > a > span {
|
||||||
color: black !important;
|
color: black !important;
|
||||||
}
|
}
|
||||||
|
@ -407,6 +407,7 @@ class GetLimesurveyCommand extends Command
|
|||||||
foreach($surveys as $survey) {
|
foreach($surveys as $survey) {
|
||||||
// Si le sondage est actif
|
// Si le sondage est actif
|
||||||
if($survey["active"]=="Y") {
|
if($survey["active"]=="Y") {
|
||||||
|
$this->writeln("SURVEY = ".$survey["surveyls_title"]);
|
||||||
|
|
||||||
// Liste des participants
|
// Liste des participants
|
||||||
$survey_id=$survey["sid"];
|
$survey_id=$survey["sid"];
|
||||||
@ -415,6 +416,8 @@ class GetLimesurveyCommand extends Command
|
|||||||
|
|
||||||
foreach($users as $user) {
|
foreach($users as $user) {
|
||||||
if(isset($user["participant_info"]["email"]) && $user["participant_info"]["email"]!="") {
|
if(isset($user["participant_info"]["email"]) && $user["participant_info"]["email"]!="") {
|
||||||
|
$this->writeln("EMAIL = ".$user["participant_info"]["email"]);
|
||||||
|
|
||||||
$entity = $this->em->getRepository('CadolesCoreBundle:User')->findOneBy(["email"=>$user["participant_info"]["email"]]);
|
$entity = $this->em->getRepository('CadolesCoreBundle:User')->findOneBy(["email"=>$user["participant_info"]["email"]]);
|
||||||
if($entity) {
|
if($entity) {
|
||||||
$surveypropconf = $myJSONRPCClient->get_survey_properties($sessionKey,$survey["sid"],["datecreated"]);
|
$surveypropconf = $myJSONRPCClient->get_survey_properties($sessionKey,$survey["sid"],["datecreated"]);
|
||||||
|
@ -43,6 +43,7 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
|
|
||||||
$activate_widadminer = $this->getContainer()->getParameter('activate_widadminer');
|
$activate_widadminer = $this->getContainer()->getParameter('activate_widadminer');
|
||||||
$activate_widbalado = $this->getContainer()->getParameter('activate_widbalado');
|
$activate_widbalado = $this->getContainer()->getParameter('activate_widbalado');
|
||||||
|
$activate_widcdt = $this->getContainer()->getParameter('activate_widcdt');
|
||||||
$activate_widdokuwiki = $this->getContainer()->getParameter('activate_widdokuwiki');
|
$activate_widdokuwiki = $this->getContainer()->getParameter('activate_widdokuwiki');
|
||||||
$activate_wideconnect = $this->getContainer()->getParameter('activate_wideconnect');
|
$activate_wideconnect = $this->getContainer()->getParameter('activate_wideconnect');
|
||||||
$activate_widead = $this->getContainer()->getParameter('activate_widead');
|
$activate_widead = $this->getContainer()->getParameter('activate_widead');
|
||||||
@ -380,7 +381,7 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem->setId(-394);
|
$entityItem->setId(-394);
|
||||||
$entityItem->setRowOrder(0);
|
$entityItem->setRowOrder(0);
|
||||||
$entityItem->setTitle('Adminer');
|
$entityItem->setTitle('Adminer');
|
||||||
$entityItem->SetSubtitle("Gestionnaire de Bases de Données");
|
$entityItem->setSubtitle("Gestionnaire de Bases de Données");
|
||||||
$entityItem->setIcon($entityicon);
|
$entityItem->setIcon($entityicon);
|
||||||
$entityItem->setTarget("_blank");
|
$entityItem->setTarget("_blank");
|
||||||
$entityItem->setItemcategory($entityItemcategoryadm);
|
$entityItem->setItemcategory($entityItemcategoryadm);
|
||||||
@ -402,7 +403,8 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem->setId(-377);
|
$entityItem->setId(-377);
|
||||||
$entityItem->setRowOrder(0);
|
$entityItem->setRowOrder(0);
|
||||||
$entityItem->setTitle('Balado');
|
$entityItem->setTitle('Balado');
|
||||||
$entityItem->SetSubtitle("Enregistrement en ligne et partage ses enregistrements");
|
$entityItem->setSubtitle("Interactions orales et écrites en ligne avec possibilité d’enregistrement audio intégré");
|
||||||
|
$entityItem->SetContent("Balad((o)) permet d’interagir avec les élèves en leur proposant une activité en ligne avec texte, image, audio déposé ou enregistré en ligne, vidéo déposée ou intégrée, documents joints.<br>Les élèves peuvent répondre en ligne avec texte, image, audio déposé ou enregistré en ligne, vidéo déposée ou intégrée, documents joints.<br>L’enseignant peut ensuite consulter en ligne les travaux rendus par les élèves, mais pas encore les annoter individuellement.");
|
||||||
$entityItem->setIcon($entityicon);
|
$entityItem->setIcon($entityicon);
|
||||||
$entityItem->setTarget("_blank");
|
$entityItem->setTarget("_blank");
|
||||||
$entityItem->setItemcategory($entityItemcategoryapp);
|
$entityItem->setItemcategory($entityItemcategoryapp);
|
||||||
@ -413,6 +415,29 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$em->persist($entityItem);
|
$em->persist($entityItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Item CdT
|
||||||
|
if($activate_widcdt) {
|
||||||
|
$widcdt_url =$this->getContainer()->getParameter('widcdt_url');
|
||||||
|
$entityItem = $em->getRepository('CadolesPortalBundle:Item')->find(-391);
|
||||||
|
if(!$entityItem) {
|
||||||
|
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_cdt.png"]);
|
||||||
|
|
||||||
|
$entityItem = new Item();
|
||||||
|
$entityItem->setId(-391);
|
||||||
|
$entityItem->setRowOrder(0);
|
||||||
|
$entityItem->setTitle('CdT');
|
||||||
|
$entityItem->setSubtitle("Application complète de gestion de cahier de texte scolaire");
|
||||||
|
$entityItem->SetContent("Application complète de gestion de cahier de texte scolaire");
|
||||||
|
$entityItem->setIcon($entityicon);
|
||||||
|
$entityItem->setTarget("_blank");
|
||||||
|
$entityItem->setItemcategory($entityItemcategoryapp);
|
||||||
|
$entityItem->setEssential(true);
|
||||||
|
$entityItem->addGroup($groupall);
|
||||||
|
}
|
||||||
|
$entityItem->setUrl($widcdt_url);
|
||||||
|
$em->persist($entityItem);
|
||||||
|
}
|
||||||
|
|
||||||
// Item Dokuwiki
|
// Item Dokuwiki
|
||||||
if($activate_widdokuwiki) {
|
if($activate_widdokuwiki) {
|
||||||
$widdokuwiki_url =$this->getContainer()->getParameter('widdokuwiki_url');
|
$widdokuwiki_url =$this->getContainer()->getParameter('widdokuwiki_url');
|
||||||
@ -424,7 +449,8 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem->setId(-399);
|
$entityItem->setId(-399);
|
||||||
$entityItem->setRowOrder(0);
|
$entityItem->setRowOrder(0);
|
||||||
$entityItem->setTitle('Dokuwiki');
|
$entityItem->setTitle('Dokuwiki');
|
||||||
$entityItem->SetSubtitle("Création de documentations de toute sorte");
|
$entityItem->setSubtitle("Base de connaissances sous forme d’un wiki");
|
||||||
|
$entityItem->SetContent("Le wiki permet de mettre du contenu classé par catégories.<br>Sur chaque catégorie et sur chaque page, des droits de lecture, modification, suppression peuvent être affectés à des utilisateurs ou des groupes d’utilisateurs.<br>En établissement, le wiki peut être utilisé comme base de connaissances en intranet / extranet professionnel ou comme support pédagogique d’écriture collaborative.");
|
||||||
$entityItem->setIcon($entityicon);
|
$entityItem->setIcon($entityicon);
|
||||||
$entityItem->setTarget("_blank");
|
$entityItem->setTarget("_blank");
|
||||||
$entityItem->setItemcategory($entityItemcategoryapp);
|
$entityItem->setItemcategory($entityItemcategoryapp);
|
||||||
@ -446,7 +472,7 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem->setId(-376);
|
$entityItem->setId(-376);
|
||||||
$entityItem->setRowOrder(0);
|
$entityItem->setRowOrder(0);
|
||||||
$entityItem->setTitle('Econnect');
|
$entityItem->setTitle('Econnect');
|
||||||
$entityItem->SetSubtitle("Gestion de connecteurs vers d'autres applications");
|
$entityItem->setSubtitle("Gestion de connecteurs vers d'autres applications");
|
||||||
$entityItem->setIcon($entityicon);
|
$entityItem->setIcon($entityicon);
|
||||||
$entityItem->setTarget("_blank");
|
$entityItem->setTarget("_blank");
|
||||||
$entityItem->setItemcategory($entityItemcategoryapp);
|
$entityItem->setItemcategory($entityItemcategoryapp);
|
||||||
@ -468,7 +494,7 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem->setId(-393);
|
$entityItem->setId(-393);
|
||||||
$entityItem->setRowOrder(0);
|
$entityItem->setRowOrder(0);
|
||||||
$entityItem->setTitle('EAD');
|
$entityItem->setTitle('EAD');
|
||||||
$entityItem->SetSubtitle("Console d'administration du serveur scribe");
|
$entityItem->setSubtitle("Console d'administration du serveur scribe");
|
||||||
$entityItem->setIcon($entityicon);
|
$entityItem->setIcon($entityicon);
|
||||||
$entityItem->setTarget("_blank");
|
$entityItem->setTarget("_blank");
|
||||||
$entityItem->setItemcategory($entityItemcategoryadm);
|
$entityItem->setItemcategory($entityItemcategoryadm);
|
||||||
@ -489,8 +515,9 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem = new Item();
|
$entityItem = new Item();
|
||||||
$entityItem->setId(-370);
|
$entityItem->setId(-370);
|
||||||
$entityItem->setRowOrder(0);
|
$entityItem->setRowOrder(0);
|
||||||
$entityItem->setTitle('EOE');
|
$entityItem->setTitle('Outils Élève');
|
||||||
$entityItem->SetSubtitle("EOLE Outils Elève");
|
$entityItem->setSubtitle("EOLE Outils Elève<br>(EOE)");
|
||||||
|
$entityItem->setContent("EOLE Outils Élève (EOE) permet à l’élève en particulier de changer son mot de passe d’accès, dans l’objectif de maîtriser son identité numérique sur l’ENT.");
|
||||||
$entityItem->setIcon($entityicon);
|
$entityItem->setIcon($entityicon);
|
||||||
$entityItem->setTarget("_blank");
|
$entityItem->setTarget("_blank");
|
||||||
$entityItem->setItemcategory($entityItemcategoryapp);
|
$entityItem->setItemcategory($entityItemcategoryapp);
|
||||||
@ -511,8 +538,9 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem = new Item();
|
$entityItem = new Item();
|
||||||
$entityItem->setId(-371);
|
$entityItem->setId(-371);
|
||||||
$entityItem->setRowOrder(0);
|
$entityItem->setRowOrder(0);
|
||||||
$entityItem->setTitle('EOP');
|
$entityItem->setTitle('Outils Professeur');
|
||||||
$entityItem->SetSubtitle("EOLE Outils Professeur");
|
$entityItem->setSubtitle("EOLE Outils Professeur<br>(EOP)");
|
||||||
|
$entityItem->setContent("Parmi les outils disponibles dans EOLE Outils Professeur (EOP) :<br>Changement de mot de passe local (Scribe) utilisé sur les postes en établissement<br>Changer le mot de passe des élèves (uniquement pour les professeurs principaux)<br>Distribuer des documents / devoirs à des classes et groupes à l’aide du dossier « perso » de l’enseignant et de chaque élève. Cette application est adaptée à un fonctionnement synchrone en établissement, un peu moins en distanciel asynchrone.");
|
||||||
$entityItem->setIcon($entityicon);
|
$entityItem->setIcon($entityicon);
|
||||||
$entityItem->setTarget("_blank");
|
$entityItem->setTarget("_blank");
|
||||||
$entityItem->setItemcategory($entityItemcategoryapp);
|
$entityItem->setItemcategory($entityItemcategoryapp);
|
||||||
@ -534,7 +562,8 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem->setId(-382);
|
$entityItem->setId(-382);
|
||||||
$entityItem->setRowOrder(0);
|
$entityItem->setRowOrder(0);
|
||||||
$entityItem->setTitle('Etherhome');
|
$entityItem->setTitle('Etherhome');
|
||||||
$entityItem->SetSubtitle("Gestion de vos pads et de vos calcs collaboratifs");
|
$entityItem->setSubtitle("Accès aux pads, calcs et scrums");
|
||||||
|
$entityItem->setContent("Etherhome permet de créer, partager et accéder aux pads (textes), calcs (tableaux) et scrums (murs de textes).<br>Les pads et calcs sont des supports de travail collaboratif synchrone ou asynchrone, à reprendre éventuellement ensuite dans un traitement de textes ou un tableur ou un logiciel de présentation.");
|
||||||
$entityItem->setIcon($entityicon);
|
$entityItem->setIcon($entityicon);
|
||||||
$entityItem->setTarget("_blank");
|
$entityItem->setTarget("_blank");
|
||||||
$entityItem->setItemcategory($entityItemcategoryapp);
|
$entityItem->setItemcategory($entityItemcategoryapp);
|
||||||
@ -556,7 +585,8 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem->setId(-397);
|
$entityItem->setId(-397);
|
||||||
$entityItem->setRowOrder(0);
|
$entityItem->setRowOrder(0);
|
||||||
$entityItem->setTitle('Fluxbb');
|
$entityItem->setTitle('Fluxbb');
|
||||||
$entityItem->SetSubtitle("Forum");
|
$entityItem->setSubtitle("Forum");
|
||||||
|
$entityItem->setContent("Forum avec gestion des droits des utilisateurs.");
|
||||||
$entityItem->setIcon($entityicon);
|
$entityItem->setIcon($entityicon);
|
||||||
$entityItem->setTarget("_blank");
|
$entityItem->setTarget("_blank");
|
||||||
$entityItem->setItemcategory($entityItemcategoryapp);
|
$entityItem->setItemcategory($entityItemcategoryapp);
|
||||||
@ -578,7 +608,7 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem->setId(-368);
|
$entityItem->setId(-368);
|
||||||
$entityItem->setRowOrder(0);
|
$entityItem->setRowOrder(0);
|
||||||
$entityItem->setTitle('Genconfig');
|
$entityItem->setTitle('Genconfig');
|
||||||
$entityItem->SetSubtitle("Console de configuration du serveur");
|
$entityItem->setSubtitle("Console de configuration du serveur");
|
||||||
$entityItem->setIcon($entityicon);
|
$entityItem->setIcon($entityicon);
|
||||||
$entityItem->setTarget("_blank");
|
$entityItem->setTarget("_blank");
|
||||||
$entityItem->setItemcategory($entityItemcategoryadm);
|
$entityItem->setItemcategory($entityItemcategoryadm);
|
||||||
@ -600,7 +630,7 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem->setId(-389);
|
$entityItem->setId(-389);
|
||||||
$entityItem->setRowOrder(0);
|
$entityItem->setRowOrder(0);
|
||||||
$entityItem->setTitle('GEPI');
|
$entityItem->setTitle('GEPI');
|
||||||
$entityItem->SetSubtitle("Intégration du logiciel de gestion des notes, absences, cahier de texte");
|
$entityItem->setSubtitle("Intégration du logiciel de gestion des notes, absences, cahier de texte");
|
||||||
$entityItem->setIcon($entityicon);
|
$entityItem->setIcon($entityicon);
|
||||||
$entityItem->setTarget("_blank");
|
$entityItem->setTarget("_blank");
|
||||||
$entityItem->setItemcategory($entityItemcategoryapp);
|
$entityItem->setItemcategory($entityItemcategoryapp);
|
||||||
@ -622,7 +652,7 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem->setId(-388);
|
$entityItem->setId(-388);
|
||||||
$entityItem->setRowOrder(0);
|
$entityItem->setRowOrder(0);
|
||||||
$entityItem->setTitle('GLPI');
|
$entityItem->setTitle('GLPI');
|
||||||
$entityItem->SetSubtitle("Gestion de tickets");
|
$entityItem->setSubtitle("Gestion de tickets");
|
||||||
$entityItem->setIcon($entityicon);
|
$entityItem->setIcon($entityicon);
|
||||||
$entityItem->setTarget("_blank");
|
$entityItem->setTarget("_blank");
|
||||||
$entityItem->setItemcategory($entityItemcategoryapp);
|
$entityItem->setItemcategory($entityItemcategoryapp);
|
||||||
@ -644,7 +674,8 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem->setId(-388);
|
$entityItem->setId(-388);
|
||||||
$entityItem->setRowOrder(0);
|
$entityItem->setRowOrder(0);
|
||||||
$entityItem->setTitle('Grr');
|
$entityItem->setTitle('Grr');
|
||||||
$entityItem->SetSubtitle("Gestion et de Réservations de Ressources");
|
$entityItem->setSubtitle("Gestion et de Réservations de Ressources");
|
||||||
|
$entityItem->setContent("GRR permet de réserver des ressources disponibles dans l’établissement : salles, matériels, etc.");
|
||||||
$entityItem->setIcon($entityicon);
|
$entityItem->setIcon($entityicon);
|
||||||
$entityItem->setTarget("_blank");
|
$entityItem->setTarget("_blank");
|
||||||
$entityItem->setItemcategory($entityItemcategoryapp);
|
$entityItem->setItemcategory($entityItemcategoryapp);
|
||||||
@ -666,7 +697,7 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem->setId(-363);
|
$entityItem->setId(-363);
|
||||||
$entityItem->setRowOrder(0);
|
$entityItem->setRowOrder(0);
|
||||||
$entityItem->setTitle('Kanboard');
|
$entityItem->setTitle('Kanboard');
|
||||||
$entityItem->SetSubtitle("Gestion de Projets");
|
$entityItem->setSubtitle("Gestion de rojets");
|
||||||
$entityItem->setIcon($entityicon);
|
$entityItem->setIcon($entityicon);
|
||||||
$entityItem->setTarget("_blank");
|
$entityItem->setTarget("_blank");
|
||||||
$entityItem->setItemcategory($entityItemcategoryapp);
|
$entityItem->setItemcategory($entityItemcategoryapp);
|
||||||
@ -688,7 +719,8 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem->setId(-374);
|
$entityItem->setId(-374);
|
||||||
$entityItem->setRowOrder(0);
|
$entityItem->setRowOrder(0);
|
||||||
$entityItem->setTitle('Limesurvey');
|
$entityItem->setTitle('Limesurvey');
|
||||||
$entityItem->SetSubtitle("Application de sondage");
|
$entityItem->setSubtitle("Gestion d’enquêtes");
|
||||||
|
$entityItem->setContent("Limesurvey permet de créer des enquêtes en ligne avec différents formats de réponses : texte, nombre, choix multiple avec réponse unique ou non, etc.<br>Chaque enquête peut être adressée :<br>soit à des utilisateurs ou groupes par invitation individuelle, ce qui permet d’éviter les doubles réponses<br>soit de manière anonyme par un lien public");
|
||||||
$entityItem->setIcon($entityicon);
|
$entityItem->setIcon($entityicon);
|
||||||
$entityItem->setTarget("_blank");
|
$entityItem->setTarget("_blank");
|
||||||
$entityItem->setItemcategory($entityItemcategoryapp);
|
$entityItem->setItemcategory($entityItemcategoryapp);
|
||||||
@ -710,7 +742,8 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem->setId(-369);
|
$entityItem->setId(-369);
|
||||||
$entityItem->setRowOrder(0);
|
$entityItem->setRowOrder(0);
|
||||||
$entityItem->setTitle('Mindmaps');
|
$entityItem->setTitle('Mindmaps');
|
||||||
$entityItem->SetSubtitle("Carte Mentale");
|
$entityItem->setSubtitle("Carte Mentale");
|
||||||
|
$entityItem->setContent("Carte mentale simple, enregistrable mais non collaborative.");
|
||||||
$entityItem->setIcon($entityicon);
|
$entityItem->setIcon($entityicon);
|
||||||
$entityItem->setTarget("_blank");
|
$entityItem->setTarget("_blank");
|
||||||
$entityItem->setItemcategory($entityItemcategoryapp);
|
$entityItem->setItemcategory($entityItemcategoryapp);
|
||||||
@ -732,7 +765,8 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem->setId(-387);
|
$entityItem->setId(-387);
|
||||||
$entityItem->setRowOrder(0);
|
$entityItem->setRowOrder(0);
|
||||||
$entityItem->setTitle('Moodle');
|
$entityItem->setTitle('Moodle');
|
||||||
$entityItem->SetSubtitle("Application de eLearning");
|
$entityItem->setSubtitle("Cours en ligne");
|
||||||
|
$entityItem->setContent("Plateforme d’apprentissage en ligne (« e-learning ») où l’enseignant peut mettre à disposition :<br>- des ressources à consulter : textes en ligne, documents joints, vidéos intégrées, etc.<br>- des activités : devoirs à rendre, tests auto-évalués, glossaire collaboratif, activités multimédia H5P, etc.");
|
||||||
$entityItem->setIcon($entityicon);
|
$entityItem->setIcon($entityicon);
|
||||||
$entityItem->setTarget("_blank");
|
$entityItem->setTarget("_blank");
|
||||||
$entityItem->setItemcategory($entityItemcategoryapp);
|
$entityItem->setItemcategory($entityItemcategoryapp);
|
||||||
@ -754,7 +788,8 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem->setId(-366);
|
$entityItem->setId(-366);
|
||||||
$entityItem->setRowOrder(0);
|
$entityItem->setRowOrder(0);
|
||||||
$entityItem->setTitle('Nextcloud');
|
$entityItem->setTitle('Nextcloud');
|
||||||
$entityItem->SetSubtitle("Stockage de Fichiers");
|
$entityItem->setSubtitle("Dépôt et partage de fichiers");
|
||||||
|
$entityItem->setContent("Nextcloud permet de déposer des fichiers, organisés dans des dossiers.<br>Ces dossiers et fichiers peuvent être partagés avec des droits de lecture et/ou de modification / suppression :<br>Soit avec des utilisateurs ou groupes d’utilisateurs<br>Soit de manière anonyme avec un lien public, paramétrable (durée, mot de passe)");
|
||||||
$entityItem->setIcon($entityicon);
|
$entityItem->setIcon($entityicon);
|
||||||
$entityItem->setTarget("_blank");
|
$entityItem->setTarget("_blank");
|
||||||
$entityItem->setItemcategory($entityItemcategoryapp);
|
$entityItem->setItemcategory($entityItemcategoryapp);
|
||||||
@ -776,7 +811,8 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem->setId(-361);
|
$entityItem->setId(-361);
|
||||||
$entityItem->setRowOrder(0);
|
$entityItem->setRowOrder(0);
|
||||||
$entityItem->setTitle('Nineboard');
|
$entityItem->setTitle('Nineboard');
|
||||||
$entityItem->SetSubtitle("Gestionnaire de tableau de bord collaboratif");
|
$entityItem->setSubtitle("Accès aux pads, calcs, scrums, whiteboards, timelines et mindmaps");
|
||||||
|
$entityItem->setContent("Nineboard permet de créer, partager et accéder aux pads (textes), calcs (tableaux), scrums (murs de textes en colonne), whiteboards (murs de textes libre), timelines (frises temporelles) et mindmaps (cartes mentales)<br>Les pads et calcs sont des supports de travail collaboratif synchrone ou asynchrone, à reprendre éventuellement ensuite dans un traitement de textes ou un tableur ou un logiciel de présentation.");
|
||||||
$entityItem->setIcon($entityicon);
|
$entityItem->setIcon($entityicon);
|
||||||
$entityItem->setTarget("_blank");
|
$entityItem->setTarget("_blank");
|
||||||
$entityItem->setItemcategory($entityItemcategoryapp);
|
$entityItem->setItemcategory($entityItemcategoryapp);
|
||||||
@ -798,7 +834,7 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem->setId(-1001);
|
$entityItem->setId(-1001);
|
||||||
$entityItem->setRowOrder(0);
|
$entityItem->setRowOrder(0);
|
||||||
$entityItem->setTitle('Nineschool');
|
$entityItem->setTitle('Nineschool');
|
||||||
$entityItem->SetSubtitle("Gestionnaire d'activités scolaire'");
|
$entityItem->setSubtitle("Gestionnaire d'activités scolaire'");
|
||||||
$entityItem->setIcon($entityicon);
|
$entityItem->setIcon($entityicon);
|
||||||
$entityItem->setTarget("_blank");
|
$entityItem->setTarget("_blank");
|
||||||
$entityItem->setItemcategory($entityItemcategoryapp);
|
$entityItem->setItemcategory($entityItemcategoryapp);
|
||||||
@ -820,7 +856,7 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem->setId(-1002);
|
$entityItem->setId(-1002);
|
||||||
$entityItem->setRowOrder(0);
|
$entityItem->setRowOrder(0);
|
||||||
$entityItem->setTitle('Ninesurvey');
|
$entityItem->setTitle('Ninesurvey');
|
||||||
$entityItem->SetSubtitle("Application de Sondage par Date");
|
$entityItem->setSubtitle("Application de Sondage par Date");
|
||||||
$entityItem->setIcon($entityicon);
|
$entityItem->setIcon($entityicon);
|
||||||
$entityItem->setTarget("_blank");
|
$entityItem->setTarget("_blank");
|
||||||
$entityItem->setItemcategory($entityItemcategoryapp);
|
$entityItem->setItemcategory($entityItemcategoryapp);
|
||||||
@ -842,7 +878,7 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem->setId(-1000);
|
$entityItem->setId(-1000);
|
||||||
$entityItem->setRowOrder(0);
|
$entityItem->setRowOrder(0);
|
||||||
$entityItem->setTitle('Onlyoffice');
|
$entityItem->setTitle('Onlyoffice');
|
||||||
$entityItem->SetSubtitle("Application Bureautique");
|
$entityItem->setSubtitle("Application Bureautique");
|
||||||
$entityItem->setIcon($entityicon);
|
$entityItem->setIcon($entityicon);
|
||||||
$entityItem->setTarget("_blank");
|
$entityItem->setTarget("_blank");
|
||||||
$entityItem->setItemcategory($entityItemcategoryapp);
|
$entityItem->setItemcategory($entityItemcategoryapp);
|
||||||
@ -864,7 +900,7 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem->setId(-383);
|
$entityItem->setId(-383);
|
||||||
$entityItem->setRowOrder(0);
|
$entityItem->setRowOrder(0);
|
||||||
$entityItem->setTitle('Opensondage');
|
$entityItem->setTitle('Opensondage');
|
||||||
$entityItem->SetSubtitle("Application de Sondage par Date");
|
$entityItem->setSubtitle("Création de sondage à réponse simple ou pour le choix d’une date");
|
||||||
$entityItem->setIcon($entityicon);
|
$entityItem->setIcon($entityicon);
|
||||||
$entityItem->setTarget("_blank");
|
$entityItem->setTarget("_blank");
|
||||||
$entityItem->setItemcategory($entityItemcategoryapp);
|
$entityItem->setItemcategory($entityItemcategoryapp);
|
||||||
@ -886,7 +922,7 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem->setId(-362);
|
$entityItem->setId(-362);
|
||||||
$entityItem->setRowOrder(0);
|
$entityItem->setRowOrder(0);
|
||||||
$entityItem->setTitle('PhpLdapAdmin');
|
$entityItem->setTitle('PhpLdapAdmin');
|
||||||
$entityItem->SetSubtitle("Gestionnaire d’annuaire LDAP");
|
$entityItem->setSubtitle("Gestionnaire d’annuaire LDAP");
|
||||||
$entityItem->setIcon($entityicon);
|
$entityItem->setIcon($entityicon);
|
||||||
$entityItem->setTarget("_blank");
|
$entityItem->setTarget("_blank");
|
||||||
$entityItem->setItemcategory($entityItemcategoryadm);
|
$entityItem->setItemcategory($entityItemcategoryadm);
|
||||||
@ -897,7 +933,7 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$em->persist($entityItem);
|
$em->persist($entityItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Item piwigo
|
// Item Piwigo
|
||||||
if($activate_widpiwigo) {
|
if($activate_widpiwigo) {
|
||||||
$widpiwigo_url =$this->getContainer()->getParameter('widpiwigo_url');
|
$widpiwigo_url =$this->getContainer()->getParameter('widpiwigo_url');
|
||||||
$entityItem = $em->getRepository('CadolesPortalBundle:Item')->find(-396);
|
$entityItem = $em->getRepository('CadolesPortalBundle:Item')->find(-396);
|
||||||
@ -908,7 +944,7 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem->setId(-396);
|
$entityItem->setId(-396);
|
||||||
$entityItem->setRowOrder(0);
|
$entityItem->setRowOrder(0);
|
||||||
$entityItem->setTitle('Piwigo');
|
$entityItem->setTitle('Piwigo');
|
||||||
$entityItem->SetSubtitle("Gestionnaire d’albums photos");
|
$entityItem->setSubtitle("Gestionnaire d’albums photos");
|
||||||
$entityItem->setIcon($entityicon);
|
$entityItem->setIcon($entityicon);
|
||||||
$entityItem->setTarget("_blank");
|
$entityItem->setTarget("_blank");
|
||||||
$entityItem->setItemcategory($entityItemcategoryapp);
|
$entityItem->setItemcategory($entityItemcategoryapp);
|
||||||
@ -930,7 +966,7 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem->setId(-380);
|
$entityItem->setId(-380);
|
||||||
$entityItem->setRowOrder(0);
|
$entityItem->setRowOrder(0);
|
||||||
$entityItem->setTitle('Piwik');
|
$entityItem->setTitle('Piwik');
|
||||||
$entityItem->SetSubtitle("Application de Statistique de Visite");
|
$entityItem->setSubtitle("Mesures d’audience du portail");
|
||||||
$entityItem->setIcon($entityicon);
|
$entityItem->setIcon($entityicon);
|
||||||
$entityItem->setTarget("_blank");
|
$entityItem->setTarget("_blank");
|
||||||
$entityItem->setItemcategory($entityItemcategoryadm);
|
$entityItem->setItemcategory($entityItemcategoryadm);
|
||||||
@ -952,7 +988,8 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem->setId(-398);
|
$entityItem->setId(-398);
|
||||||
$entityItem->setRowOrder(0);
|
$entityItem->setRowOrder(0);
|
||||||
$entityItem->setTitle('Roundcube');
|
$entityItem->setTitle('Roundcube');
|
||||||
$entityItem->SetSubtitle("Webmail");
|
$entityItem->setSubtitle("Messagerie");
|
||||||
|
$entityItem->setContent("Messagerie permettant la communication sécurisée par méls. La messagerie n’a pas pour but d’envoyer des gros fichiers mais plutôt de communiquer des informations, des liens.");
|
||||||
$entityItem->setIcon($entityicon);
|
$entityItem->setIcon($entityicon);
|
||||||
$entityItem->setTarget("_blank");
|
$entityItem->setTarget("_blank");
|
||||||
$entityItem->setItemcategory($entityItemcategoryapp);
|
$entityItem->setItemcategory($entityItemcategoryapp);
|
||||||
@ -960,6 +997,12 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem->addGroup($groupall);
|
$entityItem->addGroup($groupall);
|
||||||
}
|
}
|
||||||
$entityItem->setUrl($widroundcube_url);
|
$entityItem->setUrl($widroundcube_url);
|
||||||
|
|
||||||
|
if($this->getContainer()->getParameter('cas_type')=="proxy")
|
||||||
|
$entityItem->setBadgeurl("/ninegate/cas/imapunread");
|
||||||
|
else
|
||||||
|
$entityItem->setBadgeurl(null);
|
||||||
|
|
||||||
$em->persist($entityItem);
|
$em->persist($entityItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -974,7 +1017,7 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem->setId(-372);
|
$entityItem->setId(-372);
|
||||||
$entityItem->setRowOrder(0);
|
$entityItem->setRowOrder(0);
|
||||||
$entityItem->setTitle('Sacoche');
|
$entityItem->setTitle('Sacoche');
|
||||||
$entityItem->SetSubtitle("Evaluation de compétences");
|
$entityItem->setSubtitle("Evaluation de compétences");
|
||||||
$entityItem->setIcon($entityicon);
|
$entityItem->setIcon($entityicon);
|
||||||
$entityItem->setTarget("_blank");
|
$entityItem->setTarget("_blank");
|
||||||
$entityItem->setItemcategory($entityItemcategoryapp);
|
$entityItem->setItemcategory($entityItemcategoryapp);
|
||||||
@ -996,7 +1039,8 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityItem->setId(-400);
|
$entityItem->setId(-400);
|
||||||
$entityItem->setRowOrder(0);
|
$entityItem->setRowOrder(0);
|
||||||
$entityItem->setTitle('Wordpress');
|
$entityItem->setTitle('Wordpress');
|
||||||
$entityItem->SetSubtitle("Application de Blog");
|
$entityItem->setSubtitle("Sites ou blogs en intranet ou sur internet");
|
||||||
|
$entityItem->setContent("Avec la plateforme Wordpress, sur demande, un administrateur peut créer des blogs ou sites.<br>Pour chaque blog ou site, des droits peuvent être donnés aux utilisateurs :<br>Qui peut écrire des articles ?<br>Qui peut valider ces articles ?<br>Qui peut consulter ces articles ? (le blog peut aussi être rendu visible publiquement sur internet)<br>");
|
||||||
$entityItem->setIcon($entityicon);
|
$entityItem->setIcon($entityicon);
|
||||||
$entityItem->setTarget("_blank");
|
$entityItem->setTarget("_blank");
|
||||||
$entityItem->setItemcategory($entityItemcategoryapp);
|
$entityItem->setItemcategory($entityItemcategoryapp);
|
||||||
@ -1011,15 +1055,15 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
//== WIDGET ============================================================================================================================================
|
//== WIDGET ============================================================================================================================================
|
||||||
$output->writeln(' > Creation Widget');
|
$output->writeln(' > Creation Widget');
|
||||||
|
|
||||||
// Widget URL
|
// Widget Page web
|
||||||
$entityWidget = $em->getRepository('CadolesPortalBundle:Widget')->find(-2000);
|
$entityWidget = $em->getRepository('CadolesPortalBundle:Widget')->find(-2000);
|
||||||
if(!$entityWidget) $entityWidget = new Widget();
|
if(!$entityWidget) $entityWidget = new Widget();
|
||||||
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_ribbon.png"]);
|
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_ribbon.png"]);
|
||||||
$entityWidget->setId(-2000);
|
$entityWidget->setId(-2000);
|
||||||
$entityWidget->setRoworder(0);
|
$entityWidget->setRoworder(0);
|
||||||
$entityWidget->setIcon($entityicon);
|
$entityWidget->setIcon($entityicon);
|
||||||
$entityWidget->setName('URL');
|
$entityWidget->setName('Page web');
|
||||||
$entityWidget->setDescription("Affiche le contenu d'une url");
|
$entityWidget->setDescription("Affiche le contenu d'une page web");
|
||||||
$entityWidget->setRouteview("cadoles_portal_config_panelwidget_view_url");
|
$entityWidget->setRouteview("cadoles_portal_config_panelwidget_view_url");
|
||||||
$entityWidget->setHeight("630");
|
$entityWidget->setHeight("630");
|
||||||
$entityWidget->setAutoajust(false);
|
$entityWidget->setAutoajust(false);
|
||||||
@ -1091,15 +1135,15 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$em->persist($entityWidget);
|
$em->persist($entityWidget);
|
||||||
|
|
||||||
|
|
||||||
// Widget Favoris
|
// Widget Liens
|
||||||
$entityWidget = $em->getRepository('CadolesPortalBundle:Widget')->find(-1960);
|
$entityWidget = $em->getRepository('CadolesPortalBundle:Widget')->find(-1960);
|
||||||
if(!$entityWidget) $entityWidget = new Widget();
|
if(!$entityWidget) $entityWidget = new Widget();
|
||||||
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_star.png"]);
|
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_star.png"]);
|
||||||
$entityWidget->setId(-1960);
|
$entityWidget->setId(-1960);
|
||||||
$entityWidget->setRoworder(0);
|
$entityWidget->setRoworder(0);
|
||||||
$entityWidget->setIcon($entityicon);
|
$entityWidget->setIcon($entityicon);
|
||||||
$entityWidget->setName('Favoris');
|
$entityWidget->setName('Liens');
|
||||||
$entityWidget->setDescription("Création de Favoris");
|
$entityWidget->setDescription("Bibliothèque de Liens");
|
||||||
$entityWidget->setRouteview("cadoles_portal_config_panelwidget_view_bookmark");
|
$entityWidget->setRouteview("cadoles_portal_config_panelwidget_view_bookmark");
|
||||||
$entityWidget->setHeight("630");
|
$entityWidget->setHeight("630");
|
||||||
$entityWidget->setAutoajust(true);
|
$entityWidget->setAutoajust(true);
|
||||||
@ -1111,7 +1155,7 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$em->persist($entityWidget);
|
$em->persist($entityWidget);
|
||||||
|
|
||||||
|
|
||||||
// Widget Liens
|
// Widget Lien
|
||||||
$entityWidget = $em->getRepository('CadolesPortalBundle:Widget')->find(-1950);
|
$entityWidget = $em->getRepository('CadolesPortalBundle:Widget')->find(-1950);
|
||||||
if(!$entityWidget) $entityWidget = new Widget();
|
if(!$entityWidget) $entityWidget = new Widget();
|
||||||
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_bolt.png"]);
|
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_bolt.png"]);
|
||||||
@ -1119,7 +1163,7 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$entityWidget->setRoworder(0);
|
$entityWidget->setRoworder(0);
|
||||||
$entityWidget->setIcon($entityicon);
|
$entityWidget->setIcon($entityicon);
|
||||||
$entityWidget->setName('Lien');
|
$entityWidget->setName('Lien');
|
||||||
$entityWidget->setDescription("Création d'un Lien");
|
$entityWidget->setDescription("Création d'un Lien unique");
|
||||||
$entityWidget->setRouteview("cadoles_portal_config_panelwidget_view_link");
|
$entityWidget->setRouteview("cadoles_portal_config_panelwidget_view_link");
|
||||||
$entityWidget->setHeight("200");
|
$entityWidget->setHeight("200");
|
||||||
$entityWidget->setAutoajust(true);
|
$entityWidget->setAutoajust(true);
|
||||||
@ -1131,14 +1175,14 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$em->persist($entityWidget);
|
$em->persist($entityWidget);
|
||||||
|
|
||||||
|
|
||||||
// Widget Editor
|
// Widget Texte
|
||||||
$entityWidget = $em->getRepository('CadolesPortalBundle:Widget')->find(-1940);
|
$entityWidget = $em->getRepository('CadolesPortalBundle:Widget')->find(-1940);
|
||||||
if(!$entityWidget) $entityWidget = new Widget();
|
if(!$entityWidget) $entityWidget = new Widget();
|
||||||
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_compose.png"]);
|
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_compose.png"]);
|
||||||
$entityWidget->setId(-1940);
|
$entityWidget->setId(-1940);
|
||||||
$entityWidget->setRoworder(0);
|
$entityWidget->setRoworder(0);
|
||||||
$entityWidget->setIcon($entityicon);
|
$entityWidget->setIcon($entityicon);
|
||||||
$entityWidget->setName('Editeur');
|
$entityWidget->setName('Texte');
|
||||||
$entityWidget->setDescription("Votre propre texte à éditer");
|
$entityWidget->setDescription("Votre propre texte à éditer");
|
||||||
$entityWidget->setRouteview("cadoles_portal_config_panelwidget_view_editor");
|
$entityWidget->setRouteview("cadoles_portal_config_panelwidget_view_editor");
|
||||||
$entityWidget->setHeight("630");
|
$entityWidget->setHeight("630");
|
||||||
@ -1302,14 +1346,14 @@ class InitDataCommand extends ContainerAwareCommand
|
|||||||
$em->persist($entityWidget);
|
$em->persist($entityWidget);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Widget Information
|
// Widget Informations
|
||||||
$entityWidget = $em->getRepository('CadolesPortalBundle:Widget')->find(-1860);
|
$entityWidget = $em->getRepository('CadolesPortalBundle:Widget')->find(-1860);
|
||||||
if(!$entityWidget) $entityWidget = new Widget();
|
if(!$entityWidget) $entityWidget = new Widget();
|
||||||
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_info.png"]);
|
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_info.png"]);
|
||||||
$entityWidget->setId(-1860);
|
$entityWidget->setId(-1860);
|
||||||
$entityWidget->setRoworder(0);
|
$entityWidget->setRoworder(0);
|
||||||
$entityWidget->setIcon($entityicon);
|
$entityWidget->setIcon($entityicon);
|
||||||
$entityWidget->setName('Information Page');
|
$entityWidget->setName('Informations');
|
||||||
$entityWidget->setDescription("Afficher les informations associées à la page");
|
$entityWidget->setDescription("Afficher les informations associées à la page");
|
||||||
$entityWidget->setRouteview("cadoles_portal_config_panelwidget_view_info");
|
$entityWidget->setRouteview("cadoles_portal_config_panelwidget_view_info");
|
||||||
$entityWidget->setHeight("630");
|
$entityWidget->setHeight("630");
|
||||||
|
@ -8,6 +8,7 @@ use Symfony\Component\HttpFoundation\Request;
|
|||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||||
use Symfony\Component\Form\FormError;
|
use Symfony\Component\Form\FormError;
|
||||||
|
use Symfony\Component\Filesystem\Filesystem;
|
||||||
|
|
||||||
use Cadoles\PortalBundle\Entity\Alert;
|
use Cadoles\PortalBundle\Entity\Alert;
|
||||||
use Cadoles\PortalBundle\Form\AlertType;
|
use Cadoles\PortalBundle\Form\AlertType;
|
||||||
@ -195,6 +196,32 @@ class AlertController extends Controller
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function uploadAction(Request $request,$access=null) {
|
||||||
|
// Fichier temporaire uploadé
|
||||||
|
$tmpfile = $request->files->get('upload');
|
||||||
|
$extention = $tmpfile->getClientOriginalExtension();
|
||||||
|
|
||||||
|
// Répertoire de Destination
|
||||||
|
$fs = new Filesystem();
|
||||||
|
$rootdir = $this->get('kernel')->getRootDir()."/../web";
|
||||||
|
$fs->mkdir($rootdir."/uploads/ckeditor");
|
||||||
|
|
||||||
|
// Fichier cible
|
||||||
|
$targetName = uniqid().".".$extention;
|
||||||
|
$targetFile = $rootdir."/uploads/ckeditor/".$targetName;
|
||||||
|
$targetUrl = "/".$this->getParameter('alias')."/uploads/ckeditor/".$targetName;
|
||||||
|
$message = "";
|
||||||
|
|
||||||
|
move_uploaded_file($tmpfile,$targetFile);
|
||||||
|
|
||||||
|
$output["uploaded"]=1;
|
||||||
|
$output["fileName"]=$targetName;
|
||||||
|
$output["url"]=$targetUrl;
|
||||||
|
|
||||||
|
return new Response(json_encode($output));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public function readAction(Request $request) {
|
public function readAction(Request $request) {
|
||||||
$output=array();
|
$output=array();
|
||||||
$id=$request->request->get('id');
|
$id=$request->request->get('id');
|
||||||
|
@ -361,7 +361,7 @@ class BlogController extends Controller
|
|||||||
if($groups[0]) {
|
if($groups[0]) {
|
||||||
if($groups[0]->getFgcanshare()) {
|
if($groups[0]->getFgcanshare()) {
|
||||||
$pages=$groups[0]->getPages();
|
$pages=$groups[0]->getPages();
|
||||||
if($pages) {
|
if($pages[0]) {
|
||||||
$idpage=$pages[0]->getId();
|
$idpage=$pages[0]->getId();
|
||||||
$groups=$pages[0]->getGroups();
|
$groups=$pages[0]->getGroups();
|
||||||
$idgroup=$groups[0]->getId();
|
$idgroup=$groups[0]->getId();
|
||||||
|
@ -106,6 +106,7 @@ class BlogarticleController extends Controller
|
|||||||
if($access=="user") {
|
if($access=="user") {
|
||||||
$em->getRepository("CadolesPortalBundle:Blog")->getPermission($this->getUser(),$entity->getBlog(),$cansee,$canupdate,$canadd);
|
$em->getRepository("CadolesPortalBundle:Blog")->getPermission($this->getUser(),$entity->getBlog(),$cansee,$canupdate,$canadd);
|
||||||
if(!$canadd) throw $this->createNotFoundException('Permission denied');
|
if(!$canadd) throw $this->createNotFoundException('Permission denied');
|
||||||
|
elseif(!$canupdate&&$this->getUser()!=$entity->getUser()) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Création du formulaire
|
// Création du formulaire
|
||||||
@ -157,6 +158,7 @@ class BlogarticleController extends Controller
|
|||||||
if($access=="user") {
|
if($access=="user") {
|
||||||
$em->getRepository("CadolesPortalBundle:Blog")->getPermission($this->getUser(),$entity->getBlog(),$cansee,$canupdate,$canadd);
|
$em->getRepository("CadolesPortalBundle:Blog")->getPermission($this->getUser(),$entity->getBlog(),$cansee,$canupdate,$canadd);
|
||||||
if(!$canadd) throw $this->createNotFoundException('Permission denied');
|
if(!$canadd) throw $this->createNotFoundException('Permission denied');
|
||||||
|
elseif(!$canupdate&&$this->getUser()!=$entity->getUser()) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Suppression
|
// Suppression
|
||||||
@ -180,7 +182,7 @@ class BlogarticleController extends Controller
|
|||||||
if($groups[0]) {
|
if($groups[0]) {
|
||||||
if($groups[0]->getFgcanshare()) {
|
if($groups[0]->getFgcanshare()) {
|
||||||
$pages=$groups[0]->getPages();
|
$pages=$groups[0]->getPages();
|
||||||
if($pages) {
|
if($pages[0]) {
|
||||||
$idpage=$pages[0]->getId();
|
$idpage=$pages[0]->getId();
|
||||||
$groups=$pages[0]->getGroups();
|
$groups=$pages[0]->getGroups();
|
||||||
$idgroup=$groups[0]->getId();
|
$idgroup=$groups[0]->getId();
|
||||||
@ -208,12 +210,10 @@ class BlogarticleController extends Controller
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$em->getRepository("CadolesPortalBundle:Blog")->getPermission($user,$entity->getBlog(),$cansee,$canupdate,$canadd);
|
$em->getRepository("CadolesPortalBundle:Blog")->getPermission($user,$entity->getBlog(),$cansee,$canupdate,$canadd);
|
||||||
|
if(!$canupdate&&$this->getUser()==$entity->getUser()) $canupdate=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
||||||
|
|
||||||
$canupdate=false;
|
|
||||||
if($user) $canupdate=true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$em->getRepository("CadolesPortalBundle:Blogarticle")->getBlogsArticles($blogs,0,10,$count,$blogarticles);
|
$em->getRepository("CadolesPortalBundle:Blogarticle")->getBlogsArticles($blogs,0,10,$count,$blogarticles);
|
||||||
|
@ -145,7 +145,8 @@ class BlogcommentController extends Controller
|
|||||||
// On s'assure que l'utilisateur à la permission de modifier
|
// On s'assure que l'utilisateur à la permission de modifier
|
||||||
if($access=="user") {
|
if($access=="user") {
|
||||||
$em->getRepository("CadolesPortalBundle:Blog")->getPermission($this->getUser(),$entity->getBlogarticle()->getBlog(),$cansee,$canupdate,$canadd);
|
$em->getRepository("CadolesPortalBundle:Blog")->getPermission($this->getUser(),$entity->getBlogarticle()->getBlog(),$cansee,$canupdate,$canadd);
|
||||||
if(!$canadd&&$this->getUser()!=$entity->getUser()) throw $this->createNotFoundException('Permission denied');
|
if(!$canupdate&&$this->getUser()==$entity->getBlogarticle()->getUser()) $canupdate=true;
|
||||||
|
if(!$canupdate&&$this->getUser()!=$entity->getUser()) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Création du formulaire
|
// Création du formulaire
|
||||||
@ -196,7 +197,7 @@ class BlogcommentController extends Controller
|
|||||||
// On s'assure que l'utilisateur à la permission de supprimer
|
// On s'assure que l'utilisateur à la permission de supprimer
|
||||||
if($access=="user") {
|
if($access=="user") {
|
||||||
$em->getRepository("CadolesPortalBundle:Blog")->getPermission($this->getUser(),$entity->getBlogarticle()->getBlog(),$cansee,$canupdate,$canadd);
|
$em->getRepository("CadolesPortalBundle:Blog")->getPermission($this->getUser(),$entity->getBlogarticle()->getBlog(),$cansee,$canupdate,$canadd);
|
||||||
if(!$canadd&&$this->getUser()!=$entity->getUser()) throw $this->createNotFoundException('Permission denied');
|
if(!$canupdate&&$this->getUser()!=$entity->getUser()) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Suppression
|
// Suppression
|
||||||
|
@ -35,6 +35,19 @@ class BookmarkController extends Controller
|
|||||||
if (!$pagewidget) throw $this->createNotFoundException('Unable to find entity.');
|
if (!$pagewidget) throw $this->createNotFoundException('Unable to find entity.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Vérifier que cet enregistrement est modifiable
|
||||||
|
if($access=="user") {
|
||||||
|
if($usage=="user") {
|
||||||
|
$user=$pagewidget->getPage()->getUser();
|
||||||
|
if($user!=$this->getUser()) throw $this->createNotFoundException('Permission denied');
|
||||||
|
}
|
||||||
|
elseif($usage=="group") {
|
||||||
|
$groupentity=$this->getDoctrine()->getRepository("CadolesCoreBundle:Group")->find($group);
|
||||||
|
$usergroup=$this->getDoctrine()->getRepository("CadolesCoreBundle:UserGroup")->findoneby(["user"=>$this->getUser(),"group"=>$groupentity]);
|
||||||
|
if(!$usergroup or $usergroup->getRolegroup()<50) throw $this->createNotFoundException('Permission denied');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Création du formulaire
|
// Création du formulaire
|
||||||
$form = $this->createForm(BookmarkType::class,$data,array("mode"=>"submit"));
|
$form = $this->createForm(BookmarkType::class,$data,array("mode"=>"submit"));
|
||||||
|
|
||||||
@ -123,8 +136,8 @@ class BookmarkController extends Controller
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$groupentity=$this->getDoctrine()->getRepository("CadolesCoreBundle:Group")->find($group);
|
$groupentity=$this->getDoctrine()->getRepository("CadolesCoreBundle:Group")->find($group);
|
||||||
$fgmanager=$this->getDoctrine()->getRepository("CadolesCoreBundle:UserGroup")->findoneby(["user"=>$this->getUser(),"group"=>$groupentity,"fgmanager"=>true]);
|
$usergroup=$this->getDoctrine()->getRepository("CadolesCoreBundle:UserGroup")->findoneby(["user"=>$this->getUser(),"group"=>$groupentity]);
|
||||||
if(!$fgmanager) throw $this->createNotFoundException('Permission denied');
|
if(!$usergroup or $usergroup->getRolegroup()<50) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -214,8 +227,8 @@ class BookmarkController extends Controller
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$groupentity=$this->getDoctrine()->getRepository("CadolesCoreBundle:Group")->find($group);
|
$groupentity=$this->getDoctrine()->getRepository("CadolesCoreBundle:Group")->find($group);
|
||||||
$fgmanager=$this->getDoctrine()->getRepository("CadolesCoreBundle:UserGroup")->findoneby(["user"=>$this->getUser(),"group"=>$groupentity,"fgmanager"=>true]);
|
$usergroup=$this->getDoctrine()->getRepository("CadolesCoreBundle:UserGroup")->findoneby(["user"=>$this->getUser(),"group"=>$groupentity]);
|
||||||
if(!$fgmanager) throw $this->createNotFoundException('Permission denied');
|
if(!$usergroup or $usergroup->getRolegroup()<50) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -220,7 +220,7 @@ class CalendarController extends Controller
|
|||||||
|
|
||||||
// On s'assure que l'utilisateur à la permission de modifier
|
// On s'assure que l'utilisateur à la permission de modifier
|
||||||
if($access=="user") {
|
if($access=="user") {
|
||||||
$em->getRepository($this->labelentity)->getPermission($this->getUser(),$entity,$cansee,$canupdate);
|
$em->getRepository($this->labelentity)->getPermission($this->getUser(),$entity,$cansee,$canupdate,$canadd);
|
||||||
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
$oldpassword=$entity->getPasswordDecrypt();
|
$oldpassword=$entity->getPasswordDecrypt();
|
||||||
@ -272,7 +272,7 @@ class CalendarController extends Controller
|
|||||||
|
|
||||||
// On s'assure que l'utilisateur à la permission de modifier
|
// On s'assure que l'utilisateur à la permission de modifier
|
||||||
if($access=="user") {
|
if($access=="user") {
|
||||||
$em->getRepository($this->labelentity)->getPermission($this->getUser(),$entity,$cansee,$canupdate);
|
$em->getRepository($this->labelentity)->getPermission($this->getUser(),$entity,$cansee,$canupdate,$canadd);
|
||||||
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -308,7 +308,7 @@ class CalendarController extends Controller
|
|||||||
|
|
||||||
// On s'assure que l'utilisateur à la permission de supprimer
|
// On s'assure que l'utilisateur à la permission de supprimer
|
||||||
if($access=="user") {
|
if($access=="user") {
|
||||||
$em->getRepository($this->labelentity)->getPermission($this->getUser(),$entity,$cansee,$canupdate);
|
$em->getRepository($this->labelentity)->getPermission($this->getUser(),$entity,$cansee,$canupdate,$canadd);
|
||||||
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -341,7 +341,7 @@ class CalendarController extends Controller
|
|||||||
if($groups[0]) {
|
if($groups[0]) {
|
||||||
if($groups[0]->getFgcanshare()) {
|
if($groups[0]->getFgcanshare()) {
|
||||||
$pages=$groups[0]->getPages();
|
$pages=$groups[0]->getPages();
|
||||||
if($pages) {
|
if($pages[0]) {
|
||||||
$idpage=$pages[0]->getId();
|
$idpage=$pages[0]->getId();
|
||||||
$groups=$pages[0]->getGroups();
|
$groups=$pages[0]->getGroups();
|
||||||
$idgroup=$groups[0]->getId();
|
$idgroup=$groups[0]->getId();
|
||||||
@ -369,6 +369,7 @@ class CalendarController extends Controller
|
|||||||
$calendar->setType(0);
|
$calendar->setType(0);
|
||||||
$calendar->setUser($user);
|
$calendar->setUser($user);
|
||||||
$calendar->setCanupdate(true);
|
$calendar->setCanupdate(true);
|
||||||
|
$calendar->setCanadd(true);
|
||||||
$key = Uuid::uuid4();
|
$key = Uuid::uuid4();
|
||||||
$calendar->setKeyvalue($key);
|
$calendar->setKeyvalue($key);
|
||||||
$em->persist($calendar);
|
$em->persist($calendar);
|
||||||
|
@ -40,9 +40,10 @@ class CalendareventController extends Controller
|
|||||||
if($access=="config")
|
if($access=="config")
|
||||||
$calendar->setCanupdate(true);
|
$calendar->setCanupdate(true);
|
||||||
else {
|
else {
|
||||||
$this->getDoctrine()->getRepository("CadolesPortalBundle:Calendar")->getPermission($this->getUser(),$calendar,$cansee,$canupdate);
|
$this->getDoctrine()->getRepository("CadolesPortalBundle:Calendar")->getPermission($this->getUser(),$calendar,$cansee,$canupdate,$canadd);
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
||||||
$calendar->setCanupdate($canupdate);
|
$calendar->setCanupdate($canupdate);
|
||||||
|
$calendar->setCanadd($canadd);
|
||||||
}
|
}
|
||||||
|
|
||||||
$calendars=[$calendar];
|
$calendars=[$calendar];
|
||||||
@ -67,17 +68,43 @@ class CalendareventController extends Controller
|
|||||||
$tmp['color'] = "#".(is_null($calendar->getColor())?$this->get('session')->get('color')["main"]:$calendar->getColor());
|
$tmp['color'] = "#".(is_null($calendar->getColor())?$this->get('session')->get('color')["main"]:$calendar->getColor());
|
||||||
$tmp['allDay'] = $calendarevent->getAllday();
|
$tmp['allDay'] = $calendarevent->getAllday();
|
||||||
$tmp['calendar'] = $calendar->getId();
|
$tmp['calendar'] = $calendar->getId();
|
||||||
$tmp['editable'] = $calendarevent->getCalendar()->getCanupdate();
|
$tmp['editable'] = $calendarevent->getCalendar()->getCanadd();
|
||||||
$tmp['files'] = $this->loadpj($tmp['id'] );
|
$tmp['files'] = $this->loadpj($tmp['id'] );
|
||||||
|
|
||||||
array_push($events,$tmp);
|
array_push($events,$tmp);
|
||||||
array_push($eventids,$tmp["id"]);
|
array_push($eventids,$tmp["id"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// On recherche les taches associées aux groupes du calendrier
|
||||||
|
if($this->getUser()) {
|
||||||
|
$groups=$calendar->getGroups();
|
||||||
|
foreach($groups as $group) {
|
||||||
|
$projects=$group->getProjects();
|
||||||
|
foreach($projects as $project) {
|
||||||
|
$projecttasks = $this->getDoctrine()->getRepository("CadolesPortalBundle:Projecttask")->getProjectTasksByDate($project,$this->getUser(),$start,$end);
|
||||||
|
foreach($projecttasks as $projecttask) {
|
||||||
|
$tmp=[];
|
||||||
|
$tmp['id'] = "TASK".strval($projecttask->getId());
|
||||||
|
$tmp['title'] = "TACHE = ".$projecttask->getName();
|
||||||
|
$tmp['description'] = $projecttask->getDescription();
|
||||||
|
$tmp['start'] = $projecttask->getEnd()->format("Y-m-d\TH:i:s");
|
||||||
|
$tmp['end'] = $projecttask->getEnd()->format("Y-m-d\TH:i:s");
|
||||||
|
$tmp['color'] = "#".$this->get('session')->get('color')["main"];
|
||||||
|
$tmp['allDay'] = true;
|
||||||
|
$tmp['calendar'] = $project->getId();
|
||||||
|
$tmp['name'] = $project->getName()." - Tache";
|
||||||
|
$tmp['editable'] = false;
|
||||||
|
|
||||||
|
array_push($events,$tmp);
|
||||||
|
array_push($eventids,$tmp["id"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// On récupére les évenement partagé de l'utilisateur
|
// On récupére les évenement partagé de l'utilisateur
|
||||||
if($this->getUser()) {
|
if($this->getUser()) {
|
||||||
|
|
||||||
$calendarevents = $this->getDoctrine()->getRepository("CadolesPortalBundle:Calendarevent")->getCalendareventGroupsShareByDate($this->getUser(),$start,$end);
|
$calendarevents = $this->getDoctrine()->getRepository("CadolesPortalBundle:Calendarevent")->getCalendareventGroupsShareByDate($this->getUser(),$start,$end);
|
||||||
|
|
||||||
foreach($calendarevents as $calendarevent) {
|
foreach($calendarevents as $calendarevent) {
|
||||||
@ -128,8 +155,8 @@ class CalendareventController extends Controller
|
|||||||
|
|
||||||
// On s'assure que l'utilisateur à la permission de supprimer
|
// On s'assure que l'utilisateur à la permission de supprimer
|
||||||
if($access=="user") {
|
if($access=="user") {
|
||||||
$em->getRepository("CadolesPortalBundle:Calendar")->getPermission($this->getUser(),$calendar,$cansee,$canupdate);
|
$em->getRepository("CadolesPortalBundle:Calendar")->getPermission($this->getUser(),$calendar,$cansee,$canupdate,$canadd);
|
||||||
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
if(!$canadd) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
|
|
||||||
$calendarevent=new Calendarevent();
|
$calendarevent=new Calendarevent();
|
||||||
@ -182,8 +209,8 @@ class CalendareventController extends Controller
|
|||||||
|
|
||||||
// On s'assure que l'utilisateur à la permission
|
// On s'assure que l'utilisateur à la permission
|
||||||
if($access=="user") {
|
if($access=="user") {
|
||||||
$em->getRepository("CadolesPortalBundle:Calendar")->getPermission($this->getUser(),$calendar,$cansee,$canupdate);
|
$em->getRepository("CadolesPortalBundle:Calendar")->getPermission($this->getUser(),$calendar,$cansee,$canupdate,$canadd);
|
||||||
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
if(!$canadd) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
|
|
||||||
$calendarevent = $this->getDoctrine()->getRepository("CadolesPortalBundle:Calendarevent")->find($id);
|
$calendarevent = $this->getDoctrine()->getRepository("CadolesPortalBundle:Calendarevent")->find($id);
|
||||||
@ -240,8 +267,8 @@ class CalendareventController extends Controller
|
|||||||
|
|
||||||
// On s'assure que l'utilisateur à la permission
|
// On s'assure que l'utilisateur à la permission
|
||||||
if($access=="user") {
|
if($access=="user") {
|
||||||
$em->getRepository("CadolesPortalBundle:Calendar")->getPermission($this->getUser(),$calendar,$cansee,$canupdate);
|
$em->getRepository("CadolesPortalBundle:Calendar")->getPermission($this->getUser(),$calendar,$cansee,$canupdate,$canadd);
|
||||||
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
if(!$canadd) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
|
|
||||||
$calendarevent = $this->getDoctrine()->getRepository("CadolesPortalBundle:Calendarevent")->find($id);
|
$calendarevent = $this->getDoctrine()->getRepository("CadolesPortalBundle:Calendarevent")->find($id);
|
||||||
@ -265,8 +292,8 @@ class CalendareventController extends Controller
|
|||||||
|
|
||||||
// On s'assure que l'utilisateur à la permission de modifier
|
// On s'assure que l'utilisateur à la permission de modifier
|
||||||
if($access=="user") {
|
if($access=="user") {
|
||||||
$em->getRepository("CadolesPortalBundle:Calendar")->getPermission($this->getUser(),$calendar,$cansee,$canupdate);
|
$em->getRepository("CadolesPortalBundle:Calendar")->getPermission($this->getUser(),$calendar,$cansee,$canupdate,$canadd);
|
||||||
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
if(!$canadd) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Création du formulaire
|
// Création du formulaire
|
||||||
@ -303,8 +330,8 @@ class CalendareventController extends Controller
|
|||||||
|
|
||||||
// On s'assure que l'utilisateur à la permission
|
// On s'assure que l'utilisateur à la permission
|
||||||
if($access=="user") {
|
if($access=="user") {
|
||||||
$em->getRepository("CadolesPortalBundle:Calendar")->getPermission($this->getUser(),$calendar,$cansee,$canupdate);
|
$em->getRepository("CadolesPortalBundle:Calendar")->getPermission($this->getUser(),$calendar,$cansee,$canupdate,$canadd);
|
||||||
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
if(!$canadd) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
|
|
||||||
$files = $this->loadpj($id);
|
$files = $this->loadpj($id);
|
||||||
|
@ -65,13 +65,18 @@ class ItemController extends Controller
|
|||||||
{
|
{
|
||||||
// Initialisation de l'enregistrement
|
// Initialisation de l'enregistrement
|
||||||
$data = new Item();
|
$data = new Item();
|
||||||
|
if($this->GetParameter("activate_widsonde")) {
|
||||||
|
$data->setClicksonde(true);
|
||||||
|
$data->setClicksondeservice("PAGE_ENT");
|
||||||
|
}
|
||||||
|
|
||||||
// Création du formulaire
|
// Création du formulaire
|
||||||
$form = $this->createForm(ItemType::class,$data,array(
|
$form = $this->createForm(ItemType::class,$data,array(
|
||||||
"mode" => "submit",
|
"mode" => "submit",
|
||||||
"labelniveau01" => $this->GetParameter("labelsniveau01"),
|
"labelniveau01" => $this->GetParameter("labelsniveau01"),
|
||||||
"ssosynchroitem" => $this->GetParameter("ssosynchroitem"),
|
"ssosynchroitem" => $this->GetParameter("ssosynchroitem"),
|
||||||
"user_attr_cas_item" => $this->GetParameter("user_attr_cas_item")
|
"user_attr_cas_item" => $this->GetParameter("user_attr_cas_item"),
|
||||||
|
"activate_widsonde" => $this->GetParameter("activate_widsonde"),
|
||||||
));
|
));
|
||||||
|
|
||||||
// Récupération des data du formulaire
|
// Récupération des data du formulaire
|
||||||
@ -122,7 +127,8 @@ class ItemController extends Controller
|
|||||||
"idicon" => ($data->getIcon()?$data->getIcon()->getId():null),
|
"idicon" => ($data->getIcon()?$data->getIcon()->getId():null),
|
||||||
"labelniveau01" => $this->GetParameter("labelsniveau01"),
|
"labelniveau01" => $this->GetParameter("labelsniveau01"),
|
||||||
"ssosynchroitem" => $this->GetParameter("ssosynchroitem"),
|
"ssosynchroitem" => $this->GetParameter("ssosynchroitem"),
|
||||||
"user_attr_cas_item" => $this->GetParameter("user_attr_cas_item")
|
"user_attr_cas_item" => $this->GetParameter("user_attr_cas_item"),
|
||||||
|
"activate_widsonde" => ($this->GetParameter("activate_widsonde")&&$data->getId()>0),
|
||||||
));
|
));
|
||||||
|
|
||||||
// Récupération des data du formulaire
|
// Récupération des data du formulaire
|
||||||
@ -204,6 +210,26 @@ class ItemController extends Controller
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function forceorderAction(Request $request)
|
||||||
|
{
|
||||||
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
$categorys=$em->getRepository("CadolesPortalBundle:Itemcategory")->findAll();
|
||||||
|
|
||||||
|
foreach($categorys as $category) {
|
||||||
|
$i=0;
|
||||||
|
$items=$em->getRepository("CadolesPortalBundle:Item")->findBy(["itemcategory"=>$category],["title"=>"ASC"]);
|
||||||
|
foreach($items as $item) {
|
||||||
|
$i++;
|
||||||
|
$item->setRowOrder($i);
|
||||||
|
$em->flush();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retour à la liste
|
||||||
|
return $this->redirectToRoute($this->labelroute);
|
||||||
|
}
|
||||||
|
|
||||||
protected function getDatas()
|
protected function getDatas()
|
||||||
{
|
{
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
@ -230,6 +256,13 @@ class ItemController extends Controller
|
|||||||
if ($form->get('submit')->isClicked() && $mode=="submit") {
|
if ($form->get('submit')->isClicked() && $mode=="submit") {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($form->get('submit')->isClicked() && ($mode=="submit" || $mode=="update")) {
|
||||||
|
// si clicksonde alors clicksondeservice obligatoire
|
||||||
|
if ($data->getClicksonde() && !$data->getClicksondeservice()) {
|
||||||
|
$form->addError(new FormError('Type de service sur le click sonde est obligatoire'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($form->get('submit')->isClicked() && !$form->isValid()) {
|
if ($form->get('submit')->isClicked() && !$form->isValid()) {
|
||||||
$this->get('session')->getFlashBag()->clear();
|
$this->get('session')->getFlashBag()->clear();
|
||||||
$validator = $this->get('validator');
|
$validator = $this->get('validator');
|
||||||
|
@ -210,6 +210,10 @@ class NoticeController extends Controller
|
|||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$user=$this->getUser();
|
$user=$this->getUser();
|
||||||
$notices=$em->getRepository("CadolesPortalBundle:Notice")->getNoticeToRead($user);
|
$notices=$em->getRepository("CadolesPortalBundle:Notice")->getNoticeToRead($user);
|
||||||
|
|
||||||
|
// Récupération redirection potentielle
|
||||||
|
$id = $request->get('id');
|
||||||
|
|
||||||
foreach($notices as $notice) {
|
foreach($notices as $notice) {
|
||||||
$users=$notice->getUsers();
|
$users=$notice->getUsers();
|
||||||
|
|
||||||
@ -223,7 +227,7 @@ class NoticeController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->redirectToRoute("cadoles_core_home");
|
return $this->redirectToRoute("cadoles_core_home",["id"=>$id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewAction(Request $request) {
|
public function viewAction(Request $request) {
|
||||||
|
@ -286,7 +286,7 @@ class PageController extends Controller
|
|||||||
|
|
||||||
// On s'assure que l'utilisateur à la permission de modifier
|
// On s'assure que l'utilisateur à la permission de modifier
|
||||||
if($access=="user") {
|
if($access=="user") {
|
||||||
$em->getRepository($this->labelentity)->getPermission($this->getUser(),$entity,$cansee,$canupdate);
|
$em->getRepository($this->labelentity)->getPermission($this->getUser(),$entity,$cansee,$canupdate,$canadd);
|
||||||
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -369,7 +369,7 @@ class PageController extends Controller
|
|||||||
|
|
||||||
// On s'assure que l'utilisateur à la permission de modifier
|
// On s'assure que l'utilisateur à la permission de modifier
|
||||||
if($access=="user") {
|
if($access=="user") {
|
||||||
$em->getRepository($this->labelentity)->getPermission($this->getUser(),$entity,$cansee,$canupdate);
|
$em->getRepository($this->labelentity)->getPermission($this->getUser(),$entity,$cansee,$canupdate,$canadd);
|
||||||
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -408,7 +408,7 @@ class PageController extends Controller
|
|||||||
|
|
||||||
// On s'assure que l'utilisateur à la permission de supprimer
|
// On s'assure que l'utilisateur à la permission de supprimer
|
||||||
if($access=="user") {
|
if($access=="user") {
|
||||||
$em->getRepository($this->labelentity)->getPermission($this->getUser(),$entity,$cansee,$canupdate);
|
$em->getRepository($this->labelentity)->getPermission($this->getUser(),$entity,$cansee,$canupdate,$canadd);
|
||||||
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -438,7 +438,7 @@ class PageController extends Controller
|
|||||||
|
|
||||||
// On s'assure que l'utilisateur à la permission
|
// On s'assure que l'utilisateur à la permission
|
||||||
if($access=="user") {
|
if($access=="user") {
|
||||||
$em->getRepository($this->labelentity)->getPermission($this->getUser(),$entity,$cansee,$canupdate);
|
$em->getRepository($this->labelentity)->getPermission($this->getUser(),$entity,$cansee,$canupdate,$canadd);
|
||||||
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -474,7 +474,7 @@ class PageController extends Controller
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// On s'assure que l'utilisateur à la permission de voir
|
// On s'assure que l'utilisateur à la permission de voir
|
||||||
$em->getRepository($this->labelentity)->getPermission($this->getUser(),$entity,$cansee,$canupdate);
|
$em->getRepository($this->labelentity)->getPermission($this->getUser(),$entity,$cansee,$canupdate,$canadd);
|
||||||
if(!$cansee) {
|
if(!$cansee) {
|
||||||
return $this->render('CadolesCoreBundle:Core:reconnect.html.twig', [
|
return $this->render('CadolesCoreBundle:Core:reconnect.html.twig', [
|
||||||
'useheader' => false,
|
'useheader' => false,
|
||||||
|
@ -31,13 +31,14 @@ class PagewidgetController extends Controller
|
|||||||
private $look;
|
private $look;
|
||||||
private $mini;
|
private $mini;
|
||||||
private $selwidget;
|
private $selwidget;
|
||||||
|
private $usage;
|
||||||
|
private $group;
|
||||||
|
|
||||||
private $cansee;
|
private $cansee;
|
||||||
private $canudate;
|
private $canupdate;
|
||||||
private $canadd;
|
private $canadd;
|
||||||
|
|
||||||
private function searchArray($array, $key, $value)
|
private function searchArray($array, $key, $value) {
|
||||||
{
|
|
||||||
$results = array();
|
$results = array();
|
||||||
|
|
||||||
if (is_array($array))
|
if (is_array($array))
|
||||||
@ -52,8 +53,7 @@ class PagewidgetController extends Controller
|
|||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function entityForm(Pagewidget $entity,$idpage,$id,$access="config",$by="view")
|
private function entityForm(Pagewidget $entity,$idpage,$id,$access="config",$by="view") {
|
||||||
{
|
|
||||||
if ($this->getDoctrine()->getManager()->contains($entity)) {
|
if ($this->getDoctrine()->getManager()->contains($entity)) {
|
||||||
$widgettype= $this->getDoctrine()->getManager()->getRepository("CadolesPortalBundle:Pagewidget")->find($id)->getWidget();
|
$widgettype= $this->getDoctrine()->getManager()->getRepository("CadolesPortalBundle:Pagewidget")->find($id)->getWidget();
|
||||||
$params = $widgettype->getParameter();
|
$params = $widgettype->getParameter();
|
||||||
@ -97,8 +97,7 @@ class PagewidgetController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function submitAction(Request $request,$idpage,$idwidgettype,$access="config")
|
public function submitAction(Request $request,$idpage,$idwidgettype,$access="config") {
|
||||||
{
|
|
||||||
$by=$request->query->get('by');
|
$by=$request->query->get('by');
|
||||||
$entity = new Pagewidget();
|
$entity = new Pagewidget();
|
||||||
$form = $this->entityForm($entity,$idpage,$idwidgettype,$access,$by);
|
$form = $this->entityForm($entity,$idpage,$idwidgettype,$access,$by);
|
||||||
@ -190,8 +189,7 @@ class PagewidgetController extends Controller
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updateAction(Request $request,$idpage,$idwidget,$access="config")
|
public function updateAction(Request $request,$idpage,$idwidget,$access="config") {
|
||||||
{
|
|
||||||
$by=$request->query->get('by');
|
$by=$request->query->get('by');
|
||||||
$usage=$request->query->get('usage');
|
$usage=$request->query->get('usage');
|
||||||
$group=$request->query->get('group');
|
$group=$request->query->get('group');
|
||||||
@ -203,7 +201,7 @@ class PagewidgetController extends Controller
|
|||||||
|
|
||||||
// On s'assure que l'utilisateur à la permission de modifier
|
// On s'assure que l'utilisateur à la permission de modifier
|
||||||
if($access=="user") {
|
if($access=="user") {
|
||||||
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$entity->getPage(),$cansee,$canupdate);
|
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$entity->getPage(),$cansee,$canupdate,$canadd);
|
||||||
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -273,8 +271,7 @@ class PagewidgetController extends Controller
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function deleteAction(Request $request,$access="config")
|
public function deleteAction(Request $request,$access="config") {
|
||||||
{
|
|
||||||
// S'assurer que c'est un appel ajax
|
// S'assurer que c'est un appel ajax
|
||||||
if (!$request->isXmlHttpRequest()) return new JsonResponse(array('message' => 'Interdit'), 400);
|
if (!$request->isXmlHttpRequest()) return new JsonResponse(array('message' => 'Interdit'), 400);
|
||||||
|
|
||||||
@ -289,7 +286,7 @@ class PagewidgetController extends Controller
|
|||||||
|
|
||||||
// On s'assure que l'utilisateur à la permission de supprimer
|
// On s'assure que l'utilisateur à la permission de supprimer
|
||||||
if($access=="user") {
|
if($access=="user") {
|
||||||
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$entity->getPage(),$cansee,$canupdate);
|
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$entity->getPage(),$cansee,$canupdate,$canadd);
|
||||||
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -315,8 +312,7 @@ class PagewidgetController extends Controller
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function orderAction(Request $request)
|
public function orderAction(Request $request) {
|
||||||
{
|
|
||||||
// S'assurer que c'est un appel ajax
|
// S'assurer que c'est un appel ajax
|
||||||
if (!$request->isXmlHttpRequest()) return new JsonResponse(array('message' => 'Interdit'), 400);
|
if (!$request->isXmlHttpRequest()) return new JsonResponse(array('message' => 'Interdit'), 400);
|
||||||
|
|
||||||
@ -367,7 +363,6 @@ class PagewidgetController extends Controller
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected function getErrorForm($id,$form,$request,$idwidgettype,$page,$data,$mode) {
|
protected function getErrorForm($id,$form,$request,$idwidgettype,$page,$data,$mode) {
|
||||||
if ($form->get('submit')->isClicked()&&$mode=="delete") {
|
if ($form->get('submit')->isClicked()&&$mode=="delete") {
|
||||||
|
|
||||||
@ -405,6 +400,8 @@ class PagewidgetController extends Controller
|
|||||||
$this->access = $access;
|
$this->access = $access;
|
||||||
$this->look = $request->query->get('look');
|
$this->look = $request->query->get('look');
|
||||||
$this->selwidget = $request->query->get('selwidget');
|
$this->selwidget = $request->query->get('selwidget');
|
||||||
|
$this->usage = $request->query->get('usage');
|
||||||
|
$this->group = $request->query->get('group');
|
||||||
|
|
||||||
// Le widget existe-t-il ?
|
// Le widget existe-t-il ?
|
||||||
$this->entity = $this->em->getRepository($this->labelentity)->find($this->id);
|
$this->entity = $this->em->getRepository($this->labelentity)->find($this->id);
|
||||||
@ -417,7 +414,7 @@ class PagewidgetController extends Controller
|
|||||||
else {
|
else {
|
||||||
// On s'assure que l'utilisateur à la permission de voir
|
// On s'assure que l'utilisateur à la permission de voir
|
||||||
$this->page=$this->entity->getPage();
|
$this->page=$this->entity->getPage();
|
||||||
$this->em->getRepository("CadolesPortalBundle:Page")->getPermission($this->user,$this->page,$this->cansee,$this->canupdate);
|
$this->em->getRepository("CadolesPortalBundle:Page")->getPermission($this->user,$this->page,$this->cansee,$this->canupdate,$this->canadd);
|
||||||
if(!$this->cansee) throw $this->createNotFoundException('Permission denied');
|
if(!$this->cansee) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -450,6 +447,26 @@ class PagewidgetController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getKeyPreference(&$entity,$key,$value) {
|
||||||
|
$user=$this->getUser();
|
||||||
|
if(!$user)
|
||||||
|
return $value;
|
||||||
|
|
||||||
|
$preference=$user->getPreference();
|
||||||
|
$id=$entity->getId();
|
||||||
|
|
||||||
|
if(!is_array($preference))
|
||||||
|
return $value;
|
||||||
|
|
||||||
|
if(!array_key_exists($key,$preference))
|
||||||
|
return $value;
|
||||||
|
|
||||||
|
if(!array_key_exists($id,$preference[$key]))
|
||||||
|
return $value;
|
||||||
|
|
||||||
|
return $preference[$key][$id];
|
||||||
|
}
|
||||||
|
|
||||||
protected function getRender($view,$params) {
|
protected function getRender($view,$params) {
|
||||||
// Paramétres toujours présent dans un rendu de widget
|
// Paramétres toujours présent dans un rendu de widget
|
||||||
$allways = [
|
$allways = [
|
||||||
@ -605,6 +622,9 @@ class PagewidgetController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Préference utilisateur
|
||||||
|
$modedesktop = $this->getKeyPreference($this->entity,"modedesktop",$modedesktop);
|
||||||
|
|
||||||
// Profilage
|
// Profilage
|
||||||
$itemsordered = $this->em->getRepository("CadolesPortalBundle:Item")->getUserItems($this->user,$bookmarks,$items,$itemcategorys,$iditemcategory,$this->get('session')->get('ssoitems'),$withbookmark,false);
|
$itemsordered = $this->em->getRepository("CadolesPortalBundle:Item")->getUserItems($this->user,$bookmarks,$items,$itemcategorys,$iditemcategory,$this->get('session')->get('ssoitems'),$withbookmark,false);
|
||||||
}
|
}
|
||||||
@ -643,10 +663,14 @@ class PagewidgetController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Préference utilisateur
|
||||||
|
$modedesktop = $this->getKeyPreference($this->entity,"modedesktop",$modedesktop);
|
||||||
|
|
||||||
// Profilage
|
// Profilage
|
||||||
$itemsordered = $this->em->getRepository("CadolesPortalBundle:Item")->getUserItems($this->user,$bookmarks,$items,$itemcategorys,null,$this->get('session')->get('ssoitems'),0,true);
|
$itemsordered = $this->em->getRepository("CadolesPortalBundle:Item")->getUserItems($this->user,$bookmarks,$items,$itemcategorys,null,$this->get('session')->get('ssoitems'),0,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
return $this->getRender('viewitemessential.html.twig', [
|
return $this->getRender('viewitemessential.html.twig', [
|
||||||
'canadd' => ($this->user),
|
'canadd' => ($this->user),
|
||||||
@ -687,7 +711,6 @@ class PagewidgetController extends Controller
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function viewfluxAction(Request $request,$id,$access="config") {
|
public function viewfluxAction(Request $request,$id,$access="config") {
|
||||||
// Récupération de la requete
|
// Récupération de la requete
|
||||||
$this->setRequest($request,$id,$access);
|
$this->setRequest($request,$id,$access);
|
||||||
@ -894,7 +917,6 @@ class PagewidgetController extends Controller
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function viewrssAction(Request $request,$id,$access="config") {
|
public function viewrssAction(Request $request,$id,$access="config") {
|
||||||
// Récupération de la requete
|
// Récupération de la requete
|
||||||
$this->setRequest($request,$id,$access);
|
$this->setRequest($request,$id,$access);
|
||||||
@ -1115,34 +1137,20 @@ class PagewidgetController extends Controller
|
|||||||
|
|
||||||
// Render
|
// Render
|
||||||
return $this->getRender('viewbookmark.html.twig', [
|
return $this->getRender('viewbookmark.html.twig', [
|
||||||
|
'canadd' => $this->canadd,
|
||||||
'modedesktop' => $modedesktop,
|
'modedesktop' => $modedesktop,
|
||||||
'bookmarks' => $bookmarks,
|
'bookmarks' => $bookmarks,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewlinkAction(Request $request,$id,$access="config") {
|
public function viewlinkAction(Request $request,$id,$access="config") {
|
||||||
$look=$request->query->get('look');
|
// Récupération de la requete
|
||||||
$selwidget=$request->query->get('selwidget');
|
$this->setRequest($request,$id,$access);
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
|
||||||
|
|
||||||
// Permissions
|
|
||||||
if($access=="config") {
|
|
||||||
$canupdate = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// On s'assure que l'utilisateur à la permission de voir
|
|
||||||
$page=$entity->getPage();
|
|
||||||
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$page,$cansee,$canupdate);
|
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Récupération des paramétres du widget
|
// Récupération des paramétres du widget
|
||||||
$url="";
|
$url="";
|
||||||
$target="_blank";
|
$target="_blank";
|
||||||
foreach($entity->getParameter()["fields"] as $parameter) {
|
foreach($this->entity->getParameter()["fields"] as $parameter) {
|
||||||
switch($parameter["id"]) {
|
switch($parameter["id"]) {
|
||||||
case "url":
|
case "url":
|
||||||
$url=$parameter["value"];
|
$url=$parameter["value"];
|
||||||
@ -1153,44 +1161,21 @@ class PagewidgetController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Préference utilisateur
|
|
||||||
$this->getPreference($entity);
|
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
return $this->render($this->labelentity.':viewlink.html.twig', [
|
return $this->getRender('viewlink.html.twig', [
|
||||||
'entity' => $entity,
|
|
||||||
'canadd' => false,
|
'canadd' => false,
|
||||||
'canupdate' => $canupdate,
|
|
||||||
'url' => $url,
|
'url' => $url,
|
||||||
'target' => $target,
|
'target' => $target,
|
||||||
'access' => $access,
|
|
||||||
'look' => $look,
|
|
||||||
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function vieweditorAction(Request $request,$id,$access="config") {
|
public function vieweditorAction(Request $request,$id,$access="config") {
|
||||||
$look=$request->query->get('look');
|
// Récupération de la requete
|
||||||
$selwidget=$request->query->get('selwidget');
|
$this->setRequest($request,$id,$access);
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
|
||||||
|
|
||||||
// Permissions
|
|
||||||
if($access=="config") {
|
|
||||||
$canupdate = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// On s'assure que l'utilisateur à la permission de voir
|
|
||||||
$page=$entity->getPage();
|
|
||||||
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$page,$cansee,$canupdate);
|
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Récupération des paramétres du widget
|
// Récupération des paramétres du widget
|
||||||
$html="";
|
$html="";
|
||||||
foreach($entity->getParameter()["fields"] as $parameter) {
|
foreach($this->entity->getParameter()["fields"] as $parameter) {
|
||||||
switch($parameter["id"]) {
|
switch($parameter["id"]) {
|
||||||
case "html":
|
case "html":
|
||||||
$html=$parameter["value"];
|
$html=$parameter["value"];
|
||||||
@ -1199,43 +1184,20 @@ class PagewidgetController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Préference utilisateur
|
|
||||||
$this->getPreference($entity);
|
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
return $this->render($this->labelentity.':vieweditor.html.twig', [
|
return $this->getRender('vieweditor.html.twig', [
|
||||||
'entity' => $entity,
|
|
||||||
'canadd' => false,
|
'canadd' => false,
|
||||||
'canupdate' => $canupdate,
|
|
||||||
'html' => $html,
|
'html' => $html,
|
||||||
'access' => $access,
|
|
||||||
'look' => $look,
|
|
||||||
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewslideAction(Request $request,$id,$access="config") {
|
public function viewslideAction(Request $request,$id,$access="config") {
|
||||||
$look=$request->query->get('look');
|
// Récupération de la requete
|
||||||
$selwidget=$request->query->get('selwidget');
|
$this->setRequest($request,$id,$access);
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
|
||||||
|
|
||||||
// Permissions
|
|
||||||
if($access=="config") {
|
|
||||||
$canupdate = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// On s'assure que l'utilisateur à la permission de voir
|
|
||||||
$page=$entity->getPage();
|
|
||||||
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$page,$cansee,$canupdate);
|
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Récupération des paramétres du widget
|
// Récupération des paramétres du widget
|
||||||
$interval="2";
|
$interval="2";
|
||||||
foreach($entity->getParameter()["fields"] as $parameter) {
|
foreach($this->entity->getParameter()["fields"] as $parameter) {
|
||||||
switch($parameter["id"]) {
|
switch($parameter["id"]) {
|
||||||
case "interval":
|
case "interval":
|
||||||
$interval=$parameter["value"];
|
$interval=$parameter["value"];
|
||||||
@ -1243,47 +1205,24 @@ class PagewidgetController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Préference utilisateur
|
|
||||||
$this->getPreference($entity);
|
|
||||||
|
|
||||||
// Récupération des slides
|
// Récupération des slides
|
||||||
$slides=$em->getRepository("CadolesPortalBundle:Slide")->findBy(["pagewidget"=>$entity],['roworder'=>'ASC','title'=>'ASC']);
|
$slides=$this->em->getRepository("CadolesPortalBundle:Slide")->findBy(["pagewidget"=>$this->entity],['roworder'=>'ASC','title'=>'ASC']);
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
return $this->render($this->labelentity.':viewslide.html.twig', [
|
return $this->getRender('viewslide.html.twig', [
|
||||||
'entity' => $entity,
|
'canadd' => $this->canadd,
|
||||||
'canadd' => $canupdate,
|
|
||||||
'canupdate' => $canupdate,
|
|
||||||
'slides' => $slides,
|
'slides' => $slides,
|
||||||
'interval' => $interval,
|
'interval' => $interval,
|
||||||
'access' => $access,
|
|
||||||
'look' => $look,
|
|
||||||
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewfileAction(Request $request,$id,$access="config") {
|
public function viewfileAction(Request $request,$id,$access="config") {
|
||||||
$look=$request->query->get('look');
|
// Récupération de la requete
|
||||||
$selwidget=$request->query->get('selwidget');
|
$this->setRequest($request,$id,$access);
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
|
||||||
|
|
||||||
// Permissions
|
|
||||||
if($access=="config") {
|
|
||||||
$canupdate = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// On s'assure que l'utilisateur à la permission de voir
|
|
||||||
$page=$entity->getPage();
|
|
||||||
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$page,$cansee,$canupdate);
|
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Récupération des paramétres du widget
|
// Récupération des paramétres du widget
|
||||||
$view="small";
|
$view="small";
|
||||||
foreach($entity->getParameter()["fields"] as $parameter) {
|
foreach($this->entity->getParameter()["fields"] as $parameter) {
|
||||||
switch($parameter["id"]) {
|
switch($parameter["id"]) {
|
||||||
case "modelist":
|
case "modelist":
|
||||||
$view=($parameter["value"]==0?"small":"list");
|
$view=($parameter["value"]==0?"small":"list");
|
||||||
@ -1291,45 +1230,17 @@ class PagewidgetController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Préference utilisateur
|
// Render
|
||||||
$this->getPreference($entity);
|
return $this->getRender('viewfile.html.twig', [
|
||||||
|
'canadd' => $this->canadd,
|
||||||
return $this->render($this->labelentity.':viewfile.html.twig', [
|
|
||||||
'entity' => $entity,
|
|
||||||
'canadd' => $canupdate,
|
|
||||||
'canupdate' => $canupdate,
|
|
||||||
'access' => $access,
|
|
||||||
'directory' => "widget-".$id,
|
'directory' => "widget-".$id,
|
||||||
'view' => $view,
|
'view' => $view,
|
||||||
'look' => $look,
|
|
||||||
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewgaleryAction(Request $request,$id,$access="config") {
|
public function viewgaleryAction(Request $request,$id,$access="config") {
|
||||||
$look=$request->query->get('look');
|
// Récupération de la requete
|
||||||
$selwidget=$request->query->get('selwidget');
|
$this->setRequest($request,$id,$access);
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
|
||||||
|
|
||||||
// Permissions
|
|
||||||
if($access=="config") {
|
|
||||||
$canupdate = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// On s'assure que l'utilisateur à la permission de voir
|
|
||||||
$page=$entity->getPage();
|
|
||||||
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$page,$cansee,$canupdate);
|
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Préference utilisateur
|
|
||||||
$this->getPreference($entity);
|
|
||||||
|
|
||||||
$directory=$this->get('kernel')->getRootDir()."/../uploads/file/widget-".$id;
|
$directory=$this->get('kernel')->getRootDir()."/../uploads/file/widget-".$id;
|
||||||
$files=[];
|
$files=[];
|
||||||
@ -1359,43 +1270,19 @@ class PagewidgetController extends Controller
|
|||||||
|
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
return $this->render($this->labelentity.':viewgalery.html.twig', [
|
return $this->getRender('viewgalery.html.twig', [
|
||||||
'entity' => $entity,
|
'canadd' => $this->canadd,
|
||||||
'canadd' => $canupdate,
|
|
||||||
'canupdate' => $canupdate,
|
|
||||||
'files' => $files,
|
'files' => $files,
|
||||||
'access' => $access,
|
|
||||||
'look' => $look,
|
|
||||||
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewcalendarAction(Request $request,$id,$access="config") {
|
public function viewcalendarAction(Request $request,$id,$access="config") {
|
||||||
$usage=$request->query->get('usage');
|
// Récupération de la requete
|
||||||
$group=$request->query->get('group');
|
$this->setRequest($request,$id,$access);
|
||||||
$look=$request->query->get('look');
|
|
||||||
$selwidget=$request->query->get('selwidget');
|
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
|
||||||
|
|
||||||
if($group) $groupentity=$em->getRepository("CadolesCoreBundle:Group")->find($group);
|
|
||||||
|
|
||||||
// Permissions
|
|
||||||
if($access=="config") {
|
|
||||||
$canupdate = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// On s'assure que l'utilisateur à la permission de voir
|
|
||||||
$page=$entity->getPage();
|
|
||||||
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$page,$cansee,$canupdate);
|
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Récupération des paramétres du widget
|
// Récupération des paramétres du widget
|
||||||
$nbday="0";
|
$nbday="0";
|
||||||
foreach($entity->getParameter()["fields"] as $parameter) {
|
foreach($this->entity->getParameter()["fields"] as $parameter) {
|
||||||
switch($parameter["id"]) {
|
switch($parameter["id"]) {
|
||||||
case "nbday":
|
case "nbday":
|
||||||
$nbday=$parameter["value"];
|
$nbday=$parameter["value"];
|
||||||
@ -1403,52 +1290,27 @@ class PagewidgetController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Préference utilisateur
|
|
||||||
$this->getPreference($entity);
|
|
||||||
|
|
||||||
// Récupérer les events de l'utilisateur
|
// Récupérer les events de l'utilisateur
|
||||||
$user=$this->getUser();
|
$user=$this->getUser();
|
||||||
$events=$em->getRepository("CadolesPortalBundle:Calendarevent")->getUserCalendarevents($user,$this->get('session')->get('color')["main"],$usage,$group,$firstcalendar);
|
$events=$this->em->getRepository("CadolesPortalBundle:Calendarevent")->getUserCalendarevents($user,$this->get('session')->get('color')["main"],$this->usage,$this->group,$firstcalendar);
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
return $this->render($this->labelentity.':viewcalendar.html.twig', [
|
return $this->getRender('viewcalendar.html.twig', [
|
||||||
'entity' => $entity,
|
'canadd' => $this->canadd,
|
||||||
'canadd' => $canupdate,
|
|
||||||
'canupdate' => $canupdate,
|
|
||||||
'events' => $events,
|
'events' => $events,
|
||||||
'nbday' => $nbday,
|
'nbday' => $nbday,
|
||||||
'access' => $access,
|
|
||||||
'firstcalendar' => $firstcalendar,
|
'firstcalendar' => $firstcalendar,
|
||||||
'usage' => $usage,
|
'usage' => $this->usage,
|
||||||
'look' => $look,
|
|
||||||
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewblogAction(Request $request,$id,$access="config") {
|
public function viewblogAction(Request $request,$id,$access="config") {
|
||||||
$usage=$request->query->get('usage');
|
// Récupération de la requete
|
||||||
$group=$request->query->get('group');
|
$this->setRequest($request,$id,$access);
|
||||||
$look=$request->query->get('look');
|
|
||||||
$selwidget=$request->query->get('selwidget');
|
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
|
||||||
|
|
||||||
// Permissions
|
|
||||||
if($access=="config") {
|
|
||||||
$canupdate = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// On s'assure que l'utilisateur à la permission de voir
|
|
||||||
$page=$entity->getPage();
|
|
||||||
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$page,$cansee,$canupdate);
|
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Récupération des paramétres du widget
|
// Récupération des paramétres du widget
|
||||||
$nbarticle=10;
|
$nbarticle=10;
|
||||||
foreach($entity->getParameter()["fields"] as $parameter) {
|
foreach($this->entity->getParameter()["fields"] as $parameter) {
|
||||||
switch($parameter["id"]) {
|
switch($parameter["id"]) {
|
||||||
case "nbarticle":
|
case "nbarticle":
|
||||||
$nbarticle=$parameter["value"];
|
$nbarticle=$parameter["value"];
|
||||||
@ -1456,64 +1318,38 @@ class PagewidgetController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Préference utilisateur
|
|
||||||
$this->getPreference($entity);
|
|
||||||
|
|
||||||
// On récupère soit les blogs du group en cours soit l'ensemble des blogs de l'utilisateur
|
// On récupère soit les blogs du group en cours soit l'ensemble des blogs de l'utilisateur
|
||||||
if($usage=="group") {
|
if($this->usage=="group") {
|
||||||
$blogs=$em->getRepository("CadolesPortalBundle:Blog")->getBlogsGroup($this->getUser(),$group);
|
$blogs=$this->em->getRepository("CadolesPortalBundle:Blog")->getBlogsGroup($this->getUser(),$this->group);
|
||||||
if($blogs) $firstblog=$blogs[0]->getId();
|
if($blogs) $firstblog=$blogs[0]->getId();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$em->getRepository("CadolesPortalBundle:Blog")->getBlogsUser($this->getUser(),$blogsuser,$blogsadmin,$blogsshared);
|
$this->em->getRepository("CadolesPortalBundle:Blog")->getBlogsUser($this->getUser(),$blogsuser,$blogsadmin,$blogsshared);
|
||||||
$blogs=array_merge($blogsuser,$blogsadmin->toArray(),$blogsshared);
|
$blogs=array_merge($blogsuser,$blogsadmin->toArray(),$blogsshared);
|
||||||
$firstblog="all";
|
$firstblog="all";
|
||||||
}
|
}
|
||||||
|
|
||||||
// On récupère les nbarticle de ses blogs
|
// On récupère les nbarticle de ses blogs
|
||||||
$em->getRepository("CadolesPortalBundle:Blogarticle")->getBlogsArticles($blogs,0,$nbarticle,$count,$blogarticles);
|
$this->em->getRepository("CadolesPortalBundle:Blogarticle")->getBlogsArticles($blogs,0,$nbarticle,$count,$blogarticles);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
return $this->render($this->labelentity.':viewblog.html.twig', [
|
return $this->getRender('viewblog.html.twig', [
|
||||||
'entity' => $entity,
|
'canadd' => $this->canadd,
|
||||||
'canadd' => $canupdate,
|
|
||||||
'canupdate' => $canupdate,
|
|
||||||
'blogarticles' => $blogarticles,
|
'blogarticles' => $blogarticles,
|
||||||
'nbarticle' => $nbarticle,
|
'nbarticle' => $nbarticle,
|
||||||
'access' => $access,
|
|
||||||
'firstblog' => $firstblog,
|
'firstblog' => $firstblog,
|
||||||
'usage' => $usage,
|
'usage' => $this->usage,
|
||||||
'look' => $look,
|
|
||||||
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewprojectAction(Request $request,$id,$access="config") {
|
public function viewprojectAction(Request $request,$id,$access="config") {
|
||||||
$usage=$request->query->get('usage');
|
// Récupération de la requete
|
||||||
$group=$request->query->get('group');
|
$this->setRequest($request,$id,$access);
|
||||||
$look=$request->query->get('look');
|
|
||||||
$selwidget=$request->query->get('selwidget');
|
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
|
||||||
|
|
||||||
// Permissions
|
|
||||||
if($access=="config") {
|
|
||||||
$canupdate = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// On s'assure que l'utilisateur à la permission de voir
|
|
||||||
$page=$entity->getPage();
|
|
||||||
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$page,$cansee,$canupdate);
|
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Parametres
|
// Parametres
|
||||||
$nbarticle=10;
|
$nbarticle=10;
|
||||||
foreach($entity->getParameter()["fields"] as $parameter) {
|
foreach($this->entity->getParameter()["fields"] as $parameter) {
|
||||||
switch($parameter["id"]) {
|
switch($parameter["id"]) {
|
||||||
case "nbarticle":
|
case "nbarticle":
|
||||||
$nbarticle=$parameter["value"];
|
$nbarticle=$parameter["value"];
|
||||||
@ -1521,76 +1357,56 @@ class PagewidgetController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Préference utilisateur
|
|
||||||
$this->getPreference($entity);
|
|
||||||
|
|
||||||
// On récupère soit les projects du group en cours soit l'ensemble des projects de l'utilisateur
|
// On récupère soit les projects du group en cours soit l'ensemble des projects de l'utilisateur
|
||||||
$user=$this->getUser();
|
$user=$this->getUser();
|
||||||
if($usage=="group") {
|
if($this->usage=="group") {
|
||||||
$projects=$em->getRepository("CadolesPortalBundle:Project")->getProjectsGroup($this->getUser(),$group);
|
$projects=$this->em->getRepository("CadolesPortalBundle:Project")->getProjectsGroup($this->getUser(),$this->group);
|
||||||
if($projects) $firstproject=$projects[0]->getId();
|
if($projects) $firstproject=$projects[0]->getId();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$em->getRepository("CadolesPortalBundle:Project")->getProjectsUser($user,$projectsuser,$projectsadmin,$projectsshared);
|
$this->em->getRepository("CadolesPortalBundle:Project")->getProjectsUser($user,$projectsuser,$projectsadmin,$projectsshared);
|
||||||
$projects=array_merge($projectsuser,$projectsadmin->toArray(),$projectsshared);
|
$projects=array_merge($projectsuser,$projectsadmin->toArray(),$projectsshared);
|
||||||
$firstproject="all";
|
$firstproject="all";
|
||||||
}
|
}
|
||||||
|
|
||||||
// On récupère les nbarticle de ses projects
|
// On récupère les nbarticle de ses projects
|
||||||
$em->getRepository("CadolesPortalBundle:Projecttask")->getProjectsTasks($projects,0,$nbarticle,$count,$projecttasks);
|
$this->em->getRepository("CadolesPortalBundle:Projecttask")->getProjectsTasks($projects,0,$nbarticle,$count,$projecttasks);
|
||||||
|
|
||||||
foreach($projecttasks as $key => $projecttask) {
|
foreach($projecttasks as $key => $projecttask) {
|
||||||
if($projecttask->getPercentage()==100) unset($projecttasks[$key]);
|
if($projecttask->getPercentage()==100) unset($projecttasks[$key]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($usage!="group") {
|
if($this->usage!="group") {
|
||||||
foreach($projecttasks as $key => $projecttask) {
|
foreach($projecttasks as $key => $projecttask) {
|
||||||
if(!$user) unset($projecttasks[$key]);
|
if(!$user) unset($projecttasks[$key]);
|
||||||
else {
|
else {
|
||||||
if($projecttask->getUser() && $projecttask->getUser()!=$user) unset($projecttasks[$key]);
|
if($projecttask->getUser() && $projecttask->getUser()!=$user)
|
||||||
elseif($projecttask->getOwner() && $projecttask->getOwner()!=$user) unset($projecttasks[$key]);
|
unset($projecttasks[$key]);
|
||||||
|
elseif(!$projecttask->getUser() && $projecttask->getOwner() && $projecttask->getOwner()!=$user)
|
||||||
|
unset($projecttasks[$key]);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
return $this->render($this->labelentity.':viewproject.html.twig', [
|
return $this->getRender('viewproject.html.twig', [
|
||||||
'entity' => $entity,
|
'canadd' => $this->canupdate,
|
||||||
'canadd' => $canupdate,
|
|
||||||
'canupdate' => $canupdate,
|
|
||||||
'projecttasks' => $projecttasks,
|
'projecttasks' => $projecttasks,
|
||||||
'nbarticle' => $nbarticle,
|
'nbarticle' => $nbarticle,
|
||||||
'access' => $access,
|
|
||||||
'firstproject' => $firstproject,
|
'firstproject' => $firstproject,
|
||||||
'usage' => $usage,
|
'usage' => $this->usage,
|
||||||
'look' => $look,
|
|
||||||
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewseparatorAction(Request $request,$id,$access="config") {
|
public function viewseparatorAction(Request $request,$id,$access="config") {
|
||||||
$look=$request->query->get('look');
|
// Récupération de la requete
|
||||||
$selwidget=$request->query->get('selwidget');
|
$this->setRequest($request,$id,$access);
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
|
||||||
|
|
||||||
// Permissions
|
|
||||||
if($access=="config") {
|
|
||||||
$canupdate = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// On s'assure que l'utilisateur à la permission de voir
|
|
||||||
$page=$entity->getPage();
|
|
||||||
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$page,$cansee,$canupdate);
|
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Parametres
|
// Parametres
|
||||||
$seetitle=false;
|
$seetitle=false;
|
||||||
$seeicon=false;
|
$seeicon=false;
|
||||||
foreach($entity->getParameter()["fields"] as $parameter) {
|
foreach($this->entity->getParameter()["fields"] as $parameter) {
|
||||||
switch($parameter["id"]) {
|
switch($parameter["id"]) {
|
||||||
case "seetitle":
|
case "seetitle":
|
||||||
$seetitle=boolval($parameter["value"]);
|
$seetitle=boolval($parameter["value"]);
|
||||||
@ -1601,44 +1417,21 @@ class PagewidgetController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Préference utilisateur
|
|
||||||
$this->getPreference($entity);
|
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
return $this->render($this->labelentity.':viewseparator.html.twig', [
|
return $this->getRender('viewseparator.html.twig', [
|
||||||
'entity' => $entity,
|
'canadd' => $this->canupdate,
|
||||||
'canadd' => $canupdate,
|
|
||||||
'canupdate' => $canupdate,
|
|
||||||
'seetitle' => $seetitle,
|
'seetitle' => $seetitle,
|
||||||
'seeicon' => $seeicon,
|
'seeicon' => $seeicon,
|
||||||
'access' => $access,
|
|
||||||
'look' => $look,
|
|
||||||
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewclockAction(Request $request,$id,$access="config") {
|
public function viewclockAction(Request $request,$id,$access="config") {
|
||||||
$look=$request->query->get('look');
|
// Récupération de la requete
|
||||||
$selwidget=$request->query->get('selwidget');
|
$this->setRequest($request,$id,$access);
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
|
||||||
|
|
||||||
// Permissions
|
|
||||||
if($access=="config") {
|
|
||||||
$canupdate = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// On s'assure que l'utilisateur à la permission de voir
|
|
||||||
$page=$entity->getPage();
|
|
||||||
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$page,$cansee,$canupdate);
|
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Parametres
|
// Parametres
|
||||||
$clock="0";
|
$clock="0";
|
||||||
foreach($entity->getParameter()["fields"] as $parameter) {
|
foreach($this->entity->getParameter()["fields"] as $parameter) {
|
||||||
switch($parameter["id"]) {
|
switch($parameter["id"]) {
|
||||||
case "clock":
|
case "clock":
|
||||||
$clock=$parameter["value"];
|
$clock=$parameter["value"];
|
||||||
@ -1646,79 +1439,33 @@ class PagewidgetController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Préference utilisateur
|
|
||||||
$this->getPreference($entity);
|
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
return $this->render($this->labelentity.':viewframe.html.twig', [
|
return $this->getRender('viewframe.html.twig', [
|
||||||
'entity' => $entity,
|
'canadd' => $this->canupdate,
|
||||||
'canadd' => $canupdate,
|
|
||||||
'canupdate' => $canupdate,
|
|
||||||
'onheader' => true,
|
'onheader' => true,
|
||||||
'tool' => ($clock==0?"cadoles_portal_user_tool_clockanalogique":"cadoles_portal_user_tool_clocknumerique"),
|
'tool' => ($clock==0?"cadoles_portal_user_tool_clockanalogique":"cadoles_portal_user_tool_clocknumerique"),
|
||||||
'access' => $access,
|
|
||||||
'look' => $look,
|
|
||||||
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewcalculatorAction(Request $request,$id,$access="config") {
|
public function viewcalculatorAction(Request $request,$id,$access="config") {
|
||||||
$look=$request->query->get('look');
|
// Récupération de la requete
|
||||||
$selwidget=$request->query->get('selwidget');
|
$this->setRequest($request,$id,$access);
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
|
||||||
|
|
||||||
// Permissions
|
|
||||||
if($access=="config") {
|
|
||||||
$canupdate = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// On s'assure que l'utilisateur à la permission de voir
|
|
||||||
$page=$entity->getPage();
|
|
||||||
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$page,$cansee,$canupdate);
|
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Préference utilisateur
|
|
||||||
$this->getPreference($entity);
|
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
return $this->render($this->labelentity.':viewframe.html.twig', [
|
return $this->getRender('viewframe.html.twig', [
|
||||||
'entity' => $entity,
|
'canadd' => $this->canupdate,
|
||||||
'canadd' => $canupdate,
|
|
||||||
'canupdate' => $canupdate,
|
|
||||||
'onheader' => true,
|
'onheader' => true,
|
||||||
'tool' => "cadoles_portal_user_tool_calculator",
|
'tool' => "cadoles_portal_user_tool_calculator",
|
||||||
'access' => $access,
|
|
||||||
'look' => $look,
|
|
||||||
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewappexternalAction(Request $request,$id,$access="config") {
|
public function viewappexternalAction(Request $request,$id,$access="config") {
|
||||||
$look=$request->query->get('look');
|
// Récupération de la requete
|
||||||
$selwidget=$request->query->get('selwidget');
|
$this->setRequest($request,$id,$access);
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
|
||||||
|
|
||||||
// Permissions
|
|
||||||
if($access=="config") {
|
|
||||||
$canupdate = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// On s'assure que l'utilisateur à la permission de voir
|
|
||||||
$page=$entity->getPage();
|
|
||||||
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$page,$cansee,$canupdate);
|
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Récupération des paramétres du widget
|
// Récupération des paramétres du widget
|
||||||
$idappexternal=null;
|
$idappexternal=null;
|
||||||
foreach($entity->getParameter()["fields"] as $parameter) {
|
foreach($this->entity->getParameter()["fields"] as $parameter) {
|
||||||
switch($parameter["id"]) {
|
switch($parameter["id"]) {
|
||||||
case "appexternal":
|
case "appexternal":
|
||||||
$idappexternal=$parameter["value"];
|
$idappexternal=$parameter["value"];
|
||||||
@ -1729,15 +1476,12 @@ class PagewidgetController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Préference utilisateur
|
|
||||||
$this->getPreference($entity);
|
|
||||||
|
|
||||||
$user=$this->getUser();
|
$user=$this->getUser();
|
||||||
$items=[];
|
$items=[];
|
||||||
$itemcategorys=[];
|
$itemcategorys=[];
|
||||||
if($user) {
|
if($user) {
|
||||||
if($idappexternal) $appextenals=$em->getRepository("CadolesPortalBundle:Appexternal")->findBy(["id"=>$idappexternal]);
|
if($idappexternal) $appextenals=$this->em->getRepository("CadolesPortalBundle:Appexternal")->findBy(["id"=>$idappexternal]);
|
||||||
else $appextenals=$em->getRepository("CadolesPortalBundle:Appexternal")->findAll();
|
else $appextenals=$this->em->getRepository("CadolesPortalBundle:Appexternal")->findAll();
|
||||||
foreach($appextenals as $appexternal) {
|
foreach($appextenals as $appexternal) {
|
||||||
switch($appexternal->getName()) {
|
switch($appexternal->getName()) {
|
||||||
case "Limesurvey":
|
case "Limesurvey":
|
||||||
@ -1790,161 +1534,86 @@ class PagewidgetController extends Controller
|
|||||||
array_multisort($title, SORT_ASC, $items);
|
array_multisort($title, SORT_ASC, $items);
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
return $this->render($this->labelentity.':viewappexternal.html.twig', [
|
return $this->getRender('viewappexternal.html.twig', [
|
||||||
'entity' => $entity,
|
|
||||||
'canadd' => ($user),
|
'canadd' => ($user),
|
||||||
'canupdate' => $canupdate,
|
|
||||||
'modedesktop' => $modedesktop,
|
'modedesktop' => $modedesktop,
|
||||||
'items' => $items,
|
'items' => $items,
|
||||||
'itemcategorys' => $itemcategorys,
|
'itemcategorys' => $itemcategorys,
|
||||||
'access' => $access,
|
|
||||||
'look' => $look,
|
|
||||||
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewinfoAction(Request $request,$id,$access="config") {
|
public function viewinfoAction(Request $request,$id,$access="config") {
|
||||||
$usage=$request->query->get('usage');
|
// Récupération de la requete
|
||||||
$group=$request->query->get('group');
|
$this->setRequest($request,$id,$access);
|
||||||
$look=$request->query->get('look');
|
|
||||||
$selwidget=$request->query->get('selwidget');
|
|
||||||
$user=$this->getUser();
|
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
|
||||||
$page=$entity->getPage();
|
|
||||||
|
|
||||||
// Permissions
|
|
||||||
if($access=="config") {
|
|
||||||
$canupdate = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// On s'assure que l'utilisateur à la permission de voir
|
|
||||||
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$page,$cansee,$canupdate);
|
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Préference utilisateur
|
|
||||||
$this->getPreference($entity);
|
|
||||||
|
|
||||||
$icon=null;
|
$icon=null;
|
||||||
$title=null;
|
$title=null;
|
||||||
$description=null;
|
$description=null;
|
||||||
$members=[];
|
$members=[];
|
||||||
if($usage=="group") {
|
if($this->usage=="group") {
|
||||||
$group=$em->getRepository("CadolesCoreBundle:Group")->find($group);
|
$groupentity=$this->em->getRepository("CadolesCoreBundle:Group")->find($this->group);
|
||||||
if($group) {
|
if($groupentity) {
|
||||||
$title=$group->getLabel();
|
$title=$this->entity->getPage()->getName();
|
||||||
$id=$group->getId();
|
$id=$groupentity->getId();
|
||||||
if($group->getDescription())
|
if($groupentity->getDescription())
|
||||||
$description="<strong>Description</strong><br>".$group->getDescription();
|
$description="<strong>Description</strong><br>".$groupentity->getDescription();
|
||||||
if($group->getIcon())
|
if($groupentity->getIcon())
|
||||||
$icon="/".$group->getIcon()->getLabel();
|
$icon="/".$groupentity->getIcon()->getLabel();
|
||||||
|
|
||||||
|
|
||||||
foreach($group->getUsers() as $usergroup) {
|
foreach($groupentity->getUsers() as $usergroup) {
|
||||||
|
|
||||||
array_push($members,$usergroup);
|
array_push($members,$usergroup);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$title=$entity->getPage()->getName();
|
$title=$this->entity->getPage()->getName();
|
||||||
$proprio=$entity->getPage()->getUser();
|
$proprio=$this->entity->getPage()->getUser();
|
||||||
$id=0;
|
$id=0;
|
||||||
if($proprio) {
|
if($proprio) {
|
||||||
$description="Propriétaire de la page<br>".$proprio->getLastname()." ".$proprio->getLastname();
|
$description="Propriétaire de la page<br>".$proprio->getLastname()." ".$proprio->getLastname();
|
||||||
$icon="/uploads/avatar/".$proprio->getAvatar();
|
$icon="/uploads/avatar/".$proprio->getAvatar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
return $this->render($this->labelentity.':viewinfo.html.twig', [
|
return $this->getRender('viewinfo.html.twig', [
|
||||||
'entity' => $entity,
|
'canadd' => $this->canupdate,
|
||||||
'canadd' => $canupdate,
|
'usage' => $this->usage,
|
||||||
'canupdate' => $canupdate,
|
|
||||||
'usage' => $usage,
|
|
||||||
'icon' => $icon,
|
'icon' => $icon,
|
||||||
'title' => $title,
|
'title' => $title,
|
||||||
'description' => $description,
|
'description' => $description,
|
||||||
'members' => $members,
|
'members' => $members,
|
||||||
'id' => $id,
|
'id' => $id,
|
||||||
'idpage' => $page->getId(),
|
'idpage' => $this->entity->getPage()->getId(),
|
||||||
'look' => $look,
|
|
||||||
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewchatAction(Request $request,$id,$access="config") {
|
public function viewchatAction(Request $request,$id,$access="config") {
|
||||||
$usage=$request->query->get('usage');
|
// Récupération de la requete
|
||||||
$group=$request->query->get('group');
|
$this->setRequest($request,$id,$access);
|
||||||
$look=$request->query->get('look');
|
|
||||||
$selwidget=$request->query->get('selwidget');
|
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$group=$this->group;
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
if($this->usage!="group"||!$group) {
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
$group=$this->em->getRepository("CadolesCoreBundle:Group")->findOneBy(["fgall"=>true])->getId();
|
||||||
|
|
||||||
// Permissions
|
|
||||||
if($access=="config") {
|
|
||||||
$canupdate = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// On s'assure que l'utilisateur à la permission de voir
|
|
||||||
$page=$entity->getPage();
|
|
||||||
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$page,$cansee,$canupdate);
|
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Préference utilisateur
|
|
||||||
$this->getPreference($entity);
|
|
||||||
|
|
||||||
if($usage!="group"||!$group) {
|
|
||||||
$group=$em->getRepository("CadolesCoreBundle:Group")->findOneBy(["fgall"=>true])->getId();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
return $this->render($this->labelentity.':viewchat.html.twig', [
|
return $this->getRender('viewchat.html.twig', [
|
||||||
'entity' => $entity,
|
'canadd' => $this->canupdate,
|
||||||
'canadd' => $canupdate,
|
|
||||||
'canupdate' => $canupdate,
|
|
||||||
'onheader' => false,
|
'onheader' => false,
|
||||||
'tool' => "cadoles_websocket_chat",
|
'tool' => "cadoles_websocket_chat",
|
||||||
'access' => $access,
|
'usage' => $this->usage,
|
||||||
'usage' => $usage,
|
|
||||||
'group' => $group,
|
'group' => $group,
|
||||||
'look' => $look,
|
|
||||||
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function viewgroupAction(Request $request,$id,$access="config") {
|
public function viewgroupAction(Request $request,$id,$access="config") {
|
||||||
$usage=$request->query->get('usage');
|
// Récupération de la requete
|
||||||
$group=$request->query->get('group');
|
$this->setRequest($request,$id,$access);
|
||||||
$look=$request->query->get('look');
|
|
||||||
$selwidget=$request->query->get('selwidget');
|
|
||||||
|
|
||||||
$user=$this->getUser();
|
$user=$this->getUser();
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
|
||||||
|
|
||||||
// Permissions
|
|
||||||
if($access=="config") {
|
|
||||||
$canupdate = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// On s'assure que l'utilisateur à la permission de voir
|
|
||||||
$page=$entity->getPage();
|
|
||||||
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$page,$cansee,$canupdate);
|
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Préference utilisateur
|
|
||||||
$this->getPreference($entity);
|
|
||||||
|
|
||||||
$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);
|
||||||
if(is_array($groupsshared)) {
|
if(is_array($groupsshared)) {
|
||||||
@ -1962,47 +1631,21 @@ class PagewidgetController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
return $this->render($this->labelentity.':viewgroup.html.twig', [
|
return $this->getRender('viewgroup.html.twig', [
|
||||||
'entity' => $entity,
|
|
||||||
'canadd' => ($user),
|
'canadd' => ($user),
|
||||||
'canupdate' => $canupdate,
|
'usage' => $this->usage,
|
||||||
'usage' => $usage,
|
|
||||||
'groups' => $mygroups,
|
'groups' => $mygroups,
|
||||||
'look' => $look,
|
|
||||||
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewgroupmessageAction(Request $request,$id,$access="config") {
|
public function viewgroupmessageAction(Request $request,$id,$access="config") {
|
||||||
$usage=$request->query->get('usage');
|
// Récupération de la requete
|
||||||
$group=$request->query->get('group');
|
$this->setRequest($request,$id,$access);
|
||||||
$look=$request->query->get('look');
|
|
||||||
$selwidget=$request->query->get('selwidget');
|
|
||||||
|
|
||||||
$user=$this->getUser();
|
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
|
||||||
|
|
||||||
// Permissions
|
|
||||||
if($access=="config") {
|
|
||||||
$canupdate = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// On s'assure que l'utilisateur à la permission de voir
|
|
||||||
$page=$entity->getPage();
|
|
||||||
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$page,$cansee,$canupdate);
|
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Préference utilisateur
|
|
||||||
$this->getPreference($entity);
|
|
||||||
|
|
||||||
// Récupération des paramétres du widget
|
// Récupération des paramétres du widget
|
||||||
$modelist=1;
|
$modelist=1;
|
||||||
$nbarticle=5;
|
$nbarticle=5;
|
||||||
foreach($entity->getParameter()["fields"] as $parameter) {
|
foreach($this->entity->getParameter()["fields"] as $parameter) {
|
||||||
switch($parameter["id"]) {
|
switch($parameter["id"]) {
|
||||||
case "modelist":
|
case "modelist":
|
||||||
$modelist=$parameter["value"];
|
$modelist=$parameter["value"];
|
||||||
@ -2013,8 +1656,8 @@ class PagewidgetController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$mygroups=[];
|
|
||||||
$mymsg= [];
|
$mymsg= [];
|
||||||
|
$user=$this->getUser();
|
||||||
$this->getDoctrine()->getRepository("CadolesPortalBundle:Page")->getPagesUser($user,null,$default,$pagesuser,$pagesadmin,$groupsshared);
|
$this->getDoctrine()->getRepository("CadolesPortalBundle:Page")->getPagesUser($user,null,$default,$pagesuser,$pagesadmin,$groupsshared);
|
||||||
if(is_array($groupsshared)) {
|
if(is_array($groupsshared)) {
|
||||||
foreach($groupsshared as $groupshared) {
|
foreach($groupsshared as $groupshared) {
|
||||||
@ -2050,48 +1693,23 @@ class PagewidgetController extends Controller
|
|||||||
|
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
return $this->render($this->labelentity.':viewgroupmessage.html.twig', [
|
return $this->getRender('viewgroupmessage.html.twig', [
|
||||||
'entity' => $entity,
|
|
||||||
'canadd' => ($user),
|
'canadd' => ($user),
|
||||||
'canupdate' => $canupdate,
|
'usage' => $this->usage,
|
||||||
'usage' => $usage,
|
|
||||||
'modelist' => $modelist,
|
'modelist' => $modelist,
|
||||||
'messages' => $mymsg,
|
'messages' => $mymsg,
|
||||||
'nbarticle' => $nbarticle,
|
'nbarticle' => $nbarticle,
|
||||||
'look' => $look,
|
|
||||||
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function viewOnlydocAction(Request $request,$id,$access="config") {
|
public function viewOnlydocAction(Request $request,$id,$access="config") {
|
||||||
$usage=$request->query->get('usage');
|
// Récupération de la requete
|
||||||
$group=$request->query->get('group');
|
$this->setRequest($request,$id,$access);
|
||||||
$look=$request->query->get('look');
|
|
||||||
$selwidget=$request->query->get('selwidget');
|
|
||||||
|
|
||||||
$user=$this->getUser();
|
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
|
||||||
$entity = $em->getRepository($this->labelentity)->find($id);
|
|
||||||
if (!$entity) throw $this->createNotFoundException('Unable to find entity.');
|
|
||||||
|
|
||||||
// Permissions
|
|
||||||
if($access=="config") {
|
|
||||||
$canupdate = true;
|
|
||||||
$cansee = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// On s'assure que l'utilisateur à la permission de voir
|
|
||||||
$page=$entity->getPage();
|
|
||||||
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$page,$cansee,$canupdate);
|
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Récupération des paramétres du widget
|
// Récupération des paramétres du widget
|
||||||
$apponly=0;
|
$apponly=0;
|
||||||
$view="small";
|
$view="small";
|
||||||
foreach($entity->getParameter()["fields"] as $parameter) {
|
foreach($this->entity->getParameter()["fields"] as $parameter) {
|
||||||
switch($parameter["id"]) {
|
switch($parameter["id"]) {
|
||||||
case "apponly":
|
case "apponly":
|
||||||
$apponly=$parameter["value"];
|
$apponly=$parameter["value"];
|
||||||
@ -2102,18 +1720,10 @@ class PagewidgetController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Préference utilisateur
|
return $this->getRender('viewonlydoc.html.twig', [
|
||||||
$this->getPreference($entity);
|
'canadd' => $this->canupdate,
|
||||||
|
|
||||||
return $this->render($this->labelentity.':viewonlydoc.html.twig', [
|
|
||||||
'entity' => $entity,
|
|
||||||
'canadd' => $canupdate,
|
|
||||||
'canupdate' => $canupdate,
|
|
||||||
'access' => $access,
|
|
||||||
'directory' => $id,
|
'directory' => $id,
|
||||||
'view' => $view,
|
'view' => $view,
|
||||||
'look' => $look,
|
|
||||||
'mini' => ($look=="list"&&$entity->getId()!=$selwidget),
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -362,7 +362,7 @@ class ProjectController extends Controller
|
|||||||
if($groups[0]) {
|
if($groups[0]) {
|
||||||
if($groups[0]->getFgcanshare()) {
|
if($groups[0]->getFgcanshare()) {
|
||||||
$pages=$groups[0]->getPages();
|
$pages=$groups[0]->getPages();
|
||||||
if($pages) {
|
if($pages[0]) {
|
||||||
$idpage=$pages[0]->getId();
|
$idpage=$pages[0]->getId();
|
||||||
$groups=$pages[0]->getGroups();
|
$groups=$pages[0]->getGroups();
|
||||||
$idgroup=$groups[0]->getId();
|
$idgroup=$groups[0]->getId();
|
||||||
@ -410,7 +410,6 @@ class ProjectController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
||||||
|
|
||||||
$canupdate=$this->get('session')->get('cancreateproject');
|
$canupdate=$this->get('session')->get('cancreateproject');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,6 +116,7 @@ class ProjecttaskController extends Controller
|
|||||||
$user=$this->getUser();
|
$user=$this->getUser();
|
||||||
$em->getRepository("CadolesPortalBundle:Project")->getPermission($user,$entity->getProject(),$cansee,$canupdate,$canadd);
|
$em->getRepository("CadolesPortalBundle:Project")->getPermission($user,$entity->getProject(),$cansee,$canupdate,$canadd);
|
||||||
if($user && ((is_null($entity->getUser()) && $user==$entity->getOwner()) || $user==$entity->getUser())) $canadd=true;
|
if($user && ((is_null($entity->getUser()) && $user==$entity->getOwner()) || $user==$entity->getUser())) $canadd=true;
|
||||||
|
else $canadd = $em->getRepository("CadolesPortalBundle:Project")->getInvalideur($user,$entity->getProject());
|
||||||
if(!$canadd) throw $this->createNotFoundException('Permission denied');
|
if(!$canadd) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,6 +181,7 @@ class ProjecttaskController extends Controller
|
|||||||
$user=$this->getUser();
|
$user=$this->getUser();
|
||||||
$em->getRepository("CadolesPortalBundle:Project")->getPermission($user,$entity->getProject(),$cansee,$canupdate,$canadd);
|
$em->getRepository("CadolesPortalBundle:Project")->getPermission($user,$entity->getProject(),$cansee,$canupdate,$canadd);
|
||||||
if($user && ((is_null($entity->getUser()) && $user==$entity->getOwner()) || $user==$entity->getUser())) $canadd=true;
|
if($user && ((is_null($entity->getUser()) && $user==$entity->getOwner()) || $user==$entity->getUser())) $canadd=true;
|
||||||
|
else $canadd = $em->getRepository("CadolesPortalBundle:Project")->getInvalideur($user,$entity->getProject());
|
||||||
|
|
||||||
if(!$canadd) throw $this->createNotFoundException('Permission denied');
|
if(!$canadd) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
@ -205,7 +207,7 @@ class ProjecttaskController extends Controller
|
|||||||
if($groups[0]) {
|
if($groups[0]) {
|
||||||
if($groups[0]->getFgcanshare()) {
|
if($groups[0]->getFgcanshare()) {
|
||||||
$pages=$groups[0]->getPages();
|
$pages=$groups[0]->getPages();
|
||||||
if($pages) {
|
if($pages[0]) {
|
||||||
$idpage=$pages[0]->getId();
|
$idpage=$pages[0]->getId();
|
||||||
$groups=$pages[0]->getGroups();
|
$groups=$pages[0]->getGroups();
|
||||||
$idgroup=$groups[0]->getId();
|
$idgroup=$groups[0]->getId();
|
||||||
@ -233,6 +235,7 @@ class ProjecttaskController extends Controller
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$em->getRepository("CadolesPortalBundle:Project")->getPermission($user,$entity->getProject(),$cansee,$canupdate,$canadd);
|
$em->getRepository("CadolesPortalBundle:Project")->getPermission($user,$entity->getProject(),$cansee,$canupdate,$canadd);
|
||||||
|
$canadd = $em->getRepository("CadolesPortalBundle:Project")->getInvalideur($user,$entity->getProject());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
if(!$cansee) throw $this->createNotFoundException('Permission denied');
|
||||||
@ -266,17 +269,6 @@ class ProjecttaskController extends Controller
|
|||||||
$tmp["thumb"]="";
|
$tmp["thumb"]="";
|
||||||
if($tmp["extension"]=="pdf") {
|
if($tmp["extension"]=="pdf") {
|
||||||
$tmp["thumb"]="/".$this->getParameter('alias')."/bundles/cadolescore/images/files/".$tmp["extension"].".png";
|
$tmp["thumb"]="/".$this->getParameter('alias')."/bundles/cadolescore/images/files/".$tmp["extension"].".png";
|
||||||
|
|
||||||
/* ne plus afficher l'apercu du pdf
|
|
||||||
if($fs->exists($directory."/thumbmini/".$tmp["name"])) {
|
|
||||||
$data = file_get_contents($directory."/thumbmini/".$tmp["name"]);
|
|
||||||
$tmp["thumb"]="data:image/jpg;base64," . base64_encode($data);
|
|
||||||
}
|
|
||||||
elseif($fs->exists($directory."/thumb/".$tmp["name"])) {
|
|
||||||
$data = file_get_contents($directory."/thumb/".$tmp["name"]);
|
|
||||||
$tmp["thumb"]="data:image/jpg;base64," . base64_encode($data);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
elseif($fs->exists($directory."/thumbmini/".$tmp["name"])) {
|
elseif($fs->exists($directory."/thumbmini/".$tmp["name"])) {
|
||||||
$data = file_get_contents($directory."/thumbmini/".$tmp["name"]);
|
$data = file_get_contents($directory."/thumbmini/".$tmp["name"]);
|
||||||
@ -353,7 +345,7 @@ class ProjecttaskController extends Controller
|
|||||||
$project=$em->getRepository("CadolesPortalBundle:Project")->find($projectid);
|
$project=$em->getRepository("CadolesPortalBundle:Project")->find($projectid);
|
||||||
if($project) {
|
if($project) {
|
||||||
$user=$this->getUser();
|
$user=$this->getUser();
|
||||||
$em->getRepository("CadolesPortalBundle:Project")->getPermission($user,$project,$cansee,$canupdate,$canadd);
|
$canadd = $em->getRepository("CadolesPortalBundle:Project")->getInvalideur($user,$project);
|
||||||
|
|
||||||
// Si permission alors il peut affecter tt les personnes du groupe
|
// Si permission alors il peut affecter tt les personnes du groupe
|
||||||
if($canadd||$access=="config") {
|
if($canadd||$access=="config") {
|
||||||
@ -405,9 +397,8 @@ class ProjecttaskController extends Controller
|
|||||||
// On s'assure que l'utilisateur à la permission de modifier
|
// On s'assure que l'utilisateur à la permission de modifier
|
||||||
if($access=="user") {
|
if($access=="user") {
|
||||||
$user=$this->getUser();
|
$user=$this->getUser();
|
||||||
$em->getRepository("CadolesPortalBundle:Project")->getPermission($user,$entity->getProject(),$cansee,$canupdate,$canadd);
|
|
||||||
if($user && ((is_null($entity->getUser()) && $user==$entity->getOwner()) || $user==$entity->getUser())) $canadd=true;
|
if($user && ((is_null($entity->getUser()) && $user==$entity->getOwner()) || $user==$entity->getUser())) $canadd=true;
|
||||||
|
else $canadd = $em->getRepository("CadolesPortalBundle:Project")->getInvalideur($user,$entity->getProject());
|
||||||
if(!$canadd) throw $this->createNotFoundException('Permission denied');
|
if(!$canadd) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,8 +37,8 @@ class SlideController extends Controller
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$groupentity=$this->getDoctrine()->getRepository("CadolesCoreBundle:Group")->find($group);
|
$groupentity=$this->getDoctrine()->getRepository("CadolesCoreBundle:Group")->find($group);
|
||||||
$fgmanager=$this->getDoctrine()->getRepository("CadolesCoreBundle:UserGroup")->findoneby(["user"=>$this->getUser(),"group"=>$groupentity,"fgmanager"=>true]);
|
$usergroup=$this->getDoctrine()->getRepository("CadolesCoreBundle:UserGroup")->findoneby(["user"=>$this->getUser(),"group"=>$groupentity]);
|
||||||
if(!$fgmanager) throw $this->createNotFoundException('Permission denied');
|
if(!$usergroup||$usergroup->getRolegroup()<50) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,8 +81,8 @@ class SlideController extends Controller
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$groupentity=$this->getDoctrine()->getRepository("CadolesCoreBundle:Group")->find($group);
|
$groupentity=$this->getDoctrine()->getRepository("CadolesCoreBundle:Group")->find($group);
|
||||||
$fgmanager=$this->getDoctrine()->getRepository("CadolesCoreBundle:UserGroup")->findoneby(["user"=>$this->getUser(),"group"=>$groupentity,"fgmanager"=>true]);
|
$usergroup=$this->getDoctrine()->getRepository("CadolesCoreBundle:UserGroup")->findoneby(["user"=>$this->getUser(),"group"=>$groupentity]);
|
||||||
if(!$fgmanager) throw $this->createNotFoundException('Permission denied');
|
if(!$usergroup||$usergroup->getRolegroup()<50) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,8 +142,8 @@ class SlideController extends Controller
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$groupentity=$this->getDoctrine()->getRepository("CadolesCoreBundle:Group")->find($group);
|
$groupentity=$this->getDoctrine()->getRepository("CadolesCoreBundle:Group")->find($group);
|
||||||
$fgmanager=$this->getDoctrine()->getRepository("CadolesCoreBundle:UserGroup")->findoneby(["user"=>$this->getUser(),"group"=>$groupentity,"fgmanager"=>true]);
|
$usergroup=$this->getDoctrine()->getRepository("CadolesCoreBundle:UserGroup")->findoneby(["user"=>$this->getUser(),"group"=>$groupentity]);
|
||||||
if(!$fgmanager) throw $this->createNotFoundException('Permission denied');
|
if(!$usergroup||$usergroup->getRolegroup()<50) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -206,8 +206,8 @@ class SlideController extends Controller
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$groupentity=$this->getDoctrine()->getRepository("CadolesCoreBundle:Group")->find($group);
|
$groupentity=$this->getDoctrine()->getRepository("CadolesCoreBundle:Group")->find($group);
|
||||||
$fgmanager=$this->getDoctrine()->getRepository("CadolesCoreBundle:UserGroup")->findoneby(["user"=>$this->getUser(),"group"=>$groupentity,"fgmanager"=>true]);
|
$usergroup=$this->getDoctrine()->getRepository("CadolesCoreBundle:UserGroup")->findoneby(["user"=>$this->getUser(),"group"=>$groupentity]);
|
||||||
if(!$fgmanager) throw $this->createNotFoundException('Permission denied');
|
if(!$usergroup||$usergroup->getRolegroup()<50) throw $this->createNotFoundException('Permission denied');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,6 +39,20 @@ class SyncenvoleController extends Controller
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function cdtAction()
|
||||||
|
{
|
||||||
|
$url=$this->getParameter("widcdt_syncenvole");
|
||||||
|
$color=$this->get('session')->get('colormain');
|
||||||
|
$themename=$this->get('session')->get("theme");
|
||||||
|
|
||||||
|
return $this->render('CadolesPortalBundle:Tool:frame.html.twig', [
|
||||||
|
'useheader' => true,
|
||||||
|
'usemenu' => false,
|
||||||
|
'usesidebar' => true,
|
||||||
|
'url' => $url."/synchro.php?app=cdt&color=#color#"
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
public function gepiannuAction()
|
public function gepiannuAction()
|
||||||
{
|
{
|
||||||
$url=$this->getParameter("widgepi_syncenvole");
|
$url=$this->getParameter("widgepi_syncenvole");
|
||||||
|
@ -149,7 +149,7 @@ class Alert
|
|||||||
{
|
{
|
||||||
$today = new \DateTime();
|
$today = new \DateTime();
|
||||||
if (null === $this->unpublishedat) {
|
if (null === $this->unpublishedat) {
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
if ($this->unpublishedat->getTimestamp() < $today->getTimestamp()) {
|
if ($this->unpublishedat->getTimestamp() < $today->getTimestamp()) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -132,6 +132,17 @@ class Calendar
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private $canadd;
|
||||||
|
public function getCanadd()
|
||||||
|
{
|
||||||
|
return $this->canadd;
|
||||||
|
}
|
||||||
|
public function setCanadd($canadd)
|
||||||
|
{
|
||||||
|
$this->canadd = $canadd;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/* Password User */
|
/* Password User */
|
||||||
public function setPassword($password)
|
public function setPassword($password)
|
||||||
{
|
{
|
||||||
|
@ -95,6 +95,13 @@ class Item
|
|||||||
*/
|
*/
|
||||||
private $color;
|
private $color;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*
|
||||||
|
* @ORM\Column(name="badgeurl", type="string", length=250, nullable=true)
|
||||||
|
*/
|
||||||
|
private $badgeurl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
@ -115,6 +122,20 @@ class Item
|
|||||||
*/
|
*/
|
||||||
private $icon;
|
private $icon;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var boolean
|
||||||
|
*
|
||||||
|
* @ORM\Column(name="clicksonde", type="boolean", nullable=true, options={"default":false})
|
||||||
|
*/
|
||||||
|
private $clicksonde = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var boolean
|
||||||
|
*
|
||||||
|
* @ORM\Column(name="clicksondeservice", type="string", nullable=true)
|
||||||
|
*/
|
||||||
|
private $clicksondeservice;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var ArrayCollection $bookmark
|
* @var ArrayCollection $bookmark
|
||||||
* @var Bookmark
|
* @var Bookmark
|
||||||
@ -650,4 +671,76 @@ class Item
|
|||||||
{
|
{
|
||||||
return $this->ssoitem;
|
return $this->ssoitem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set badgeurl.
|
||||||
|
*
|
||||||
|
* @param string|null $badgeurl
|
||||||
|
*
|
||||||
|
* @return Item
|
||||||
|
*/
|
||||||
|
public function setBadgeurl($badgeurl = null)
|
||||||
|
{
|
||||||
|
$this->badgeurl = $badgeurl;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get badgeurl.
|
||||||
|
*
|
||||||
|
* @return string|null
|
||||||
|
*/
|
||||||
|
public function getBadgeurl()
|
||||||
|
{
|
||||||
|
return $this->badgeurl;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set clicksonde
|
||||||
|
*
|
||||||
|
* @param boolean $clicksonde
|
||||||
|
*
|
||||||
|
* @return Item
|
||||||
|
*/
|
||||||
|
public function setClicksonde($clicksonde)
|
||||||
|
{
|
||||||
|
$this->clicksonde = $clicksonde;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get clicksonde
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public function getClicksonde()
|
||||||
|
{
|
||||||
|
return $this->clicksonde;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set clicksondeservice
|
||||||
|
*
|
||||||
|
* @param string $clicksondeservice
|
||||||
|
*
|
||||||
|
* @return Item
|
||||||
|
*/
|
||||||
|
public function setClicksondeservice($clicksondeservice)
|
||||||
|
{
|
||||||
|
$this->clicksondeservice = $clicksondeservice;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get clicksondeservice
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getClicksondeservice()
|
||||||
|
{
|
||||||
|
return $this->clicksondeservice;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ class AlertType extends AbstractType
|
|||||||
"label" => 'Description',
|
"label" => 'Description',
|
||||||
"required" => false,
|
"required" => false,
|
||||||
"disabled" => ($options["mode"]=="delete"?true:false),
|
"disabled" => ($options["mode"]=="delete"?true:false),
|
||||||
"config" => array("height" => "500px")
|
"config" => array("height" => "500px","filebrowserUploadRoute" => 'cadoles_portal_config_alert_upload')
|
||||||
])
|
])
|
||||||
|
|
||||||
->add("fghideable",ChoiceType::class,[
|
->add("fghideable",ChoiceType::class,[
|
||||||
@ -118,14 +118,13 @@ class AlertType extends AbstractType
|
|||||||
|
|
||||||
->add('publishedat', DateType::class, [
|
->add('publishedat', DateType::class, [
|
||||||
'label' => 'Publier du',
|
'label' => 'Publier du',
|
||||||
'input' => 'datetime',
|
"widget" => 'single_text',
|
||||||
])
|
])
|
||||||
|
|
||||||
->add('unpublishedat', DateType::class, [
|
->add('unpublishedat', DateType::class, [
|
||||||
'label' => 'Jusqu\'au',
|
'label' => 'Jusqu\'au',
|
||||||
'input' => 'datetime',
|
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'years' => range(date('Y'), date('Y')+10)
|
"widget" => 'single_text',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,8 +35,9 @@ class BlogShareType extends AbstractType
|
|||||||
->where('g.fgcanshare=:fgcanshare')
|
->where('g.fgcanshare=:fgcanshare')
|
||||||
->andWhere('g=ug.group')
|
->andWhere('g=ug.group')
|
||||||
->andWhere('ug.user=:user')
|
->andWhere('ug.user=:user')
|
||||||
->andWhere('ug.fgmanager=:fgcanshare')
|
->andWhere('ug.rolegroup>=:role')
|
||||||
->setParameter('fgcanshare',true)
|
->setParameter('fgcanshare',true)
|
||||||
|
->setParameter('role',90)
|
||||||
->setParameter('user',$user);
|
->setParameter('user',$user);
|
||||||
},
|
},
|
||||||
'choice_label' => 'label',
|
'choice_label' => 'label',
|
||||||
|