Exemplo n.º 1
0
<?php
NavBar::begin([
    'brandLabel' => '<img alt="" src="/images/logo-reglobe.png">',
    'brandUrl' => '#',
    'renderInnerContainer' => false,
    'options' => [
        'class' => 'navbar navbar-default navbar-static-top',
        'style' => 'margin-bottom: 0',
        'role' => 'navigation',
        'id' => false
    ],
]);

echo Nav::widget([
      'items' => [
          ['label' => '<div class="Partner-logo navbar-brand">Apple Exchange Program </div>', 'url' => Auction::createUrl('site/login')],
      ],
    'encodeLabels' => false,
    'options' => [
        'class' => 'nav navbar-top-links navbar-right',
    ]
  ]);

NavBar::end();
?>

<div class="container">
    <?= $content?>
</div>
<?php $this->endBody() ?>
</body>
Exemplo n.º 2
0
                'options' => [
                    'class' => 'form-control',
                    'data-id' => '',
                    'placeholder' => 'Search..'
                ]
            ]); ?>
            <span class="input-group-btn">
            <?= Html::submitButton('<i class="fa fa-search"></i>', [
                'id' => 'company-id',
                'class' => 'btn btn-primary',
                'onClick' => new JsExpression('
                var id = $("#name_search").attr("data-id");
                if(id == ""){
                    return false;
                }else{
                    window.location.href = "'. Auction::createUrl('dealer/company/view') .'?id="+id;
                }
                ')
            ]) ?>
            </span>
        </div>
    </div>
</div>

<div class="row">
    <?= ListView::widget([
        'dataProvider' => $dataProvider,
        'itemView' => '_info_panel',
        'emptyText' => '',
        'summary' => false
    ])
Exemplo n.º 3
0
<?php
/**
 * Created by PhpStorm.
 * User: reglobbe
 * Date: 1/9/15
 * Time: 5:20 PM
 */
use auction\components\Auction;
?>

<div class="error-page">
    <img src="<?= Auction::$app->request->baseUrl?>/images/500-error.jpg" alt="" />
    <h1>Oops, Something went wrong</h1>
    <p>The page you are looking for can’t be found.<br/>
        Go home by <a href="<?php echo Auction::createUrl('site/index')?>">clicking here!</a></p>
</div>
Exemplo n.º 4
0
                'options' => [
                    'class' => 'form-control',
                    'data-id' => '',
                    'placeholder' => 'Search..'
                ]
            ]); ?>
            <span class="input-group-btn">
            <?= Html::submitButton('<i class="fa fa-search"></i>', [
                'id' => 'company-id',
                'class' => 'btn btn-primary',
                'onClick' => new JsExpression('
                var id = $("#name_search").attr("data-id");
                if(id == ""){
                    return false;
                }else{
                    window.location.href = "'. Auction::createUrl('dealer/auction/view') .'&id="+id;
                }
                ')
            ]) ?>
            </span>
        </div>
    </div>
</div>

<div class="row">
    <?php Pjax::begin(['id' => 'pjax-gridview', 'timeout' => false, 'enablePushState' => false]) ?>
    <?= ListView::widget([
        'dataProvider' => $dataProvider,
        'itemView' => '_info_panel',
        'emptyText' => '',
        'summary' => false
Exemplo n.º 5
0
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use auction\models\Auctions;
use yii\widgets\Pjax;
use auction\components\Auction;

/* @var $this yii\web\View */
/* @var $model auction\models\Lots */
/* @var $form yii\widgets\ActiveForm */
?>
<?php Pjax::begin(['id' => 'brand-form','enablePushState' => false, 'timeout' => false])?>

<?php $form = ActiveForm::begin([
    'id' => 'create-brand',
    'action' => Auction::createUrl('company/lots/create'),
    'fieldClass' => 'auction\widgets\ActiveField',
    'options' => [
        'data-pjax' => 1,
    ],
]); ?>

<fieldset>

    <?= $form->field($model, 'name')->textInput() ?>

    <?= $form->field($model, 'auction')->dropDownList(ArrayHelper::map(Auctions::find()->all(),'id','name'),['class' => 'form-control']) ?>

    <?= $form->field($model, 'condition')->textInput() ?>

    <?= $form->field($model, 'is_quantity')->textInput() ?>
Exemplo n.º 6
0
    public function init()
    {

        $_role = Auction::userRole();

        if ($_role == DatabaseHelper::COMPANY_ADMIN) {

            $this->items = [
                ['label' => '<i class="fa fa-dashboard fa-fw"></i>Dashboard', 'url' => Auction::createUrl('company/info')],
                [
                    'template' => '<a class="active" href="#"><i class="fa fa-wrench fa-fw"></i>Auctions<span class="fa arrow"></span></a>',
                    'items'    => [
                        ['label' => '<i class="fa fa-play-circle-o fa-fw"></i>List Auctions', 'url' => Auction::createUrl('company/auction')],
                        ['label' => '<i class="fa  fa-github-square fa-fw"></i>Add Auction', 'url' => Auction::createUrl('company/auction/create')],
                    ],
                ],
                [
                    'template' => '<a class="active" href="#"><i class="fa fa-wrench fa-fw"></i>Users<span class="fa arrow"></span></a>',
                    'items'    => [
                        ['label' => '<i class="fa fa-play-circle-o fa-fw"></i>List Company Users', 'url' => Auction::createUrl('company/user')],
                        ['label' => '<i class="fa  fa-github-square fa-fw"></i>Dealers', 'url' => Auction::createUrl('company/dealer')],
                    ],
                ],
                [
                    'template' => '<a class="active" href="#"><i class="fa fa-wrench fa-fw"></i>Auction Lots<span class="fa arrow"></span></a>',
                    'items'    => [
                        ['label' => '<i class="fa fa-play-circle-o fa-fw"></i>Lots', 'url' => Auction::createUrl('company/lots')],
                        ['label' => '<i class="fa fa-play-circle-o fa-fw"></i>Add Products In Lot', 'url' => Auction::createUrl('company/lot-product')],
                    ],
                ],
                [
                    'template' => '<a class="active" href="#"><i class="fa fa-wrench fa-fw"></i>Products<span class="fa arrow"></span></a>',
                    'items'    => [
                        ['label' => '<i class="fa fa-play-circle-o fa-fw"></i>List Products', 'url' => Auction::createUrl('company/product')],
                        ['label' => '<i class="fa fa-play-circle-o fa-fw"></i>Upload CSV', 'url' => Auction::createUrl('company/upload-csv')],
                        ['label' => '<i class="fa fa-play-circle-o fa-fw"></i>Create Product Cofig', 'url' => Auction::createUrl('company/product-config')],
                    ],
                ],
                [
                    'template' => '<a class="active" href="#"><i class="fa fa-wrench fa-fw"></i>Setting<span class="fa arrow"></span></a>',
                    'items'    => [
                        ['label' => '<i class="fa fa-play-circle-o fa-fw"></i>Update Info', 'url' => Auction::createUrl('company/edit')],
                    ],
                ],
            ];
        } elseif ($_role == DatabaseHelper::DEALER) {

            $this->items = [
                ['label' => '<i class="fa fa-dashboard fa-fw"></i>Dashboard', 'url' => Auction::createUrl('dealer/profile')],
                ['label' => '<i class="fa fa-dashboard fa-fw"></i>Auctions', 'url' => Auction::createUrl('dealer/auction')],
                ['label' => '<i class="fa fa-dashboard fa-fw"></i>Companies', 'url' => Auction::createUrl('dealer/company')],
                ['label' => '<i class="fa fa-dashboard fa-fw"></i>Payment', 'url' => Auction::createUrl('dealer/payment')],
                [
                    'template' => '<a class="active" href="#"><i class="fa fa-wrench fa-fw"></i>Setting<span class="fa arrow"></span></a>',
                    'items'    => [
                        ['label' => '<i class="fa fa-play-circle-o fa-fw"></i>Update Info', 'url' => Auction::createUrl('dealer/edit-profile')],
                    ],
                ],
            ];
        }

       $this->items[] = ['label' => '<i class="fa fa-sign-out fa-fw"></i>Sign Out', 'url' => Auction::createUrl('site/logout')];

        parent::init();
    }
Exemplo n.º 7
0
    var selectedId= $("#dataTables-example").yiiGridView("getSelectedRows");
    console.log(id);
    console.log(selectedId);
    $.ajax({
        type : "post",
        url : "'. Auction::createUrl('company/lot-product/update') .'",
        data: {id:id,selectedId:selectedId},
        success: function(t){
            $("#activity-modal").modal("hide");
            $.pjax.reload({container:"#pjax-gridview",timeout:2e3})
        }
    });
    return false;
});
jQuery(document).on("click" ,"#create-lot-modal",function(){
    $("#activity-modal").modal("hide");
    $.ajax({
    type: "post",
    url: "'. Auction::createUrl('company/lots/create') .'",
    success : function(t){
        $("#new-form-modal").find(".modal-body").html(t);
        $("#new-form-modal").modal("show");
    }
    });
    return false;
});
jQuery(document).on("pjax:success", "#brand-form",  function(event){$("#new-form-modal").modal("hide");});
jQuery(document).pjax("#brand-form a", "#brand-form", {"push":false,"replace":false,"timeout":false,"scrollTo":false});
jQuery(document).on("submit", "#brand-form form[data-pjax]", function (event) {jQuery.pjax.submit(event, "#brand-form", {"push":false,"replace":false,"timeout":false,"scrollTo":false});});
')?>
Exemplo n.º 8
0
                            'template' => '<a class="active" href="#"><i class="fa fa-wrench fa-fw"></i>Operations<span class="fa arrow"></span></a>',
                            'items' => [
                                ['label' => '<i class="fa fa-play-circle-o fa-fw"></i>Brands', 'url' => Auction::createUrl('admin/brand')],
                                ['label' => '<i class="fa  fa-github-square fa-fw"></i>Category', 'url' => Auction::createUrl('admin/category')],
                            ],
                        ],
                        [
                            'template' => '<a class="active" href="#"><i class="fa fa-wrench fa-fw"></i>Products<span class="fa arrow"></span></a>',
                            'items' => [
                                ['label' => '<i class="fa fa-truck fa-fw"></i>List Products', 'url' => Auction::createUrl('admin/product')],
                                ['label' => '<i class="fa fa-upload fa-fw"></i>Upload Products List', 'url' => Auction::createUrl('admin/product/upload')],
                            ],
                        ],
                        ['label' => '<i class="fa fa-user fa-fw"></i>Users', 'url' => Auction::createUrl('admin/user')],
                        ['label' => '<i class="fa fa-credit-card fa-fw"></i>Auction', 'url' => Auction::createUrl('admin/auction')],
                        ['label' => '<i class="fa fa-sign-out fa-fw"></i>Sign Out', 'url' => Auction::createUrl('site/logout')],
                    ],
                    'encodeLabels' => false, //allows you to use html in labels,
                    'submenuTemplate' => "\n<ul class='nav nav-second-level'>\n{items}\n</ul>\n",
                ]);  ?>
            </div>
        </div>
    </nav>

    <div id="page-wrapper">
    <?= $content ?>
        </div>
</div>
<?php $this->endBody() ?>
</body>
</html>