fgcf_formations_par_organisme.php 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. <?php
  2. // $Id$
  3. /**
  4. * @file
  5. * Liste des formations proposée par un organisme passé en argument.
  6. */
  7. $view = new view;
  8. $view->name = 'fgcf_formations_par_organisme';
  9. $view->description = 'FG Liste des formations assurées par un organisme';
  10. $view->tag = 'FGCF';
  11. $view->view_php = '';
  12. $view->base_table = 'node';
  13. $view->is_cacheable = FALSE;
  14. $view->api_version = 2;
  15. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  16. $handler = $view->new_display('default', 'Defaults', 'default');
  17. $handler->override_option('relationships', array(
  18. 'parent' => array(
  19. 'id' => 'parent',
  20. 'table' => 'term_hierarchy',
  21. 'field' => 'parent',
  22. 'required' => 0,
  23. ),
  24. ));
  25. $handler->override_option('fields', array(
  26. 'tid' => array(
  27. 'id' => 'tid',
  28. 'table' => 'term_data',
  29. 'field' => 'tid',
  30. 'relationship' => 'parent',
  31. 'label' => 'ParentTid',
  32. 'exclude' => TRUE,
  33. 'alter' => array(
  34. 'alter_text' => 0,
  35. 'make_link' => 0,
  36. 'trim' => 0,
  37. 'word_boundary' => 1,
  38. 'ellipsis' => 1,
  39. 'strip_tags' => 0,
  40. 'html' => 0,
  41. ),
  42. 'hide_empty' => 0,
  43. 'empty_zero' => 0,
  44. ),
  45. 'name' => array(
  46. 'id' => 'name',
  47. 'table' => 'term_data',
  48. 'field' => 'name',
  49. 'relationship' => 'parent',
  50. 'exclude' => TRUE,
  51. 'alter' => array(
  52. 'alter_text' => 0,
  53. 'make_link' => 1,
  54. 'path' => 'fgcf/theme/[tid]',
  55. 'trim' => 0,
  56. 'word_boundary' => 1,
  57. 'ellipsis' => 1,
  58. 'strip_tags' => 0,
  59. 'html' => 0,
  60. ),
  61. 'hide_empty' => 0,
  62. 'empty_zero' => 0,
  63. 'link_to_taxonomy' => 0,
  64. ),
  65. 'tid_1' => array(
  66. 'id' => 'tid_1',
  67. 'table' => 'term_data',
  68. 'field' => 'tid',
  69. 'exclude' => TRUE,
  70. 'alter' => array(
  71. 'alter_text' => 0,
  72. 'text' => '[description] / [tid_1]',
  73. 'make_link' => 0,
  74. 'trim' => 0,
  75. 'word_boundary' => 1,
  76. 'ellipsis' => 1,
  77. 'strip_tags' => 0,
  78. 'html' => 0,
  79. ),
  80. 'hide_empty' => 0,
  81. 'empty_zero' => 0,
  82. ),
  83. 'description_1' => array(
  84. 'id' => 'description_1',
  85. 'table' => 'term_data',
  86. 'field' => 'description',
  87. 'exclude' => TRUE,
  88. 'alter' => array(
  89. 'alter_text' => 0,
  90. 'text' => '[description] / <a href="/fgcf/theme/[tid_1]">[description_1]</a>',
  91. 'make_link' => 1,
  92. 'path' => 'fgcf/theme/[tid_1]',
  93. 'trim' => 0,
  94. 'word_boundary' => 1,
  95. 'ellipsis' => 1,
  96. 'strip_tags' => 1,
  97. 'html' => 0,
  98. ),
  99. 'hide_empty' => 0,
  100. 'empty_zero' => 0,
  101. ),
  102. 'nothing' => array(
  103. 'id' => 'nothing',
  104. 'table' => 'views',
  105. 'field' => 'nothing',
  106. 'label' => 'Thème',
  107. 'alter' => array(
  108. 'text' => '[name] / [description_1]',
  109. 'make_link' => 0,
  110. 'trim' => 0,
  111. 'word_boundary' => 1,
  112. 'ellipsis' => 1,
  113. 'strip_tags' => 0,
  114. 'html' => 0,
  115. ),
  116. 'hide_empty' => 0,
  117. 'empty_zero' => 0,
  118. ),
  119. 'title' => array(
  120. 'id' => 'title',
  121. 'table' => 'node',
  122. 'field' => 'title',
  123. 'label' => 'Titre',
  124. 'alter' => array(
  125. 'alter_text' => 0,
  126. 'make_link' => 0,
  127. 'trim' => 0,
  128. 'word_boundary' => 1,
  129. 'ellipsis' => 1,
  130. 'strip_tags' => 0,
  131. 'html' => 0,
  132. ),
  133. 'hide_empty' => 0,
  134. 'empty_zero' => 0,
  135. 'link_to_node' => 1,
  136. ),
  137. ));
  138. $handler->override_option('sorts', array(
  139. 'name' => array(
  140. 'id' => 'name',
  141. 'table' => 'term_data',
  142. 'field' => 'name',
  143. 'relationship' => 'parent',
  144. ),
  145. 'name_1' => array(
  146. 'id' => 'name_1',
  147. 'table' => 'term_data',
  148. 'field' => 'name',
  149. ),
  150. 'title' => array(
  151. 'id' => 'title',
  152. 'table' => 'node',
  153. 'field' => 'title',
  154. ),
  155. ));
  156. $handler->override_option('arguments', array(
  157. 'field_fgcf_fiche_organisme_nid' => array(
  158. 'default_action' => 'default',
  159. 'style_plugin' => 'default_summary',
  160. 'style_options' => array(),
  161. 'wildcard' => 'all',
  162. 'wildcard_substitution' => 'All',
  163. 'title' => '',
  164. 'breadcrumb' => '',
  165. 'default_argument_type' => 'node',
  166. 'default_argument' => '',
  167. 'validate_type' => 'node',
  168. 'validate_fail' => 'empty',
  169. 'break_phrase' => 0,
  170. 'not' => 0,
  171. 'id' => 'field_fgcf_fiche_organisme_nid',
  172. 'table' => 'node_data_field_fgcf_fiche_organisme',
  173. 'field' => 'field_fgcf_fiche_organisme_nid',
  174. 'validate_options' => array(
  175. 'types' => array(
  176. 'fgcf_prestataire' => 'fgcf_prestataire',
  177. ),
  178. 'access' => 1,
  179. ),
  180. 'validate_user_argument_type' => 'uid',
  181. 'validate_user_roles' => array(
  182. '2' => 0,
  183. ),
  184. 'relationship' => 'none',
  185. 'default_options_div_prefix' => '',
  186. 'default_argument_fixed' => '',
  187. 'default_argument_user' => 0,
  188. 'default_argument_php' => '',
  189. 'validate_argument_node_type' => array(
  190. 'fgcf_prestataire' => 'fgcf_prestataire',
  191. 'fgcf_fiche' => 0,
  192. 'fgcf_thematique' => 0,
  193. 'page' => 0,
  194. 'story' => 0,
  195. ),
  196. 'validate_argument_node_access' => 0,
  197. 'validate_argument_nid_type' => 'nid',
  198. 'validate_argument_vocabulary' => array(
  199. '2' => 0,
  200. '5' => 0,
  201. '4' => 0,
  202. '3' => 0,
  203. '1' => 0,
  204. ),
  205. 'validate_argument_type' => 'tid',
  206. 'validate_argument_transform' => 0,
  207. 'validate_user_restrict_roles' => 0,
  208. 'validate_argument_php' => '',
  209. ),
  210. ));
  211. $handler->override_option('filters', array(
  212. 'status_extra' => array(
  213. 'id' => 'status_extra',
  214. 'table' => 'node',
  215. 'field' => 'status_extra',
  216. ),
  217. 'type' => array(
  218. 'id' => 'type',
  219. 'table' => 'node',
  220. 'field' => 'type',
  221. 'value' => array(
  222. 'fgcf_fiche' => 'fgcf_fiche',
  223. ),
  224. ),
  225. ));
  226. $handler->override_option('access', array(
  227. 'type' => 'none',
  228. ));
  229. $handler->override_option('cache', array(
  230. 'type' => 'none',
  231. ));
  232. $handler->override_option('title', 'Formations proposées');
  233. $handler->override_option('empty_format', '1');
  234. $handler->override_option('items_per_page', 0);
  235. $handler->override_option('style_plugin', 'table');
  236. $handler->override_option('style_options', array(
  237. 'columns' => array(
  238. 'title' => 'title',
  239. 'tid' => 'tid',
  240. 'description' => 'description',
  241. ),
  242. 'default' => '-1',
  243. 'info' => array(
  244. 'title' => array(
  245. 'sortable' => 0,
  246. 'align' => '',
  247. 'separator' => '',
  248. ),
  249. 'tid' => array(
  250. 'sortable' => 0,
  251. 'align' => '',
  252. 'separator' => '',
  253. ),
  254. 'description' => array(
  255. 'align' => '',
  256. 'separator' => '',
  257. ),
  258. ),
  259. 'override' => 1,
  260. 'sticky' => 0,
  261. ));
  262. $handler = $view->new_display('node_content', 'Node content', 'node_content_1');
  263. $handler->override_option('types', array(
  264. 'fgcf_prestataire' => 'fgcf_prestataire',
  265. ));
  266. $handler->override_option('modes', array(
  267. '0' => 'full',
  268. ));
  269. $handler->override_option('argument_mode', 'nid');
  270. $handler->override_option('default_argument', '');
  271. $handler->override_option('show_title', 0);