|
@@ -42,10 +42,10 @@ function fgcf_menu() {
|
|
'access arguments' => $read_access,
|
|
'access arguments' => $read_access,
|
|
'menu_name' => 'primary-links',
|
|
'menu_name' => 'primary-links',
|
|
);
|
|
);
|
|
- $items['fgcf/format'] = array(
|
|
|
|
|
|
+ $items['fgcf/support'] = array(
|
|
'type' => MENU_CALLBACK,
|
|
'type' => MENU_CALLBACK,
|
|
- 'title' => 'Formations par format',
|
|
|
|
- 'page callback' => 'fgcf_page_format',
|
|
|
|
|
|
+ 'title' => 'Formations par support',
|
|
|
|
+ 'page callback' => 'fgcf_page_support',
|
|
'access arguments' => $read_access,
|
|
'access arguments' => $read_access,
|
|
);
|
|
);
|
|
$items['fgcf/organisme'] = array(
|
|
$items['fgcf/organisme'] = array(
|
|
@@ -65,6 +65,7 @@ function fgcf_menu() {
|
|
'page callback' => 'fgcf_page_odt',
|
|
'page callback' => 'fgcf_page_odt',
|
|
'access arguments' => array('create fgcf_fiche content'),
|
|
'access arguments' => array('create fgcf_fiche content'),
|
|
);
|
|
);
|
|
|
|
+
|
|
return $items;
|
|
return $items;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -134,7 +135,11 @@ function fgcf_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
|
|
if ($a3 /* !teaser */ || !$a4 /* page */) {
|
|
if ($a3 /* !teaser */ || !$a4 /* page */) {
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
- drupal_add_css(drupal_get_path('module', 'fgcf') .'/theme/css/fgcf.css');
|
|
|
|
|
|
+
|
|
|
|
+ // 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');
|
|
|
|
+ }
|
|
|
|
|
|
switch ($node->type) {
|
|
switch ($node->type) {
|
|
case 'fgcf_prestataire':
|
|
case 'fgcf_prestataire':
|
|
@@ -196,7 +201,6 @@ function fgcf_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
|
|
* Page callback : 'Catalogue Formations'.
|
|
* Page callback : 'Catalogue Formations'.
|
|
*/
|
|
*/
|
|
function fgcf_page_home() {
|
|
function fgcf_page_home() {
|
|
- drupal_add_css(drupal_get_path('module', 'fgcf') .'/theme/css/fgcf.css');
|
|
|
|
drupal_set_title('Catalogue des formations France Galop');
|
|
drupal_set_title('Catalogue des formations France Galop');
|
|
|
|
|
|
$filter_form = drupal_get_form('fgcf_filter_form');
|
|
$filter_form = drupal_get_form('fgcf_filter_form');
|
|
@@ -206,18 +210,18 @@ function fgcf_page_home() {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * Page callback : 'Formations par format'.
|
|
|
|
|
|
+ * Page callback : 'Formations par support'.
|
|
*/
|
|
*/
|
|
-function fgcf_page_format($format = 0) {
|
|
|
|
|
|
+function fgcf_page_support($format = 0) {
|
|
$bc = drupal_get_breadcrumb();
|
|
$bc = drupal_get_breadcrumb();
|
|
$bc[] = l(t('Catalogue formations'), 'fgcf');
|
|
$bc[] = l(t('Catalogue formations'), 'fgcf');
|
|
|
|
|
|
$filter_form = drupal_get_form('fgcf_filter_form');
|
|
$filter_form = drupal_get_form('fgcf_filter_form');
|
|
|
|
|
|
$ret = $filter_form;
|
|
$ret = $filter_form;
|
|
- $vid = _fgcf_get_vocabulary_by_name('FGCF Format de cours');
|
|
|
|
|
|
+ $vid = _fgcf_get_vocabulary_by_name('FGCF Supports de cours');
|
|
if (empty($format)) {
|
|
if (empty($format)) {
|
|
- $ret .= views_embed_view('fgcf_formats_de_formations', 'default', $vid);
|
|
|
|
|
|
+ $ret .= views_embed_view('fgcf_supports_de_formations', 'default', $vid);
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
$term = taxonomy_get_term($format);
|
|
$term = taxonomy_get_term($format);
|
|
@@ -225,12 +229,12 @@ function fgcf_page_format($format = 0) {
|
|
$format = 0;
|
|
$format = 0;
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- $bc[] = l(t('Formats de formation'), 'fgcf/format');
|
|
|
|
- drupal_set_title(t('Format : @term', array('@term' => $term->name)));
|
|
|
|
|
|
+ $bc[] = l(t('Supports de formation'), 'fgcf/support');
|
|
|
|
+ drupal_set_title(t('Support: @term', array('@term' => $term->name)));
|
|
$values = _fgcf_filter_form_translate_values();
|
|
$values = _fgcf_filter_form_translate_values();
|
|
}
|
|
}
|
|
|
|
|
|
- $ret .= views_embed_view('fgcf_formations_par_format', 'default', $format, $values['dif'], $values['modalites']);
|
|
|
|
|
|
+ $ret .= views_embed_view('fgcf_formations_par_support', 'default', $format, $values['dif'], $values['modalites']);
|
|
}
|
|
}
|
|
|
|
|
|
drupal_set_breadcrumb($bc);
|
|
drupal_set_breadcrumb($bc);
|