Compare commits
166 Commits
23219dd58e
...
dist/envol
Author | SHA1 | Date | |
---|---|---|---|
4959a10857 | |||
d0d8183f7a | |||
d42fdbfedd | |||
4f2fa1db4f | |||
75d935aa57 | |||
27e23fffaf | |||
70e2d49e7c | |||
df8bcfc1a1 | |||
666b90d513 | |||
2b86aa4e2f | |||
cbae74f041 | |||
57f96132f4 | |||
ecbaed5c85 | |||
aac017c263 | |||
e2d9380f65 | |||
21fc95f71e | |||
702d060503 | |||
c6d349696e | |||
3818a38106 | |||
d0d933f28e | |||
d155d5331f | |||
1249b7be21 | |||
f535e165ef | |||
6081e6a692 | |||
fce9842064 | |||
01da55e6d6 | |||
95e51c4d53 | |||
9157b78671 | |||
fec7eff6c5 | |||
e66f8999ed | |||
41915a0547 | |||
c7586c86d5 | |||
6a8e102fc6 | |||
e41093d3b9 | |||
eedaa86dcf | |||
91d2febf2e | |||
1d448e70c7 | |||
0fc2346281 | |||
63c710c4fd | |||
fbb5a4aca6 | |||
ac37691536 | |||
13e5bfb428 | |||
98718ccc1e | |||
ed75b5f5c3 | |||
5147a2b105 | |||
f361110766 | |||
a5fbe134cc | |||
7dc7d708d3 | |||
9a260e6ae5 | |||
7ecfa45d75 | |||
7380823897 | |||
8b794e8aa1 | |||
911bea2b5d | |||
13c24bd1ee | |||
fac25a036e | |||
d61c2fc94d | |||
f228f01c62 | |||
3e9e581116 | |||
14283a731e | |||
de04ab9bdb | |||
5271f992a7 | |||
729ed9fba9 | |||
e3188b1732 | |||
39f45ab8b8 | |||
fa62b8aa36 | |||
3ba041b207 | |||
465bfd0374 | |||
2a2dfc55bb | |||
24e2fb3c2e | |||
ebd9a5a0a6 | |||
16eb147e5b | |||
e4cb40fae8 | |||
9d40aa6575 | |||
4399db9498 | |||
295c4bd4f7 | |||
27bcb3fbe7 | |||
aef67571f6 | |||
d3c8a95336 | |||
2679d8f629 | |||
2ec1ae6824 | |||
8ed97d8d96 | |||
0ab5a40d98 | |||
2b4d048f9d | |||
edd59cd60c | |||
20c131db2e | |||
da0f0ad0f3 | |||
72c5e49cf6 | |||
996651ca0e | |||
635f44a894 | |||
a78b2051f1 | |||
33841459d9 | |||
d61216216a | |||
150e624fca | |||
1381e4f7be | |||
f621ebea82 | |||
1d490ae066 | |||
ccdacac7c5 | |||
a2a54c3501 | |||
0805750c33 | |||
ff7183ef5b | |||
67d026a8a0 | |||
cf255183bd | |||
743ffa7910 | |||
261129755d | |||
c150c15bc7 | |||
3fc0a1b809 | |||
2d88133e60 | |||
1209c90388 | |||
fdb7c9850e | |||
d65a003422 | |||
3b6095cec7 | |||
04272afa3d | |||
75925d4969 | |||
4aa766759c | |||
dbade2fce4 | |||
ae4debf6b9 | |||
74c0a44f56 | |||
4ecfa70106 | |||
dd46b9ba01 | |||
5aefa64fce | |||
9a8105edb9 | |||
26d31f4fce | |||
0102239e09 | |||
e9242e4b0c | |||
0886f96cf4 | |||
ecfce10e3b | |||
cf85ca9023 | |||
8738cdeec5 | |||
569f3a5860 | |||
4c707c5899 | |||
b2c78b523a | |||
57606ce0d5 | |||
490d8112fa | |||
54158df23f | |||
81f4614680 | |||
49e2527337 | |||
3438392632 | |||
788e0f511f | |||
1461ceca06 | |||
016f09983f | |||
27ab0758e7 | |||
cf91d5c9cd | |||
6d04f2a08e | |||
4328e7b7c8 | |||
0ceffe2fa3 | |||
b272e50f88 | |||
9433a39649 | |||
eb3ed083e7 | |||
d0a7f05f50 | |||
68410eeb34 | |||
224cc87e77 | |||
4247ead6bd | |||
2acf186c9b | |||
3389eecb74 | |||
6a5a50a2f8 | |||
4a72cf0d6c | |||
ee4c59a859 | |||
094ef42e9b | |||
f2df26e0d9 | |||
2a4d246a00 | |||
429ce0ba1f | |||
4a7c8258b7 | |||
4314cec399 | |||
eacc7dea66 | |||
aaaf22e3ba | |||
a91f357d7c |
@ -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
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
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,7 +78,9 @@ 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") {
|
||||||
@ -86,8 +91,10 @@ class SecurityController extends Controller
|
|||||||
|
|
||||||
// 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 +111,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 +202,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 +219,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 +308,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);
|
||||||
|
@ -61,7 +61,7 @@ class TestRestCommand extends Command
|
|||||||
// only = liste des informations désirés = user, items, bookmarks, groups, alerts, calendars
|
// only = liste des informations désirés = user, items, bookmarks, groups, alerts, calendars
|
||||||
$apiurl = $url."/rest/user/".$login;
|
$apiurl = $url."/rest/user/".$login;
|
||||||
$this->writeln($apiurl);
|
$this->writeln($apiurl);
|
||||||
$response = \Unirest\Request::post($apiurl,$headers,["key"=>$masterapikey,"only"=>"user,items,bookmarks","ssoitems"=>"ninegate,toto"]);
|
$response = \Unirest\Request::post($apiurl,$headers,["key"=>$masterapikey,"only"=>"user,items,bookmarks"]);
|
||||||
dump($response->body);
|
dump($response->body);
|
||||||
|
|
||||||
$this->writeln('');
|
$this->writeln('');
|
||||||
|
@ -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;
|
||||||
|
@ -26,6 +26,7 @@ class FileController extends Controller
|
|||||||
$clear=$request->get("clear");
|
$clear=$request->get("clear");
|
||||||
$view=$request->get("view");
|
$view=$request->get("view");
|
||||||
$sort=$request->get("sort");
|
$sort=$request->get("sort");
|
||||||
|
$order=$request->get("order");
|
||||||
$defaultview=$request->get("defaultview");
|
$defaultview=$request->get("defaultview");
|
||||||
|
|
||||||
// Récupérer les préférences utilisateur
|
// Récupérer les préférences utilisateur
|
||||||
@ -68,7 +69,7 @@ class FileController extends Controller
|
|||||||
$preference["widgetviewdirectory"][$directory]=$view;
|
$preference["widgetviewdirectory"][$directory]=$view;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prérence trie
|
// Préférence trie
|
||||||
if(!array_key_exists("widgetsortdirectory",$preference)) {
|
if(!array_key_exists("widgetsortdirectory",$preference)) {
|
||||||
$toupdate=true;
|
$toupdate=true;
|
||||||
$preference["widgetsortdirectory"]=[];
|
$preference["widgetsortdirectory"]=[];
|
||||||
@ -82,6 +83,21 @@ class FileController extends Controller
|
|||||||
$preference["widgetsortdirectory"][$directory]=$sort;
|
$preference["widgetsortdirectory"][$directory]=$sort;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Préférence order
|
||||||
|
if(!array_key_exists("widgetorderdirectory",$preference)) {
|
||||||
|
$toupdate=true;
|
||||||
|
$preference["widgetorderdirectory"]=[];
|
||||||
|
}
|
||||||
|
if((!array_key_exists($directory,$preference["widgetorderdirectory"]))) {
|
||||||
|
$toupdate=true;
|
||||||
|
$preference["widgetorderdirectory"][$directory]="SORT_ASC";
|
||||||
|
}
|
||||||
|
if($sort&&$preference["widgetorderdirectory"][$directory]!=$order) {
|
||||||
|
$toupdate=true;
|
||||||
|
$preference["widgetorderdirectory"][$directory]=$order;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Mise à jour des préferences
|
// Mise à jour des préferences
|
||||||
if($toupdate) {
|
if($toupdate) {
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
@ -109,23 +125,27 @@ class FileController extends Controller
|
|||||||
|
|
||||||
if($fs->exists($fulldirectory)) {
|
if($fs->exists($fulldirectory)) {
|
||||||
$finder = new Finder();
|
$finder = new Finder();
|
||||||
$finder->depth('== 0')->sortByName()->in($fulldirectory)->exclude('thumb')->exclude('thumbmini');
|
$finder->depth('== 0')->sortByName()->in($fulldirectory)->exclude('thumb')->exclude('thumbmini')->exclude('__trash');
|
||||||
|
|
||||||
foreach ($finder as $file) {
|
foreach ($finder as $file) {
|
||||||
if(is_dir($file)) {
|
if(is_dir($file)) {
|
||||||
$tmp=[];
|
$tmp=[];
|
||||||
$tmp["name"]=$file->getRelativePathname();
|
$tmp["name"]=$file->getRelativePathname();
|
||||||
|
$tmp["namesort"]=strtolower($tmp["name"]);
|
||||||
$tmp["date"]=date ("d/m/Y H:i", filemtime($file));
|
$tmp["date"]=date ("d/m/Y H:i", filemtime($file));
|
||||||
|
$tmp["datesort"] = date ("YmdHi", filemtime($file));
|
||||||
array_push($dirs,$tmp);
|
array_push($dirs,$tmp);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$tmp=[];
|
$tmp=[];
|
||||||
$tmp["name"]=$file->getRelativePathname();
|
$tmp["name"]=$file->getRelativePathname();
|
||||||
|
$tmp["namesort"]=strtolower($tmp["name"]);
|
||||||
$tmp["extension"]=strtolower($file->getExtension());
|
$tmp["extension"]=strtolower($file->getExtension());
|
||||||
$fileinfo = new file($file->getPathname());
|
$fileinfo = new file($file->getPathname());
|
||||||
$tmp["minetype"]=$fileinfo->getMimeType();
|
$tmp["minetype"]=$fileinfo->getMimeType();
|
||||||
$tmp["minefamily"]=explode("/",$tmp["minetype"])[0];
|
$tmp["minefamily"]=explode("/",$tmp["minetype"])[0];
|
||||||
$tmp["date"] = date ("d/m/Y H:i", filemtime($file));
|
$tmp["date"] = date ("d/m/Y H:i", filemtime($file));
|
||||||
|
$tmp["datesort"] = date ("YmdHi", filemtime($file));
|
||||||
|
|
||||||
$tmp["thumb"]="";
|
$tmp["thumb"]="";
|
||||||
if($tmp["extension"]=="pdf") {
|
if($tmp["extension"]=="pdf") {
|
||||||
@ -148,12 +168,22 @@ class FileController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Trie du tableu
|
// Flag poubelle
|
||||||
$sort = array_column($files, $preference["widgetsortdirectory"][$directory]);
|
$fgtrash=false;
|
||||||
array_multisort($sort, SORT_ASC, $files);
|
if(stripos($subdirectory,"_trash")==1) $fgtrash=true;
|
||||||
|
|
||||||
$sort = array_column($dirs, $preference["widgetsortdirectory"][$directory]);
|
// Trie du tableu
|
||||||
|
$sort = array_column($files, $preference["widgetsortdirectory"][$directory]."sort");
|
||||||
|
if($preference["widgetorderdirectory"][$directory]=="SORT_ASC")
|
||||||
|
array_multisort($sort, SORT_ASC, $files);
|
||||||
|
else
|
||||||
|
array_multisort($sort, SORT_DESC, $files);
|
||||||
|
|
||||||
|
$sort = array_column($dirs, $preference["widgetsortdirectory"][$directory]."sort");
|
||||||
|
if($preference["widgetorderdirectory"][$directory]=="SORT_ASC")
|
||||||
array_multisort($sort, SORT_ASC, $dirs);
|
array_multisort($sort, SORT_ASC, $dirs);
|
||||||
|
else
|
||||||
|
array_multisort($sort, SORT_DESC, $dirs);
|
||||||
|
|
||||||
return $this->render('CadolesCoreBundle:File:list.html.twig',[
|
return $this->render('CadolesCoreBundle:File:list.html.twig',[
|
||||||
'useheader' => false,
|
'useheader' => false,
|
||||||
@ -171,12 +201,17 @@ class FileController extends Controller
|
|||||||
'canadd' => $canupdate,
|
'canadd' => $canupdate,
|
||||||
'view' => $preference["widgetviewdirectory"][$directory],
|
'view' => $preference["widgetviewdirectory"][$directory],
|
||||||
'sort' => $preference["widgetsortdirectory"][$directory],
|
'sort' => $preference["widgetsortdirectory"][$directory],
|
||||||
|
'order' => $preference["widgetorderdirectory"][$directory],
|
||||||
|
'fgtrash' => $fgtrash,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function uploadAction($id,$type,Request $request,$access="config")
|
public function uploadAction($id,$type,Request $request,$access="config")
|
||||||
{
|
{
|
||||||
$subdirectory=$request->get("subdirectory");
|
$canupdate =$this->getPermission($access,$id);
|
||||||
|
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
||||||
|
|
||||||
|
$subdirectory=urldecode($request->get("subdirectory"));
|
||||||
$forcereload=(is_null($request->get("forcereload"))?true:$request->get("forcereload"));
|
$forcereload=(is_null($request->get("forcereload"))?true:$request->get("forcereload"));
|
||||||
|
|
||||||
return $this->render('CadolesCoreBundle:File:upload.html.twig',[
|
return $this->render('CadolesCoreBundle:File:upload.html.twig',[
|
||||||
@ -193,8 +228,10 @@ class FileController extends Controller
|
|||||||
|
|
||||||
public function subdirectoryAction($id,$type,Request $request,$access="config")
|
public function subdirectoryAction($id,$type,Request $request,$access="config")
|
||||||
{
|
{
|
||||||
$subdirectory=$request->get("subdirectory");
|
$canupdate =$this->getPermission($access,$id);
|
||||||
|
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
||||||
|
|
||||||
|
$subdirectory=$request->get("subdirectory");
|
||||||
$defaultData = [];
|
$defaultData = [];
|
||||||
$form = $this->createFormBuilder()
|
$form = $this->createFormBuilder()
|
||||||
->add('subdirectory', TextType::class,["label"=>"Répertoire"])
|
->add('subdirectory', TextType::class,["label"=>"Répertoire"])
|
||||||
@ -206,7 +243,7 @@ class FileController extends Controller
|
|||||||
|
|
||||||
if ($form->isSubmitted() && $form->isValid()) {
|
if ($form->isSubmitted() && $form->isValid()) {
|
||||||
$data = $form->getData();
|
$data = $form->getData();
|
||||||
if($data["subdirectory"]=="thumb"||$data["subdirectory"]=="thumbmini") {
|
if($data["subdirectory"]=="thumb"||$data["subdirectory"]=="thumbmini"||$data["subdirectory"]=="__trash") {
|
||||||
$form->addError(new FormError('Nom de répertoire réservé, merci de choisir un autre nom de répertoire'));
|
$form->addError(new FormError('Nom de répertoire réservé, merci de choisir un autre nom de répertoire'));
|
||||||
$this->get('session')->getFlashBag()->clear();
|
$this->get('session')->getFlashBag()->clear();
|
||||||
$request->getSession()->getFlashBag()->add("error", 'Nom de répertoire réservé, merci de choisir un autre nom de répertoire');
|
$request->getSession()->getFlashBag()->add("error", 'Nom de répertoire réservé, merci de choisir un autre nom de répertoire');
|
||||||
@ -234,6 +271,225 @@ class FileController extends Controller
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function renameAction($id,$oldname, Request $request,$access="config")
|
||||||
|
{
|
||||||
|
$canupdate =$this->getPermission($access,$id);
|
||||||
|
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
||||||
|
|
||||||
|
$subdirectory=$request->get("subdirectory");
|
||||||
|
|
||||||
|
$form = $this->createFormBuilder()
|
||||||
|
->add('subdirectory', TextType::class,["label"=>"Renommer"])
|
||||||
|
->add('submit', SubmitType::class,["label"=>"Valider"])
|
||||||
|
->getForm();
|
||||||
|
|
||||||
|
$form->handleRequest($request);
|
||||||
|
$toclose=false;
|
||||||
|
|
||||||
|
if ($form->isSubmitted() && $form->isValid()) {
|
||||||
|
$data = $form->getData();
|
||||||
|
if($data["subdirectory"]=="thumb"||$data["subdirectory"]=="thumbmini"||$data["subdirectory"]=="__trash") {
|
||||||
|
$form->addError(new FormError('Nom réservé, merci de choisir un autre nom'));
|
||||||
|
$this->get('session')->getFlashBag()->clear();
|
||||||
|
$request->getSession()->getFlashBag()->add("error", 'Nom réservé, merci de choisir un autre nom');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$fs = new Filesystem();
|
||||||
|
$fulldirectory=$this->get('kernel')->getRootDir()."/../uploads/file/".$id;
|
||||||
|
if($subdirectory) $fulldirectory.="/".$subdirectory;
|
||||||
|
|
||||||
|
$urlsource= $fulldirectory."/".$oldname;
|
||||||
|
$urldestination = $fulldirectory."/".$data["subdirectory"];
|
||||||
|
|
||||||
|
if($urlsource!=$urldestination) {
|
||||||
|
|
||||||
|
if($fs->exists($urldestination)) {
|
||||||
|
$form->addError(new FormError('Ce nom existe déjà'));
|
||||||
|
$this->get('session')->getFlashBag()->clear();
|
||||||
|
$request->getSession()->getFlashBag()->add("error", 'Ce nom existe déjà');
|
||||||
|
}
|
||||||
|
elseif($fs->exists($urlsource)) {
|
||||||
|
if(is_dir($urlsource)) {
|
||||||
|
$fs->mirror($urlsource,$urldestination);
|
||||||
|
$fs->remove($urlsource);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$fs->rename($urlsource,$urldestination,true);
|
||||||
|
$fs->touch($urldestination);
|
||||||
|
|
||||||
|
$urlsource= $fulldirectory."/thumb/".$oldname;
|
||||||
|
$urldestination = $fulldirectory."/thumb/".$data["subdirectory"];
|
||||||
|
if($fs->exists($urlsource))
|
||||||
|
$fs->rename($urlsource,$urldestination,true);
|
||||||
|
|
||||||
|
$urlsource= $fulldirectory."/thumbmini/".$oldname;
|
||||||
|
$urldestination = $fulldirectory."/thumbmini/".$data["subdirectory"];
|
||||||
|
if($fs->exists($urlsource))
|
||||||
|
$fs->rename($urlsource,$urldestination,true);
|
||||||
|
}
|
||||||
|
|
||||||
|
$toclose=true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
} else $form->get('subdirectory')->setData($oldname);
|
||||||
|
|
||||||
|
return $this->render('CadolesCoreBundle:File:subdirectory.html.twig',[
|
||||||
|
'useheader' => false,
|
||||||
|
'usemenu' => false,
|
||||||
|
'usesidebar' => false,
|
||||||
|
'access' => $access,
|
||||||
|
'id' => $id,
|
||||||
|
'subdirectory' => $subdirectory,
|
||||||
|
'form' => $form->createView(),
|
||||||
|
'toclose' => $toclose,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function trashAction(Request $request,$access="config")
|
||||||
|
{
|
||||||
|
// S'assurer que c'est un appel ajax
|
||||||
|
if (!$request->isXmlHttpRequest()) {
|
||||||
|
return new JsonResponse(array('message' => 'Interdit'), 400);
|
||||||
|
}
|
||||||
|
|
||||||
|
$output=array();
|
||||||
|
$directory=$request->request->get('directory');
|
||||||
|
|
||||||
|
// Récupération du répertoire source et le nom du fichier
|
||||||
|
$racine=$this->get('kernel')->getRootDir()."/../uploads/file";
|
||||||
|
$directory=$request->request->get('directory');
|
||||||
|
$dirsource =$request->request->get('subdirectory');
|
||||||
|
$namesource =$request->request->get('filename');
|
||||||
|
|
||||||
|
$canupdate =$this->getPermission($access,$directory);
|
||||||
|
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
||||||
|
|
||||||
|
$fs = new Filesystem();
|
||||||
|
|
||||||
|
// Déplacer le fichier
|
||||||
|
$urlsource=$racine."/".$directory."/".$dirsource."/".$namesource;
|
||||||
|
$urldestination=$racine."/".$directory."/__trash/".$dirsource."/".$namesource;
|
||||||
|
$fs->mkdir($racine."/".$directory."/__trash/".$dirsource);
|
||||||
|
if($fs->exists($urlsource)) {
|
||||||
|
if(is_dir($urlsource)) {
|
||||||
|
$fs->mirror($urlsource,$urldestination);
|
||||||
|
$fs->remove($urlsource);
|
||||||
|
}
|
||||||
|
else $fs->rename($urlsource,$urldestination,true);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Déplacer le thumb
|
||||||
|
$fs->mkdir($racine."/".$directory."/__trash/".$dirsource."/thumb");
|
||||||
|
$urlsource=$racine."/".$directory."/".$dirsource."/thumb/".$namesource;
|
||||||
|
$urldestination=$racine."/".$directory."/__trash/".$dirsource."/thumb/".$namesource;
|
||||||
|
if($fs->exists($urlsource)) {
|
||||||
|
if(is_dir($urlsource)) {
|
||||||
|
$fs->mirror($urlsource,$urldestination);
|
||||||
|
$fs->remove($urlsource);
|
||||||
|
}
|
||||||
|
else $fs->rename($urlsource,$urldestination,true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Déplacer le thumbmini
|
||||||
|
$fs->mkdir($racine."/".$directory."/__trash/".$dirsource."/thumbmini");
|
||||||
|
$urlsource=$racine."/".$directory."/".$dirsource."/thumbmini/".$namesource;
|
||||||
|
$urldestination=$racine."/".$directory."/__trash/".$dirsource."/thumbmini/".$namesource;
|
||||||
|
if($fs->exists($urlsource)) {
|
||||||
|
if(is_dir($urlsource)) {
|
||||||
|
$fs->mirror($urlsource,$urldestination);
|
||||||
|
$fs->remove($urlsource);
|
||||||
|
}
|
||||||
|
else $fs->rename($urlsource,$urldestination,true);
|
||||||
|
}
|
||||||
|
|
||||||
|
$response = new Response(json_encode($output));
|
||||||
|
$response->headers->set('Content-Type', 'application/json');
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function restaureAction(Request $request,$access="config")
|
||||||
|
{
|
||||||
|
// S'assurer que c'est un appel ajax
|
||||||
|
if (!$request->isXmlHttpRequest()) {
|
||||||
|
return new JsonResponse(array('message' => 'Interdit'), 400);
|
||||||
|
}
|
||||||
|
|
||||||
|
$output=array();
|
||||||
|
$directory=$request->request->get('directory');
|
||||||
|
|
||||||
|
// Récupération du répertoire source et le nom du fichier
|
||||||
|
$racine=$this->get('kernel')->getRootDir()."/../uploads/file";
|
||||||
|
$directory=$request->request->get('directory');
|
||||||
|
$dirsource =$request->request->get('subdirectory');
|
||||||
|
$namesource =$request->request->get('filename');
|
||||||
|
|
||||||
|
$canupdate =$this->getPermission($access,$directory);
|
||||||
|
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
||||||
|
|
||||||
|
$fs = new Filesystem();
|
||||||
|
|
||||||
|
// Déplacer le fichier
|
||||||
|
$dirdestination=str_replace("__trash/","",$dirsource);
|
||||||
|
$urlsource=$racine."/".$directory."/".$dirsource."/".$namesource;
|
||||||
|
$urldestination=str_replace("__trash/","/",$urlsource);
|
||||||
|
$fs->mkdir($racine."/".$directory."/".$dirdestination);
|
||||||
|
if($fs->exists($urlsource)) {
|
||||||
|
if(is_dir($urlsource)) {
|
||||||
|
$fs->mirror($urlsource,$urldestination);
|
||||||
|
$fs->remove($urlsource);
|
||||||
|
}
|
||||||
|
else $fs->rename($urlsource,$urldestination,true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Déplacer le thumb
|
||||||
|
$urlsource=$racine."/".$directory."/".$dirsource."/thumb/".$namesource;
|
||||||
|
$urldestination=str_replace("__trash/","/",$urlsource);
|
||||||
|
$fs->mkdir($racine."/".$directory."/".$dirdestination."/thumb");
|
||||||
|
if($fs->exists($urlsource)) {
|
||||||
|
if(is_dir($urlsource)) {
|
||||||
|
$fs->mirror($urlsource,$urldestination);
|
||||||
|
$fs->remove($urlsource);
|
||||||
|
}
|
||||||
|
else $fs->rename($urlsource,$urldestination,true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Déplacer le thumbmini
|
||||||
|
$urlsource=$racine."/".$directory."/".$dirsource."/thumbmini/".$namesource;
|
||||||
|
$urldestination=str_replace("__trash/","/",$urlsource);
|
||||||
|
$fs->mkdir($racine."/".$directory."/".$dirdestination."/thumbmini");
|
||||||
|
if($fs->exists($urlsource)) {
|
||||||
|
if(is_dir($urlsource)) {
|
||||||
|
$fs->mirror($urlsource,$urldestination);
|
||||||
|
$fs->remove($urlsource);
|
||||||
|
}
|
||||||
|
else $fs->rename($urlsource,$urldestination,true);
|
||||||
|
}
|
||||||
|
|
||||||
|
$response = new Response(json_encode($output));
|
||||||
|
$response->headers->set('Content-Type', 'application/json');
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function purgetrashAction($directory,Request $request,$access="config")
|
||||||
|
{
|
||||||
|
$output=array();
|
||||||
|
|
||||||
|
$canupdate =$this->getPermission($access,$directory);
|
||||||
|
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
||||||
|
|
||||||
|
$fs = new Filesystem();
|
||||||
|
$url=$this->get('kernel')->getRootDir()."/../uploads/file/".$directory."/__trash";
|
||||||
|
if($fs->exists($url)) {
|
||||||
|
$fs->remove($url);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->redirectToRoute('cadoles_core_'.$access.'_file_list',['directory'=>$directory]);
|
||||||
|
}
|
||||||
|
|
||||||
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
|
||||||
@ -247,7 +503,9 @@ class FileController extends Controller
|
|||||||
$filename=$request->request->get('filename');
|
$filename=$request->request->get('filename');
|
||||||
if($subdirectory) $directory.="/".$subdirectory;
|
if($subdirectory) $directory.="/".$subdirectory;
|
||||||
|
|
||||||
$this->getPermission($access,$directory);
|
$canupdate =$this->getPermission($access,$directory);
|
||||||
|
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
||||||
|
|
||||||
$fs = new Filesystem();
|
$fs = new Filesystem();
|
||||||
$url=$this->get('kernel')->getRootDir()."/../uploads/file/".$directory."/".$filename;
|
$url=$this->get('kernel')->getRootDir()."/../uploads/file/".$directory."/".$filename;
|
||||||
if($fs->exists($url)) {
|
if($fs->exists($url)) {
|
||||||
@ -267,25 +525,44 @@ 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";
|
||||||
|
$directory = $request->request->get('directory');
|
||||||
$dirsource = $request->request->get('dirsource');
|
$dirsource = $request->request->get('dirsource');
|
||||||
$namesource = $request->request->get('namesource');
|
$namesource = $request->request->get('namesource');
|
||||||
$dirdestination = $request->request->get('dirdestination');
|
$dirdestination = $request->request->get('dirdestination');
|
||||||
$namedestination = $request->request->get('namedestination');
|
$namedestination = $request->request->get('namedestination');
|
||||||
|
|
||||||
$destid=$request->request->get('destid');
|
|
||||||
|
|
||||||
$this->getPermission($access,$directory);
|
$canupdate =$this->getPermission($access,$directory);
|
||||||
|
if(!$canupdate) throw $this->createNotFoundException('Permission denied');
|
||||||
|
|
||||||
$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)) {
|
||||||
$fs->rename($urlsource,$urldestination);
|
if(is_dir($urlsource)) {
|
||||||
|
$fs->mirror($urlsource,$urldestination);
|
||||||
|
$fs->remove($urlsource);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$fs->rename($urlsource,$urldestination, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Déplacer le thumb
|
// Déplacer le thumb
|
||||||
@ -293,7 +570,12 @@ class FileController extends Controller
|
|||||||
$urlsource=$racine."/".$dirsource."/thumb/".$namesource;
|
$urlsource=$racine."/".$dirsource."/thumb/".$namesource;
|
||||||
$urldestination=$racine."/".$dirdestination."/thumb/".$namedestination;
|
$urldestination=$racine."/".$dirdestination."/thumb/".$namedestination;
|
||||||
if($fs->exists($urlsource)) {
|
if($fs->exists($urlsource)) {
|
||||||
$fs->rename($urlsource,$urldestination);
|
if(is_dir($urlsource)) {
|
||||||
|
$fs->mirror($urlsource,$urldestination);
|
||||||
|
$fs->remove($urlsource);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$fs->rename($urlsource,$urldestination, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Déplacer le thumbmini
|
// Déplacer le thumbmini
|
||||||
@ -301,7 +583,12 @@ class FileController extends Controller
|
|||||||
$urlsource=$racine."/".$dirsource."/thumbmini/".$namesource;
|
$urlsource=$racine."/".$dirsource."/thumbmini/".$namesource;
|
||||||
$urldestination=$racine."/".$dirdestination."/thumbmini/".$namedestination;
|
$urldestination=$racine."/".$dirdestination."/thumbmini/".$namedestination;
|
||||||
if($fs->exists($urlsource)) {
|
if($fs->exists($urlsource)) {
|
||||||
$fs->rename($urlsource,$urldestination);
|
if(is_dir($urlsource)) {
|
||||||
|
$fs->mirror($urlsource,$urldestination);
|
||||||
|
$fs->remove($urlsource);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$fs->rename($urlsource,$urldestination, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$response = new Response(json_encode($output));
|
$response = new Response(json_encode($output));
|
||||||
@ -309,6 +596,7 @@ class FileController extends Controller
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function viewAction($directory,$filename,Request $request,$access="config")
|
public function viewAction($directory,$filename,Request $request,$access="config")
|
||||||
{
|
{
|
||||||
$this->getPermission($access,$directory);
|
$this->getPermission($access,$directory);
|
||||||
@ -447,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":
|
||||||
@ -461,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":
|
||||||
@ -471,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
|
||||||
|
if($fgviewvisite) {
|
||||||
$visite="";
|
$visite="";
|
||||||
if($usergroup->getVisitedate()) {
|
if($usergroup->getVisitedate()) {
|
||||||
$visite=$usergroup->getVisitedate()->format("d/m/Y H:i")."<br>nb = ".$usergroup->getVisitecpt();
|
$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,9 +588,9 @@ 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_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>";
|
||||||
$text="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel()."<br>Suivez le lien suivant pour y accéder = $url";
|
$text="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel()."<br>Suivez le lien suivant pour y accéder = $url";
|
||||||
|
|
||||||
@ -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,7 +68,14 @@ 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();
|
||||||
@ -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")."'"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ class RestController extends Controller
|
|||||||
{
|
{
|
||||||
$key=$request->get('key');
|
$key=$request->get('key');
|
||||||
$only=($request->get('only')?explode(",",$request->get('only')):"");
|
$only=($request->get('only')?explode(",",$request->get('only')):"");
|
||||||
$ssoitems=($request->get('ssoitems')?explode(",",$request->get('ssoitems')):"");
|
$ssoitems=($request->get('ssoitems')?explode(",",$request->get('ssoitems')):[]);
|
||||||
|
|
||||||
// Vérification de la clé
|
// Vérification de la clé
|
||||||
$realkey = $this->getParameter("apikeyninegate");
|
$realkey = $this->getParameter("apikeyninegate");
|
||||||
|
@ -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)
|
||||||
|
@ -68,9 +68,6 @@ class ThemeController extends Controller
|
|||||||
$logo=$request->query->get('logo');
|
$logo=$request->query->get('logo');
|
||||||
if(!empty($logo)) $session->set('logo',"bundles/cadolescore/themes/$themename/".$logo);
|
if(!empty($logo)) $session->set('logo',"bundles/cadolescore/themes/$themename/".$logo);
|
||||||
|
|
||||||
$fgheader=$request->query->get('fgheader');
|
|
||||||
if(!empty($fgheader)) $session->set('fgheader',boolval($fgheader));
|
|
||||||
|
|
||||||
$header=$request->query->get('header');
|
$header=$request->query->get('header');
|
||||||
if(!empty($header)) $session->set('header',"bundles/cadolescore/themes/$themename/".$header);
|
if(!empty($header)) $session->set('header',"bundles/cadolescore/themes/$themename/".$header);
|
||||||
|
|
||||||
|
@ -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,12 +429,16 @@ 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')) {
|
||||||
$text="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel();
|
$idpage =$group->getPages()->first()->getId();
|
||||||
|
$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>";
|
||||||
|
$text="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel()."<br>Suivez le lien suivant pour y accéder = $url";
|
||||||
|
|
||||||
$template="template";
|
$template="template";
|
||||||
$mail_params=array(
|
$mail_params=array(
|
||||||
"subject" => $this->get('session')->get('appname')." : Inscription au groupe de travail : ".$group->getLabel()."\n\n".$group->getDescription(),
|
"subject" => $this->get('session')->get('appname')." : Inscription au groupe de travail : ".$group->getLabel()."\n\n".$group->getDescription(),
|
||||||
"body_html"=>nl2br($text),
|
"body_html"=>$texthtml,
|
||||||
"body_text"=>$text
|
"body_text"=>$text
|
||||||
);
|
);
|
||||||
$to = $data->getEmail();
|
$to = $data->getEmail();
|
||||||
@ -484,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();
|
||||||
@ -565,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();
|
||||||
}
|
}
|
||||||
@ -574,12 +581,16 @@ 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')) {
|
||||||
$text="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel();
|
$idpage =$group->getPages()->first()->getId();
|
||||||
|
$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>";
|
||||||
|
$text="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel()."<br>Suivez le lien suivant pour y accéder = $url";
|
||||||
|
|
||||||
$template="template";
|
$template="template";
|
||||||
$mail_params=array(
|
$mail_params=array(
|
||||||
"subject" => $this->get('session')->get('appname')." : Inscription au groupe de travail : ".$group->getLabel()."\n\n".$group->getDescription(),
|
"subject" => $this->get('session')->get('appname')." : Inscription au groupe de travail : ".$group->getLabel()."\n\n".$group->getDescription(),
|
||||||
"body_html"=>nl2br($text),
|
"body_html"=>$texthtml,
|
||||||
"body_text"=>$text
|
"body_text"=>$text
|
||||||
);
|
);
|
||||||
$to = $data->getEmail();
|
$to = $data->getEmail();
|
||||||
@ -613,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(
|
||||||
@ -621,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');
|
||||||
@ -829,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,
|
||||||
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -910,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);
|
||||||
@ -920,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
|
||||||
@ -942,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(),
|
||||||
@ -960,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,
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -1230,8 +1260,32 @@ class UserController extends Controller
|
|||||||
$id=$request->request->get('id');
|
$id=$request->request->get('id');
|
||||||
$value=$request->request->get('value');
|
$value=$request->request->get('value');
|
||||||
|
|
||||||
|
// Récupérer les préférences de l'utilisateur
|
||||||
$preference=$this->getUser()->getPreference();
|
$preference=$this->getUser()->getPreference();
|
||||||
|
|
||||||
|
// Cas particulier de page bookmark, on vide la préférence si on reset la meme valeur
|
||||||
|
if($key=="pagebookmark") {
|
||||||
|
if(is_array($preference)&&array_key_exists("pagebookmark",$preference)) {
|
||||||
|
$oldid=$preference["pagebookmark"][0];
|
||||||
|
if($oldid==$value) {
|
||||||
|
unset($preference["pagebookmark"]);
|
||||||
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
$this->getUser()->setPreference($preference);
|
||||||
|
$this->get('session')->set("pagebookmark", "");
|
||||||
|
$em->persist($this->getUser());
|
||||||
|
$em->flush();
|
||||||
|
return new Response();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Mise à jour de la préférence
|
||||||
$toupdate=false;
|
$toupdate=false;
|
||||||
|
if(!is_array($preference)) {
|
||||||
|
$toupdate=true;
|
||||||
|
$preference=[];
|
||||||
|
}
|
||||||
|
|
||||||
if(!array_key_exists($key,$preference)) {
|
if(!array_key_exists($key,$preference)) {
|
||||||
$toupdate=true;
|
$toupdate=true;
|
||||||
$preference[$key]=[];
|
$preference[$key]=[];
|
||||||
@ -1240,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;
|
||||||
}
|
}
|
||||||
@ -1403,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1437,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');
|
||||||
@ -312,13 +314,20 @@
|
|||||||
if($curentuser!="anon.") {
|
if($curentuser!="anon.") {
|
||||||
// Préférence
|
// Préférence
|
||||||
$preference=$curentuser->getPreference();
|
$preference=$curentuser->getPreference();
|
||||||
|
if(is_array($preference)) {
|
||||||
// Préférence header
|
// Préférence header
|
||||||
if(array_key_exists("fgheader",$preference)) {
|
if(array_key_exists("fgheader",$preference)) {
|
||||||
$fgheader=($preference["fgheader"][0]=="true");
|
$fgheader=($preference["fgheader"][0]=="true");
|
||||||
$session->set("fgheader", $fgheader);
|
$session->set("fgheader", $fgheader);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Préférence header
|
||||||
|
if(array_key_exists("pagebookmark",$preference)) {
|
||||||
|
$pagebookmark=$preference["pagebookmark"][0];
|
||||||
|
$session->set("pagebookmark", $pagebookmark);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Visite
|
// Visite
|
||||||
$now=new \DateTime();
|
$now=new \DateTime();
|
||||||
if(!$curentuser->getVisitedate()) {
|
if(!$curentuser->getVisitedate()) {
|
||||||
|
@ -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();
|
||||||
|
@ -74,6 +74,22 @@ cadoles_core_config_file_subdirectory:
|
|||||||
path: /config/file/subdirectory/{id}/{type}
|
path: /config/file/subdirectory/{id}/{type}
|
||||||
defaults: { _controller: CadolesCoreBundle:File:subdirectory, access: config }
|
defaults: { _controller: CadolesCoreBundle:File:subdirectory, access: config }
|
||||||
|
|
||||||
|
cadoles_core_config_file_rename:
|
||||||
|
path: /config/file/rename/{id}/{oldname}
|
||||||
|
defaults: { _controller: CadolesCoreBundle:File:rename, access: config }
|
||||||
|
|
||||||
|
cadoles_core_config_file_trash:
|
||||||
|
path: /config/file/trash/
|
||||||
|
defaults: { _controller: CadolesCoreBundle:File:trash, access: config }
|
||||||
|
|
||||||
|
cadoles_core_config_file_restaure:
|
||||||
|
path: /config/file/restaure/
|
||||||
|
defaults: { _controller: CadolesCoreBundle:File:restaure, access: config }
|
||||||
|
|
||||||
|
cadoles_core_config_file_purgetrash:
|
||||||
|
path: /config/file/purgetrash/{directory}
|
||||||
|
defaults: { _controller: CadolesCoreBundle:File:purgetrash, access: config }
|
||||||
|
|
||||||
cadoles_core_config_file_delete:
|
cadoles_core_config_file_delete:
|
||||||
path: /config/file/delete/
|
path: /config/file/delete/
|
||||||
defaults: { _controller: CadolesCoreBundle:File:delete, access: config }
|
defaults: { _controller: CadolesCoreBundle:File:delete, access: config }
|
||||||
@ -107,6 +123,22 @@ cadoles_core_user_file_subdirectory:
|
|||||||
path: /user/file/subdirectory/{id}/{type}
|
path: /user/file/subdirectory/{id}/{type}
|
||||||
defaults: { _controller: CadolesCoreBundle:File:subdirectory, access: user }
|
defaults: { _controller: CadolesCoreBundle:File:subdirectory, access: user }
|
||||||
|
|
||||||
|
cadoles_core_user_file_rename:
|
||||||
|
path: /user/file/rename/{id}/{oldname}
|
||||||
|
defaults: { _controller: CadolesCoreBundle:File:rename, access: user }
|
||||||
|
|
||||||
|
cadoles_core_user_file_trash:
|
||||||
|
path: /user/file/trash/
|
||||||
|
defaults: { _controller: CadolesCoreBundle:File:trash, access: user }
|
||||||
|
|
||||||
|
cadoles_core_user_file_restaure:
|
||||||
|
path: /user/file/restaure/
|
||||||
|
defaults: { _controller: CadolesCoreBundle:File:restaure, access: user }
|
||||||
|
|
||||||
|
cadoles_core_user_file_purgetrash:
|
||||||
|
path: /user/file/purgetrash/{directory}
|
||||||
|
defaults: { _controller: CadolesCoreBundle:File:purgetrash, access: user }
|
||||||
|
|
||||||
cadoles_core_user_file_delete:
|
cadoles_core_user_file_delete:
|
||||||
path: /user/file/delete
|
path: /user/file/delete
|
||||||
defaults: { _controller: CadolesCoreBundle:File:delete, access: user }
|
defaults: { _controller: CadolesCoreBundle:File:delete, access: user }
|
||||||
@ -128,6 +160,7 @@ cadoles_core_user_file_show:
|
|||||||
defaults: { _controller: CadolesCoreBundle:File:show, access: user }
|
defaults: { _controller: CadolesCoreBundle:File:show, access: user }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#== Ajax =================================================================================================================
|
#== Ajax =================================================================================================================
|
||||||
cadoles_core_ajax_country_list:
|
cadoles_core_ajax_country_list:
|
||||||
path: /ajax/country/list
|
path: /ajax/country/list
|
||||||
@ -161,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
|
||||||
@ -457,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
|
||||||
@ -514,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
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;
|
||||||
@ -381,6 +411,15 @@ a.item-update {
|
|||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
a.item-restaure {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
right: 25px;
|
||||||
|
top: 2px;
|
||||||
|
z-index: 1000;
|
||||||
|
}
|
||||||
|
|
||||||
a.item-delete {
|
a.item-delete {
|
||||||
display: none;
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -726,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
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 );
|
@ -1,6 +1,5 @@
|
|||||||
{% set logo = "icart.png" %}
|
{% set logo = "icart.png" %}
|
||||||
|
|
||||||
{% set fgheader = "true" %}
|
|
||||||
{% set header = "header.jpg" %}
|
{% set header = "header.jpg" %}
|
||||||
{% set heightheader = "" %}
|
{% set heightheader = "" %}
|
||||||
|
|
||||||
@ -15,7 +14,6 @@
|
|||||||
render(url("cadoles_core_theme_setconfig",
|
render(url("cadoles_core_theme_setconfig",
|
||||||
{
|
{
|
||||||
'logo':logo,
|
'logo':logo,
|
||||||
'fgheader':fgheader,
|
|
||||||
'header': header,
|
'header': header,
|
||||||
'heightheader': heightheader,
|
'heightheader': heightheader,
|
||||||
'colormain': colormain,
|
'colormain': colormain,
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 8.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
@ -1,6 +1,5 @@
|
|||||||
{% set logo = "" %}
|
{% set logo = "" %}
|
||||||
|
|
||||||
{% set fgheader = "" %}
|
|
||||||
{% set header = "" %}
|
{% set header = "" %}
|
||||||
{% set heightheader = "" %}
|
{% set heightheader = "" %}
|
||||||
|
|
||||||
@ -15,7 +14,6 @@
|
|||||||
render(url("cadoles_core_theme_setconfig",
|
render(url("cadoles_core_theme_setconfig",
|
||||||
{
|
{
|
||||||
'logo':logo,
|
'logo':logo,
|
||||||
'fgheader':fgheader,
|
|
||||||
'header': header,
|
'header': header,
|
||||||
'heightheader': heightheader,
|
'heightheader': heightheader,
|
||||||
'colormain': colormain,
|
'colormain': colormain,
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
{% macro logo() %}{{ app.session.get('logo') }}{% endmacro %}
|
{% macro logo() %}{{ app.session.get('logo') }}{% endmacro %}
|
||||||
{% macro fgheader() %}{{ app.session.get('fgheader') }}{% endmacro %}
|
|
||||||
{% macro header() %}{{ app.session.get('header') }}{% endmacro %}
|
{% macro header() %}{{ app.session.get('header') }}{% endmacro %}
|
||||||
{% macro heightheader() %}{{ app.session.get('heightheader') }}{% endmacro %}
|
{% macro heightheader() %}{{ app.session.get('heightheader') }}{% endmacro %}
|
||||||
{% macro colorR() %}{{ app.session.get('color')['mainrgb']['r'] }}{% endmacro %}
|
{% macro colorR() %}{{ app.session.get('color')['mainrgb']['r'] }}{% endmacro %}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
{% set logo = "" %}
|
{% set logo = "" %}
|
||||||
|
|
||||||
{% set fgheader = "" %}
|
|
||||||
{% set header = "" %}
|
{% set header = "" %}
|
||||||
{% set heightheader = "" %}
|
{% set heightheader = "" %}
|
||||||
|
|
||||||
@ -15,7 +14,6 @@
|
|||||||
render(url("cadoles_core_theme_setconfig",
|
render(url("cadoles_core_theme_setconfig",
|
||||||
{
|
{
|
||||||
'logo':logo,
|
'logo':logo,
|
||||||
'fgheader':fgheader,
|
|
||||||
'header': header,
|
'header': header,
|
||||||
'heightheader': heightheader,
|
'heightheader': heightheader,
|
||||||
'colormain': colormain,
|
'colormain': colormain,
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
{% set logo = "" %}
|
{% set logo = "" %}
|
||||||
|
|
||||||
{% set fgheader = "" %}
|
|
||||||
{% set header = "" %}
|
{% set header = "" %}
|
||||||
{% set heightheader = "" %}
|
{% set heightheader = "" %}
|
||||||
|
|
||||||
@ -15,7 +14,6 @@
|
|||||||
render(url("cadoles_core_theme_setconfig",
|
render(url("cadoles_core_theme_setconfig",
|
||||||
{
|
{
|
||||||
'logo':logo,
|
'logo':logo,
|
||||||
'fgheader':fgheader,
|
|
||||||
'header': header,
|
'header': header,
|
||||||
'heightheader': heightheader,
|
'heightheader': heightheader,
|
||||||
'colormain': colormain,
|
'colormain': colormain,
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
{% set logo = "logo.png" %}
|
{% set logo = "logo.png" %}
|
||||||
|
|
||||||
{% set fgheader = "true" %}
|
|
||||||
{% set header = "" %}
|
{% set header = "" %}
|
||||||
{% set heightheader = "150" %}
|
{% set heightheader = "150" %}
|
||||||
|
|
||||||
@ -15,7 +14,6 @@
|
|||||||
render(url("cadoles_core_theme_setconfig",
|
render(url("cadoles_core_theme_setconfig",
|
||||||
{
|
{
|
||||||
'logo':logo,
|
'logo':logo,
|
||||||
'fgheader':fgheader,
|
|
||||||
'header': header,
|
'header': header,
|
||||||
'heightheader': heightheader,
|
'heightheader': heightheader,
|
||||||
'colormain': colormain,
|
'colormain': colormain,
|
||||||
|
@ -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,5 +288,66 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* mise à jour du thème pour le bandeau escamotable #31431
|
||||||
|
*/
|
||||||
|
|
||||||
|
nav.navbarsmall {
|
||||||
|
background: white !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbarsmall .navbar-brand {
|
||||||
|
color: black !important;
|
||||||
|
font-family: var(--fontfacetitle);
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbarsmall #logo {
|
||||||
|
float: left !important;
|
||||||
|
top: 0px !important;
|
||||||
|
left: 0px !important;
|
||||||
|
position: relative !important;
|
||||||
|
}
|
||||||
|
.navbarsmall {
|
||||||
|
height: 50px !important;
|
||||||
|
overflow-y: hidden;
|
||||||
|
}
|
||||||
|
.navbarsmall .nav.navbar-top-links.navbar-right > li a {font-size: 1.5em; }
|
||||||
|
|
||||||
|
.navbarsmall .title img { margin-left:-300px !important;}
|
||||||
|
.navbarsmall small {
|
||||||
|
top: 18px !important;
|
||||||
|
font-size: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbarsmall .nav.navbar-top-links.navbar-left li {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbarsmall a.navbar-brand {
|
||||||
|
line-height: 27px !important;
|
||||||
|
transition:line-height 0.5s ease;
|
||||||
|
font-size: 1.3em;
|
||||||
|
margin-left: -90px;
|
||||||
|
margin-top: -3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbarsmall #logo {
|
||||||
|
/* remplacer l'image en définissant une image de background */
|
||||||
|
/* et en positionnant un padding de la largeur de l'image */
|
||||||
|
display: block;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background: var(--logo) no-repeat;
|
||||||
|
width: 62px; /* Width of new image */
|
||||||
|
height: 23px !important; /* Height of new image */
|
||||||
|
padding-left: 62px; /* Equal to width of new image */
|
||||||
|
margin-top: -1px;
|
||||||
|
margin-left: 86px;
|
||||||
|
margin-right: 14px;
|
||||||
|
}
|
||||||
|
.navbarsmall .avatar {height: 25px; }
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
{% set logo = "" %}
|
{% set logo = "" %}
|
||||||
|
|
||||||
{% set fgheader = "" %}
|
|
||||||
{% set header = "" %}
|
{% set header = "" %}
|
||||||
{% set heightheader = "" %}
|
{% set heightheader = "" %}
|
||||||
|
|
||||||
@ -15,7 +14,6 @@
|
|||||||
render(url("cadoles_core_theme_setconfig",
|
render(url("cadoles_core_theme_setconfig",
|
||||||
{
|
{
|
||||||
'logo':logo,
|
'logo':logo,
|
||||||
'fgheader':fgheader,
|
|
||||||
'header': header,
|
'header': header,
|
||||||
'heightheader': heightheader,
|
'heightheader': heightheader,
|
||||||
'colormain': colormain,
|
'colormain': colormain,
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
{% set logo = "" %}
|
{% set logo = "" %}
|
||||||
|
|
||||||
{% set fgheader = "" %}
|
|
||||||
{% set header = "" %}
|
{% set header = "" %}
|
||||||
{% set heightheader = "" %}
|
{% set heightheader = "" %}
|
||||||
|
|
||||||
@ -15,7 +14,6 @@
|
|||||||
render(url("cadoles_core_theme_setconfig",
|
render(url("cadoles_core_theme_setconfig",
|
||||||
{
|
{
|
||||||
'logo':logo,
|
'logo':logo,
|
||||||
'fgheader':fgheader,
|
|
||||||
'header': header,
|
'header': header,
|
||||||
'heightheader': heightheader,
|
'heightheader': heightheader,
|
||||||
'colormain': colormain,
|
'colormain': colormain,
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
{% set logo = "" %}
|
{% set logo = "" %}
|
||||||
|
|
||||||
{% set fgheader = "" %}
|
|
||||||
{% set header = "" %}
|
{% set header = "" %}
|
||||||
{% set heightheader = "" %}
|
{% set heightheader = "" %}
|
||||||
|
|
||||||
@ -15,7 +14,6 @@
|
|||||||
render(url("cadoles_core_theme_setconfig",
|
render(url("cadoles_core_theme_setconfig",
|
||||||
{
|
{
|
||||||
'logo':logo,
|
'logo':logo,
|
||||||
'fgheader':fgheader,
|
|
||||||
'header': header,
|
'header': header,
|
||||||
'heightheader': heightheader,
|
'heightheader': heightheader,
|
||||||
'colormain': colormain,
|
'colormain': colormain,
|
||||||
|
@ -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
|
||||||
|
}
|
||||||
|
))
|
||||||
|
}}
|
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
@ -0,0 +1,3 @@
|
|||||||
|
name: White
|
||||||
|
author: Arnaud Fornerot
|
||||||
|
version: 1.0
|
Binary file not shown.
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;
|
||||||
|
}
|
@ -1,6 +1,5 @@
|
|||||||
{% set logo = "" %}
|
{% set logo = "" %}
|
||||||
|
|
||||||
{% set fgheader = "" %}
|
|
||||||
{% set header = "" %}
|
{% set header = "" %}
|
||||||
{% set heightheader = "" %}
|
{% set heightheader = "" %}
|
||||||
|
|
||||||
@ -15,7 +14,6 @@
|
|||||||
render(url("cadoles_core_theme_setconfig",
|
render(url("cadoles_core_theme_setconfig",
|
||||||
{
|
{
|
||||||
'logo':logo,
|
'logo':logo,
|
||||||
'fgheader':fgheader,
|
|
||||||
'header': header,
|
'header': header,
|
||||||
'heightheader': heightheader,
|
'heightheader': heightheader,
|
||||||
'colormain': colormain,
|
'colormain': colormain,
|
||||||
|
@ -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 %}
|
||||||
|
@ -33,6 +33,10 @@
|
|||||||
text-transform: initial !important;
|
text-transform: initial !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a.item-update {
|
||||||
|
right: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -41,7 +45,7 @@
|
|||||||
|
|
||||||
<div id="explorer">
|
<div id="explorer">
|
||||||
<div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups" style="margin-top:5px">
|
<div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups" style="margin-top:5px">
|
||||||
{% if canupdate %}
|
{% if canupdate and not fgtrash %}
|
||||||
<div class="btn-group mr-2" role="group" aria-label="First group">
|
<div class="btn-group mr-2" role="group" aria-label="First group">
|
||||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Téléchargez vos Fichiers','{{ path('cadoles_core_'~access~'_file_upload',{'id': directory,'type':'all','subdirectory':subdirectory}) }}');" title="Ajouter des fichiers">
|
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Téléchargez vos Fichiers','{{ path('cadoles_core_'~access~'_file_upload',{'id': directory,'type':'all','subdirectory':subdirectory}) }}');" title="Ajouter des fichiers">
|
||||||
<i class="fa fa-upload"></i>
|
<i class="fa fa-upload"></i>
|
||||||
@ -49,7 +53,6 @@
|
|||||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Création Répertoire','{{ path('cadoles_core_'~access~'_file_subdirectory',{'id': directory,'type':'all','subdirectory':subdirectory}) }}');" title="Ajouter un Répertoire">
|
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Création Répertoire','{{ path('cadoles_core_'~access~'_file_subdirectory',{'id': directory,'type':'all','subdirectory':subdirectory}) }}');" title="Ajouter un Répertoire">
|
||||||
<i class="fa fa-folder-plus"></i>
|
<i class="fa fa-folder-plus"></i>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
@ -71,23 +74,59 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
{% set active="" %}
|
||||||
{% if sort=="name" %}
|
{% if sort=="name" %}
|
||||||
{%set action="date" %}
|
{% set active="active" %}
|
||||||
|
{%endif%}
|
||||||
|
|
||||||
|
{% if order=="SORT_ASC" %}
|
||||||
|
{%set action="SORT_DESC" %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{%set action="name" %}
|
{%set action="SORT_ASC" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if not subdirectory is empty %}
|
{% if not subdirectory is empty %}
|
||||||
<a href="{{ path('cadoles_core_'~access~'_file_list',{'directory':directory,'subdirectory':subdirectory,'sort':action }) }}" type="button" class="btn btn-primary">
|
<a href="{{ path('cadoles_core_'~access~'_file_list',{'directory':directory,'subdirectory':subdirectory,'sort':'name', 'order':action }) }}" type="button" class="btn btn-primary {{active}}">
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{{ path('cadoles_core_'~access~'_file_list',{'directory':directory,'clear':true,'sort':action }) }}" type="button" class="btn btn-primary">
|
<a href="{{ path('cadoles_core_'~access~'_file_list',{'directory':directory,'clear':true,'sort':'name', 'order':action }) }}" type="button" class="btn btn-primary {{active}}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if sort=="name" %}
|
{% if order=="SORT_ASC" %}
|
||||||
<i class="fas fa-long-arrow-alt-down"></i> Nom
|
<i class="fas fa-long-arrow-alt-down"></i> Nom
|
||||||
{% else %}
|
{% else %}
|
||||||
|
<i class="fas fa-long-arrow-alt-up"></i> Nom
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
|
||||||
|
{% set active="" %}
|
||||||
|
{% if sort=="date" %}
|
||||||
|
{% set active="active" %}
|
||||||
|
{%endif%}
|
||||||
|
|
||||||
|
{% if order=="SORT_ASC" %}
|
||||||
|
{%set action="SORT_DESC" %}
|
||||||
|
{% else %}
|
||||||
|
{%set action="SORT_ASC" %}
|
||||||
|
{% endif %}
|
||||||
|
{% if not subdirectory is empty %}
|
||||||
|
<a href="{{ path('cadoles_core_'~access~'_file_list',{'directory':directory,'subdirectory':subdirectory,'sort':'date', 'order':action }) }}" type="button" class="btn btn-primary {{active}}">
|
||||||
|
{% else %}
|
||||||
|
<a href="{{ path('cadoles_core_'~access~'_file_list',{'directory':directory,'clear':true,'sort':'date', 'order':action }) }}" type="button" class="btn btn-primary {{active}}">
|
||||||
|
{% endif %}
|
||||||
|
{% if order=="SORT_ASC" %}
|
||||||
<i class="fas fa-long-arrow-alt-down"></i> Date
|
<i class="fas fa-long-arrow-alt-down"></i> Date
|
||||||
|
{% else %}
|
||||||
|
<i class="fas fa-long-arrow-alt-up"></i> Date
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% if canupdate %}
|
||||||
|
<div class="btn-group mr-2" role="group" aria-label="Third group">
|
||||||
|
<a href="{{ path('cadoles_core_'~access~'_file_list',{'directory':directory,'subdirectory':'__trash' }) }}" type="button" class="btn btn-primary"><i class="fas fa-trash"></i></a>
|
||||||
|
{% if fgtrash %}
|
||||||
|
<a href="{{ path('cadoles_core_'~access~'_file_purgetrash',{'directory':directory }) }}" type="button" class="btn btn-primary" data-method="delete" data-confirm="Souhaitez-vous purger votre poubelle ? Cette action sera irrévocable.">Purger la poubelle</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@ -104,11 +143,13 @@
|
|||||||
{% set sub = sub~"/"~parent %}
|
{% set sub = sub~"/"~parent %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<li class="brea.dcrumb-item directory" data-dir="{{datadir}}" data-name="{{ parent }}"><a href="{{ path('cadoles_core_'~access~'_file_list',{'directory':directory,'subdirectory':sub }) }}">{{parent|raw}}</a></li>
|
{% set tmpdirname = parent|replace({'__trash': 'Poubelle'}) %}
|
||||||
|
<li class="brea.dcrumb-item directory" data-dir="{{datadir}}" data-name="{{ parent }}"><a href="{{ path('cadoles_core_'~access~'_file_list',{'directory':directory,'subdirectory':sub }) }}">{{tmpdirname|raw}}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% if not subdirectory is empty %}
|
{% if not subdirectory is empty %}
|
||||||
<li class="breadcrumb-item directory" data-dir="{{directory}}/{{sub}}" data-name="{{dirname}}"><a href="{{ path('cadoles_core_'~access~'_file_list',{'directory':directory,'subdirectory':subdirectory }) }}">{{dirname|raw}}</a></li>
|
{% set tmpdirname = dirname|replace({'__trash': 'Poubelle'}) %}
|
||||||
|
<li class="breadcrumb-item directory" data-dir="{{directory}}/{{sub}}" data-name="{{dirname}}"><a href="{{ path('cadoles_core_'~access~'_file_list',{'directory':directory,'subdirectory':subdirectory }) }}">{{tmpdirname|raw}}</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</ol>
|
</ol>
|
||||||
@ -124,9 +165,23 @@
|
|||||||
<div id="{{dir.name|e('js')|raw }}" class="grid-item grid-{{view}} directory" data-dir="{{directory}}/{{subdirectory}}" data-name="{{dir.name}}">
|
<div id="{{dir.name|e('js')|raw }}" class="grid-item grid-{{view}} directory" data-dir="{{directory}}/{{subdirectory}}" data-name="{{dir.name}}">
|
||||||
<div class="grid-item-content">
|
<div class="grid-item-content">
|
||||||
{% if canadd %}
|
{% if canadd %}
|
||||||
|
{% if fgtrash %}
|
||||||
|
<a style="cursor:pointer;" onClick="restaureFile('{{ directory }}','{{subdirectory}}','{{dir.name|e('js')|raw }}')" class="item-restaure">
|
||||||
|
<i class="fa fa-undo" title="Restaurer le fichier"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
<a style="cursor:pointer;" onClick="delFile('{{ directory }}','{{subdirectory}}','{{dir.name|e('js')|raw }}')" class="item-delete">
|
<a style="cursor:pointer;" onClick="delFile('{{ directory }}','{{subdirectory}}','{{dir.name|e('js')|raw }}')" class="item-delete">
|
||||||
<i class="fa fa-trash" title="Supprimer le dossier"></i>
|
<i class="fa fa-trash" title="Supprimer le dossier"></i>
|
||||||
</a>
|
</a>
|
||||||
|
{% 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">
|
||||||
|
<i class="fa fa-file" title="Renommer le dossier"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a style="cursor:pointer;" onClick="trashFile('{{ directory }}','{{subdirectory}}','{{dir.name|e('js')|raw }}')" class="item-delete">
|
||||||
|
<i class="fa fa-trash" title="Supprimer le dossier"></i>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if subdirectory is empty %}
|
{% if subdirectory is empty %}
|
||||||
@ -153,9 +208,23 @@
|
|||||||
<div class="grid-item grid-{{view}} file" data-dir="{{directory}}/{{subdirectory}}" data-name="{{file.name}}">
|
<div class="grid-item grid-{{view}} file" data-dir="{{directory}}/{{subdirectory}}" data-name="{{file.name}}">
|
||||||
<div class="grid-item-content">
|
<div class="grid-item-content">
|
||||||
{% if canadd %}
|
{% if canadd %}
|
||||||
|
{% if fgtrash %}
|
||||||
|
<a style="cursor:pointer;" onClick="restaureFile('{{ directory }}','{{subdirectory}}','{{file.name|e('js')|raw }}')" class="item-restaure">
|
||||||
|
<i class="fa fa-undo" title="Restaurer le fichier"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
<a style="cursor:pointer;" onClick="delFile('{{ directory }}','{{subdirectory}}','{{file.name|e('js')|raw }}')" class="item-delete">
|
<a style="cursor:pointer;" onClick="delFile('{{ directory }}','{{subdirectory}}','{{file.name|e('js')|raw }}')" class="item-delete">
|
||||||
<i class="fa fa-trash" title="Supprimer le fichier"></i>
|
<i class="fa fa-trash" title="Supprimer le fichier"></i>
|
||||||
</a>
|
</a>
|
||||||
|
{% 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">
|
||||||
|
<i class="fa fa-file" title="Renommer le fichier"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a style="cursor:pointer;" onClick="trashFile('{{ directory }}','{{subdirectory}}','{{file.name|e('js')|raw }}')" class="item-delete">
|
||||||
|
<i class="fa fa-trash" title="Supprimer le fichier"></i>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if file.minefamily=="text" or file.minefamily=="image" or file.minetype == "application/pdf" %}
|
{% if file.minefamily=="text" or file.minefamily=="image" or file.minetype == "application/pdf" %}
|
||||||
@ -205,8 +274,12 @@
|
|||||||
else {
|
else {
|
||||||
color = "#{{ color["main"]}}";
|
color = "#{{ color["main"]}}";
|
||||||
}
|
}
|
||||||
|
$(".item-update").css("color",color);
|
||||||
|
$(".item-update > i").css("color",color);
|
||||||
$(".item-delete").css("color",color);
|
$(".item-delete").css("color",color);
|
||||||
$(".item-delete > i").css("color",color);
|
$(".item-delete > i").css("color",color);
|
||||||
|
$(".item-restaure").css("color",color);
|
||||||
|
$(".item-restaure > i").css("color",color);
|
||||||
$(".grid-item-title > h2").css("color",color);
|
$(".grid-item-title > h2").css("color",color);
|
||||||
|
|
||||||
$('#mymodal').on('shown.bs.modal', function() {
|
$('#mymodal').on('shown.bs.modal', function() {
|
||||||
@ -218,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");
|
||||||
@ -240,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",
|
||||||
@ -263,11 +343,9 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -293,9 +371,48 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{% if canupdate %}
|
||||||
|
// Trasher un fichier
|
||||||
|
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.");
|
||||||
|
if (r == true) {
|
||||||
|
$.ajax({
|
||||||
|
method: "POST",
|
||||||
|
url: "{{ path('cadoles_core_'~access~'_file_trash') }}",
|
||||||
|
data: {
|
||||||
|
directory:directory,
|
||||||
|
subdirectory:subdirectory,
|
||||||
|
filename:filename
|
||||||
|
},
|
||||||
|
success: function() {
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Restaurer un fichier
|
||||||
|
function restaureFile(directory,subdirectory,filename) {
|
||||||
|
var r = confirm("Confirmez-vous la restauration de ce fichier ?");
|
||||||
|
if (r == true) {
|
||||||
|
$.ajax({
|
||||||
|
method: "POST",
|
||||||
|
url: "{{ path('cadoles_core_'~access~'_file_restaure') }}",
|
||||||
|
data: {
|
||||||
|
directory:directory,
|
||||||
|
subdirectory:subdirectory,
|
||||||
|
filename:filename
|
||||||
|
},
|
||||||
|
success: function() {
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Supprimer un fichier
|
// Supprimer un fichier
|
||||||
function delFile(directory,subdirectory,filename) {
|
function delFile(directory,subdirectory,filename) {
|
||||||
var r = confirm("Confirmez-vous la suppression de ce fichier ?");
|
var r = confirm("Confirmez-vous la suppression définitive de ce fichier ?");
|
||||||
if (r == true) {
|
if (r == true) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
@ -311,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();
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
init: function() {
|
init: function() {
|
||||||
this.on("sending", function(file, xhr, formData) {
|
this.on("sending", function(file, xhr, formData) {
|
||||||
formData.append("directory", "{{ id }}");
|
formData.append("directory", "{{ id }}");
|
||||||
formData.append("subdirectory", "{{ subdirectory }}");
|
formData.append("subdirectory", "{{ subdirectory|raw }}");
|
||||||
});
|
});
|
||||||
|
|
||||||
var totalFiles = 0;
|
var totalFiles = 0;
|
||||||
|
@ -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 %}
|
||||||
|
@ -149,7 +149,7 @@
|
|||||||
value: true
|
value: true
|
||||||
{% endif %}
|
{% endif %}
|
||||||
},
|
},
|
||||||
success: function(idbookmark) {
|
success: function() {
|
||||||
location.reload();
|
location.reload();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -217,6 +217,7 @@
|
|||||||
$( ".grid-item-content").hover(function() {
|
$( ".grid-item-content").hover(function() {
|
||||||
$(this).children(".item-heart").show();
|
$(this).children(".item-heart").show();
|
||||||
$(this).children(".item-delete").show();
|
$(this).children(".item-delete").show();
|
||||||
|
$(this).children(".item-restaure").show();
|
||||||
$(this).children(".item-update").show();
|
$(this).children(".item-update").show();
|
||||||
$(this).children(".item-preview").show();
|
$(this).children(".item-preview").show();
|
||||||
});
|
});
|
||||||
@ -224,6 +225,7 @@
|
|||||||
$( ".grid-item-content" ).mouseleave(function() {
|
$( ".grid-item-content" ).mouseleave(function() {
|
||||||
$(this).children(".item-heart").hide();
|
$(this).children(".item-heart").hide();
|
||||||
$(this).children(".item-delete").hide();
|
$(this).children(".item-delete").hide();
|
||||||
|
$(this).children(".item-restaure").hide();
|
||||||
$(this).children(".item-update").hide();
|
$(this).children(".item-update").hide();
|
||||||
$(this).children(".item-preview").hide();
|
$(this).children(".item-preview").hide();
|
||||||
});
|
});
|
||||||
|
@ -187,6 +187,7 @@
|
|||||||
.header .title,
|
.header .title,
|
||||||
.panel-heading,
|
.panel-heading,
|
||||||
.widgetheader,
|
.widgetheader,
|
||||||
|
#navbarsmalltitle,
|
||||||
h1 {
|
h1 {
|
||||||
font-family: var(--fontfacetitle);
|
font-family: var(--fontfacetitle);
|
||||||
}
|
}
|
||||||
|
@ -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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,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 +34,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,10 +182,19 @@
|
|||||||
<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 %}
|
||||||
|
@ -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,16 +11,19 @@
|
|||||||
<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%}
|
{%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%}
|
||||||
|
{%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%}
|
||||||
|
|
||||||
|
{% if not fields["group"].perm==0 or not is_granted('ROLE_USER') %}
|
||||||
<br>
|
<br>
|
||||||
{% set fgtitle=false %}
|
{% set fgtitle=false %}
|
||||||
{% for usergroup in user.groups %}
|
{% for usergroup in user.groups %}
|
||||||
@ -35,6 +38,7 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
{% import '@Theme/constant.html.twig' as constant %}
|
{% import '@Theme/constant.html.twig' as constant %}
|
||||||
|
|
||||||
{% set logo = constant.logo().__toString %}
|
{% set logo = constant.logo().__toString %}
|
||||||
{% set fgheader = constant.fgheader().__toString %}
|
|
||||||
{% set header = constant.header().__toString %}
|
{% set header = constant.header().__toString %}
|
||||||
{% set heightheader = constant.heightheader().__toString %}
|
{% set heightheader = constant.heightheader().__toString %}
|
||||||
{% set colorR = constant.colorR.__toString %}
|
{% set colorR = constant.colorR.__toString %}
|
||||||
@ -85,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 %}
|
||||||
@ -107,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');
|
||||||
|
@ -39,6 +39,72 @@ use Cadoles\EdispatcherBundle\Entity\Datasource;
|
|||||||
|
|
||||||
class ApiController extends Controller
|
class ApiController extends Controller
|
||||||
{
|
{
|
||||||
|
|
||||||
|
public function applicationsAction() {
|
||||||
|
$itemcategorys = $this->getDoctrine()->getRepository('CadolesPortalBundle:Itemcategory')->findBy(
|
||||||
|
[], ['rowOrder' => 'asc']);
|
||||||
|
$groups = $this->getDoctrine()->getRepository('CadolesCoreBundle:Group')->findBy([], ['label' =>
|
||||||
|
'asc']);
|
||||||
|
foreach($itemcategorys as $itemcategory) {
|
||||||
|
$items = $itemcategory->getItems();
|
||||||
|
|
||||||
|
foreach($items as $item) {
|
||||||
|
$output = [];
|
||||||
|
$output["id"] = $item->getId();
|
||||||
|
$output["name"] = $item->getTitle();
|
||||||
|
$output["libelle"] = $item->getSubtitle();
|
||||||
|
$output["icon"] = $item->getIcon()?$item->getIcon()->getLabel():"default";
|
||||||
|
$output["url"] = $item->getUrl();
|
||||||
|
$output["profils"] = [];
|
||||||
|
|
||||||
|
foreach($item->getGroups() as $group) {
|
||||||
|
$output["profils"]["groupes"][] = "NINEGATE|".$group->getLabel();
|
||||||
|
}
|
||||||
|
foreach($item->getRoles() as $role) {
|
||||||
|
$output["profils"]["roles"][] = "NINEGATE|".$role;
|
||||||
|
}
|
||||||
|
if ($item->getSsoitem()!="") $output["profils"]["SSOITEM"] = $item->getSsoitem();
|
||||||
|
$reponse[$item->getTitle()] = $output;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Response(json_encode($reponse), Response::HTTP_OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function checkuserAction() {
|
||||||
|
|
||||||
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
||||||
|
$request = $this->container->get('request_stack')->getCurrentRequest();
|
||||||
|
$id = $request->query->get('id',false);
|
||||||
|
|
||||||
|
if ($id) {
|
||||||
|
|
||||||
|
$user=$em->getRepository('CadolesCoreBundle:User')->findOneBy(["username"=>$id]);
|
||||||
|
|
||||||
|
if (!$user) {
|
||||||
|
$output["error"]="id=".$id." : user not found";
|
||||||
|
return new Response(json_encode($output), 400);
|
||||||
|
}
|
||||||
|
$output["username"] = $user->getUsername();
|
||||||
|
$output["firstname"] = $user->getFirstname();
|
||||||
|
$output["lastname"] = $user->getLastname();
|
||||||
|
$output["email"] = $user->getEmail();
|
||||||
|
$output["role"] = $user->getRole();
|
||||||
|
foreach($user->getGroups() as $group) {
|
||||||
|
$output["groupes"][] = $group->getGroup()->getLabel();
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$output["error"]="id needed";
|
||||||
|
return new Response(json_encode($output), 404);
|
||||||
|
|
||||||
|
}
|
||||||
|
return new Response(json_encode($output), Response::HTTP_OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public function testAction() {
|
public function testAction() {
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
@ -134,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);
|
||||||
|
|
||||||
@ -285,7 +352,7 @@ class ApiController extends Controller
|
|||||||
$ret_str=$ret_str."<categorie>";
|
$ret_str=$ret_str."<categorie>";
|
||||||
$ret_str=$ret_str."<nom>Mes Ressources</nom>";
|
$ret_str=$ret_str."<nom>Mes Ressources</nom>";
|
||||||
$ret_str=$ret_str."<indice>-1</indice>";
|
$ret_str=$ret_str."<indice>-1</indice>";
|
||||||
$ret_str=$ret_str."<icone>fa-user-circle</icone>";
|
$ret_str=$ret_str."<icone>fa-star</icone>";
|
||||||
$ret_str=$ret_str."</categorie>";
|
$ret_str=$ret_str."</categorie>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -376,7 +443,8 @@ EOL
|
|||||||
return new Response(json_encode($output), 400);
|
return new Response(json_encode($output), 400);
|
||||||
}
|
}
|
||||||
|
|
||||||
$weburl="https://".$this->getParameter("weburl")."/".$this->getParameter("alias")."/";
|
# fixe #31884 "https://" => "//"
|
||||||
|
$weburl="//".$this->getParameter("weburl")."/".$this->getParameter("alias")."/";
|
||||||
$serializer = new Serializer(array(new DateTimeNormalizer()));
|
$serializer = new Serializer(array(new DateTimeNormalizer()));
|
||||||
|
|
||||||
if ($action == null) {
|
if ($action == null) {
|
||||||
@ -407,7 +475,6 @@ EOL
|
|||||||
}
|
}
|
||||||
$categorielabel="";
|
$categorielabel="";
|
||||||
if ($compteur==0) {
|
if ($compteur==0) {
|
||||||
if ($alert->getAlertcategory()->getLabel()!="sans categorie")
|
|
||||||
if ($flag=="") {
|
if ($flag=="") {
|
||||||
$categorielabel="<div style='float:left;width: 102.5%;padding: 4px;padding-left: 4px;color:white;background-color: #$bgcolor;position:relative;top: -16px;left: -11px;'><img src='$iconeurl' width='24em'> ".$alert->getAlertcategory()->getLabel()."</div></br>";
|
$categorielabel="<div style='float:left;width: 102.5%;padding: 4px;padding-left: 4px;color:white;background-color: #$bgcolor;position:relative;top: -16px;left: -11px;'><img src='$iconeurl' width='24em'> ".$alert->getAlertcategory()->getLabel()."</div></br>";
|
||||||
$tmp["message"] = "$categorielabel<h4>".$alert->getTitle()."</h4>".$alert->getContent();
|
$tmp["message"] = "$categorielabel<h4>".$alert->getTitle()."</h4>".$alert->getContent();
|
||||||
@ -415,7 +482,6 @@ EOL
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($alert->getAlertcategory()->getLabel()!="sans categorie")
|
|
||||||
if ($flag=="") {
|
if ($flag=="") {
|
||||||
$categorielabel="<img src='$iconeurl' width='16em' ><span style='font-weight: bold'> ".$alert->getAlertcategory()->getLabel()."</span> : ";
|
$categorielabel="<img src='$iconeurl' width='16em' ><span style='font-weight: bold'> ".$alert->getAlertcategory()->getLabel()."</span> : ";
|
||||||
$tmp["message"] = $categorielabel.$alert->getTitle()."".$alert->getContent();
|
$tmp["message"] = $categorielabel.$alert->getTitle()."".$alert->getContent();
|
||||||
@ -608,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -664,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")))
|
||||||
@ -779,9 +846,9 @@ $api('$id',data);";
|
|||||||
$debug = ob_get_clean();
|
$debug = ob_get_clean();
|
||||||
//$debug=json_encode($request->query);
|
//$debug=json_encode($request->query);
|
||||||
|
|
||||||
|
//return new Response(json_encode($output), 400);
|
||||||
if(is_null($token)||is_null($libelle)||is_null($icon)||is_null($favurl)||is_null($nom)||is_null($categorie)||is_null($callback)||is_null($action)||is_null($callbackid)){
|
if(is_null($token)||is_null($libelle)||is_null($icon)||is_null($favurl)||is_null($nom)||is_null($categorie)||is_null($callback)||is_null($action)||is_null($callbackid)){
|
||||||
$output["error"]="missing parameter : token - id - libelle - icon - favurl - nom - categorie - callback - action - callbackid";
|
$output["error"]="missing parameter : token - id - libelle - icon - favurl - nom - categorie - callback - action - callbackid";
|
||||||
return new Response(json_encode($output), 400);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
@ -789,15 +856,13 @@ $api('$id',data);";
|
|||||||
$datasource = $em->getRepository('CadolesEdispatcherBundle:Datasource')->findOneBy(["token"=>$token]);
|
$datasource = $em->getRepository('CadolesEdispatcherBundle:Datasource')->findOneBy(["token"=>$token]);
|
||||||
if (!$datasource) {
|
if (!$datasource) {
|
||||||
$output["error"]="no datasource session found for token = $token";
|
$output["error"]="no datasource session found for token = $token";
|
||||||
return new Response(json_encode($output), 400);
|
|
||||||
}
|
}
|
||||||
$login = $datasource->getUsername();
|
$login = $datasource->getUsername();
|
||||||
|
|
||||||
// Récupérer l'utilisateur
|
// Récupérer l'utilisateur
|
||||||
$user=$em->getRepository('CadolesCoreBundle:User')->findOneBy(["username"=>$login]);
|
$user=$em->getRepository('CadolesCoreBundle:User')->findOneBy(["username"=>$login]);
|
||||||
if(!$user) {
|
if(!$user) {
|
||||||
$output["error"]="user not exist";
|
$output["error"]="user does not exist";
|
||||||
return new Response(json_encode($output), 400);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// chercher l'item
|
// chercher l'item
|
||||||
@ -805,8 +870,7 @@ $api('$id',data);";
|
|||||||
if(!$item) {
|
if(!$item) {
|
||||||
$altitem=$em->getRepository('CadolesPortalBundle:Item')->findOneBy(["url"=>$favurl."?gestion_edispatcher=locale"]);
|
$altitem=$em->getRepository('CadolesPortalBundle:Item')->findOneBy(["url"=>$favurl."?gestion_edispatcher=locale"]);
|
||||||
if(!$altitem) {
|
if(!$altitem) {
|
||||||
$output["error"]="item with url=$favurl(?gestion_edispatcher=locale) not exist";
|
$output["error"]="item with url=$favurl(?gestion_edispatcher=locale) not found";
|
||||||
return new Response(json_encode($output), 400);
|
|
||||||
} else {
|
} else {
|
||||||
$item = $altitem;
|
$item = $altitem;
|
||||||
}
|
}
|
||||||
@ -815,10 +879,15 @@ $api('$id',data);";
|
|||||||
$bookmark = $em->getRepository('CadolesPortalBundle:Bookmark')->findOneBy(["user"=>$user,"item"=>$item]);
|
$bookmark = $em->getRepository('CadolesPortalBundle:Bookmark')->findOneBy(["user"=>$user,"item"=>$item]);
|
||||||
$title="";
|
$title="";
|
||||||
$subtitle="";
|
$subtitle="";
|
||||||
|
$message="";
|
||||||
|
|
||||||
|
if (isset($output["error"])) {
|
||||||
|
$message=$output["error"];
|
||||||
|
$success=0;
|
||||||
|
} else {
|
||||||
$output="";
|
$output="";
|
||||||
if(!$bookmark) {
|
if(!$bookmark) {
|
||||||
if ($action=="BOOKMARK_ADD") {
|
if ($action=="BOOKMARK_ADD") {
|
||||||
|
|
||||||
$bookmark = new Bookmark();
|
$bookmark = new Bookmark();
|
||||||
$bookmark->setTitle($item->getTitle());
|
$bookmark->setTitle($item->getTitle());
|
||||||
$title=$item->getTitle();
|
$title=$item->getTitle();
|
||||||
@ -833,33 +902,29 @@ $api('$id',data);";
|
|||||||
$em->persist($bookmark);
|
$em->persist($bookmark);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
$success=1;
|
$success=1;
|
||||||
$output="<html><body>
|
$message="$title : $subtitle a été ajouté à vos favoris";
|
||||||
<form id='form2submit' name='form2submit' method='POST' action='$callback'>
|
} else {
|
||||||
<input name='action' id='action' type='hidden' value='$action' />
|
$success=0;
|
||||||
<input name='message' id='message' type='hidden' value='$title : $subtitle a été ajouté à vos favoris' />
|
$message="item introuvable en favori mais action=DEL (retrait)";
|
||||||
<input name='success' id='success' type='hidden' value='1' />
|
}
|
||||||
<input name='id' id='id' type='hidden' value='$id' />
|
|
||||||
<input name='callbackid' id='callbackid' type='hidden' value='$callbackid' />
|
|
||||||
</form>
|
|
||||||
<script>
|
|
||||||
document.form2submit.submit();
|
|
||||||
</script>
|
|
||||||
</body></html>
|
|
||||||
";
|
|
||||||
|
|
||||||
|
|
||||||
} else $success=0; // item pas en favori, mais ce n'est pas une demande d'ajout
|
|
||||||
} else {
|
} else {
|
||||||
if ($action=="BOOKMARK_DEL") {
|
if ($action=="BOOKMARK_DEL") {
|
||||||
|
|
||||||
$em->remove($bookmark);
|
$em->remove($bookmark);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
$success=1;
|
$success=1;
|
||||||
|
$message="item supprimé de vos favoris";
|
||||||
|
} else {
|
||||||
|
$success=0;
|
||||||
|
$message="item deja en favori mais action=ADD (ajout)";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$output="<html><body>
|
$output="<html><body>
|
||||||
<form id='form2submit' name='form2submit' method='POST' action='$callback'>
|
<form id='form2submit' name='form2submit' method='POST' action='$callback'>
|
||||||
<input name='action' id='action' type='hidden' value='$action' />
|
<input name='action' id='action' type='hidden' value='$action' />
|
||||||
<input name='message' id='message' type='hidden' value='item supprimé de vos favoris' />
|
<input name='message' id='message' type='hidden' value='$message' />
|
||||||
<input name='success' id='success' type='hidden' value='1' />
|
<input name='success' id='success' type='hidden' value='$success' />
|
||||||
<input name='id' id='id' type='hidden' value='$id' />
|
<input name='id' id='id' type='hidden' value='$id' />
|
||||||
<input name='callbackid' id='callbackid' type='hidden' value='$callbackid' />
|
<input name='callbackid' id='callbackid' type='hidden' value='$callbackid' />
|
||||||
</form>
|
</form>
|
||||||
@ -869,8 +934,7 @@ document.form2submit.submit();
|
|||||||
</body></html>
|
</body></html>
|
||||||
";
|
";
|
||||||
|
|
||||||
} else $success=0; // item deja en favori mais demande d'ajout
|
|
||||||
}
|
|
||||||
|
|
||||||
$reponse = new Response();
|
$reponse = new Response();
|
||||||
$reponse->setContent($output);
|
$reponse->setContent($output);
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,14 @@ cadoles_edispatcher_api_public_hello:
|
|||||||
path: /edispatcher/api/public/hello
|
path: /edispatcher/api/public/hello
|
||||||
defaults: { _controller: CadolesEdispatcherBundle:Api:hello }
|
defaults: { _controller: CadolesEdispatcherBundle:Api:hello }
|
||||||
|
|
||||||
|
cadoles_edispatcher_api_applications:
|
||||||
|
path: /edispatcher/api/applications
|
||||||
|
defaults: { _controller: CadolesEdispatcherBundle:Api:applications }
|
||||||
|
|
||||||
|
cadoles_edispatcher_api_checkuser:
|
||||||
|
path: /edispatcher/api/checkuser
|
||||||
|
defaults: { _controller: CadolesEdispatcherBundle:Api:checkuser }
|
||||||
|
|
||||||
cadoles_edispatcher_api_apps_all:
|
cadoles_edispatcher_api_apps_all:
|
||||||
path: /edispatcher/api/apps/all
|
path: /edispatcher/api/apps/all
|
||||||
defaults: { _controller: CadolesEdispatcherBundle:Api:hello }
|
defaults: { _controller: CadolesEdispatcherBundle:Api:hello }
|
||||||
|
@ -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');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user