Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
opacce
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Fleurant Ylan
opacce
Commits
df87f7b9
Commit
df87f7b9
authored
Mar 23, 2017
by
Ghislain Loas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CIP #57952 wip
parent
b4bebbaa
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
170 additions
and
50 deletions
+170
-50
index.php
index.php
+2
-2
AbonneAvis.php
library/Class/Systeme/ModulesMenu/AbonneAvis.php
+3
-2
AbonneCards.php
library/Class/Systeme/ModulesMenu/AbonneCards.php
+4
-3
AbonneFiche.php
library/Class/Systeme/ModulesMenu/AbonneFiche.php
+1
-1
AbonneFormations.php
library/Class/Systeme/ModulesMenu/AbonneFormations.php
+10
-11
AbonneModificationFiche.php
...ary/Class/Systeme/ModulesMenu/AbonneModificationFiche.php
+1
-1
AbonnePrets.php
library/Class/Systeme/ModulesMenu/AbonnePrets.php
+1
-1
AbonneReservations.php
library/Class/Systeme/ModulesMenu/AbonneReservations.php
+1
-1
Accueil.php
library/Class/Systeme/ModulesMenu/Accueil.php
+0
-1
ArteVOD.php
library/Class/Systeme/ModulesMenu/ArteVOD.php
+9
-7
Avis.php
library/Class/Systeme/ModulesMenu/Avis.php
+1
-1
BibliothequeNumerique.php
library/Class/Systeme/ModulesMenu/BibliothequeNumerique.php
+2
-1
CVS.php
library/Class/Systeme/ModulesMenu/CVS.php
+8
-7
Catalogue.php
library/Class/Systeme/ModulesMenu/Catalogue.php
+5
-2
Null.php
library/Class/Systeme/ModulesMenu/Null.php
+4
-1
Album.php
library/ZendAfi/Form/Configuration/Menu/Album.php
+36
-0
Entry.php
library/ZendAfi/Form/Configuration/Menu/Entry.php
+40
-0
LastReviews.php
library/ZendAfi/Form/Configuration/Menu/LastReviews.php
+33
-0
MenusTest.php
tests/scenarios/Menus/MenusTest.php
+9
-8
No files found.
index.php
View file @
df87f7b9
...
...
@@ -2,7 +2,7 @@
/**
* Copyright (c) 2012, Agence Française Informatique (AFI). All rights reserved.
*
* BOKEH is free software; you can redistribute it and/or modify
* BOKEH is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
...
...
@@ -21,7 +21,7 @@
// Run Bokeh installer if not configured
if
((
!
file_exists
(
'local.php'
)
||
!
file_exists
(
'config.ini'
)
||
!
file_exists
(
'cosmogramme/config.php'
))
&&
file_exists
(
'scripts/install-bokeh.php'
))
{
include
(
'scripts/install-bokeh.php'
);
include
(
'scripts/install-bokeh.php'
);
}
require
(
'includes.php'
);
...
...
library/Class/Systeme/ModulesMenu/AbonneAvis.php
View file @
df87f7b9
...
...
@@ -19,15 +19,16 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class
Class_Systeme_ModulesMenu_AbonneAvis
extends
Class_Systeme_ModulesMenu_Null
{
protected
$_group
=
Class_Systeme_ModulesMenu
::
GROUP_MENU_ABONNES
,
$_type_module
=
'ABON_AVIS'
,
$_isPhone
=
false
,
$_url
=
[
'controller'
=>
'abonne'
,
'action'
=>
'viewavis'
];
'action'
=>
'viewavis'
];
public
function
__construct
()
{
$this
->
_libelle
=
$this
->
_
(
'Derniers avis'
);
$this
->
_form
=
'ZendAfi_Form_Configuration_RatingWidget'
;
}
}
\ No newline at end of file
library/Class/Systeme/ModulesMenu/AbonneCards.php
View file @
df87f7b9
...
...
@@ -18,16 +18,17 @@
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class
Class_Systeme_ModulesMenu_AbonneCards
extends
Class_Systeme_ModulesMenu_Null
{
protected
$_group
=
Class_Systeme_ModulesMenu
::
GROUP_MENU_ABONNES
,
$_type_module
=
'ABON_CARDS'
,
$_url
=
[
'controller'
=>
'abonne'
,
'action'
=>
'cards'
];
public
function
__construct
()
{
$this
->
_libelle
=
$this
->
_
(
'Cartes'
);
$this
->
_form
=
'ZendAfi_Form_Configuration_CardsWidget'
;
}
}
?>
\ No newline at end of file
}
\ No newline at end of file
library/Class/Systeme/ModulesMenu/AbonneFiche.php
View file @
df87f7b9
...
...
@@ -18,6 +18,7 @@
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class
Class_Systeme_ModulesMenu_AbonneFiche
extends
Class_Systeme_ModulesMenu_Null
{
protected
...
...
@@ -29,6 +30,5 @@ class Class_Systeme_ModulesMenu_AbonneFiche extends Class_Systeme_ModulesMenu_Nu
public
function
__construct
()
{
$this
->
_libelle
=
$this
->
_
(
'Fiche abonné'
);
$this
->
_form
=
'ZendAfi_Form_Configuration_UserWidget'
;
}
}
\ No newline at end of file
library/Class/Systeme/ModulesMenu/AbonneFormations.php
View file @
df87f7b9
...
...
@@ -18,23 +18,22 @@
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class
Class_Systeme_ModulesMenu_AbonneFormations
extends
Class_Systeme_ModulesMenu_Null
{
/** @var string */
protected
$_group
=
Class_Systeme_ModulesMenu
::
GROUP_MENU_ABONNES
;
/** @var string */
protected
$_type_module
=
'ABON_FORMATIONS'
;
protected
$_group
=
Class_Systeme_ModulesMenu
::
GROUP_MENU_ABONNES
,
$_type_module
=
'ABON_FORMATIONS'
,
$_url
=
[
'controller'
=>
'formations'
,
'action'
=>
'index'
];
/** @var string */
protected
$_libelle
=
'Formations'
;
/** @var string */
protected
$_url
=
[
'controller'
=>
'formations'
,
'action'
=>
'index'
];
public
function
__construct
()
{
$this
->
_libelle
=
$this
->
_
(
'Formations'
);
}
public
function
isVisibleForProfil
(
$profil
)
{
return
Class_AdminVar
::
isFormationEnabled
();
}
}
?>
\ No newline at end of file
}
\ No newline at end of file
library/Class/Systeme/ModulesMenu/AbonneModificationFiche.php
View file @
df87f7b9
...
...
@@ -18,6 +18,7 @@
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class
Class_Systeme_ModulesMenu_AbonneModificationFiche
extends
Class_Systeme_ModulesMenu_Null
{
protected
...
...
@@ -29,6 +30,5 @@ class Class_Systeme_ModulesMenu_AbonneModificationFiche extends Class_Systeme_Mo
public
function
__construct
()
{
$this
->
_libelle
=
$this
->
_
(
'Modifier ma fiche'
);
$this
->
_form
=
'ZendAfi_Form_Configuration_UserEditWidget'
;
}
}
\ No newline at end of file
library/Class/Systeme/ModulesMenu/AbonnePrets.php
View file @
df87f7b9
...
...
@@ -18,6 +18,7 @@
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class
Class_Systeme_ModulesMenu_AbonnePrets
extends
Class_Systeme_ModulesMenu_Null
{
protected
$_group
=
Class_Systeme_ModulesMenu
::
GROUP_MENU_ABONNES
,
...
...
@@ -28,6 +29,5 @@ class Class_Systeme_ModulesMenu_AbonnePrets extends Class_Systeme_ModulesMenu_Nu
public
function
__construct
()
{
$this
->
_libelle
=
$this
->
_
(
'Prêts en cours'
);
$this
->
_form
=
'ZendAfi_Form_Configuration_LoansWidget'
;
}
}
\ No newline at end of file
library/Class/Systeme/ModulesMenu/AbonneReservations.php
View file @
df87f7b9
...
...
@@ -18,6 +18,7 @@
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class
Class_Systeme_ModulesMenu_AbonneReservations
extends
Class_Systeme_ModulesMenu_Null
{
protected
...
...
@@ -29,6 +30,5 @@ class Class_Systeme_ModulesMenu_AbonneReservations extends Class_Systeme_Modules
public
function
__construct
()
{
$this
->
_libelle
=
$this
->
_
(
'Réservations en cours'
);
$this
->
_form
=
'ZendAfi_Form_Configuration_HoldsWidget'
;
}
}
\ No newline at end of file
library/Class/Systeme/ModulesMenu/Accueil.php
View file @
df87f7b9
...
...
@@ -32,6 +32,5 @@ class Class_Systeme_ModulesMenu_Accueil extends Class_Systeme_ModulesMenu_Null {
public
function
__construct
()
{
$this
->
_libelle
=
$this
->
_
(
'Retour à l\'accueil'
);
$this
->
_form
=
'ZendAfi_Form_Configuration_Menu_Home'
;
}
}
\ No newline at end of file
library/Class/Systeme/ModulesMenu/ArteVOD.php
View file @
df87f7b9
...
...
@@ -18,15 +18,17 @@
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class
Class_Systeme_ModulesMenu_ArteVOD
extends
Class_Systeme_ModulesMenu_SSOAbstract
{
/** @var string */
protected
$_group
=
Class_Systeme_ModulesMenu
::
GROUP_MENU_ABONNES
;
/** @var string */
protected
$_type_module
=
'ArteVod'
;
protected
$_group
=
Class_Systeme_ModulesMenu
::
GROUP_MENU_ABONNES
,
$_type_module
=
'ArteVod'
;
/** @var string */
protected
$_libelle
=
'Lien vers ArteVod'
;
public
function
__construct
()
{
$this
->
_libelle
=
$this
->
_
(
'Lien vers ArteVod'
);
}
public
function
getArteVodUrlForUser
(
$user
)
{
...
...
@@ -63,4 +65,4 @@ class Class_Systeme_ModulesMenu_ArteVOD extends Class_Systeme_ModulesMenu_SSOAbs
public
function
isVisibleForProfil
(
$profil
)
{
return
Class_AdminVar
::
isArteVODEnabled
();
}
}
}
\ No newline at end of file
library/Class/Systeme/ModulesMenu/Avis.php
View file @
df87f7b9
...
...
@@ -33,7 +33,7 @@ class Class_Systeme_ModulesMenu_Avis extends Class_Systeme_ModulesMenu_Null{
public
function
__construct
()
{
$this
->
_libelle
=
$this
->
_
(
'Les avis les plus récents'
);
$this
->
_form
=
'ZendAfi_Form_Configuration_
LastReviewsWidget
'
;
$this
->
_form
=
'ZendAfi_Form_Configuration_
Menu_LastReviews
'
;
}
...
...
library/Class/Systeme/ModulesMenu/BibliothequeNumerique.php
View file @
df87f7b9
...
...
@@ -18,6 +18,7 @@
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class
Class_Systeme_ModulesMenu_BibliothequeNumerique
extends
Class_Systeme_ModulesMenu_Null
{
protected
...
...
@@ -31,7 +32,7 @@ class Class_Systeme_ModulesMenu_BibliothequeNumerique extends Class_Systeme_Modu
public
function
__construct
()
{
$this
->
_libelle
=
$this
->
_
(
'Lien vers un album'
);
$this
->
_form
=
'ZendAfi_Form_Configuration_
AlbumWidget
'
;
$this
->
_form
=
'ZendAfi_Form_Configuration_
Menu_Album
'
;
}
...
...
library/Class/Systeme/ModulesMenu/CVS.php
View file @
df87f7b9
...
...
@@ -18,17 +18,18 @@
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class
Class_Systeme_ModulesMenu_CVS
extends
Class_Systeme_ModulesMenu_SSOAbstract
{
/** @var string */
protected
$_group
=
Class_Systeme_ModulesMenu
::
GROUP_MENU_ABONNES
;
/** @var string */
protected
$_type_module
=
'CVS'
;
protected
$_group
=
Class_Systeme_ModulesMenu
::
GROUP_MENU_ABONNES
,
$_type_module
=
'CVS'
,
$_doc_id
=
null
;
/** @var string */
protected
$_libelle
=
'Lien vers CVS'
;
protected
$_doc_id
=
null
;
public
function
__construct
()
{
$this
->
_libelle
=
$this
->
_
(
'Lien vers CVS'
);
}
public
function
getCVSUrlForUser
(
$user
)
{
...
...
library/Class/Systeme/ModulesMenu/Catalogue.php
View file @
df87f7b9
...
...
@@ -18,7 +18,9 @@
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class
Class_Systeme_ModulesMenu_Catalogue
extends
Class_Systeme_ModulesMenu_Null
{
class
Class_Systeme_ModulesMenu_Catalogue
extends
Class_Systeme_ModulesMenu_Null
{
protected
$_group
=
Class_Systeme_ModulesMenu
::
GROUP_MENU_CATALOGUES
,
$_type_module
=
'CATALOGUE'
,
...
...
@@ -30,7 +32,8 @@ class Class_Systeme_ModulesMenu_Catalogue extends Class_Systeme_ModulesMenu_Null
public
function
__construct
()
{
$this
->
_libelle
=
$this
->
_
(
'Domaine'
);
$this
->
_form
=
'ZendAfi_Form_Configuration_DomainWidget'
;
$this
->
_form
=
'ZendAfi_Form_Configuration_Menu_Domain'
;
$this
->
_defaultValues
=
[
'titre'
=>
$this
->
_
(
'Catalogue'
),
'nb_notices'
=>
20
,
'aleatoire'
=>
1
,
...
...
library/Class/Systeme/ModulesMenu/Null.php
View file @
df87f7b9
...
...
@@ -18,7 +18,9 @@
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class
Class_Systeme_ModulesMenu_Null
extends
Class_Systeme_ModulesAccueil_Null
{
protected
$_url
=
''
,
$_message
=
''
,
...
...
@@ -27,7 +29,8 @@ class Class_Systeme_ModulesMenu_Null extends Class_Systeme_ModulesAccueil_Null {
$_open_in_new_window
=
false
,
$_popupWidth
=
'550'
,
$_popupHeight
=
'215'
,
$_type_module
;
$_type_module
,
$_form
=
'ZendAfi_Form_Configuration_Menu_Entry'
;
public
function
getUrl
(
$preferences
=
[])
{
...
...
library/ZendAfi/Form/Configuration/Menu/Album.php
0 → 100644
View file @
df87f7b9
<?php
/**
* Copyright (c) 2012-2017, Agence Française Informatique (AFI). All rights reserved.
*
* BOKEH is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* BOKEH is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class
ZendAfi_Form_Configuration_Menu_Album
extends
ZendAfi_Form_Configuration_Menu_Entry
{
public
function
popupate
(
$datas
)
{
$this
->
addElement
(
'select'
,
'album_id'
,
[
'label'
=>
$this
->
_
(
'Lien vers l\'album'
),
'multipOptions'
=>
$datas
[
'albums'
]])
->
removeDisplayGroup
(
'menu_entry'
)
->
addUniqDisplayGroup
(
'menu_entry'
);
return
parent
::
popupate
(
$datas
);
}
}
\ No newline at end of file
library/ZendAfi/Form/Configuration/Menu/Entry.php
0 → 100644
View file @
df87f7b9
<?php
/**
* Copyright (c) 2012-2017, Agence Française Informatique (AFI). All rights reserved.
*
* BOKEH is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* BOKEH is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class
ZendAfi_Form_Configuration_Menu_Entry
extends
ZendAfi_Form
{
public
function
init
()
{
parent
::
init
();
$this
->
addElement
(
'text'
,
'libelle'
,
[
'label'
=>
$this
->
_
(
'Text du lien'
)])
->
addElement
(
'IcoPicker'
,
'picto'
,
[
'label'
=>
$this
->
_
(
'Icône du lien'
)])
->
addElement
(
'comboProfils'
,
'use_profil'
,
[
'label'
=>
$this
->
_
(
'Utiliser un profil particulier'
),
'empty_option'
=>
true
])
->
addUniqDisplayGroup
(
'menu_entry'
);
}
}
\ No newline at end of file
library/ZendAfi/Form/Configuration/Menu/LastReviews.php
0 → 100644
View file @
df87f7b9
<?php
/**
* Copyright (c) 2012-2017, Agence Française Informatique (AFI). All rights reserved.
*
* BOKEH is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* BOKEH is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class
ZendAfi_Form_Configuration_Menu_LastReviews
extends
ZendAfi_Form_Configuration_Menu_Entry
{
public
function
init
()
{
parent
::
init
();
$this
->
addElement
(
'text'
,
'nb'
,
[
'label'
=>
$this
->
_
(
'Nombre d\'avis afficher'
)])
->
removeDisplayGroup
(
'menu_entry'
)
->
addUniqDisplayGroup
(
'menu_entry'
);
}
}
\ No newline at end of file
tests/scenarios/Menus/MenusTest.php
View file @
df87f7b9
...
...
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
include_once
(
'tests/fixtures/RessourcesNumeriquesFixtures.php'
);
abstract
class
MenusNavSimpleTestCase
extends
Admin_AbstractControllerTestCase
{
protected
$_storm_default_to_volatile
=
true
;
...
...
@@ -275,17 +276,17 @@ class MenusEditNavPostReorderDispatchTest extends MenusNavSimpleTestCase {
class
MenusDispatchAllMenusTest
extends
Admin_AbstractControllerTestCase
{
protected
$_storm_default_to_volatile
=
true
;
public
function
setUp
()
{
parent
::
setUp
();
$this
->
fixture
(
'Class_AdminVar'
,[
'id'
=>
'MENU_BOITE'
,
'valeur'
=>
1
]);
}
public
function
entries
()
{
RessourcesNumeriquesFixtures
::
activateCVS
();
$this
->
fixture
(
'Class_AdminVar'
,
[
'id'
=>
'MENU_BOITE'
,
'valeur'
=>
1
]);
$this
->
fixture
(
'Class_AdminVar'
,
[
'id'
=>
'FORMATIONS'
,
'valeur'
=>
1
]);
public
function
entries
()
{
$datas
=
[];
foreach
((
new
Class_Systeme_ModulesMenu
())
->
getEntries
()
as
$menu
)
$datas
[]
=
[
[
$menu
->
getForm
()]
,
[
$menu
->
getLabel
()]
];
$datas
[]
=
[
$menu
->
getForm
()
,
$menu
->
getLabel
()
];
return
$datas
;
}
...
...
@@ -305,6 +306,6 @@ class MenusDispatchAllMenusTest extends Admin_AbstractControllerTestCase {
* @test
*/
public
function
formsShouldExists
(
$form
,
$definition
)
{
$this
->
assertNotNull
(
call_user_func
_array
([
$form
,
'new'
],
[[]
]));
$this
->
assertNotNull
(
call_user_func
([
$form
,
'newWith'
]));
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment