function get_html(toba_ef $ef) { $objeto_js = $ef->objeto_js(); if ($this->es_abrir) { $img = toba_recurso::imagen_proyecto('reflexion/abrir.gif', true); } else { $img = toba_recurso::imagen_toba('nucleo/php.gif', true); } if (!$this->_sin_archivo) { $salida = "<a href='#' onclick=\"if ({$objeto_js}.get_estado() == ''){return;}\n\t\t\t\t\t\t\t\t\t\t\tvinculador.agregar_parametros({$this->id_vinculo}, {archivo: {$objeto_js}.get_estado()});\n\t\t\t\t\t\t\t\t\t\t\tvinculador.invocar({$this->id_vinculo})\">{$img}</a>"; } else { if (!$ef->tiene_estado()) { $img = toba_recurso::imagen_toba('nucleo/extender.gif', true); $objeto_js = $ef->controlador()->get_id_objeto_js(); //Imita el metodo de modificacion de vinculos usado por los eis $nombre = 'modificar_vinculo__ef_' . $ef->get_id(); //de otro modo se hace imposible agregarle parametros en runtime $codigo = " if (!existe_funcion({$objeto_js}, '{$nombre}')){return;}\n\t\t\t\t\t\t\t{$objeto_js}.{$nombre}({$this->id_vinculo});\n\t\t\t\t\t\t\tvinculador.invocar({$this->id_vinculo});"; $salida = "<a href='#' onclick=\"{$codigo}\">{$img}</a>"; } else { $salida = "<a href='#' onclick=\"vinculador.invocar({$this->id_vinculo})\">{$img}</a>"; } } return $salida; }