|
@@ -65,7 +65,7 @@ function fgcf_menu() {
|
|
|
'page callback' => 'fgcf_page_odt',
|
|
|
'access arguments' => array('create fgcf_fiche content'),
|
|
|
);
|
|
|
-
|
|
|
+
|
|
|
return $items;
|
|
|
}
|
|
|
|
|
@@ -82,7 +82,7 @@ function fgcf_perm() {
|
|
|
function fgcf_theme($existing, $type, $theme, $path) {
|
|
|
$ret = array(
|
|
|
'fgcf_home' => array(
|
|
|
- 'arguments' => array('filter_form' => array()),
|
|
|
+ 'arguments' => array('links' => array(), 'content' => NULL),
|
|
|
'template' => 'fgcf-home',
|
|
|
'path' => $path .'/theme',
|
|
|
),
|
|
@@ -135,7 +135,7 @@ function fgcf_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
|
|
|
if ($a3 /* !teaser */ || !$a4 /* page */) {
|
|
|
break;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// Not redundant with hook_init: fgcf node pages are not on fgcf[/.*] URLs
|
|
|
if (in_array($node->type, array_keys(fgcf_node_info()))) {
|
|
|
drupal_add_css(drupal_get_path('module', 'fgcf') .'/theme/css/fgcf.css');
|
|
@@ -203,9 +203,11 @@ function fgcf_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
|
|
|
function fgcf_page_home() {
|
|
|
drupal_set_title('Catalogue des formations France Galop');
|
|
|
|
|
|
- $filter_form = drupal_get_form('fgcf_filter_form');
|
|
|
- $ret = theme('fgcf_home', $filter_form);
|
|
|
-
|
|
|
+ $links = array(
|
|
|
+ l(t('Formations par organisme'), 'fgcf/organisme'),
|
|
|
+ l(t('Formations par support'), 'fgcf/support'),
|
|
|
+ );
|
|
|
+ $ret = theme('fgcf_home', $links, fgcf_page_thematique());
|
|
|
return $ret;
|
|
|
}
|
|
|
|
|
@@ -516,6 +518,8 @@ function _fgcf_filter_form_translate_values() {
|
|
|
* @todo : inefficient - replace with constants once the vocabs are deployed ?
|
|
|
*
|
|
|
* @param string $name
|
|
|
+ *
|
|
|
+ * @return int
|
|
|
*/
|
|
|
function _fgcf_get_vocabulary_by_name($name) {
|
|
|
static $matches = array();
|