[c2a0e37] | 1 | <?php |
---|
| 2 | |
---|
| 3 | /** |
---|
| 4 | * |
---|
| 5 | * Sistema Automatizado para la Planificación Estratégico-Situacional en la Administración Pública Venezolana |
---|
| 6 | * @file proyectos_operativos_seguimiento.views.inc |
---|
| 7 | * Drupal part Module ente_planificador_hierarchical module |
---|
| 8 | * Copyright 2017 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 - Phd. Juan Vizcarrondo |
---|
| 28 | * @date 2017-05-03 // (año-mes-dia) |
---|
| 29 | * @version 0.2 // (0.1) |
---|
| 30 | * |
---|
| 31 | */ |
---|
| 32 | |
---|
| 33 | |
---|
| 34 | /** |
---|
| 35 | * Implementation of hook_views_data(). |
---|
| 36 | */ |
---|
| 37 | function proyecto_operativo_seguimiento_views_data() { |
---|
| 38 | $data['seguimiento_proyecto']['table']['group'] = t('Seguimiento proyectos operativos'); |
---|
| 39 | |
---|
| 40 | $data['seguimiento_proyecto']['table']['base'] = array( |
---|
| 41 | 'field' => 'id_seg', |
---|
| 42 | 'title' => t('Seguimiento de Proyectos Operativos'), |
---|
| 43 | 'help' => t("Permite consultar el seguimiento de proyectos operativos."), |
---|
| 44 | ); |
---|
| 45 | |
---|
| 46 | // For other base tables, explain how we join |
---|
| 47 | $data['seguimiento_proyecto']['table']['join'] = array( |
---|
| 48 | // Directly links to node table. |
---|
| 49 | 'node' => array( |
---|
| 50 | 'left_field' => 'nid', |
---|
| 51 | 'field' => 'nid', |
---|
| 52 | ), |
---|
| 53 | 'users' => array( |
---|
| 54 | 'left_field' => 'uid', |
---|
| 55 | 'field' => 'uid', |
---|
| 56 | ), |
---|
| 57 | ); |
---|
| 58 | |
---|
| 59 | // id_seg |
---|
| 60 | $data['seguimiento_proyecto']['id_seg'] = array( |
---|
| 61 | 'title' => t('Id_seg'), |
---|
| 62 | 'help' => t('The ID of seguimiento.'), // The help that appears on the UI, |
---|
| 63 | // Information for displaying the nid |
---|
| 64 | 'field' => array( |
---|
| 65 | 'handler' => 'views_handler_field_node', |
---|
| 66 | 'click sortable' => TRUE, |
---|
| 67 | ), |
---|
| 68 | // Information for accepting a nid as an argument |
---|
| 69 | 'argument' => array( |
---|
| 70 | 'handler' => 'views_handler_argument_numeric', |
---|
| 71 | ), |
---|
| 72 | // Information for accepting a nid as a filter |
---|
| 73 | 'filter' => array( |
---|
| 74 | 'handler' => 'views_handler_filter_numeric', |
---|
| 75 | ), |
---|
| 76 | // Information for sorting on a nid. |
---|
| 77 | 'sort' => array( |
---|
| 78 | 'handler' => 'views_handler_sort', |
---|
| 79 | ), |
---|
| 80 | ); |
---|
| 81 | |
---|
| 82 | //nid |
---|
| 83 | $data['seguimiento_proyecto']['nid'] = array( |
---|
| 84 | 'title' => t('Nid del Proyecto.'), |
---|
| 85 | 'help' => t('Nid del Proyecto.'), |
---|
| 86 | 'relationship' => array( |
---|
| 87 | 'base' => 'node', |
---|
| 88 | 'base field' => 'nid', |
---|
| 89 | 'field' => 'nid', |
---|
| 90 | 'handler' => 'views_handler_relationship', |
---|
| 91 | 'label' => t('Nid Proyecto'), |
---|
| 92 | ), |
---|
| 93 | 'field' => array( |
---|
| 94 | 'handler' => 'views_handler_field', |
---|
| 95 | ), |
---|
| 96 | 'sort' => array( |
---|
| 97 | 'handler' => 'views_handler_sort', |
---|
| 98 | ), |
---|
| 99 | ); |
---|
| 100 | |
---|
| 101 | // uid field for seguimiento |
---|
| 102 | $data['seguimiento_proyecto']['uid'] = array( |
---|
| 103 | 'title' => t('User'), |
---|
| 104 | 'help' => t('Relate a seguimiento to the user who created the revision.'), |
---|
| 105 | 'relationship' => array( |
---|
| 106 | 'handler' => 'views_handler_relationship', |
---|
| 107 | 'base' => 'users', |
---|
| 108 | 'field' => 'uid', |
---|
| 109 | 'label' => t('revision user'), |
---|
| 110 | ), |
---|
| 111 | ); |
---|
| 112 | // fecha |
---|
| 113 | $data['seguimiento_proyecto']['fecha'] = array( |
---|
| 114 | 'title' => t('Created date'), // The item it appears as on the UI, |
---|
| 115 | 'help' => t('The date the seguimiento was last created.'), // The help that appears on the UI, |
---|
| 116 | 'field' => array( |
---|
| 117 | 'handler' => 'views_handler_field_date', |
---|
| 118 | 'click sortable' => TRUE, |
---|
| 119 | ), |
---|
| 120 | 'sort' => array( |
---|
| 121 | 'handler' => 'views_handler_sort_date', |
---|
| 122 | ), |
---|
| 123 | 'filter' => array( |
---|
| 124 | 'handler' => 'views_handler_filter_date', |
---|
| 125 | ), |
---|
| 126 | ); |
---|
| 127 | // acumulativo |
---|
| 128 | $data['seguimiento_proyecto']['acumulativo'] = array( |
---|
| 129 | 'title' => t('Unidad Acumulativa'), |
---|
| 130 | 'help' => t('Indica si la unidad de medida es acumulativa.'), |
---|
| 131 | 'field' => array( |
---|
| 132 | 'handler' => 'views_handler_field_boolean', |
---|
| 133 | 'click sortable' => TRUE, |
---|
| 134 | 'output formats' => array( |
---|
| 135 | 'published-notpublished' => array(t('Acumulativa'), t('No acumulativa')), |
---|
| 136 | ), |
---|
| 137 | ), |
---|
| 138 | 'filter' => array( |
---|
| 139 | 'handler' => 'views_handler_filter_boolean_operator', |
---|
| 140 | 'label' => t('Acumulativa'), |
---|
| 141 | 'type' => 'yes-no', |
---|
| 142 | 'use equal' => TRUE, // Use status = 1 instead of status <> 0 in WHERE statment |
---|
| 143 | ), |
---|
| 144 | 'sort' => array( |
---|
| 145 | 'handler' => 'views_handler_sort', |
---|
| 146 | ), |
---|
| 147 | ); |
---|
| 148 | // mes |
---|
| 149 | $data['seguimiento_proyecto']['mes'] = array( |
---|
| 150 | 'title' => t('El mes del Seguimiento'), // The item it appears as on the UI, |
---|
| 151 | 'help' => t('El mes del Seguimiento.'), // The help that appears on the UI, |
---|
| 152 | 'field' => array( |
---|
| 153 | 'handler' => 'views_handler_field_numeric', |
---|
| 154 | 'click sortable' => TRUE, |
---|
| 155 | ), |
---|
| 156 | 'sort' => array( |
---|
| 157 | 'handler' => 'views_handler_sort_date', |
---|
| 158 | ), |
---|
| 159 | 'filter' => array( |
---|
| 160 | 'handler' => 'views_handler_filter_numeric', |
---|
| 161 | ), |
---|
| 162 | ); |
---|
| 163 | // ejecutadometafisica |
---|
| 164 | $data['seguimiento_proyecto']['ejecutadometafisica'] = array( |
---|
| 165 | 'title' => t('Ejecutado meta fisica'), // The item it appears as on the UI, |
---|
| 166 | 'help' => t('Ejecutado meta fisica.'), // The help that appears on the UI, |
---|
| 167 | 'field' => array( |
---|
| 168 | 'handler' => 'views_handler_field_numeric', |
---|
| 169 | 'click sortable' => TRUE, |
---|
| 170 | ), |
---|
| 171 | 'sort' => array( |
---|
| 172 | 'handler' => 'views_handler_sort_date', |
---|
| 173 | ), |
---|
| 174 | 'filter' => array( |
---|
| 175 | 'handler' => 'views_handler_filter_numeric', |
---|
| 176 | ), |
---|
| 177 | ); |
---|
| 178 | //infocomplementaria_metafisica |
---|
| 179 | $data['seguimiento_proyecto']['infocomplementaria_metafisica'] = array( |
---|
| 180 | 'title' => t('Información Meta fisica'), // The item it appears as on the UI, |
---|
| 181 | 'help' => t('El texto ingresado de la meta fisica.'), // The help that appears on the UI, |
---|
| 182 | // Information for displaying a title as a field |
---|
| 183 | 'field' => array( |
---|
| 184 | 'handler' => 'views_handler_field_xss', |
---|
| 185 | ), |
---|
| 186 | 'sort' => array( |
---|
| 187 | 'handler' => 'views_handler_sort', |
---|
| 188 | ), |
---|
| 189 | // Information for accepting a title as a filter |
---|
| 190 | 'filter' => array( |
---|
| 191 | 'handler' => 'views_handler_filter_string', |
---|
| 192 | ), |
---|
| 193 | 'argument' => array( |
---|
| 194 | 'handler' => 'views_handler_argument_string', |
---|
| 195 | ), |
---|
| 196 | ); |
---|
| 197 | //infocomplementaria_metafinanciera |
---|
| 198 | $data['seguimiento_proyecto']['infocomplementaria_metafinanciera'] = array( |
---|
| 199 | 'title' => t('Información Meta Financiera'), // The item it appears as on the UI, |
---|
| 200 | 'help' => t('El texto ingresado de la meta financiera.'), // The help that appears on the UI, |
---|
| 201 | // Information for displaying a title as a field |
---|
| 202 | 'field' => array( |
---|
| 203 | 'handler' => 'views_handler_field_xss', |
---|
| 204 | ), |
---|
| 205 | 'sort' => array( |
---|
| 206 | 'handler' => 'views_handler_sort', |
---|
| 207 | ), |
---|
| 208 | // Information for accepting a title as a filter |
---|
| 209 | 'filter' => array( |
---|
| 210 | 'handler' => 'views_handler_filter_string', |
---|
| 211 | ), |
---|
| 212 | 'argument' => array( |
---|
| 213 | 'handler' => 'views_handler_argument_string', |
---|
| 214 | ), |
---|
| 215 | ); |
---|
| 216 | |
---|
| 217 | return $data; |
---|
| 218 | } |
---|