1 | <?php |
---|
2 | /** |
---|
3 | * Sistema Automatizado para la Planificación Estratégico-Situacional en la Administración Pública Venezolana |
---|
4 | * @file proyectos_operativos_opcseg.module |
---|
5 | * Drupal part Module to code proyectos operativos module |
---|
6 | * Copyright 2012 Sistema Automatizado para la Planificación Estratégico-Situacional en la Administración Pública Venezolana (CENDITEL) |
---|
7 | * |
---|
8 | * This program is free software; you can redistribute it and/or modify |
---|
9 | * it under the terms of the GNU General Public License as published by |
---|
10 | * the Free Software Foundation; either version 2 of the License, or |
---|
11 | * (at your option) any later version. |
---|
12 | * |
---|
13 | * This program is distributed in the hope that it will be useful, |
---|
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
16 | * GNU General Public License for more details. |
---|
17 | * |
---|
18 | * You should have received a copy of the GNU General Public License |
---|
19 | * along with this program; if not, write to the Free Software |
---|
20 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
---|
21 | * |
---|
22 | * @author CENDITEL Merida - Ing. Diego Uzcategui |
---|
23 | * @date 2013-04-24 // (anno-mes-dia) |
---|
24 | * @modificado CENDITEL Merida - Juan Vizcarrondo |
---|
25 | * @date 2013-06-06 // (anno-mes-dia) |
---|
26 | * @author CENDITEL Merida - Ing. Diego Uzcategui |
---|
27 | * @date 2013-06-18 // (anno-mes-dia) |
---|
28 | * @author CENDITEL Merida - Ing. José Gregorio Puentes |
---|
29 | * @date 2015-03-12 // (anno-mes-dia) |
---|
30 | * @version 0.1 |
---|
31 | * |
---|
32 | */ |
---|
33 | |
---|
34 | /* |
---|
35 | * Implementation of hook_user |
---|
36 | */ |
---|
37 | function principal_inicio_sipp_user($op, &$edit, &$user, $category = NULL) { |
---|
38 | switch ($op) { |
---|
39 | case 'login': |
---|
40 | $_REQUEST['destination'] = 'principal'; |
---|
41 | if (isset($edit['nuevo_password']) && $edit['nuevo_password']) { |
---|
42 | $_SESSION['nuevo_password'] = TRUE; |
---|
43 | } |
---|
44 | break; |
---|
45 | |
---|
46 | } |
---|
47 | } |
---|
48 | |
---|
49 | /* |
---|
50 | * Implementation of hook_menu() |
---|
51 | */ |
---|
52 | function principal_inicio_sipp_menu() { |
---|
53 | $items = array(); |
---|
54 | |
---|
55 | $items['principal'] = array( |
---|
56 | 'title' => t('Menu Principal SIPP'), |
---|
57 | 'page callback' => 'menu_principal_inicio_page', |
---|
58 | 'access arguments' => array('ver planificador'), |
---|
59 | 'type' => MENU_CALLBACK, |
---|
60 | ); |
---|
61 | |
---|
62 | $items['opc_config_y_admin'] = array( |
---|
63 | 'title' => t('Configuraciones y Administración'), |
---|
64 | 'page callback' => 'menu_principal_configuraciones_y_administracion_page', |
---|
65 | 'access arguments' => array('admin planificador'), |
---|
66 | 'type' => MENU_CALLBACK, |
---|
67 | ); |
---|
68 | |
---|
69 | $items['documentacion_adicional'] = array( |
---|
70 | 'title' => t('Documentación Adicional'), |
---|
71 | 'page callback' => 'menu_principal_documentacion_page', |
---|
72 | 'access callback' => true, |
---|
73 | 'type' => MENU_CALLBACK, |
---|
74 | ); |
---|
75 | |
---|
76 | $items['inicio'] = array( |
---|
77 | //'title' => t('Sistema Integral de Planificación y Presupuesto (SIPP)'), |
---|
78 | 'page callback' => 'pagina_inicio_page', |
---|
79 | 'access callback' => true, |
---|
80 | 'type' => MENU_CALLBACK, |
---|
81 | ); |
---|
82 | |
---|
83 | return $items; |
---|
84 | } // function proyectos_operativos_opcseg_menu |
---|
85 | |
---|
86 | function _calcular_cantidad_de_notificaciones_sin_leer() { |
---|
87 | |
---|
88 | global $user; |
---|
89 | $cant_mensajes_usuario = 0; |
---|
90 | |
---|
91 | if (module_exists('gestion_mensajes')) { |
---|
92 | if($user->uid > 1){//para un usuario |
---|
93 | $consulta_sql0 = "SELECT count(id_bandeja_msj) as total from {bandejaentrada_usuario} as bandeja, {bandejaentrada_usuario_mensajes} as mensaje where bandeja.id_msj=mensaje.id_msj and bandeja.buid=%d and bandeja.visto_por_destinatario=0 ";//consulta mensajes |
---|
94 | $Resultado_consulta0 = db_query ($consulta_sql0, $user->uid); |
---|
95 | $mensajes_usuario = db_fetch_array ( $Resultado_consulta0 ); |
---|
96 | $cant_mensajes_usuario = $mensajes_usuario['total']; |
---|
97 | |
---|
98 | }elseif($user->uid == 1){//usuario administrador (todos los mensajes) |
---|
99 | $consulta_sql0 = "SELECT count(id_msj) as total from {bandejaentrada_usuario_mensajes} as mensaje where mensaje.visto_por_admin=0 ";//consulta mensajes |
---|
100 | $Resultado_consulta0 = db_query ($consulta_sql0, $user->uid); |
---|
101 | $mensajes_usuario = db_fetch_array ( $Resultado_consulta0 ); |
---|
102 | $cant_mensajes_usuario = $mensajes_usuario['total']; |
---|
103 | } |
---|
104 | } |
---|
105 | |
---|
106 | return $cant_mensajes_usuario; |
---|
107 | } |
---|
108 | |
---|
109 | |
---|
110 | function menu_principal_inicio_page() { |
---|
111 | global $user; |
---|
112 | drupal_set_title(t('Sistema Automatizado para la Planificación Estratégico-Situacional en la Administración Pública Venezolana')); |
---|
113 | $page_content = ''; |
---|
114 | $page_content .= '<br><br>'; |
---|
115 | |
---|
116 | //ente del usuario |
---|
117 | $ente = usuario_tiene_ente($user->uid); |
---|
118 | unset($user->roles[2]); |
---|
119 | $ente = ente_planificador_leer($ente->nid); |
---|
120 | $level = ''; |
---|
121 | if ($ente->nid) { |
---|
122 | if ($ente->tipo == 1) { |
---|
123 | $level = 'Primer'; |
---|
124 | } |
---|
125 | else if($ente->tipo == 2) { |
---|
126 | $level = 'Segundo'; |
---|
127 | } |
---|
128 | else if($ente->tipo == 3) { |
---|
129 | $level = 'Tercer'; |
---|
130 | } |
---|
131 | else if($ente->tipo == 4) { |
---|
132 | $level = 'Cuarto'; |
---|
133 | } |
---|
134 | $page_content .= '<div>'; |
---|
135 | $page_content .= 'Ãrgano del ' . $level . ' Nivel de Planificación : <span style="font-size: 16px; font-weight: bold">' . $ente->title . '</span>'; |
---|
136 | $page_content .= '<div>Rol: ' . implode(',', $user->roles) . '</div>'; |
---|
137 | $page_content .= '</div>'; |
---|
138 | } |
---|
139 | |
---|
140 | //SIPES |
---|
141 | $situacion_actual_preliminar = module_exists('situacion_actual_preliminar'); |
---|
142 | $politicas_direccionales = module_exists('politicas_direccionales'); |
---|
143 | if ($situacion_actual_preliminar || $politicas_direccionales) { |
---|
144 | $ente = usuario_tiene_ente($user->uid); |
---|
145 | if ($ente->nid) { |
---|
146 | $ente_macro = $ente->nid; |
---|
147 | } |
---|
148 | else { |
---|
149 | $ente_macro = ente_planificador_ente_macro(); |
---|
150 | } |
---|
151 | if ($ente_macro) { |
---|
152 | $handler_icon = variable_get('entes_planificadores_toolbar_handler_icons_admin', 'entes_planificadores_normal'); |
---|
153 | $page_content .= '<h4>' . t('Planificación Estratégica') . ':</h4>'; |
---|
154 | $page_content .= '<h1><table align=\"center\" border=\"0\"><tr>'; |
---|
155 | if ($situacion_actual_preliminar) { |
---|
156 | $icon_path = entes_planificadores_toolbar_get_icon_path('planner', 'versionpreliminary', $handler_icon); |
---|
157 | $image_tag = theme('image', $icon_path, t("Muestra la versión preliminar de la explicación situacional del actor planificador"), t("Muestra la versión preliminar de la explicación situacional del actor planificador"), array('class' => 'handler-icon-' . $handler_icon)).'<br>'.'<b>'.t('Explicación Situacional').'</b>'; |
---|
158 | $page_content .= "<td width=\"50%\" align=\"center\">" . l($image_tag, 'planificacion/' . $ente_macro . '/explicacion', array('html'=>TRUE))."</td>"; |
---|
159 | } |
---|
160 | //politicas direccionales |
---|
161 | if ($politicas_direccionales) { |
---|
162 | $icon_path = entes_planificadores_toolbar_get_icon_path('planner', 'directionalpotential', $handler_icon); |
---|
163 | $image_tag = theme('image', $icon_path, t("Muestra las polÃticas direccionales del actor planificador"), t("Muestra las polÃticas direccionales del actor planificador"), array('class' => 'handler-icon-' . $handler_icon)).'<br>'.'<b>'.t('PolÃticas Direccionales').'</b>'; |
---|
164 | $page_content .= "<td width=\"50%\" align=\"center\">".l($image_tag, 'planificacion/' . $ente_macro . '/politicas', array('html'=>TRUE))."</td>"; |
---|
165 | } |
---|
166 | $page_content .= '</tr></table></h1>'; |
---|
167 | $page_content .= '<br><br>'; |
---|
168 | } |
---|
169 | } |
---|
170 | |
---|
171 | //*********************************************************************************************** |
---|
172 | //SIPP |
---|
173 | $path_modulo_menu_principal = drupal_get_path('module', 'principal_inicio_sipp'); |
---|
174 | $page_content .= '<h4>' . t('Planificación Operativa') . ':</h4>'; |
---|
175 | $page_content .= '<h1><table align=\"center\" border=\"0\"><tr>'; |
---|
176 | |
---|
177 | $image_tag = theme_image($path_modulo_menu_principal.'/img/proyectosoperativos.png').'<br>'.'<b>'.t('Proyectos Operativos').'</b>'; |
---|
178 | $page_content .= "<td width=\"50%\" align=\"center\">".l($image_tag, 'proyectos_operativos', array('html'=>TRUE))."</td>"; |
---|
179 | $image_tag = theme_image($path_modulo_menu_principal.'/img/accionescentralizadas.png').'<br>'.'<b>'.t('Acciones Centralizadas').'</b>'; |
---|
180 | $page_content .= "<td width=\"50%\" align=\"center\">".l($image_tag, 'acciones_centralizadas', array('html'=>TRUE))."</td>"; |
---|
181 | |
---|
182 | $page_content .= '</tr></table></h1>'; |
---|
183 | $page_content .= '<br><br>'; |
---|
184 | |
---|
185 | //*********************************************************************************************** |
---|
186 | //calcular cantidad notificaciones nuevas |
---|
187 | |
---|
188 | if (module_exists('gestion_mensajes')) { |
---|
189 | |
---|
190 | $cant_mensajes_usuario = _calcular_cantidad_de_notificaciones_sin_leer(); |
---|
191 | |
---|
192 | if($user->uid > 0){ |
---|
193 | if($cant_mensajes_usuario == 0){ |
---|
194 | $nombre_enlace_notifi = t('Ver Notificaciones'); |
---|
195 | }elseif($cant_mensajes_usuario == 1){ |
---|
196 | $nombre_enlace_notifi = t('Ver Notificaciones').' ('.$cant_mensajes_usuario.' nueva)'; |
---|
197 | }else{ |
---|
198 | $nombre_enlace_notifi = t('Ver Notificaciones').' ('.$cant_mensajes_usuario.' nuevas)'; |
---|
199 | } |
---|
200 | |
---|
201 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/ver_notificaciones.png').'<br>'.'<b>'.$nombre_enlace_notifi.'</b>'; |
---|
202 | $contenido_celda_notificaciones = l($image_tag, 'ver_lista_de_mensajes_recibidos/'.$user->uid, array('html'=>TRUE)); |
---|
203 | |
---|
204 | }else{ |
---|
205 | $contenido_celda_notificaciones = " . "; |
---|
206 | } |
---|
207 | }else{ |
---|
208 | $contenido_celda_notificaciones = ''; |
---|
209 | } |
---|
210 | |
---|
211 | //otras opciones disponibles (usuario) |
---|
212 | $page_content .= '<h4>Otras opciones disponibles:</h4>'; |
---|
213 | $page_content .= '<table align=\"center\" border=\"0\">'; |
---|
214 | // $page_content .= '<tr>'; |
---|
215 | /* |
---|
216 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/date.png').'<br>'.'<b>'.t('Consultar fechas de procesos de planificación').'</b>'; |
---|
217 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'fechas_planificacion/notificacion/ambito', array('html'=>TRUE))."</td>"; |
---|
218 | */ |
---|
219 | /* if (module_exists('proyectos_operativos_mcti')) { |
---|
220 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/proyectosop.png').'<br>'.'<b>'.t('Mis Entes asignados').'</b>'; |
---|
221 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'proyectos_operativos/lista/mis_entes', array('html'=>TRUE))."</td>"; |
---|
222 | }*/ |
---|
223 | |
---|
224 | // $page_content .= "<td width=\"25%\" align=\"center\">".$contenido_celda_notificaciones."</td>"; |
---|
225 | |
---|
226 | // $page_content .= "<td width=\"25%\" align=\"center\">"."<br></td>"; |
---|
227 | // $page_content .= "<td width=\"25%\" align=\"center\">"."<br></td>"; |
---|
228 | // $page_content .= '</tr>'; |
---|
229 | |
---|
230 | $page_content .= '<tr>'; |
---|
231 | |
---|
232 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/user.png').'<br>'.'<b>'.t('Ver la información de mi usuario').'</b>'; |
---|
233 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'user/'.$user->uid, array('html'=>TRUE))."</td>"; |
---|
234 | |
---|
235 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/userpassword.png').'<br>'.'<b>'.t('Cambiar contraseña').'</b>'; |
---|
236 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'user/'.$user->uid.'/chgpwd', array('html'=>TRUE))."</td>"; |
---|
237 | |
---|
238 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/useredit.png').'<br>'.'<b>'.t('Editar datos de usuario').'</b>'; |
---|
239 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'user/'.$user->uid.'/edit', array('html'=>TRUE))."</td>"; |
---|
240 | |
---|
241 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/userlogout.png').'<br>'.'<b>'.t('Salir del sistema').'</b>'; |
---|
242 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'logout', array('html'=>TRUE))."</td>"; |
---|
243 | |
---|
244 | $page_content .= '</tr>'; |
---|
245 | |
---|
246 | $page_content .= '</table>'; |
---|
247 | $page_content .= '<br><br>'; |
---|
248 | |
---|
249 | if (user_access('admin planificador')) { |
---|
250 | |
---|
251 | $page_content .= menu_principal_configuraciones_y_administracion_page(); |
---|
252 | /* |
---|
253 | if (module_exists('reportes_sipp')) { |
---|
254 | $page_content .= reporte_sipp_page(); |
---|
255 | }*/ |
---|
256 | } |
---|
257 | |
---|
258 | $page_content .= menu_principal_documentacion_page(); |
---|
259 | |
---|
260 | return $page_content; |
---|
261 | } // function menu_principal_page |
---|
262 | |
---|
263 | function menu_principal_configuraciones_y_administracion_page() { |
---|
264 | |
---|
265 | $path_modulo_menu_principal = drupal_get_path('module', 'principal_inicio_sipp'); |
---|
266 | |
---|
267 | $page_content = ''; |
---|
268 | |
---|
269 | //administración |
---|
270 | $page_content .= '<h4>Configuraciones y Administración:</h4>'; |
---|
271 | $page_content .= '<table align=\"center\" border=\"0\">'; |
---|
272 | $page_content .= '<tr>'; |
---|
273 | |
---|
274 | //modulo ente_planificador_sector modificar las fechas de los procesos de planificacion |
---|
275 | if (module_exists('ente_planificador_importar')) { |
---|
276 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/configurar_actividades.png').'<br>'.'<b>'.t('Modificar estado de poyectos').'</b>'; |
---|
277 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'ente_planificador_importar/estadoproyecto', array('html'=>TRUE))."</td>"; |
---|
278 | } |
---|
279 | |
---|
280 | if (module_exists('ente_planificador_sector')) { |
---|
281 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/dateedit.png').'<br>'.'<b>'.t('Modificar fechas de procesos de planificación por ambitos').'</b>'; |
---|
282 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'fechas_planificacion/notificacion/ambito', array('html'=>TRUE))."</td>"; |
---|
283 | |
---|
284 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/dateedit.png').'<br>'.'<b>'.t('Modificar fechas de procesos de planificación por Sector').'</b>'; |
---|
285 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'fechas_planificacion/notificacion/sector', array('html'=>TRUE))."</td>"; |
---|
286 | } |
---|
287 | /* if (user_access('admin planificador')) { |
---|
288 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/proyectosop.png').'<br>'.'<b>'.t('Asignar Entes a usuarios').'</b>'; |
---|
289 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'proyectos_operativos/lista/asignar', array('html'=>TRUE))."</td>"; |
---|
290 | }*/ |
---|
291 | /* |
---|
292 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/dateedit.png').'<br>'.'<b>'.t('Modificar fechas de procesos de planificación').'</b>'; |
---|
293 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'fechas_planificacion/todas_edit', array('html'=>TRUE))."</td>"; |
---|
294 | |
---|
295 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/emailsend.png').'<br>'.'<b>'.t('Enviar correo con fechas de procesos de planificación').'</b>'; |
---|
296 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'fechas_planificacion', array('html'=>TRUE))."</td>"; |
---|
297 | |
---|
298 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/emailnotify.png').'<br>'.'<b>'.t('Configurar las fecha de notificación').'</b>'; |
---|
299 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'fechas_planificacion/notificacion', array('html'=>TRUE))."</td>"; |
---|
300 | */ |
---|
301 | |
---|
302 | $page_content .= "<td width=\"25%\" align=\"center\">"."<br></td>"; |
---|
303 | $page_content .= '</tr>'; |
---|
304 | |
---|
305 | $page_content .= '<tr>'; |
---|
306 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/users.png').'<br>'.'<b>'.t('Ver usuarios de los entes planificadores').'</b>'; |
---|
307 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'administrar_usuarios', array('html'=>TRUE))."</td>"; |
---|
308 | |
---|
309 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/planners.png').'<br>'.'<b>'.t('Consultar lista de los actores planificadores').'</b>'; |
---|
310 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'administrar/entes_planificadores', array('html'=>TRUE))."</td>"; |
---|
311 | |
---|
312 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/plannersearch.png').'<br>'.'<b>'.t('Consultar datos de los actores planificadores (busqueda)').'</b>'; |
---|
313 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'datosactoresplanificadores', array('html'=>TRUE))."</td>"; |
---|
314 | |
---|
315 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/planneradd.png').'<br>'.'<b>'.t('Agregar nuevo actor planificador').'</b>'; |
---|
316 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'node/add/ente-planificador', array('html'=>TRUE))."</td>"; |
---|
317 | $page_content .= '</tr>'; |
---|
318 | |
---|
319 | |
---|
320 | $page_content .= '<tr>'; |
---|
321 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/administrar_campos_seleccionables.png').'<br>'.'<b>'.t('Administrar opciones de campos seleccionables').'</b>'; |
---|
322 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'admin/content/taxonomy', array('html'=>TRUE))."</td>"; |
---|
323 | |
---|
324 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/configurar_actividades.png').'<br>'.'<b>'.t('Configurar actividades').'</b>'; |
---|
325 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'admin/settings/ente_planificador/actividades', array('html'=>TRUE))."</td>"; |
---|
326 | |
---|
327 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/agregar_actividades.png').'<br>'.'<b>'.t('Agregar actividad').'</b>'; |
---|
328 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'admin/settings/ente_planificador/agregar_actividades', array('html'=>TRUE))."</td>"; |
---|
329 | |
---|
330 | $page_content .= "<td width=\"25%\" align=\"center\">"."<br></td>"; |
---|
331 | $page_content .= '</tr>'; |
---|
332 | |
---|
333 | //trabajando con los sectores |
---|
334 | $page_content .= '<tr>'; |
---|
335 | //agregar los ambitos |
---|
336 | if (module_exists('ente_planificador_sector')) { |
---|
337 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/agregar_actividades.png').'<br>'.'<b>'.t('Agregar Ambito').'</b>'; |
---|
338 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'admin/settings/ente_planificador/agregar_ambitos', array('html'=>TRUE))."</td>"; |
---|
339 | } |
---|
340 | //agregar los sectores |
---|
341 | if (module_exists('ente_planificador_sector')) { |
---|
342 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/agregar_actividades.png').'<br>'.'<b>'.t('Agregar Sectores').'</b>'; |
---|
343 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'admin/settings/ente_planificador/agregar_sectores', array('html'=>TRUE))."</td>"; |
---|
344 | } |
---|
345 | //agregar los sectores |
---|
346 | if (module_exists('ente_planificador_sector')) { |
---|
347 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/agregar_actividades.png').'<br>'.'<b>'.t('Lista de Ambitos por sectores').'</b>'; |
---|
348 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'lista_ambitos_y_sectores_asociados', array('html'=>TRUE))."</td>"; |
---|
349 | } |
---|
350 | $page_content .= '</tr>'; |
---|
351 | |
---|
352 | $page_content .= '<tr>'; |
---|
353 | //$image_tag = theme_image($path_modulo_menu_principal.'/img/menu/conf_acc_centralizadas_c1.png').'<br>'.'<b>'.t('Configurar acciones centralizadas').'</b>'; |
---|
354 | //$page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'admin/settings/ente_planificador/acciones_centralizadas', array('html'=>TRUE))."</td>"; |
---|
355 | |
---|
356 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/conf_proyectos_operativos_d1.png').'<br>'.'<b>'.t('Configurar proyectos operativos').'</b>'; |
---|
357 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'admin/settings/ente_planificador/proyectos_operativos', array('html'=>TRUE))."</td>"; |
---|
358 | |
---|
359 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/conf_seguimiento_proyectos_y_aes_e1.png').'<br>'.'<b>'.t('Configurar seguimiento del proyecto y sus acciones especÃficas').'</b>'; |
---|
360 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'admin/settings/ente_planificador/seguimiento_proyecto_y_aes', array('html'=>TRUE))."</td>"; |
---|
361 | |
---|
362 | $page_content .= "<td width=\"25%\" align=\"center\">"."<br></td>"; |
---|
363 | $page_content .= '</tr>'; |
---|
364 | $page_content .= '</table>'; |
---|
365 | $page_content .= '<br><br>'; |
---|
366 | |
---|
367 | |
---|
368 | //*********************************************************************************************** |
---|
369 | //administración Avanzada |
---|
370 | $page_content .= '<h4>Administración avanzada:</h4>'; |
---|
371 | $page_content .= '<table align=\"center\" border=\"0\"><tr>'; |
---|
372 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/roles.png').'<br>'.'<b>'.t('Configurar los roles de los entes planificadores').'</b>'; |
---|
373 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'admin/settings/ente_planificador', array('html'=>TRUE))."</td>"; |
---|
374 | |
---|
375 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/rolesperm.png').'<br>'.'<b>'.t('Permisos de los usuarios según roles').'</b>'; |
---|
376 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'admin/user/permissions', array('html'=>TRUE))."</td>"; |
---|
377 | |
---|
378 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/nodetypes.png').'<br>'.'<b>'.t('Administrar contenido').'</b>'; |
---|
379 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'admin/content', array('html'=>TRUE))."</td>"; |
---|
380 | |
---|
381 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/modules.png').'<br>'.'<b>'.t('Administrar modulos').'</b>'; |
---|
382 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'admin/build/modules', array('html'=>TRUE))."</td>"; |
---|
383 | $page_content .= '</tr></table>'; |
---|
384 | $page_content .= '<br><br>'; |
---|
385 | |
---|
386 | return $page_content; |
---|
387 | } |
---|
388 | |
---|
389 | |
---|
390 | function menu_principal_documentacion_page() { |
---|
391 | global $user; |
---|
392 | $ente = usuario_tiene_ente($user->uid); |
---|
393 | $ente_planificador = 0; |
---|
394 | if ($ente && $ente->nid) { |
---|
395 | $ente_planificador = ente_planificador_leer_ente_planificadores($ente->nid); |
---|
396 | } |
---|
397 | |
---|
398 | $path_modulo_menu_principal = drupal_get_path('module', 'principal_inicio_sipp'); |
---|
399 | |
---|
400 | $page_content = ''; |
---|
401 | $page_content .= '<h4>Documentación:</h4>'; |
---|
402 | $page_content .= '<table align=\"center\" border=\"0\"><tr>'; |
---|
403 | |
---|
404 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/planners.png').'<br>'.'<b>'.t('Manual del Usuario').'</b>'; |
---|
405 | $page_content .= "<td width=\"50%\" align=\"center\">".l($image_tag, 'https://sipes.mppp.gob.ve/sites/default/files/ManualdeUsuario.pdf', array('html'=>TRUE))."</td>"; |
---|
406 | |
---|
407 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/plannersearch.png').'<br>'.'<b>'.t('Video tutoriales').'</b>'; |
---|
408 | $page_content .= "<td width=\"50%\" align=\"center\">".l($image_tag, 'https://planificacion.cenditel.gob.ve/productos/formacion-en-linea-en-el-area-de-planificacion/', array('html'=>TRUE))."</td>"; |
---|
409 | |
---|
410 | $page_content .= '</tr></table>'; |
---|
411 | $page_content .= '<br><br>'; |
---|
412 | |
---|
413 | if ($ente && $ente->nid) { |
---|
414 | $ente_planificador = ente_planificador_leer_ente_planificadores($ente->nid); |
---|
415 | } |
---|
416 | $page_content2 = $page_content; |
---|
417 | //$image_tag = theme_image($path_modulo_menu_principal.'/img/reportes/reports.png').'<br>'.'<b>'.t('Reporte General').'</b>'; |
---|
418 | //$page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'sipp_report_mpp/sectorial', array('html'=>TRUE))."</td>"; |
---|
419 | $title_content = ''; |
---|
420 | $page_content = ''; |
---|
421 | if (user_access('edit own planificador')) { |
---|
422 | global $user; |
---|
423 | $title_content = '<h4>Reportes:</h4>'; |
---|
424 | $page_content .= '<table align=\"center\" border=\"0\"><tr>'; |
---|
425 | $image_tag = theme_image($path_modulo_menu_principal.'/img/reportes/reports.png').'<br>'.'<b>'.t('Entes Planificadores').'</b>'; |
---|
426 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'sipp_report_mpp/entes_p', array('html'=>TRUE))."</td>"; |
---|
427 | $image_tag = theme_image($path_modulo_menu_principal.'/img/reportes/reports.png').'<br>'.'<b>'.t('Listado de Proyectos (Coordinador General)').'</b>'; |
---|
428 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'sipp_report_mpp/corrdgen', array('html'=>TRUE))."</td>"; |
---|
429 | $image_tag = theme_image($path_modulo_menu_principal.'/img/reportes/reports.png').'<br>'.'<b>'.t('Proyectos (Historico de Estados)').'</b>'; |
---|
430 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'sipp_report_mpp/estados', array('html'=>TRUE))."</td>"; |
---|
431 | $image_tag = theme_image($path_modulo_menu_principal.'/img/reportes/reports.png').'<br>'.'<b>'.t('Proyectos por estado').'</b>'; |
---|
432 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'sipp_report_mpp/estados_proyectos', array('html'=>TRUE))."</td>"; |
---|
433 | $page_content .= '</tr>'; |
---|
434 | $page_content .= '<tr>'; |
---|
435 | $image_tag = theme_image($path_modulo_menu_principal.'/img/reportes/reports.png').'<br>'.'<b>'.t('Descargar Listado de Proyectos (Plan de la Patria - CVS)').'</b>'; |
---|
436 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'sipp_report_mpp/revisor/cvs1', array('html'=>TRUE))."</td>"; |
---|
437 | $image_tag = theme_image($path_modulo_menu_principal.'/img/reportes/reports.png').'<br>'.'<b>'.t('Descargar Listado de Proyectos (Vicepresidencia Sectorial - CVS)').'</b>'; |
---|
438 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'sipp_report_mpp/cooamb/cvs1', array('html'=>TRUE))."</td>"; |
---|
439 | $page_content .= '</tr></table>'; |
---|
440 | $page_content .= '<br><br>'; |
---|
441 | } |
---|
442 | if (!user_access('edit own planificador') && ($ente_planificador->tipo || $ente->nid)) { |
---|
443 | $reportes = FALSE; |
---|
444 | if ($ente->nid && $user->ambito_user) { |
---|
445 | $reportes = TRUE; |
---|
446 | $ambito = taxonomy_get_term($user->ambito_user); |
---|
447 | $terms = taxonomy_get_children($ambito->tid); |
---|
448 | foreach ($terms as $term) { |
---|
449 | if ($term->tid == 6966 || $term->tid == 3903) { |
---|
450 | $image_tag = theme_image($path_modulo_menu_principal.'/img/reportes/unidadejecutora.png').'<br>'.'<b>' . t('Reporte de proyectos para las Vicepresidencias Sectoriales de Planificación y de SoberanÃa PolÃtica, Seguridad y Paz.').'</b>'; |
---|
451 | } |
---|
452 | else { |
---|
453 | $image_tag = theme_image($path_modulo_menu_principal.'/img/reportes/unidadejecutora.png').'<br>'.'<b>' . t('Reporte de proyectos de la %unidad', array("%unidad" => $term->name)).'</b>'; |
---|
454 | } |
---|
455 | } |
---|
456 | } |
---|
457 | $page_enlace = ''; |
---|
458 | if ($ente_planificador && $ente_planificador->tipo == 1) { |
---|
459 | $reportes = TRUE; |
---|
460 | $roles_type = _ente_planificador_hierarchical_get_roles_type($ente_planificador->tipo); |
---|
461 | foreach($roles_type as $rol => $text) { |
---|
462 | $text1 = t('Ente tipo @number (@type)', array('@number' => $ente_planificador->tipo, '@type' => $text)); |
---|
463 | if ($text1 == $user->roles[key($user->roles)] && $rol == 'enl') { |
---|
464 | $page_enlace = "<td width=\"50%\" align=\"center\">".l($image_tag, 'sipp_report_mpp/revisor', array('html'=>TRUE))."</td>"; |
---|
465 | } |
---|
466 | elseif ($text1 == $user->roles[key($user->roles)] && $rol == 'sup') { |
---|
467 | $page_enlace = "<td width=\"50%\" align=\"center\">".l($image_tag, 'sipp_report_mpp/cooamb', array('html'=>TRUE))."</td>"; |
---|
468 | } |
---|
469 | } |
---|
470 | } |
---|
471 | if ($reportes) { |
---|
472 | $title_content = '<h4>Reportes:</h4>'; |
---|
473 | $page_content .= '<table align=\"center\" border=\"0\"><tr>'; |
---|
474 | $page_content .= $page_enlace; |
---|
475 | $page_content .= '</tr></table>'; |
---|
476 | $page_content .= '<br><br>'; |
---|
477 | } |
---|
478 | } |
---|
479 | $page_content2 .= $title_content . $page_content; |
---|
480 | return $page_content2; |
---|
481 | } |
---|
482 | |
---|
483 | function pagina_inicio_page() { |
---|
484 | |
---|
485 | global $user; |
---|
486 | |
---|
487 | if($user->uid > 0){ |
---|
488 | $page_content = menu_principal_inicio_page(); |
---|
489 | } |
---|
490 | else{ |
---|
491 | $path_modulo_menu_principal = drupal_get_path('module', 'principal_inicio_sipp'); |
---|
492 | $page_content = variable_get('pagina_inicio_sipp_mensaje', '<p align="justify">El Sistema Integral de Planificación Estratégica Situacional para la Administración Pública Nacional (SIPES-APN) se plantea con la finalidad de romper con procesos tradicionales de planificación centralizada, en los cuales la planificación macro (estratégica y táctica) y la planificación micro (operativa) se llevan a cabo de manera desarticulada, y las situaciones de interés que requieren planificación de acciones son estudiadas considerando solo las interpretaciones que los actores planificadores tiene sobre estas situaciones.</p> |
---|
493 | |
---|
494 | <p align="justify">Estos procesos tradicionales de planificación carecen de referencias reales sobre las situaciones de interés, por lo cual se dificulta tanto el entendimiento de éstas como la generación de propuestas o estrategias para abordarlas. En este sentido, es fundamental para el proceso de planificación la consideración de las comunidades y demás actores que viven las situaciones de interés, pues a partir de las interpretaciones de éstos, sobre tales situaciones, se posibilita el dar cuenta del estado actual de las mismas.</p> |
---|
495 | |
---|
496 | <p align="justify">El SIPES-APN se basa en la MetodologÃa de Planificación Estratégica Situacional para la APN desarrollada por la Fundación CENDITEL, la cual esta orientada a la formulación y seguimiento de planes estratégicos y operativos de acuerdo en lo establecido en la Ley Orgánica de Planificación Pública y Popular. Este sistema constituye una herramienta de apoyo a la práctica colaborativa entre el Estado y los sectores sociales, en torno a los procesos de planificación estratégica y operativa, que permitan la articulación en la formulación, ejecución y seguimiento de planes entre los actores mencionados.</p> |
---|
497 | |
---|
498 | <p align="justify">Módulos que componen el sistema:</p> |
---|
499 | <ul> |
---|
500 | <li><b>Explicación Situacional:</b> en este módulo se gestiona la información respectiva a la explicación de la situación de interés para el plan a formular, ésta contiene: problemas, causas, posibles soluciones, cambios esperados.</li> |
---|
501 | <li><b>Definición de PolÃticas Direccionales:</b> este módulo gestiona la formulación de polÃticas y estrategias que dirigen el plan.</li> |
---|
502 | <li><b>Definición de Proyectos Operativos:</b> este módulo permite la formulación, reformulación y seguimiento de proyectos operativos (acciones especÃficas) y acciones centralizadas.</li> <p><b>Página del Proyecto:</b> <a href="http://planificacion.cenditel.gob.ve/sistema-automatizado-de-la-metodologia-de-planificacion-estrategica-situacional-para-la-administracion-publica/" target="_blank">Gestión de Desarrollo del Sistema Automatizado de Planificación</a></p><p><b>Repositorio de la Aplicación:</b> <a href="http://planificacion.cenditel.gob.ve/trac/browser/sipes" target="_blank">SIPES-APN</a></p>'); |
---|
503 | } |
---|
504 | return $page_content; |
---|
505 | } |
---|
506 | /** |
---|
507 | * Implementation of hook_block(). |
---|
508 | * |
---|
509 | * Generate a block with a promotional link to SIPP. |
---|
510 | */ |
---|
511 | function principal_inicio_sipp_block($op = 'list', $delta = 0, $edit = NULL) { |
---|
512 | switch ($op) { |
---|
513 | case 'list': |
---|
514 | $blocks[0] = array( |
---|
515 | 'info' => t('SIPP elaborado por Cenditel'), |
---|
516 | 'weight' => '10', |
---|
517 | // Not worth caching. |
---|
518 | 'cache' => BLOCK_NO_CACHE, |
---|
519 | ); |
---|
520 | return $blocks; |
---|
521 | case 'view': |
---|
522 | global $base_url; |
---|
523 | $path_modulo_menu_principal = drupal_get_path('module', 'principal_inicio_sipp'); |
---|
524 | $bloque_titulo = t("Sistema Automatizado para la Planificación Estratégico-Situacional en la Administración Pública Venezolana (SIPES) es un sistema automatizado desarrollado por CENDITEL orientado a la planificación estratégica de las instituciones públicas venezolanas"); |
---|
525 | $block['subject'] = NULL; // Don't display a title |
---|
526 | $block['content'] = '<a href="http://planificacion.cenditel.gob.ve/trac/wiki/SIPP" target="_blank"><img align="left" vspace="5" hspace="10" src="' . $base_url . '/' . $path_modulo_menu_principal .'/img/cenditel.png" title="' . $bloque_titulo . '" alt="' . $bloque_titulo . '" /></a> |
---|
527 | <p aling="justify" style="font-size: 10px">El Sistema Integral de Planificación Estratégica Situacional (SIPES-APN) ha sido desarrollado por el Centro Nacional de Desarrollo e Investigación en TecnologÃas Libres (CENDITEL), ente adscrito al Ministerio del Poder Popular para Educación Universitaria, Ciencia y TecnologÃa.</p><p aling="justify" style="font-size: 10px">El software ha sido liberado mediante el contrato de licencia GPL V2 (https://www.gnu.org/licenses/gpl-2.0.html) y la documentación mediante Creative Commons 3.0 Venezuela (http://www.creativecommonsvenezuela.org.ve/). Para acceder a información relacionada con el proyecto, asà como a los repositorios del sistema, puede consultar [aquà | http://planificacion.cenditel.gob.ve/]</p>'; |
---|
528 | return $block; |
---|
529 | } |
---|
530 | } |
---|