Conjunto de cambios 3ccd557 en sipes para 0.3-modules/ente_planificador_hierarchical/ente_planificador_hierarchical.module
- Fecha y hora:
- 08/06/2016 16:22:38 (hace 8 años)
- Branches:
- stable, version-3.0
- Children:
- 132da34
- Parents:
- 79821dd
- Fichero:
-
- 1 editado
Leyenda
- No modificado
- Añadido
- Eliminado
-
0.3-modules/ente_planificador_hierarchical/ente_planificador_hierarchical.module
r303fae2 r3ccd557 51 51 if (_ente_planificador_hierarchical_edita_datos_wk_access($proyecto)){ 52 52 $links['proyecto_state'] = array( 53 'data' => l(t(' Cambiar el estado'), 'proyectosop/' . $proyecto->nid . '/workflow'),53 'data' => l(t('Revisión del Proyecto'), 'proyectosop/' . $proyecto->nid . '/workflow'), 54 54 'class' => 'proyectos-operativos-estado', 55 55 ); … … 307 307 } 308 308 $node->content['ente_planificador_hierarchical_fathers'] = array( 309 '#value' => '<div id = "node-fathers"><b> Fathers:</b> ' . $fathers . '</div>',309 '#value' => '<div id = "node-fathers"><b>' . t('Fathers') . ':</b> ' . $fathers . '</div>', 310 310 ); 311 311 … … 319 319 } 320 320 $node->content['ente_planificador_hierarchical_childrens'] = array( 321 '#value' => '<div id = "node-childrens"><b> Childrens:</b> ' . $fathers . '</div>',321 '#value' => '<div id = "node-childrens"><b>' . t('Childrens') . ':</b> ' . $fathers . '</div>', 322 322 ); 323 323 … … 347 347 */ 348 348 function ente_planificador_hierarchical_form_alter(&$form, $form_state, $form_id) { 349 if ($form_id == 'proyectos_operativos_admin_workflow_settings') { 350 $wid = workflow_get_workflow_for_type('proyectos_operativos'); 351 if ($wid){ 352 $states = workflow_get_states($wid); 353 354 $form['buttons']['#weight'] = 1000; 355 if (count($states)) { 356 $form['workflow_formuladores'] = array( 357 '#type' => 'fieldset', 358 '#title' => t('Flujos de Formuladores'), 359 '#collapsible' => TRUE, 360 '#collapsed' => FALSE, 361 ); 362 $hierarchical = variable_get('ente_planificador_hierarchical_count', 2); 363 for($i = 1; $i < $hierarchical + 1; $i++) { 364 $form['workflow_formuladores']['proyectos_operativos_state_form_' . $i] = array( 365 '#type' => 'select', 366 '#options' => $states, 367 '#default_value' => variable_get('proyectos_operativos_state_form_' . $i, 0), 368 '#title' => t('Estado formulador del nivel (@nivel)', array('@nivel' => $i)), 369 '#multiple' => FALSE, 370 ); 371 372 373 } 374 } 375 } 376 } 377 378 if ($form_id == 'workflow_tab_form') { 379 if ($form['node']['#value']->type == 'proyectos_operativos') { 380 $nombre = check_plain((t($form['#wf']->name))); 381 $ente_planificador = ente_planificador_leer_ente_planificadores($form['node']['#value']->field_proyecto_ente[0]['nid']); 382 $hierarchical = variable_get('ente_planificador_hierarchical_count', 2); 383 for($i = 1; $i < $hierarchical + 1; $i++) { 384 //print_r($ente_planificador); 385 if ($ente_planificador->tipo != $i) { 386 $estado = variable_get('proyectos_operativos_state_form_' . $i, 0); 387 if (isset($form['workflow'][$nombre]['#options'][$estado])) { 388 unset($form['workflow'][$nombre]['#options'][$estado]); 389 } 390 } 391 } 392 } 393 } 394 395 396 349 397 if ($form_id == 'user_profile_form' && arg(2) != 'chgpwd' && user_access('administer users')) { 350 398 if (isset($form['_account']['#value']->entes) && $form['_account']['#value']->entes[0]['nid']) {
Nota: Vea TracChangeset
para ayuda en el uso del visor de conjuntos de cambios.