Exemplo n.º 1
0
 public function attributeLabels()
 {
     return ['id' => '', 'machine_name_Category' => Module::t("entity", "category"), 'machine_name' => Module::t("entity", "machine_name"), 'name' => Module::t("entity", "entity_product_name"), 'cost' => Module::t("entity", "cost")];
 }
Exemplo n.º 2
0
 public function run()
 {
     $this->blockTitle = Module::t("entity", "new_product_title");
     return $this->render('product_list', ['models' => $this->models, 'title' => $this->blockTitle]);
 }
Exemplo n.º 3
0
print Module::t("admin", "product_tab_main");
?>
        </a></li>
        <li role="presentation"><a href="#messages" aria-controls="messages" role="tab" data-toggle="tab">
            <?php 
print Module::t("admin", "product_tab_photos");
?>
        </a></li>
        <li role="presentation" class="disabled"><a href="#">
            <?php 
print Module::t("admin", "product_tab_features");
?>
        </a></li>
        <li role="presentation" class="disabled"><a href="#">
            <?php 
print Module::t("admin", "product_tab_reviews");
?>
        </a></li>
    </ul>

    <!-- Tab panes -->
    <div class="tab-content">
        <div role="tabpanel" class="tab-pane active" id="home">
            <?php 
echo $this->render('forms/product_main_form', ['model' => $model]);
?>
        </div>
        <div role="tabpanel" class="tab-pane" id="features">Not implemented yet...</div>
        <div role="tabpanel" class="tab-pane" id="messages">
            <?php 
print EntityFileList::widget(['entity' => $model]);
Exemplo n.º 4
0
if ($canUpload) {
    print FileUploader::widget(['relateTo' => $entity->id]);
}
?>

<div class="row bs-examples">
    <?php 
foreach ($entity->getFiles() as $file) {
    ?>
    <div class="col-xs-6 col-md-3 thumbnail tile" data-entity="File" data-entity-id="<?php 
    print $file->id;
    ?>
" >
        <a class="btn btn-mini btn-warning confirmable pull-right"
           data-confirm="<?php 
    print Module::t("admin", "confirm_delete_entity");
    ?>
" 
           type="button" 
           href="/file/admin/delete/<?php 
    print $file->id;
    ?>
"
        >
            <i class="glyphicon glyphicon-trash"></i>
        </a>
        <div>
            <img src="<?php 
    print $file->getAttribute("url");
    ?>
" width="120" height="120"/>            
Exemplo n.º 5
0
        <div>
            <?php 
print Html::activeDropDownList($model, 'machine_name_Category', ArrayHelper::map(Category::find()->all(), 'machine_name', 'caption'));
?>
        </div>
    </div>

    <?php 
echo $form->field($model, 'description')->textArea(['rows' => '6']);
?>

    <?php 
echo $form->field($model, 'public')->checkbox();
?>

    <div class="form-group">
        <div class="col-lg-offset-1 col-lg-11">
            <?php 
echo Html::submitButton('Save', ['class' => 'btn btn-primary']);
?>
            <?php 
echo Html::a(Module::t("admin", "cancel"), "/product/admin", ['class' => 'btn btn-warning']);
?>

        </div>
    </div>
    <?php 
ActiveForm::end();
?>
</div>
Exemplo n.º 6
0
        <?php 
// display a translated message with username being "Alexander"
NavBar::begin(['brandLabel' => Module::t('admin', 'Admin panel'), 'brandUrl' => Yii::$app->homeUrl, 'options' => ['class' => 'navbar-inverse navbar-fixed-top']]);
echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'items' => [['label' => Module::t('admin', 'logout'), 'url' => ['/admin/logout']]]]);
NavBar::end();
?>

        <div class="container">
            <?php 
echo Breadcrumbs::widget(['links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]);
?>
            <div class="row">
                <div class="col-md-2">
                    
                    <?php 
echo Menu::widget(['items' => [['label' => Module::t('admin', 'Orders'), 'url' => ['/cart/admin/']], ['label' => Module::t("admin", 'Products'), 'url' => ['/product/admin']], ['label' => Module::t("admin", 'Categories'), 'url' => ['/category/admin']], ['label' => Module::t("admin", 'Files'), 'url' => ['/file/admin ']]], 'options' => ['class' => 'list-group'], 'itemOptions' => ['class' => 'list-group-item']]);
?>
                </div>
                <div class="col-md-10">
                    <?php 
echo $content;
?>
                </div>
            </div>
            
            
        </div>
    </div>

    <footer class="footer">
        <div class="container">