Exemplo n.º 1
0
<form class="form-horizontal" action="./admin/menu/create" method="post">
	<div class="form-group">
		<label for="link-url" class="col-sm-4 control-label">Category</label>
		<div class="col-sm-8">
			<?php 
if ($__items = \Shop\Models\Categories::find()) {
    ?>
			<select name="details[url]" class="form-control">
			<?php 
    foreach ($__items as $__item) {
        ?>
			    <option value="./shop/category<?php 
        echo $__item->path;
        ?>
">
			    	<?php 
        echo @str_repeat("&ndash;", substr_count(@$__item->path, "/") - 1) . " " . $__item->title;
        ?>
			    </option>                    
			<?php 
    }
    ?>
 
			</select>
			<?php 
}
?>
   
		</div>
	</div>
	<div class="form-group">
Exemplo n.º 2
0
<?php

if ($categories = \Shop\Models\Categories::find()) {
    ?>
<div>

<select name="category_ids[]" class="select2" >

    <?php 
    $current = \Dsc\ArrayHelper::getColumn((array) $flash->old('categories'), 'id');
    ?>
    <?php 
    foreach ($categories as $one) {
        ?>
    <option value="<?php 
        echo $one->_id;
        ?>
" <?php 
        if (in_array($one->_id, $current)) {
            echo "selected='selected'";
        }
        ?>
>
        <?php 
        echo @str_repeat("&ndash;", substr_count(@$one->path, "/") - 1) . " " . $one->title;
        ?>
    </option>
    <?php 
    }
    ?>
 
Exemplo n.º 3
0
}
?>
>Out of Stock</option>
                    </select>
                </li>
                <li>
                    <select name="filter[category][id]" class="form-control" onchange="this.form.submit();">
                        <option value="">All Categories</option>
                        <option value="__uncategorized" <?php 
if ($state->get('filter.category.id') == '__uncategorized') {
    echo "selected='selected'";
}
?>
>Uncategorized</option>
                        <?php 
foreach (\Shop\Models\Categories::find() as $cat) {
    ?>
                        	<option value="<?php 
    echo (string) $cat->id;
    ?>
" <?php 
    if ($state->get('filter.category.id') == (string) $cat->id) {
        echo "selected='selected'";
    }
    ?>
><?php 
    echo @str_repeat("&ndash;", substr_count(@$cat->path, "/") - 1) . " " . $cat->title;
    ?>
</option>
                        <?php 
}