Exemplo n.º 1
0
<?php

zbase_view_plugin_load('nodes');
//zbase_view_plugin_load('nodes-upload-krajee');
/**
 * Dx
 *
 * @link http://dennesabing.com
 * @author Dennes B Abing <*****@*****.**>
 * @license proprietary
 * @copyright Copyright (c) 2015 ClaremontDesign/MadLabs-Dx
 * @version 0.0.0.1
 * @since Mar 23, 2016 8:54:46 PM
 * @file images.blade.php
 * @project Expression project.name is undefined on line 13, column 15 in Templates/Scripting/EmptyPHP.php.
 * @package Expression package is undefined on line 14, column 15 in Templates/Scripting/EmptyPHP.php.
 */
$isAngularTemplate = zbase_is_angular_template();
if (empty($node) & !empty($ui)) {
    $node = $ui->form()->entity();
}
if (empty($node)) {
    $node = $ui->entity();
}
if (!empty($node)) {
    if ($node instanceof Zbase\Entity\Laravel\Node\Category) {
        $isNode = false;
        $isCategory = true;
    } elseif ($node instanceof Zbase\Entity\Laravel\User\User) {
        $isNode = false;
        $isUser = true;
Exemplo n.º 2
0
<?php

$isMobile = zbase_is_mobile();
$isMobileTablet = zbase_is_mobileTablet();
if (zbase_is_angular_template()) {
    ?>
	@include(zbase_view_file('type.angular'))
	<?php 
} else {
    ?>
	<?php 
    $prefix = zbase_tag();
    zbase_view_plugin_load('jquery');
    zbase_view_plugin_load('zbase');
    zbase_view_plugin_load('mobileangular');
    $mobileAngular = ['id' => 'mobileangular-zbase', 'type' => \Zbase\Models\View::JAVASCRIPT, 'src' => zbase_url_from_route('angular-js'), 'enable' => true, 'position' => 496];
    zbase_view_javascripts_set(['mobileangular-zbase' => $mobileAngular]);
    ?>
	<!DOCTYPE html>
	<html ng-app="MobileAngularUi<?php 
    echo $prefix;
    ?>
" ng-controller="MainController">
		<head>
			<meta charset="utf-8" />
			<base href="/admin" />
			<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
			<meta name="apple-mobile-web-app-capable" content="yes" />
			<meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimal-ui" />
			<meta name="apple-mobile-web-app-status-bar-style" content="yes" />
			<script type="text/javascript">var isAngular = true;</script>
Exemplo n.º 3
0
/**
 * Load a view plugin based on HTML plugin configuration
 * 	See property of each view-plugin type
 * 		view.plugins.$id.type = \Zbase\Models\View::HEADMETA
 * 		view.plugins.$id.enable = false|true
 * 		view.plugins.$id.name = viewport
 * 		view.plugins.$id.content = width=1020
 * 		view.plugins.$id.html.conditions = null|array|string
 * 		view.plugins.$id.html.attributes = null
 * 		view.autoload.plugins = [$id, $id2, $id3...]
 *
 *
 * @param string|array $id
 * @return Zbase\Interfaces\HtmlInterface
 */
function zbase_view_plugin_load($id)
{
    if (is_array($id)) {
        if (!empty($id['type']) && !empty($id['enable'])) {
            zbase()->view()->add($id['type'], $id);
            if (!empty($id['dependents'])) {
                foreach ($id['dependents'] as $d) {
                    if (is_array($d)) {
                        if ($d['type'] !== \Zbase\Models\View::HEADMETA) {
                            $d['id'] = $id . '-' . $d['id'];
                        }
                        zbase_view_plugin_load($d);
                    } else {
                        zbase_view_plugin_load($d);
                    }
                }
            }
        }
        return;
    }
    $plugin = zbase_config_get('view.plugins.' . $id, null);
    if (!is_null($plugin)) {
        if (!empty($plugin['enable'])) {
            if (empty($plugin['id'])) {
                $plugin['id'] = $id;
            }
            $html = zbase()->view()->add($plugin['type'], $plugin);
            if (!empty($plugin['dependents'])) {
                foreach ($plugin['dependents'] as $d) {
                    if (is_array($d)) {
                        if ($d['type'] !== \Zbase\Models\View::HEADMETA) {
                            $d['id'] = $id . '-' . $d['id'];
                        }
                        zbase_view_plugin_load($d);
                    } else {
                        zbase_view_plugin_load($d);
                    }
                }
            }
            return $html;
        }
    }
    return null;
}
Exemplo n.º 4
0
<?php

zbase_view_plugin_load('jquery');
zbase_view_plugin_load('bootstrap');
zbase_view_plugin_load('zbase');
//ob_start('zbase_view_compile');
?>
<!DOCTYPE html>
<html lang="en" zbase-package="<?php 
echo zbase_view_template_package();
?>
">
	<head>
		{!! zbase_view_render_head() !!}
		<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
		<meta name="apple-mobile-web-app-capable" content="yes"/>
		<meta name="robots" content="INDEX,FOLLOW" />
		<meta name="HandheldFriendly" content="True" />
		<meta name="MobileOptimized" content="320" />
		<link href="/zbase/assets/zivsluck/img/favicon.ico" rel="shortcut icon" type="image/x-icon">
		<link href="/zbase/assets/zivsluck/css/zivsluck.css" rel="stylesheet" />

		<meta property="og:url" content="http://zivsluck.com" />
		<meta property="og:type" content="website" />
		<meta property="og:title" content="Create your own necklace" />
		<meta property="og:site_name" content="Personalized Necklace by ZivsLuck" />
		<meta property="og:description" content="Personalized Necklaces by Zivsluck made from High Quality Stainless, Silver and Gold! Customized design, create now!" />
		<meta property="og:image" content="http://zivsluck.com/zbase/assets/zivsluck/img/zivsluckOg.png" />
		<meta property="fb:app_id" content="1020997414620227" />

Exemplo n.º 5
0
<?php

if (zbase_is_angular_template()) {
    ?>
	@include(zbase_view_file('type.angular'))
	<?php 
} else {
    ob_start('zbase_view_compile');
    zbase_view_plugin_load('jquery');
    zbase_view_plugin_load('bootstrap');
    zbase_view_plugin_load('zbase');
    zbase_view_plugin_load('metronic-admin');
    zbase_view_plugin_load('toastr');
    ?>
	<!DOCTYPE html>
	<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
	<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
	<!--[if !IE]><!-->
	<html lang="en" class="no-js">
		<head>
			<?php 
    echo zbase_view_render_head();
    ?>
		</head>
		<body class="backend page-header-fixed {{ implode(' ',zbase_view_placeholder('body_class')) }}">
			<?php 
    if (zbase_auth_has()) {
        ?>
				<?php 
        echo zbase_view_render(zbase_view_file('partial.header', 'back'));
        ?>
Exemplo n.º 6
0
 /**
  * Autoload plugins
  */
 protected function _setPlugins()
 {
     $plugins = zbase_config_get('view.autoload.plugins', []);
     if (!empty($plugins)) {
         foreach ($plugins as $id) {
             zbase_view_plugin_load($id);
         }
     }
 }
Exemplo n.º 7
0
<?php

// http://plugins.krajee.com/file-basic-usage-demo
$label = $ui->getLabel();
$wrapperAttributes = $ui->renderHtmlAttributes($ui->wrapperAttributes());
$labelAttributes = $ui->renderHtmlAttributes($ui->labelAttributes());
$inputAttributes = $ui->renderHtmlAttributes($ui->inputAttributes());
$multiple = $ui->isMultiple();
$formId = $ui->form()->htmlId();
if (!empty($multiple)) {
    // https://github.com/blueimp/jQuery-File-Upload
    zbase_view_plugin_load('fileupload');
    $onFormSubmit = $ui->uploadOnFormSubmit();
}
?>
<div <?php 
echo $wrapperAttributes;
?>
>
	<?php 
if (!empty($multiple)) {
    ?>
		<?php 
    ob_start();
    ?>
		<script type="text/javascript">
		function <?php 
    echo $ui->getHtmlId();
    ?>
UploaderDelete(ele)
		{
Exemplo n.º 8
0
 /**
  * @return void
  * @test
  */
 public function testzbase_view_plugin_load()
 {
     $config = ['type' => \Zbase\Models\View::HEADMETA, 'enable' => true, 'name' => 'viewport', 'content' => 'width=1020'];
     zbase_config_set('view.plugins.testMeta', $config);
     $this->assertInstanceOf(Zbase\Interfaces\HtmlInterface::class, zbase_view_plugin_load('testMeta'));
 }
Exemplo n.º 9
0
 * Convert Row to JSON
 * @param EntityInterface $row
 * http://jonmiles.github.io/bootstrap-treeview/#grandchild1
 * https://github.com/jonmiles/bootstrap-treeview
 */
$rows = $ui->getRows();
$treeRows = $ui->getTree();
$htmls = [];
if (empty($rows)) {
    return;
}
$isAdmin = $ui->isAdmin();
$form = $ui->form();
$selectedRows = $ui->selectedRows();
zbase_view_plugin_load('bootstrap-treeview');
zbase_view_plugin_load('bootstrap');
$uiId = $ui->id();
$attributes = $ui->wrapperAttributes();
$wrapperAttributes = $ui->renderHtmlAttributes($attributes);
$actionCreateButton = $ui->getActionCreateButton();
if (!empty($actionCreateButton)) {
    $actionCreateButton->setAttribute('size', 'default');
}
if (!empty($selectedRows)) {
    foreach ($selectedRows as $sel) {
        if (is_object($sel)) {
            $htmls[] = '<input type="hidden" value="' . $sel->alphaId() . '" id="' . $uiId . 'Category' . $sel->alphaId() . '" name="category[]">';
        } else {
            $htmls[] = '<input type="hidden" value="' . $sel . '" id="' . $uiId . 'Category' . $sel . '" name="category[]">';
        }
    }