|
@@ -225,9 +225,12 @@ function fgcf_page_home() {
|
|
|
|
|
|
$links = array(
|
|
|
l(t('Formations par organisme'), 'fgcf/organisme'),
|
|
|
- l(t('Formations par support'), 'fgcf/support'),
|
|
|
+ // Désactivé pa #647
|
|
|
+ // l(t('Formations par support'), 'fgcf/support'),
|
|
|
);
|
|
|
- $ret = theme('fgcf_home', $links, fgcf_page_thematique());
|
|
|
+ $links = theme('item_list', $links, NULL, 'ul', array('class' => 'fgcf-home-links'));
|
|
|
+
|
|
|
+ $ret = theme('fgcf_home', $links, fgcf_page_thematique(0, $links));
|
|
|
return $ret;
|
|
|
}
|
|
|
|
|
@@ -273,19 +276,19 @@ function fgcf_page_organisme() {
|
|
|
|
|
|
$filter_form = drupal_get_form('fgcf_filter_form');
|
|
|
|
|
|
- $ret = views_embed_view('fgcf_organismes_de_formation');
|
|
|
-
|
|
|
+ $ret = $filter_form;
|
|
|
+ $ret .= views_embed_view('fgcf_organismes_de_formation');
|
|
|
return $ret;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* Page callback : 'Formations par thematique'.
|
|
|
*/
|
|
|
-function fgcf_page_thematique($thematique = 0) {
|
|
|
+function fgcf_page_thematique($thematique = 0, $filter_post = NULL) {
|
|
|
$bc = drupal_get_breadcrumb();
|
|
|
$bc[] = l(t('Catalogue formations'), 'fgcf');
|
|
|
|
|
|
- $filter_form = drupal_get_form('fgcf_filter_form');
|
|
|
+ $filter_form = drupal_get_form('fgcf_filter_form', $filter_post);
|
|
|
|
|
|
$ret = $filter_form;
|
|
|
|
|
@@ -442,7 +445,7 @@ function fgcf_mail($key, &$message, $params) {
|
|
|
*
|
|
|
* @return array
|
|
|
*/
|
|
|
-function fgcf_filter_form($form_state) {
|
|
|
+function fgcf_filter_form($form_state, $post = NULL) {
|
|
|
|
|
|
$form['filtre'] = array(
|
|
|
'#title' => t('Filtrer les formations'),
|
|
@@ -468,7 +471,7 @@ function fgcf_filter_form($form_state) {
|
|
|
? $_SESSION['fgcf']['modalite']
|
|
|
: array();
|
|
|
$form['filtre']['modalite'] = array(
|
|
|
- '#title' => t('Modalité de formation'),
|
|
|
+ '#title' => t('Modalité<br />de formation'),
|
|
|
'#type' => 'checkboxes',
|
|
|
'#options' => array(
|
|
|
'1' => t('Intra-entreprise'),
|
|
@@ -484,6 +487,17 @@ function fgcf_filter_form($form_state) {
|
|
|
'#value' => t('Appliquer le filtre'),
|
|
|
);
|
|
|
|
|
|
+ if (!is_null($post)) {
|
|
|
+ $form['post'] = array(
|
|
|
+ '#type' => 'markup',
|
|
|
+ '#value' => $post,
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ $form = array(
|
|
|
+ '#type' => 'fieldset',
|
|
|
+ $form,
|
|
|
+ );
|
|
|
return $form;
|
|
|
}
|
|
|
|