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 | * @version 0.1 |
---|
29 | * |
---|
30 | */ |
---|
31 | |
---|
32 | function principal_inicio_sipp_menu_alter(&$items) { |
---|
33 | $items['node/%/planificacion']['page callback'] = 'menu_principal_inicio_page_planificacion'; |
---|
34 | $items['node/%/planificacion']['page arguments'] = array(); |
---|
35 | $items['planificacion/%ente_planificador_menu']['page callback'] = 'menu_principal_inicio_page_planificacion'; |
---|
36 | $items['planificacion/%ente_planificador_menu']['page arguments'] = array(); |
---|
37 | } |
---|
38 | |
---|
39 | function menu_principal_inicio_page_planificacion() { |
---|
40 | global $user; |
---|
41 | drupal_set_title(t('Sistema Planificación Estratégico-Situacional')); |
---|
42 | $page_content = ''; |
---|
43 | //SIPES |
---|
44 | $situacion_actual_preliminar = module_exists('situacion_actual_preliminar'); |
---|
45 | $politicas_direccionales = module_exists('politicas_direccionales'); |
---|
46 | if ($situacion_actual_preliminar || $politicas_direccionales) { |
---|
47 | $ente = usuario_tiene_ente($user->uid); |
---|
48 | if ($ente->nid) { |
---|
49 | $ente_macro = $ente->nid; |
---|
50 | } |
---|
51 | else { |
---|
52 | $ente_macro = ente_planificador_ente_macro(); |
---|
53 | } |
---|
54 | $handler_icon = variable_get('entes_planificadores_toolbar_handler_icons_admin', 'entes_planificadores_normal'); |
---|
55 | $page_content .= '<fieldset>'; |
---|
56 | $page_content .= '<legend>' . t('Planificación EstrategÃca') . ':</legend>'; |
---|
57 | $page_content .= '<table align=\"center\" border=\"0\"><tr>'; |
---|
58 | if (!$situacion_actual_preliminar) { |
---|
59 | $icon_path = entes_planificadores_toolbar_get_icon_path('planner', 'versionpreliminary', $handler_icon); |
---|
60 | $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>'; |
---|
61 | $page_content .= "<td width=\"50%\" align=\"center\">" . l($image_tag, 'planificacion/' . $ente_macro . '/explicacion', array('html'=>TRUE))."</td>"; |
---|
62 | } |
---|
63 | //politicas direccionales |
---|
64 | if ($politicas_direccionales) { |
---|
65 | $icon_path = entes_planificadores_toolbar_get_icon_path('planner', 'directionalpotential', $handler_icon); |
---|
66 | $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>'; |
---|
67 | $page_content .= "<td width=\"50%\" align=\"center\">".l($image_tag, 'acciones_centralizadas', array('html'=>TRUE))."</td>"; |
---|
68 | } |
---|
69 | $page_content .= '</tr></table></h1>'; |
---|
70 | $page_content .= '</fieldset>'; |
---|
71 | } |
---|
72 | //*********************************************************************************************** |
---|
73 | //SIPP |
---|
74 | $path_modulo_menu_principal = drupal_get_path('module', 'principal_inicio_sipp'); |
---|
75 | $page_content .= '<fieldset>'; |
---|
76 | $page_content .= '<legend>' . t('Planificación y Presupuesto') . ':</legend>'; |
---|
77 | $page_content .= '<table align=\"center\" border=\"0\"><tr>'; |
---|
78 | $image_tag = theme_image($path_modulo_menu_principal.'/img/proyectosoperativos.png').'<br>'.'<b>'.t('Proyectos Operativos').'</b>'; |
---|
79 | $page_content .= "<td width=\"50%\" align=\"center\">".l($image_tag, 'proyectos_operativos', array('html'=>TRUE))."</td>"; |
---|
80 | $image_tag = theme_image($path_modulo_menu_principal.'/img/accionescentralizadas.png').'<br>'.'<b>'.t('Acciones Centralizadas').'</b>'; |
---|
81 | $page_content .= "<td width=\"50%\" align=\"center\">".l($image_tag, 'acciones_centralizadas', array('html'=>TRUE))."</td>"; |
---|
82 | $page_content .= '</tr></table>'; |
---|
83 | $page_content .= '</fieldset>'; |
---|
84 | return $page_content; |
---|
85 | } |
---|
86 | |
---|
87 | |
---|
88 | |
---|
89 | /* |
---|
90 | * Implementation of hook_user |
---|
91 | */ |
---|
92 | function principal_inicio_sipp_user($op, &$edit, &$user, $category = NULL) { |
---|
93 | switch ($op) { |
---|
94 | case 'login': |
---|
95 | $_REQUEST['destination'] = 'principal'; |
---|
96 | if (isset($edit['nuevo_password']) && $edit['nuevo_password']) { |
---|
97 | $_SESSION['nuevo_password'] = TRUE; |
---|
98 | } |
---|
99 | break; |
---|
100 | |
---|
101 | } |
---|
102 | } |
---|
103 | |
---|
104 | /* |
---|
105 | * Implementation of hook_menu() |
---|
106 | */ |
---|
107 | function principal_inicio_sipp_menu() { |
---|
108 | $items = array(); |
---|
109 | |
---|
110 | $items['principal'] = array( |
---|
111 | 'title' => t('Menu Principal SIPP'), |
---|
112 | 'page callback' => 'menu_principal_inicio_page', |
---|
113 | 'access arguments' => array('ver planificador'), |
---|
114 | 'type' => MENU_CALLBACK, |
---|
115 | ); |
---|
116 | |
---|
117 | $items['opc_config_y_admin'] = array( |
---|
118 | 'title' => t('Configuraciones y Administración'), |
---|
119 | 'page callback' => 'menu_principal_configuraciones_y_administracion_page', |
---|
120 | 'access arguments' => array('admin planificador'), |
---|
121 | 'type' => MENU_CALLBACK, |
---|
122 | ); |
---|
123 | |
---|
124 | $items['documentacion_adicional'] = array( |
---|
125 | 'title' => t('Documentación Adicional'), |
---|
126 | 'page callback' => 'menu_principal_documentacion_page', |
---|
127 | 'access callback' => true, |
---|
128 | 'type' => MENU_CALLBACK, |
---|
129 | ); |
---|
130 | |
---|
131 | $items['inicio'] = array( |
---|
132 | //'title' => t('Sistema Integral de Planificación y Presupuesto (SIPP)'), |
---|
133 | 'page callback' => 'pagina_inicio_page', |
---|
134 | 'access callback' => true, |
---|
135 | 'type' => MENU_CALLBACK, |
---|
136 | ); |
---|
137 | |
---|
138 | return $items; |
---|
139 | } // function proyectos_operativos_opcseg_menu |
---|
140 | |
---|
141 | function _calcular_cantidad_de_notificaciones_sin_leer() { |
---|
142 | |
---|
143 | global $user; |
---|
144 | $cant_mensajes_usuario = 0; |
---|
145 | |
---|
146 | if (module_exists('gestion_mensajes')) { |
---|
147 | if($user->uid > 1){//para un usuario |
---|
148 | $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 |
---|
149 | $Resultado_consulta0 = db_query ($consulta_sql0, $user->uid); |
---|
150 | $mensajes_usuario = db_fetch_array ( $Resultado_consulta0 ); |
---|
151 | $cant_mensajes_usuario = $mensajes_usuario['total']; |
---|
152 | |
---|
153 | }elseif($user->uid == 1){//usuario administrador (todos los mensajes) |
---|
154 | $consulta_sql0 = "SELECT count(id_msj) as total from {bandejaentrada_usuario_mensajes} as mensaje where mensaje.visto_por_admin=0 ";//consulta mensajes |
---|
155 | $Resultado_consulta0 = db_query ($consulta_sql0, $user->uid); |
---|
156 | $mensajes_usuario = db_fetch_array ( $Resultado_consulta0 ); |
---|
157 | $cant_mensajes_usuario = $mensajes_usuario['total']; |
---|
158 | } |
---|
159 | } |
---|
160 | |
---|
161 | return $cant_mensajes_usuario; |
---|
162 | } |
---|
163 | |
---|
164 | |
---|
165 | function menu_principal_inicio_page() { |
---|
166 | global $user; |
---|
167 | |
---|
168 | $page_content = ''; |
---|
169 | drupal_set_title(t('Sistema Integral de Planificación y Presupuesto (SIPP)')); |
---|
170 | //*********************************************************************************************** |
---|
171 | //opciones principales |
---|
172 | $path_modulo_menu_principal = drupal_get_path('module', 'principal_inicio_sipp'); |
---|
173 | $page_content .= '<br><br>'; |
---|
174 | $page_content .= '<h1><table align=\"center\" border=\"0\"><tr>'; |
---|
175 | |
---|
176 | $image_tag = theme_image($path_modulo_menu_principal.'/img/proyectosoperativos.png').'<br>'.'<b>'.t('Proyectos Operativos').'</b>'; |
---|
177 | $page_content .= "<td width=\"50%\" align=\"center\">".l($image_tag, 'proyectos_operativos', array('html'=>TRUE))."</td>"; |
---|
178 | |
---|
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', array('html'=>TRUE))."</td>"; |
---|
218 | |
---|
219 | $page_content .= "<td width=\"25%\" align=\"center\">".$contenido_celda_notificaciones."</td>"; |
---|
220 | |
---|
221 | $page_content .= "<td width=\"25%\" align=\"center\">"."<br></td>"; |
---|
222 | $page_content .= "<td width=\"25%\" align=\"center\">"."<br></td>"; |
---|
223 | $page_content .= '</tr>'; |
---|
224 | |
---|
225 | $page_content .= '<tr>'; |
---|
226 | |
---|
227 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/user.png').'<br>'.'<b>'.t('Ver la información de mi usuario').'</b>'; |
---|
228 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'user/'.$user->uid, array('html'=>TRUE))."</td>"; |
---|
229 | |
---|
230 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/userpassword.png').'<br>'.'<b>'.t('Cambiar contraseña').'</b>'; |
---|
231 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'user/'.$user->uid.'/chgpwd', array('html'=>TRUE))."</td>"; |
---|
232 | |
---|
233 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/useredit.png').'<br>'.'<b>'.t('Editar datos de usuario').'</b>'; |
---|
234 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'user/'.$user->uid.'/edit', array('html'=>TRUE))."</td>"; |
---|
235 | |
---|
236 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/userlogout.png').'<br>'.'<b>'.t('Salir del sistema').'</b>'; |
---|
237 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'logout', array('html'=>TRUE))."</td>"; |
---|
238 | |
---|
239 | $page_content .= '</tr>'; |
---|
240 | $page_content .= '</table>'; |
---|
241 | $page_content .= '<br><br>'; |
---|
242 | |
---|
243 | if (user_access('admin planificador')) { |
---|
244 | |
---|
245 | $page_content .= menu_principal_configuraciones_y_administracion_page(); |
---|
246 | |
---|
247 | if (module_exists('reportes_sipp')) { |
---|
248 | $page_content .= reporte_sipp_page(); |
---|
249 | } |
---|
250 | } |
---|
251 | |
---|
252 | $page_content .= menu_principal_documentacion_page(); |
---|
253 | |
---|
254 | return $page_content; |
---|
255 | } // function menu_principal_page |
---|
256 | |
---|
257 | function menu_principal_configuraciones_y_administracion_page() { |
---|
258 | |
---|
259 | $path_modulo_menu_principal = drupal_get_path('module', 'principal_inicio_sipp'); |
---|
260 | |
---|
261 | $page_content = ''; |
---|
262 | |
---|
263 | //administración |
---|
264 | $page_content .= '<h4>Configuraciones y Administración:</h4>'; |
---|
265 | $page_content .= '<table align=\"center\" border=\"0\">'; |
---|
266 | $page_content .= '<tr>'; |
---|
267 | |
---|
268 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/dateedit.png').'<br>'.'<b>'.t('Modificar fechas de procesos de planificación').'</b>'; |
---|
269 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'fechas_planificacion/todas_edit', array('html'=>TRUE))."</td>"; |
---|
270 | |
---|
271 | $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>'; |
---|
272 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'fechas_planificacion/envia_email', array('html'=>TRUE))."</td>"; |
---|
273 | |
---|
274 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/emailnotify.png').'<br>'.'<b>'.t('Configurar las fecha de notificación').'</b>'; |
---|
275 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'fechas_planificacion/notificacion', array('html'=>TRUE))."</td>"; |
---|
276 | |
---|
277 | $page_content .= "<td width=\"25%\" align=\"center\">"."<br></td>"; |
---|
278 | $page_content .= '</tr>'; |
---|
279 | |
---|
280 | |
---|
281 | $page_content .= '<tr>'; |
---|
282 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/users.png').'<br>'.'<b>'.t('Ver usuarios de los entes planificadores').'</b>'; |
---|
283 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'administrar_usuarios', array('html'=>TRUE))."</td>"; |
---|
284 | |
---|
285 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/planners.png').'<br>'.'<b>'.t('Consultar lista de los actores planificadores').'</b>'; |
---|
286 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'administrar/entes_planificadores', array('html'=>TRUE))."</td>"; |
---|
287 | |
---|
288 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/plannersearch.png').'<br>'.'<b>'.t('Consultar datos de los actores planificadores (busqueda)').'</b>'; |
---|
289 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'datosactoresplanificadores', array('html'=>TRUE))."</td>"; |
---|
290 | |
---|
291 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/planneradd.png').'<br>'.'<b>'.t('Agregar nuevo actor planificador').'</b>'; |
---|
292 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'node/add/ente-planificador', array('html'=>TRUE))."</td>"; |
---|
293 | $page_content .= '</tr>'; |
---|
294 | |
---|
295 | |
---|
296 | $page_content .= '<tr>'; |
---|
297 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/administrar_campos_seleccionables.png').'<br>'.'<b>'.t('Administrar opciones de campos seleccionables').'</b>'; |
---|
298 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'admin/content/taxonomy', array('html'=>TRUE))."</td>"; |
---|
299 | |
---|
300 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/configurar_actividades.png').'<br>'.'<b>'.t('Configurar actividades').'</b>'; |
---|
301 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'admin/settings/ente_planificador/actividades', array('html'=>TRUE))."</td>"; |
---|
302 | |
---|
303 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/agregar_actividades.png').'<br>'.'<b>'.t('Agregar actividad').'</b>'; |
---|
304 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'admin/settings/ente_planificador/agregar_actividades', array('html'=>TRUE))."</td>"; |
---|
305 | |
---|
306 | $page_content .= "<td width=\"25%\" align=\"center\">"."<br></td>"; |
---|
307 | $page_content .= '</tr>'; |
---|
308 | |
---|
309 | |
---|
310 | $page_content .= '<tr>'; |
---|
311 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/conf_acc_centralizadas_c1.png').'<br>'.'<b>'.t('Configurar acciones centralizadas').'</b>'; |
---|
312 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'admin/settings/ente_planificador/acciones_centralizadas', array('html'=>TRUE))."</td>"; |
---|
313 | |
---|
314 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/conf_proyectos_operativos_d1.png').'<br>'.'<b>'.t('Configurar proyectos operativos').'</b>'; |
---|
315 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'admin/settings/ente_planificador/proyectos_operativos', array('html'=>TRUE))."</td>"; |
---|
316 | |
---|
317 | $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>'; |
---|
318 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'admin/settings/ente_planificador/seguimiento_proyecto_y_aes', array('html'=>TRUE))."</td>"; |
---|
319 | |
---|
320 | $page_content .= "<td width=\"25%\" align=\"center\">"."<br></td>"; |
---|
321 | $page_content .= '</tr>'; |
---|
322 | $page_content .= '</table>'; |
---|
323 | $page_content .= '<br><br>'; |
---|
324 | |
---|
325 | |
---|
326 | //*********************************************************************************************** |
---|
327 | //administración Avanzada |
---|
328 | $page_content .= '<h4>Administración avanzada:</h4>'; |
---|
329 | $page_content .= '<table align=\"center\" border=\"0\"><tr>'; |
---|
330 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/roles.png').'<br>'.'<b>'.t('Configurar los roles de los entes planificadores').'</b>'; |
---|
331 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'admin/settings/ente_planificador', array('html'=>TRUE))."</td>"; |
---|
332 | |
---|
333 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/rolesperm.png').'<br>'.'<b>'.t('Permisos de los usuarios según roles').'</b>'; |
---|
334 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'admin/user/permissions', array('html'=>TRUE))."</td>"; |
---|
335 | |
---|
336 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/nodetypes.png').'<br>'.'<b>'.t('Administrar contenido').'</b>'; |
---|
337 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'admin/content', array('html'=>TRUE))."</td>"; |
---|
338 | |
---|
339 | $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/modules.png').'<br>'.'<b>'.t('Administrar modulos').'</b>'; |
---|
340 | $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'admin/build/modules', array('html'=>TRUE))."</td>"; |
---|
341 | $page_content .= '</tr></table>'; |
---|
342 | $page_content .= '<br><br>'; |
---|
343 | |
---|
344 | return $page_content; |
---|
345 | } |
---|
346 | |
---|
347 | |
---|
348 | function menu_principal_documentacion_page() { |
---|
349 | |
---|
350 | $path_modulo_menu_principal = drupal_get_path('module', 'principal_inicio_sipp'); |
---|
351 | |
---|
352 | $page_content = ''; |
---|
353 | $page_content .= '<h4>Documentación:</h4>'; |
---|
354 | $page_content .= '<table align=\"center\" border=\"0\"><tr>'; |
---|
355 | |
---|
356 | //$image_tag = theme_image($path_modulo_menu_principal.'/img/menu/por_asignar.png').'<br>'.'<b>'.t('Descripción del sistema').'</b>'; |
---|
357 | $image_tag = '<b>'.t('Descripción del Sistema').'</b>'; |
---|
358 | $page_content .= "<td width=\"50%\" align=\"center\">".l($image_tag, '', array('html'=>TRUE))."</td>"; |
---|
359 | |
---|
360 | //$image_tag = theme_image($path_modulo_menu_principal.'/img/menu/por_asignar.png').'<br>'.'<b>'.t('Sobre la fase de desarrollo').'</b>'; |
---|
361 | $image_tag = '<b>'.t('Sobre la Fase de Desarrollo').'</b>'; |
---|
362 | $page_content .= "<td width=\"50%\" align=\"center\">".l($image_tag, 'http://planificacion.cenditel.gob.ve/trac/wiki/SIPP/Metodologia', array('html'=>TRUE))."</td>"; |
---|
363 | |
---|
364 | $page_content .= '</tr></table>'; |
---|
365 | $page_content .= '<br><br>'; |
---|
366 | |
---|
367 | return $page_content; |
---|
368 | } |
---|
369 | |
---|
370 | function pagina_inicio_page() { |
---|
371 | |
---|
372 | global $user; |
---|
373 | |
---|
374 | if($user->uid > 0){ |
---|
375 | $page_content = menu_principal_inicio_page(); |
---|
376 | } |
---|
377 | else{ |
---|
378 | $path_modulo_menu_principal = drupal_get_path('module', 'principal_inicio_sipp'); |
---|
379 | $page_content = variable_get('pagina_inicio_sipp_mensaje', '<img src="' . $path_modulo_menu_principal . '/img/banner_planificacion.png" /><p align="justify">EL <b>Sistema Integral de Planificación y Presupuesto (SIPP)</b> es un sistema automatizado desarrollado por <a href="http://www.cenditel.gob.ve" target="_blank">CENDITEL</a> orientado a la planificación operativa de las instituciones públicas venezolanas, el cual permite la formulación y seguimiento de Acciones Centralizadas, proyectos operativos y acciones especÃficas. Es un software que toma como punto de partida el núcleo del <a href="http://www.drupal.org" target="_blank">CMS Drupal</a> y un conjunto de módulos del <a href="http://planificacion.cenditel.gob.ve/" target="_blank">SIPES-APN</a> . <b>SIPP</b> es software libre <b>bajo licencia GNU/GPL</b>, escrito en <b>PHP</b>, con módulos que permiten definir flujos de trabajo en las distintas fases de las Acciones Centralizadas y Proyectos Operativos.</p><ul><li>Gestión de Usuarios (Núcleo SIPES-APN).</li><li>Entes planificadores (Núcleo SIPES-APN).</li><li>Fechas para el registro de Información (Núcleo SIPES-APN).</li><li>Gestión de Acciones Centralizadas:</li><ul><li style="margin-left: 5em;">Formulación.</li><li style="margin-left: 5em;">Reformulación.</li><li style="margin-left: 5em;">Seguimiento.</li><li style="margin-left: 5em;">Gestión de Flujo de Trabajo.</li></ul><li>Gestión de Proyectos Operativos:</li><ul><li style="margin-left: 5em;">Formulación.</li><ul><li style="margin-left: 10em;">Datos Básicos.</li><li style="margin-left: 10em;">Datos Generales.</li><li style="margin-left: 10em;">Indicadores.</li><li style="margin-left: 10em;">Acciones Especificas.</li><li style="margin-left: 10em;">Datos Financieros.</li></ul><li style="margin-left: 5em;">Reformulación (Proyectos - Acciones Especificas).</li><li style="margin-left: 5em;">Seguimiento (Proyectos - Acciones Especificas).</li><li style="margin-left: 5em;">Gestión de Flujo de Trabajo.</li></ul><li>Reportes</li></ul><p><b>Página del Proyecto:</b> <a href="http://planificacion.cenditel.gob.ve/trac/wiki/SIPP" target="_blank">http://planificacion.cenditel.gob.ve/trac/wiki/SIPP</a></p><p><b>Repositorio de la Aplicación:</b> <a href="http://planificacion.cenditel.gob.ve/trac/browser/sipp" target="_blank">http://planificacion.cenditel.gob.ve/trac/browser/sipp</a></p>'); |
---|
380 | } |
---|
381 | return $page_content; |
---|
382 | } |
---|
383 | /** |
---|
384 | * Implementation of hook_block(). |
---|
385 | * |
---|
386 | * Generate a block with a promotional link to SIPP. |
---|
387 | */ |
---|
388 | function principal_inicio_sipp_block($op = 'list', $delta = 0, $edit = NULL) { |
---|
389 | switch ($op) { |
---|
390 | case 'list': |
---|
391 | $blocks[0] = array( |
---|
392 | 'info' => t('SIPP elaborado por Cenditel'), |
---|
393 | 'weight' => '10', |
---|
394 | // Not worth caching. |
---|
395 | 'cache' => BLOCK_NO_CACHE, |
---|
396 | ); |
---|
397 | return $blocks; |
---|
398 | case 'view': |
---|
399 | global $base_url; |
---|
400 | $path_modulo_menu_principal = drupal_get_path('module', 'principal_inicio_sipp'); |
---|
401 | $bloque_titulo = t("Sistema Integral de Planificación y Presupuesto (SIPP) es un sistema automatizado desarrollado por CENDITEL orientado a la planificación operativa de las instituciones públicas venezolanas"); |
---|
402 | $block['subject'] = NULL; // Don't display a title |
---|
403 | $block['content'] = '<a href="http://planificacion.cenditel.gob.ve/trac/wiki/SIPP" target="_blank"><img src="' . $base_url . '/' . $path_modulo_menu_principal .'/img/cenditel.png" title="' . $bloque_titulo . '" alt="' . $bloque_titulo . '" /></a>'; |
---|
404 | return $block; |
---|
405 | } |
---|
406 | } |
---|