source: sipes/0.3-modules/ente_planificador_hierarchical/views/ente_planificador_hierarchical.views.inc @ 2fa3319

stableversion-3.0
Last change on this file since 2fa3319 was 303fae2, checked in by José Gregorio Puentes <jpuentes@…>, 9 años ago

se agregaron los modulos

  • Propiedad mode establecida a 100755
File size: 5.7 KB
Línea 
1<?php
2
3  /**
4  *
5  * Sistema Automatizado para la Planificación Estratégico-Situacional en la Administración Pública Venezolana
6  * @file ente_planificador_hierarchical.views.inc
7  * Drupal part Module ente_planificador_hierarchical module
8  * Copyright 2015 Sistema Automatizado para la Planificación Estratégico-Situacional en la Administración Pública Venezolana (CENDITEL)
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
23  *
24  * Probado con un servidor Apache 2.0,
25  * Postgresql version 7.4.7 y 8.1 mysql 5.0.32 y PHP version 4.3.11 y 5.2.0-8
26  *
27  * @author Cenditel Merida - Msc. Juan Vizcarrondo
28  * @date 2015-02-14 // (a&#241;o-mes-dia)
29  * @version 0.2 // (0.1)
30  *
31  */
32
33
34/**
35 * Implementation of hook_views_data().
36 */
37function ente_planificador_hierarchical_views_data() {
38  $data['ente_planificador_hierarchical']['table']['group'] = t('Entes Planificadores');
39  $data['ente_planificador_hierarchical']['table']['join'] = array(
40    'node' => array(
41      'left_field' => 'nid',
42      'field' => 'nid',
43      'type' => 'INNER',
44    ),
45  );
46  $data['node']['ente_planificador_hierarchical_fathers'] = array(
47    'title' => t('Entes Planificadores padres'),
48    'help' => t('Los Entes Planificadores padres del ente.'),
49    'field' => array(
50      'additional fields' => array(
51        'nid' => array(
52          'table' => 'node',
53          'field' => 'nid',
54        ),
55      ),
56      'handler' => 'ente_planificador_hierarchical_handler_field_ente_fathers',
57    ),
58  );
59  $data['node']['ente_planificador_hierarchical_childrens'] = array(
60    'title' => t('Entes Planificadores hijos'),
61    'help' => t('Los Entes Planificadores hijos del ente.'),
62    'field' => array(
63      'additional fields' => array(
64        'nid' => array(
65          'table' => 'node',
66          'field' => 'nid',
67        ),
68      ),
69      'handler' => 'ente_planificador_hierarchical_handler_field_ente_childrens',
70    ),
71  );
72  $data['node']['ente_planificador_hierarchical_links_proyectos'] = array(
73    'title' => t('Proyectos enlaces planificación'),
74    'help' => t('Muestra los enlaces disponibles para un proyecto.'),
75    'field' => array(
76      'additional fields' => array(
77        'nid' => array(
78          'table' => 'node',
79          'field' => 'nid',
80        ),
81      ),
82      'handler' => 'ente_planificador_hierarchical_handler_field_links_proyectos',
83    ),
84  );
85
86
87  $data['ente_planificador_hierarchical']['is_hierarchical_project_member'] = array(
88    'title' => t('Is a proyecto hierarchical member ente.'),
89    'help' => t('Check for the fields provided by hierarchical member.'),
90    'filter' => array(
91      'handler' => 'ente_planificador_hierarchical_handler_filter_hierarchical_member',
92      'label' => t('Is a ente member'),
93    ),
94  );
95  $data['ente_planificador_hierarchical']['is_hierarchical_ac_member'] = array(
96    'title' => t('Is a AC hierarchical member ente.'),
97    'help' => t('Check for the fields provided by hierarchical member.'),
98    'filter' => array(
99      'handler' => 'ente_planificador_hierarchical_handler_filter_hierarchical_member',
100      'label' => t('Is a ente member'),
101    ),
102  );
103/*
104  if (module_exists('workflow')) {
105  // state
106  $data['workflow_node']['sidp'] = array(
107    'title' => t('Current Proyecto state'), // Appears in views UI.
108    'help' => t('The current workflow state that the proyecto is in.'),
109    'field' => array(
110      'name table' => 'workflow_node',
111      'name field' => 'sid',
112      'handler' => 'ente_planificador_hierarchical_proyecto_views_handler_field_sid',
113      'click sortable' => TRUE,
114     ),
115    'argument' => array(
116      'handler' => 'views_handler_argument_numeric',
117      'click sortable' => TRUE,
118      'numeric' => TRUE,
119      'name table' => 'workflow_states',
120      'name field' => 'state',
121    ),
122    'filter' => array(
123      'name table' => 'workflow_node',
124      'name field' => 'sid',
125      'handler' => 'ente_planificador_hierarchical_proyecto_views_handler_filter_sid',
126      'numeric' => TRUE,
127    ),
128  );
129
130
131  }
132*/
133  return $data;
134}
135
136/*
137 * Implementation of hook_views_handlers
138 */
139function ente_planificador_hierarchical_views_handlers() {
140  return array(
141    'info' => array(
142      'path' => drupal_get_path('module', 'ente_planificador_hierarchical') .'/views',
143    ),
144    'handlers' => array(
145      'ente_planificador_hierarchical_handler_field_ente_fathers' => array(
146        'parent' => 'views_handler_field',
147      ),
148      'ente_planificador_hierarchical_handler_field_ente_childrens' => array(
149        'parent' => 'views_handler_field',
150      ),
151      'ente_planificador_hierarchical_handler_field_links_proyectos' => array(
152        'parent' => 'views_handler_field',
153      ),
154      'ente_planificador_hierarchical_handler_filter_hierarchical_member' => array(
155        'parent' => 'views_handler_filter_boolean_operator',
156      ),
157/*
158      // field handlers
159      'ente_planificador_hierarchical_proyecto_views_handler_field_sid' => array(
160        'parent' => 'views_handler_field_node',
161      ),
162      // filter handlers
163      'ente_planificador_hierarchical_proyecto_views_handler_filter_sid' => array(
164        'parent' => 'views_handler_filter_in_operator',
165      ),
166*/
167    ),
168  );
169}
Nota: Vea TracBrowser para ayuda de uso del navegador del repositorio.