İlk temizlik tamamlandı bir önceki projeden
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
function col2($size, $title="", $color="0", $options=[], $topButtons=[], $columns=[]) {
|
||||
$id = str_slug($title);
|
||||
$colors = colors();
|
||||
$u = u();
|
||||
?>
|
||||
|
||||
<div class="<?php echo $size ?>">
|
||||
<div class="block block-themed block-rounded <?php echo isset($options['border']) ? "border" : "" ?>" id="<?php echo $id; ?>">
|
||||
<?php if(!isset($options['no-options']) && $title!="") { ?>
|
||||
<!-- Fixed toolbar for buttons, positioned at the top-right -->
|
||||
<div class="fixed-toolbar" style="position: fixed; top: 70px; right: 0px; width: auto; z-index: 1000; background-color: rgba(255,255,255,0.8); padding: 5px; border-radius: 4px; box-shadow: 0 2px 5px rgba(0,0,0,0.1);">
|
||||
<div type="button" class="btn-block-option select-columns d-none" data-toggle="modal" data-target="#select-columns" >
|
||||
<i class="fa fa-table-columns"></i>
|
||||
</div>
|
||||
<?php foreach($options AS $icon => $href) { ?>
|
||||
<a href="<?php echo $href ?>" class="btn-block-option"><i class="fa fa-<?php echo $icon ?>"></i></a>
|
||||
<?php } ?>
|
||||
<?php if(isAuth($id, "write")) { ?>
|
||||
<div class="btn btn-outline-success add-btn d-none" onclick="$('#new-modal').modal()"><i class="fa fa-plus"></i></div>
|
||||
<?php } ?>
|
||||
|
||||
<!-- To toggle fullscreen a block, just add the following properties to your button: data-toggle="block-option" data-action="fullscreen_toggle" -->
|
||||
<button type="button" class="btn-block-option d-none" data-toggle="block-option"
|
||||
<?php if(oturumesit("full-screen-block", $id)) { ?>
|
||||
onclick="$.get('?ajax=full-screen-block-remove')"
|
||||
<?php } else { ?>
|
||||
onclick="$.get('?ajax=full-screen-block&id=<?php echo($id) ?>')"
|
||||
<?php } ?>
|
||||
data-action="fullscreen_toggle"><i class="si si-size-fullscreen"></i></button>
|
||||
|
||||
<?php if(isset($options['export'])) { ?>
|
||||
<?php if($u->level == "Admin") { ?>
|
||||
<a href="<?php echo url("admin/truncate/". $options['export']) ?>" <?php echo delete_teyit() ?> class="btn-block-option " title="<?php echo e2("Delete All") ?>" ><i class="fa fa-trash"></i></a>
|
||||
<?php } ?>
|
||||
<a target="_blank" href="<?php echo url("admin-ajax/export-query?table_name=". $options['export']) ?>&module=<?php echo $id ?>&columns=<?php echo base64_encode(implode(",", $columns)) ?>" class="btn-block-option" title="<?php echo e2("Export to CSV") ?>" ><i class="fa fa-download"></i> CSV (Semicolon ;;;)</a>
|
||||
<a target="_blank" href="<?php echo url("admin-ajax/export-query?table_name=". $options['export']) ?>&module=<?php echo $id ?>&delimiter=,&columns=<?php echo base64_encode(implode(",", $columns)) ?>" class="btn-block-option" title="<?php echo e2("Export to CSV") ?>" ><i class="fa fa-download"></i> CSV (Comma ,,,)</a>
|
||||
<a target="_blank" href="<?php echo url("admin-ajax/export-query?file_type=xlsx&table_name=". $options['export']) ?>&module=<?php echo $id ?>&columns=<?php echo base64_encode(implode(",", $columns)) ?>" class="btn-block-option" title="<?php echo e2("Export to XLSX") ?>" ><i class="fa fa-download"></i> XLSX</a>
|
||||
|
||||
<a href="<?php echo url("admin/export/". $options['export']) ?>?&module=<?php echo $id ?>&columns=<?php echo base64_encode(implode(",", $columns)) ?>" class="btn-block-option d-none" title="<?php echo e2("Export to Excel") ?>" ><i class="fa fa-download"></i></a>
|
||||
<?php if(isAuth($id, "write")) { ?>
|
||||
<label for="excel-file" class="btn-block-option d-none" click="" title="<?php echo e2("Import to Excel") ?>" ><i class="fa fa-upload"></i></label>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if(isset($topButtons)) {
|
||||
foreach($topButtons AS $topButton) { ?>
|
||||
<a href="<?php echo $topButton['href'] ?>" class="<?php echo @$topButton['class'] ?>"><?php echo $topButton['html'] ?></a>
|
||||
<?php }
|
||||
} ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="block-content <?php echo isset($options['content-class']) ? $options['content-class'] : "" ?>">
|
||||
|
||||
|
||||
<?php
|
||||
}
|
||||
function _col2() {
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
Reference in New Issue
Block a user