Beispiel #1
0
defined('SYSPATH') or die('No direct script access.');
$tpl = '<tr><th>{NAME}</th><td>{VALUE}</td></tr>';
$render_table = function ($name, $class = 'eight') use($tpl, $properties) {
    $list = array();
    $list[] = __(Arr::path($properties, $name . '.name'));
    $temp = Arr::path($properties, $name . '.value');
    $temp = is_array($temp) ? $temp : array();
    $list = array_merge($list, $temp);
    $buffer = array();
    foreach ($list as $_key => $_item) {
        if (is_array($_item)) {
            if (empty($_item['value'])) {
                continue;
            }
            $_name = explode('.', Helper_Property::label($_item['name']));
            $buffer[] = '<tr><td>' . end($_name) . '</td><td>' . $_item['value'] . '</td></tr>';
        } else {
            $buffer[] = '<tr><th colspan="2">' . $_item . '</th></tr>';
        }
    }
    if (count($buffer) > 1) {
        echo '<div class="', $class, ' columns"><table class="basic-table shortcode">';
        echo implode('', $buffer);
        echo '</table></div>';
    }
};
?>
	<div class="tab-content tab-content-margin-none" id="tab-properties">
<?php 
$render_table('Characteristics', 'eight');
Beispiel #2
0
<?php

defined('SYSPATH') or die('No direct access allowed.');
foreach ($properties as $_title => $_item) {
    echo '<fieldset>';
    echo '<legend>', Helper_Property::label($_item['name']), '</legend>';
    echo View_Admin::factory('form/property/field', array('item' => $_item, 'title' => $_title));
    echo '</fieldset>';
}