Conjunto 93a028f en sipes


Ignorar:
Fecha y hora:
19/08/2016 17:29:16 (hace 8 años)
Autor:
lhernandez <lhernandez@…>
Branches:
stable, version-3.0
Children:
e32e12b
Parents:
56b9236 (diferencia), 0eec38b (diferencia)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Mensaje:

Merge branch 'version-3.0' of https://planificacion.cenditel.gob.ve/scm/git/sipes into version-3.0

Ubicación:
0.3-modules
Ficheros:
5 editados

Leyenda

No modificado
Añadido
Eliminado
  • 0.3-modules/ente_planificador/ente_planificador.module

    r3599660 r93a028f  
    22002200        $form['#ente_planificador_load'] = $ente_planificador;
    22012201        if ($ente_planificador->nid) {
    2202           $form['destination']['#value'] = 'node/' . $ente_planificador->nid . "/usuarios";
     2202         // $form['destination']['#value'] = 'node/' . $ente_planificador->nid . "/usuarios";
    22032203        }
    22042204        if ($ente_planificador) {
  • 0.3-modules/principal_inicio_sipp/principal_inicio_sipp.module

    r498b89c r2391319  
    383383
    384384function menu_principal_documentacion_page() {
    385  
     385  global $user;
     386  $ente = usuario_tiene_ente($user->uid);
     387  $ente_planificador = 0;
     388  if ($ente && $ente->nid) {
     389    $ente_planificador = ente_planificador_leer_ente_planificadores($ente->nid);
     390  }
     391
    386392  $path_modulo_menu_principal = drupal_get_path('module', 'principal_inicio_sipp');
    387393 
     
    390396  $page_content .= '<table align=\"center\" border=\"0\"><tr>';
    391397 
    392   //$image_tag = theme_image($path_modulo_menu_principal.'/img/menu/por_asignar.png').'<br>'.'<b>'.t('Descripción del sistema').'</b>';
    393   $image_tag = '<b>'.t('Manual del Usuario').'</b>';
     398  $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/planners.png').'<br>'.'<b>'.t('Manual del Usuario').'</b>';
    394399  $page_content .= "<td width=\"50%\" align=\"center\">".l($image_tag, 'https://sipes.mppp.gob.ve/sites/default/files/ManualdeUsuario.pdf', array('html'=>TRUE))."</td>";
    395400   
    396   //$image_tag = theme_image($path_modulo_menu_principal.'/img/menu/por_asignar.png').'<br>'.'<b>'.t('Sobre la fase de desarrollo').'</b>';
    397   $image_tag = '<b>'.t('Video tutoriales').'</b>';
     401  $image_tag = theme_image($path_modulo_menu_principal.'/img/menu/plannersearch.png').'<br>'.'<b>'.t('Video tutoriales').'</b>';
    398402  $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>";
    399    
     403
    400404  $page_content .= '</tr></table>';
    401405  $page_content .= '<br><br>';
    402  
     406
     407  $page_content .= '<h4>Reportes:</h4>';
     408  $page_content .= '<table align=\"center\" border=\"0\"><tr>';
     409
     410  if ($ente && $ente->nid) {
     411    $ente_planificador = ente_planificador_leer_ente_planificadores($ente->nid);
     412  }
     413
     414  //$image_tag = theme_image($path_modulo_menu_principal.'/img/reportes/reports.png').'<br>'.'<b>'.t('Reporte General').'</b>';
     415  //$page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'sipp_report_mpp/sectorial', array('html'=>TRUE))."</td>";
     416
     417  if (user_access('edit own planificador')) {
     418    $image_tag = theme_image($path_modulo_menu_principal.'/img/reportes/reports.png').'<br>'.'<b>'.t('Reporte Para la Coordinación General').'</b>';
     419    $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'sipp_report_mpp/corrdgen', array('html'=>TRUE))."</td>";
     420    //reportes revisores
     421    $image_tag = theme_image($path_modulo_menu_principal.'/img/reportes/reports.png').'<br>'.'<b>'.t('Reporte Para el Enlace revisor').'</b>';
     422    $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'sipp_report_mpp/revisor', array('html'=>TRUE))."</td>";
     423    //reportes supervisores
     424    $image_tag = theme_image($path_modulo_menu_principal.'/img/reportes/reports.png').'<br>'.'<b>'.t('Reporte Para el Coordinador de Ambito').'</b>';
     425    $page_content .= "<td width=\"25%\" align=\"center\">".l($image_tag, 'sipp_report_mpp/cooamb', array('html'=>TRUE))."</td>";
     426  }
     427  else {
     428    if ($ente->nid && $user->ambito_user) {
     429      $ambito = taxonomy_get_term($user->ambito_user);
     430      $terms = taxonomy_get_children($ambito->tid);
     431      foreach ($terms as $term) {
     432        $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>';
     433      }
     434    }
     435    $page_enlace = '';
     436    if ($ente_planificador && $ente_planificador->tipo == 1) {
     437      $roles_type = _ente_planificador_hierarchical_get_roles_type($ente_planificador->tipo);
     438      foreach($roles_type as $rol => $text) {
     439        $text1 = t('Ente tipo @number (@type)', array('@number' => $ente_planificador->tipo, '@type' => $text));
     440        if ($text1 ==  $user->roles[key($user->roles)] && $rol == 'enl') {
     441          $page_enlace = "<td width=\"50%\" align=\"center\">".l($image_tag, 'sipp_report_mpp/revisor', array('html'=>TRUE))."</td>";
     442        }
     443        elseif ($text1 ==  $user->roles[key($user->roles)] && $rol == 'sup') {
     444          $page_enlace = "<td width=\"50%\" align=\"center\">".l($image_tag, 'sipp_report_mpp/cooamb', array('html'=>TRUE))."</td>";
     445        }
     446      }
     447    }
     448    $page_content .= $page_enlace;
     449  }
     450
     451  $page_content .= '</tr></table>';
     452  $page_content .= '<br><br>';
     453
    403454  return $page_content;
    404455}
  • 0.3-modules/proyectos_operativos/proyectos_operativos.admin.inc

    rfe27a28 r56b9236  
    7171    '#options' => $years,
    7272  );
     73  $form['days']['proyectos_operativos_perm_nuevos'] = array(
     74    '#type' => 'checkbox',
     75    '#title' => t('Permitir agregar nuevos proyectos.'),
     76    '#default_value' => variable_get('proyectos_operativos_perm_nuevos', TRUE),
     77  );
     78
     79  $entes = obtener_ente_planificador();
     80  $form['days']['proyectos_operativos_add_entes'] = array(
     81    '#title' => t('Solo permitir agregar proyectos a estos entes'),
     82    '#type' => 'select',
     83    '#default_value' => variable_get('proyectos_operativos_add_entes', array()),
     84    '#options' => $entes,
     85    '#multiple' => 'TRUE',
     86  );
     87
     88  $form['days']['proyectos_operativos_perm_edit'] = array(
     89    '#type' => 'checkbox',
     90    '#title' => t('Permitir editar proyectos.'),
     91    '#default_value' => variable_get('proyectos_operativos_perm_edit', TRUE),
     92  );
     93
     94  $form['days']['proyectos_operativos_updt_entes'] = array(
     95    '#title' => t('Solo permitir modificar proyectos a estos entes'),
     96    '#type' => 'select',
     97    '#default_value' => variable_get('proyectos_operativos_updt_entes', array()),
     98    '#options' => $entes,
     99    '#multiple' => 'TRUE',
     100  );
     101
     102
    73103  $form['days']['proyectos_operativos_reformulacion_meses'] = array(
    74104    '#type' => 'checkbox',
  • 0.3-modules/proyectos_operativos/proyectos_operativos.module

    rc689ea3 rac2d4d9  
    529529    return FALSE;
    530530  }
     531  if (!variable_get('proyectos_operativos_perm_nuevos', TRUE)) {
     532    $entes_permitidos = variable_get('proyectos_operativos_add_entes', array());
     533    $tam = count($entes_permitidos);
     534    if (!$tam) {
     535      return FALSE;
     536    }
     537    if (!isset($entes_permitidos[$ente_planificador->nid])) {
     538      return FALSE; 
     539    }
     540  }
    531541  $first_state = 0;
    532542  if (!user_access('admin planificador') && module_exists('workflow')) {
     
    579589  if (!$ente_planificador || !$ente_planificador->nid) {
    580590    return FALSE;
     591  }
     592  if (!variable_get('proyectos_operativos_perm_edit', TRUE)) {
     593    $entes_permitidos = variable_get('proyectos_operativos_updt_entes', array());
     594    $tam = count($entes_permitidos);
     595    if (!$tam) {
     596      return FALSE;
     597    }
     598    if (!isset($entes_permitidos[$ente_planificador->nid])) {
     599      return FALSE; 
     600    }
    581601  }
    582602  $current_time = time();
  • 0.3-modules/sipesonapre/sipesonapre.module

    r51860d3 r0d5597e  
    3939      '#weight' => -1,
    4040    );
     41    $form['sipesonapre']['proyectos_operativos_perm_edit'] = array(
     42      '#type' => 'checkbox',
     43      '#title' => t('Convertir ISO-8859-1'),
     44      '#default_value' => variable_get('onapre_encode_ISO_8859_1', FALSE),
     45    );
    4146    if ($accion_especifica_number_fields > 0) {
    4247      for($i = 0; $i < $accion_especifica_number_fields; $i++) {
     
    168173    header('Content-type: text/plain');
    169174    header('Content-Disposition: attachment; filename="' . $filename . '"');
     175    if (variable_get('onapre_encode_ISO_8859_1', FALSE)) {
     176      $cadena = utf8_decode ($cadena);
     177    }
    170178    print $cadena;
    171179    exit();
Nota: Vea TracChangeset para ayuda en el uso del visor de conjuntos de cambios.