Example #1
0
 public function __get($attr)
 {
     $CI = Yupii::get_CI();
     if (isset($CI->{$attr})) {
         return $CI->{$attr};
     } else {
         return NULL;
     }
 }
Example #2
0
 function isThisActiveController()
 {
     $CI = Yupii::get_CI();
     if ($CI->activeYupiiController == $this->getClassName()) {
         return TRUE;
     } else {
         return FALSE;
     }
 }
Example #3
0
 public static function get_CI()
 {
     if (Yupii::$CI == NULL) {
         $f = CI_Controller::get_instance();
         if ($f == NULL) {
             $f = new CI_Controller();
         }
         Yupii::$CI = $f->get_instance();
     }
     return Yupii::$CI;
 }
Example #4
0
 /**
  * Retorna un objeto de la clase YDatasetModel y lo asigna a la propiedad "modelo"
  *
  * @return YConcreteDatasetModel
  */
 private function _getOrConstructModel()
 {
     if (is_file(APPPATH . 'models/' . $this->getClassName() . '.php')) {
         Yupii::get_CI()->load->model($this->getClassName(), 'modelo');
     } else {
         //this is weird and ugly but is the only way to make it work on CI3...
         Yupii::get_CI()->load->model('Yconcretedatasetmodel', 'modelo');
         if (ifSet($this->modelo) == NULL) {
             $this->modelo = new YConcreteDatasetModel();
         }
     }
     return ifSet($this->modelo, NULL);
 }
Example #5
0
<!DOCTYPE html>
<html lang="es">
<head>
    <meta charset="utf-8">
    <base href="<?php 
echo config_item('base_url');
?>
">
    <link rel="icon" href="./assets/images/sort_both.png" type="image/png">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="author" content="CGT">

    <?php 
Yupii::getHeaderAll();
?>
    <title><?php 
echo get_instance()->config->item('yupii_application_title');
?>
</title>
    <style type="text/css">
        body, .container {
            padding: 0 !important;
        }
    </style>

</head>
<body class="">
<div class="container">
    <noscript>
        <h1 class='error'>Para utilizar las funcionalidades completas de este sitio es necesario tener JavaScript
            habilitado.</h1>
Example #6
0
    echo $f;
    ?>
">
                                    <?php 
    echo $fieldlist[$f]->getLabel();
    ?>
</option>
                            <?php 
}
?>
                        </select>
                    </div>
                    <div class="btn-toolbar" style="margin-top:10px;margin-bottom:10px;">

                        <?php 
if (Yupii::get_CI()->activeYupiiObject->modelo->canInsert) {
    ?>
                            <button id="btn_<?php 
    echo $t;
    ?>
_New" class="toolbtn btn btn-primary">
                                <i class="fa fa-plus-circle fa-lg"></i>
                            </button>
                        <?php 
}
?>
                        <button id="btn_<?php 
echo $t;
?>
_Refresh" class="toolbtn btn btn-primary">
                            <i class="fa fa-refresh fa-lg"></i>
Example #7
0
?>
btn_ok_search" class="btn btn-success">
            <i class="fa fa-check fa-lg"></i>&nbsp;<?php 
echo $this->lang->line('yupii_accept');
?>
        </button>
        <button id="<?php 
echo $t;
?>
btn_cancel_search" class="btn btn-default">
            <i class="fa fa-undo fa-lg"></i>&nbsp;<?php 
echo $this->lang->line('yupii_cancel');
?>
        </button>
        <?php 
if (Yupii::get_CI()->activeYupiiObject->canUpdate() or Yupii::get_CI()->activeYupiiObject->canInsert()) {
    ?>
            <button id="<?php 
    echo $t;
    ?>
btn_search_admin" class="btn btn-primary col-md-offset-8 col-sm-offset-5">
                <i class="fa fa-pencil fa-lg"></i>&nbsp;
                <?php 
    echo $this->lang->line('yupii_edit');
    ?>
            </button>
        <?php 
}
?>
    </div>
</div>
Example #8
0
            ;
            <?php 
echo $t;
?>
_idactivo = '';
            if (json.aaData.length > 0) {
                $("#<?php 
echo $t;
?>
_table tbody tr").each(
                    function () {
                        var op = $(this).find("td").last();
                        var id = op.text();
                        op.attr('idr', id);
                        <?php 
if (Yupii::get_CI()->activeYupiiObject->modelo->canDelete) {
    ?>
                        op.html('<i class="fa fa-trash fa-lg ybtndelete"></i>');
                        op.addClass('<?php 
    echo $t;
    ?>
deleteme');
                        <?php 
} else {
    ?>
                        op.html('');
                        <?php 
}
?>
                    });
            }