Esempio n. 1
0
<?php

Part::input($type, 'string');
Part::input($id, 'string');
Part::input($name, 'string');
Part::input($value, 'string', '');
Part::input($attrs, 'HtmlAttributes', new HtmlAttributes());
Part::input($classes, 'HtmlClasses', new HtmlClasses('nmc-controls-text'));
?>
<input <?php 
echo $classes;
?>
 id="<?php 
echo $id;
?>
" name="<?php 
echo $name;
?>
" type="<?php 
echo $type;
?>
" <?php 
echo $attrs;
if ($value != '') {
    echo " value=\"{$value}\"";
}
?>
/>
Esempio n. 2
0
<?php

Part::input($form, 'ModelForm');
Part::input($title, 'string');
$form->begin();
?>
	<fieldset>
		<legend><?php 
echo $title;
?>
</legend>
		<?php 
$form->input('{{primaryKey}}');
?>
		
		{{editFields}}
		<input type="submit" value="Save" />
	</fieldset>
<?php 
$form->end();
Esempio n. 3
0
<?php

Part::input($controller, 'Controller');
Part::input($objects, 'ModelSet');
Part::input($columns, 'int', 4);
$count = $objects->count();
$perColumn = ceil($count / $columns);
echo '<table>';
for ($row = 0; $row < $perColumn; $row++) {
    echo '<tr>';
    for ($col = 0; $col < $columns; $col++) {
        $object = isset($objects[$perColumn * $col + $row]) ? $objects[$perColumn * $col + $row] : '';
        $value = is_object($object) ? $object->name : '';
        if ($object instanceof RecessReflectorClass && $object->package() != null) {
            $prefix = $object->package()->name . '.';
            $linkTo = 'class';
        } else {
            $prefix = '';
            $linkTo = 'package';
        }
        //$linkTo = get_class($object) == 'RecessReflectorClass' ? 'class' : 'package';
        echo '<td><a href="', $controller->urlTo($linkTo . 'Info', $prefix . $value), '">', $value, '</a></td>';
    }
    echo '</tr>';
}
echo '</table>';
Esempio n. 4
0
<?php

Part::input($class, 'string');
Part::input($column, 'RecessColumnDescriptor');
?>
<tr<?php 
if ($class != '') {
    echo " class=\"{$class}\"";
}
?>
>
	<td><?php 
echo $column->isPrimaryKey ? 'Yes' : '';
?>
</td>
	<td><?php 
echo $column->name;
?>
</td>
	<td><?php 
echo $column->type;
?>
</td>
	<td><?php 
echo $column->nullable ? 'Y' : 'N';
?>
</td>
	<td><?php 
echo $column->defaultValue == '' ? 'N/A' : $column->defaultValue;
?>
</td>
Esempio n. 5
0
<?php

Part::input($items, 'array');
Part::input($even, 'Block');
Part::input($odd, 'Block');
$i = 0;
foreach ($items as $item) {
    if ($i++ % 2 == 0) {
        $even->draw($item);
    } else {
        $odd->draw($item);
    }
}
Esempio n. 6
0
<?php

Part::input($theme, 'Theme');
?>
<h1><?php 
echo Html::anchor(Url::action('ThemeController::details', $theme->id), $theme->name);
?>
 by <?php 
echo $theme->artist;
?>
</h1>

<ul>
	<?php 
foreach ($icons as $icon) {
    ?>
		<li><?php 
    echo $icon->src;
    ?>
</li>
	<?php 
}
?>
</ul>
Esempio n. 7
0
<?php

Part::input($first, 'string');
Part::input($second, 'int');
Part::input($third, 'string');
for ($i = 0; $i < $second; $i++) {
    echo $first . $third;
}
Esempio n. 8
0
<?php

Part::input($items, 'array');
Part::input($block, 'Block');
foreach ($items as $item) {
    $block->draw($item);
}
Esempio n. 9
0
<?php

Part::input($container, 'Container');
// $this
Part::input($name, 'string');
Part::input($children, 'ArrayBlock');
Part::input($defaultSkin, 'string', 'skins/dd-dt');
Part::input($legend, 'string');
Part::input($attrs, 'HtmlAttributes', new HtmlAttributes());
Part::input($classes, 'HtmlClasses', new HtmlClasses('container-fieldset'));
?>
<!-- begin <?php 
echo $name;
?>
 container -->
<fieldset id="<?php 
echo $container->getId();
?>
" <?php 
echo $classes;
?>
 <?php 
echo $attrs;
?>
>
<legend><?php 
echo $legend;
?>
</legend>
<dl class="containers-dl">
<?php 
Esempio n. 10
0
<?php

Part::input($one, 'string');
echo $one;
Esempio n. 11
0
<?php

Part::input($container, 'Container');
// $this
Part::input($name, 'string');
Part::input($children, 'ArrayBlock');
Part::input($defaultSkin, 'string', 'skins/default');
?>
<!-- BEGIN <?php 
echo $name;
?>
 CONTAINER -->
<?php 
echo $children;
?>
<!-- END <?php 
echo $name;
?>
 FIELDSET -->
Esempio n. 12
0
<?php

Part::input($optional, 'string', 'default');
if ($optional == 'default') {
    echo 'default';
} else {
    echo 'non-default';
}
Esempio n. 13
0
<?php

Part::input($id, 'string');
Part::input($name, 'string');
Part::input($value, 'string', '');
Part::input($attrs, 'HtmlAttributes', new HtmlAttributes());
Part::input($classes, 'HtmlClasses', new HtmlClasses('html-textarea'));
?>
<textarea <?php 
echo $classes;
?>
 id="<?php 
echo $id;
?>
" name="<?php 
echo $name;
?>
" <?php 
echo $attrs;
?>
>
<?php 
echo $value;
?>
</textarea>
Esempio n. 14
0
<?php

Part::input($control, 'Control');
Part::input($name, 'string');
Part::input($value, 'string', '__false__');
Part::input($label, 'string', '');
Part::input($attrs, 'HtmlAttributes', new HtmlAttributes());
Part::input($classes, 'HtmlClasses', new HtmlClasses('control-text'));
if ($value == '__true__') {
    $attrs->set('checked', 'checked');
}
$value = '__true__';
$controlBlock = Part::block('html/input', 'checkbox', $control->getId(), $control->getFormName(), $value, $attrs, $classes);
Part::draw($control->getSkin(), $controlBlock, $label);
Esempio n. 15
0
<?php

Part::input($name, 'string');
Part::input($children, 'ArrayBlock');
Part::input($defaultSkin, 'string', 'skins/default');
Part::input($attrs, 'HtmlAttributes', new HtmlAttributes());
Part::input($classes, 'HtmlClasses', new HtmlClasses('containers-div'));
?>
<!-- begin <?php 
echo $name;
?>
 container -->
<div <?php 
echo $classes;
?>
 <?php 
echo $attrs;
?>
>
<?php 
echo $children;
?>
</div>
<!-- end <?php 
echo $name;
?>
 container -->
Esempio n. 16
0
<?php

Part::input($id, 'string');
Part::input($name, 'string');
Part::input($value, 'string', '');
Part::input($attrs, 'HtmlAttributes', new HtmlAttributes());
Part::input($classes, 'HtmlClasses', new HtmlClasses('html-select'));
Part::input($choices, 'array');
?>
<select <?php 
echo $classes;
?>
 id="<?php 
echo $id;
?>
" name="<?php 
echo $name;
?>
" <?php 
echo $attrs;
?>
><?php 
$inOptGroup = false;
foreach ($choices as $key => $choiceValue) {
    if ($choiceValue === null) {
        if ($inOptGroup) {
            echo "</optgroup>\n";
        }
        $inOptGroup = true;
        echo "<optgroup label=\"{$key}\">\n";
        continue;
Esempio n. 17
0
<?php

Part::input($routes, 'RtNode');
Part::input($omit, 'string');
$fullPath = $_ENV['url.base'];
if (strrpos($fullPath, '/') == strlen($fullPath) - 1) {
    $fullPath = substr($fullPath, 0, -1);
}
if (!isset($omit)) {
    $omit = '';
}
?>
<table>
<thead><td>HTTP</td><td>Route</td><td>Controller</td><td>Method</td></thead>
<tbody>
	<?php 
Part::draw('routes/rows', $routes, $fullPath, $omit);
?>
</tbody>
</table>
Esempio n. 18
0
<?php

Part::input($control, 'Control');
Part::input($name, 'string');
Part::input($value, 'string', '');
Part::input($label, 'string', '');
Part::input($attrs, 'HtmlAttributes', new HtmlAttributes());
Part::input($classes, 'HtmlClasses', new HtmlClasses('control-submit'));
$controlBlock = Part::block('html/input', 'submit', $control->getId(), $control->getFormName(), $value, $attrs, $classes);
Part::draw($control->getSkin(), $controlBlock, $label);
Esempio n. 19
0
<?php

Part::input($container, 'Container');
// $this
Part::input($name, 'string');
Part::input($children, 'ArrayBlock');
Part::input($defaultSkin, 'string', 'skins/default');
Part::input($method, 'string', 'POST');
Part::input($action, 'string', '');
Part::input($attrs, 'HtmlAttributes', new HtmlAttributes());
Part::input($classes, 'HtmlClasses', new HtmlClasses('container-form'));
?>
<!-- begin <?php 
echo $name;
?>
 form -->
<form id="<?php 
echo $container->getId();
?>
" method="<?php 
echo $method;
?>
"<?php 
if ($action != '') {
    ?>
 action="<?php 
    echo $action;
    ?>
"<?php 
}
?>
Esempio n. 20
0
<?php

Part::input($action, 'string');
Part::input($display, 'string');
Part::input($selectedUrl, 'string');
if ($selectedUrl == $display) {
    $liClass = ' class="highlight"';
} else {
    $liClass = '';
}
echo '<li' . $liClass . '>' . Html::anchor(Url::action($action), $display) . '</li>';
Esempio n. 21
0
<?php

Part::input($htmlInput, 'PartBlock');
Part::input($label, 'string', '');
?>
<p><?php 
if ($label != '') {
    ?>
<label<?php 
    if (($id = $htmlInput->get('id')) != '') {
        ?>
 for="<?php 
        echo $id;
        ?>
"<?php 
    }
    ?>
><?php 
    echo $label;
    ?>
</label><br /><?php 
} else {
    echo '&nbsp;';
}
echo $htmlInput;
?>
</p>