Beispiel #1
0
 public function __get($attr)
 {
     $CI = Yupii::get_CI();
     if (isset($CI->{$attr})) {
         return $CI->{$attr};
     } else {
         return NULL;
     }
 }
Beispiel #2
0
 function isThisActiveController()
 {
     $CI = Yupii::get_CI();
     if ($CI->activeYupiiController == $this->getClassName()) {
         return TRUE;
     } else {
         return FALSE;
     }
 }
Beispiel #3
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);
 }
Beispiel #4
0
 public static function loadScriptFiles()
 {
     Yupii::getHeaderScript();
     Yupii::get_CI();
     return Yupii::$CI->load->view('yupii/scriptfiles', NULL);
 }
Beispiel #5
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>
Beispiel #6
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>
Beispiel #7
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 
}
?>
                    });
            }