source: sipes/0.3-modules/proyectos_operativos_mcti/includes/views/proyectos_operativos_mcti.views.inc @ 303fae2

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

se agregaron los modulos

  • Propiedad mode establecida a 100755
File size: 6.3 KB
Línea 
1<?php
2  /**
3  *
4  * Sistema Automatizado para la Planificación Estratégico-Situacional en la Administración Pública Venezolana
5  * @file proyectos_operativos_mcti.views.inc
6  * Drupal part Module to install ente planificador module
7  * Copyright 2011 Sistema Automatizado para la Planificación Estratégico-Situacional en la Administración Pública Venezolana (CENDITEL)
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
22  *
23  * Probado con un servidor Apache 2.0,
24  * Postgresql version 7.4.7 y 8.1 mysql 5.0.32 y PHP version 4.3.11 y 5.2.0-8
25  *
26  * @author Cenditel Merida - Ing. Jose Puentes
27  * @date 2014-11-19 // (a&#241;o-mes-dia)
28  * @version 0.2 // (0.1)
29  *
30  */
31 
32/**
33 * Implementation of hook_views_data_alter()
34 */
35 function proyectos_operativos_mcti_views_data_alter(&$data) {
36   //campos disponibles para el tipo de vista node
37   $data['proyectos_operativos']['table']['group']  = t('Proyectos Operativos');
38   $data['proyectos_operativos']['table']['join'] = array(
39     'node' => array(
40      'left_field' => 'nid',
41      'field' => 'nid',
42      'type' => 'INNER',
43     ),
44   );
45   $data['proyectos_operativos']['year'] = array(
46     'title' => t('Año'),
47     'help' => t('Año de Ejecución del proyecto.'),
48     'field' => array(
49       'handler' => 'handler_field_proyecto_year',
50       'click sortable' => TRUE,
51     ),
52     'sort' => array(
53       'handler' => 'views_handler_sort',
54     ),     
55     'filter' => array(
56       'handler' => 'views_handler_filter_proyecto_year',
57     ),
58     'argument' => array(
59       'handler' => 'views_handler_argument_string',
60     ),
61   );
62   $data['proyectos_operativos_asignados']['table']['group']  = t('Proyectos Operativos');
63   $data['proyectos_operativos_asignados']['table']['join'] = array(
64     'node' => array(
65      'left_field' => 'nid',
66      'field' => 'nid_node',
67      'type' => 'INNER',
68     ),
69   );
70   $data['proyectos_operativos_asignados']['uid_users'] = array(
71     'title' => t('Proyecto asignado'),
72     'help' => t('Si el proyecto a sido asignado.'),
73     'field' => array(
74       'handler' => 'views_handler_filter_proyecto_asignado',
75       'click sortable' => TRUE,
76     ),
77     'sort' => array(
78       'handler' => 'views_handler_sort',
79     ),     
80     'filter' => array(
81       'handler' => 'views_handler_filter_proyecto_asignado',
82     ),
83     'argument' => array(
84       'handler' => 'views_handler_argument_string',
85     ),
86   );
87   //campos disponibles para el tipo de vista node
88   $data['ente_planificador']['table']['group']  = t('Entes Planificadores');
89   $data['ente_planificador']['table']['join'] = array(
90     'node' => array(
91      'left_field' => 'nid',
92      'field' => 'nid',
93      'type' => 'INNER',
94     ),
95   );
96   $data['ente_planificador']['ente_adscrito'] = array(
97     'title' => t('Ente Adscrito'),
98     'help' => t('Lista de los Entes Adscrito.'),
99     'field' => array(
100       'field' => 'nid',
101       'handler' => 'handler_field_ente_adscrito',
102       'click sortable' => TRUE,
103     ),
104     'sort' => array(
105       'handler' => 'views_handler_sort',
106     ),     
107     'filter' => array(
108       'handler' => 'views_handler_filter_ente_adscrito',
109     ),
110     'argument' => array(
111       'handler' => 'views_handler_argument_string',
112     ),
113   );
114  $data['ente_planificador']['sub_ente_adscrito'] = array(
115     'title' => t('Cuarto Nivel'),
116     'help' => t('Lista de los Entes Adscritos al cuarto nivel de Planificación.'),   
117     'filter' => array(
118       'handler' => 'views_handler_filter_sub_ente_adscrito',
119     ),
120     'argument' => array(
121       'handler' => 'views_handler_argument_string',
122     ),
123   );
124  $data['ente_planificador']['sub_sub_ente_adscrito'] = array(
125     'title' => t('Quinto Nivel'),
126     'help' => t('Lista de los Entes Adscritos al Quinto nivel de Planificación.'),   
127     'filter' => array(
128       'handler' => 'views_handler_filter_sub_sub_ente_adscrito',
129     ),
130     'argument' => array(
131       'handler' => 'views_handler_argument_string',
132     ),
133   );
134 }
135
136/**
137 * Implementation of hook_views_handlers().
138 */
139 function proyectos_operativos_mcti_views_handlers() {
140   return array(
141     'info' => array(
142       'path' => drupal_get_path('module', 'proyectos_operativos_mcti') . '/includes/views',
143     ),
144     'handlers' => array(
145       //proyectos
146       'views_handler_filter_proyecto_year' => array(
147         'parent' => 'views_handler_filter_many_to_one',
148       ),
149       'handler_field_proyecto_year' => array(
150         'parent' => 'views_handler_field',
151       ),
152       'views_handler_filter_proyecto_asignado' => array(
153         'parent' => 'views_handler_filter_many_to_one',
154       ),
155       //ente planificador
156       'views_handler_filter_ente_adscrito' => array(
157         'parent' => 'views_handler_filter_many_to_one',
158       ),
159       'views_handler_filter_sub_ente_adscrito' => array(
160         'parent' => 'views_handler_filter_many_to_one',
161       ),
162       'views_handler_filter_sub_sub_ente_adscrito' => array(
163         'parent' => 'views_handler_filter_many_to_one',
164       ),
165       'handler_field_ente_adscrito' => array(
166         'parent' => 'views_handler_field',
167       ),
168     ),
169   );
170 }
171
172/**
173 * Implementation of hook_views_plugins
174 */
175 function proyectos_operativos_mcti_views_plugins() {
176   return array(
177     'module' => 'views', // This just tells our themes are elsewhere.
178     'argument default' => array(
179       'mis_proyectos' => array(
180         'title' => t("Nid del proyecto que posee el usuario actual para su revision"),
181         'handler' => 'views_plugin_argument_default_mis_proyectos',
182         'path' => drupal_get_path('module', 'proyectos_operativos_mcti') . '/includes/views',
183         'parent' => 'fixed',
184       ),
185     ),
186   );
187 }
Nota: Vea TracBrowser para ayuda de uso del navegador del repositorio.