예제 #1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = CsServices::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['id' => $this->id, 'industry_id' => $this->industry_id, 'action_id' => $this->action_id, 'object_id' => $this->object_id, 'unit_id' => $this->unit_id, 'process' => $this->process, 'geospecific' => $this->geospecific, 'added_by' => $this->added_by, 'added_time' => $this->added_time, 'hit_counter' => $this->hit_counter]);
     /*$query->andFilterWhere(['like', 'name', $this->name])
       ->andFilterWhere(['like', 'action', $this->action])
       ->andFilterWhere(['like', 'object_name', $this->object_name])
       ->andFilterWhere(['like', 'service_type', $this->service_type])
       ->andFilterWhere(['like', 'amount', $this->amount])
       ->andFilterWhere(['like', 'pic', $this->pic])
       ->andFilterWhere(['like', 'service_object', $this->service_object])
       ->andFilterWhere(['like', 'consumer', $this->consumer])
       ->andFilterWhere(['like', 'support', $this->support])
       ->andFilterWhere(['like', 'location', $this->location])
       ->andFilterWhere(['like', 'time', $this->time])
       ->andFilterWhere(['like', 'duration', $this->duration])
       ->andFilterWhere(['like', 'turn_key', $this->turn_key])
       ->andFilterWhere(['like', 'tools', $this->tools])
       ->andFilterWhere(['like', 'labour_type', $this->labour_type])
       ->andFilterWhere(['like', 'frequency', $this->frequency])
       ->andFilterWhere(['like', 'coverage', $this->coverage])
       ->andFilterWhere(['like', 'dat', $this->dat])
       ->andFilterWhere(['like', 'status', $this->status]);*/
     return $dataProvider;
 }
예제 #2
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = CsServices::find();
     $query->joinWith(['t t']);
     //$query->joinWith(['object', 'products']);
     $dataProvider = new ActiveDataProvider(['query' => $query, 'pagination' => ['pageSize' => 2]]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['id' => $this->id, 'industry_id' => $this->industry_id, 'action_id' => $this->action_id, 'object_id' => $this->object_id]);
     $query->andFilterWhere(['like', 't.name', $this->name]);
     return $dataProvider;
 }
예제 #3
0
 /**
  * Displays a single CsObjects model.
  * @param string $id
  * @return mixed
  */
 public function actionView($id)
 {
     $model = $this->findModel($id);
     $query = \common\models\CsObjectProperties::find()->where(['object_id' => $model->id]);
     if ($model->getPath($model)) {
         foreach ($model->getPath($model) as $key => $objectpp) {
             if ($objectPropertiespp = $objectpp->objectProperties) {
                 foreach ($objectPropertiespp as $objectPropertypp) {
                     if ($objectPropertypp->property_class != 'private') {
                         $query->orWhere(['object_id' => $objectpp->id]);
                     }
                 }
             }
         }
     }
     return $this->render('view', ['model' => $model, 'products' => new ActiveDataProvider(['query' => \common\models\CsProducts::find()->where(['object_id' => $model->id])]), 'issues' => new ActiveDataProvider(['query' => \common\models\CsObjectIssues::find()->where(['object_id' => $model->id])]), 'properties' => new ActiveDataProvider(['query' => $query->orderBy('property_type')->groupBy('id')]), 'methods' => new ActiveDataProvider(['query' => \common\models\CsServices::find()->where(['object_id' => $model->id])])]);
 }
예제 #4
0
 /**
  * Displays a single CsIndustries model.
  * @param integer $id
  * @return mixed
  */
 public function actionView($title = null)
 {
     if (isset($title)) {
         $this->layout = '//index_service';
         $ind_tr = $this->findModelByTitle($title);
         // ako je našao ime usluge, renderuj stranicu - URL injection
         if ($ind_tr) {
             $model = $this->findModel($ind_tr->industry_id);
             $dataProvider_services = new ActiveDataProvider(['query' => CsServices::find()->where('industry_id=' . $model->id)]);
             $dataProvider_presentations = new ActiveDataProvider(['query' => CsServices::find()->where('industry_id=' . $model->id)]);
             $dataProvider_promotions = new ActiveDataProvider(['query' => CsServices::find()->where('industry_id=' . $model->id)]);
             $dataProvider_orders = new ActiveDataProvider(['query' => CsServices::find()->where('industry_id=' . $model->id)]);
             $dataProvider_providers = new ActiveDataProvider(['query' => CsServices::find()->where('industry_id=' . $model->id)]);
             return $this->render('view', ['model' => $model, 'dataProvider_services' => $dataProvider_services, 'dataProvider_presentations' => $dataProvider_presentations, 'dataProvider_promotions' => $dataProvider_promotions, 'dataProvider_orders' => $dataProvider_orders, 'dataProvider_providers' => $dataProvider_providers]);
         }
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
예제 #5
0
            </div>
            <div class="secondary-context cont">
                <span><i class="fa fa-globe"></i>&nbsp;7.345</span>
                <span>&nbsp;<i class="fa fa-users"></i>&nbsp;468</span>
                <span>&nbsp;<i class="fa fa-rss fa-rotate-270"></i>&nbsp;223</span>
                <p>You have successfully created your Yii-powered application.</p>
            </div>
            <div class="action-area right">
                <?php 
echo Html::a('<i class="fa fa-shopping-cart"></i>&nbsp;' . Yii::t('app', 'Order'), Url::to(), ['class' => 'btn btn-success']);
?>
            </div>
        </a>
    </div>
    <?php 
$query = \common\models\CsServices::find();
$countQuery = clone $query;
$pages = new Pagination(['totalCount' => $countQuery->count()]);
$models = $query->offset($pages->offset)->limit($pages->limit)->all();
foreach ($models as $service) {
    echo ServiceBox::widget(['serviceId' => $service->id, 'containerOptions' => '', 'link' => '/s/' . mb_strtolower(str_replace(' ', '-', $service->t[0]->name)), 'image' => ['source' => 'info_docs' . substr($service->id, -1) . '.jpg'], 'name' => $service->t[0]->name, 'subhead' => $service->industry->t[0]->name, 'description' => $service->industry->t[0]->description, 'stats' => ['orders' => 346, 'providers' => 71, 'promotions' => 102], 'price' => ['amount' => rand(1000, 10000), 'currencyCode' => 'RSD', 'unit' => 'm'], 'actionButton' => '']);
}
?>
</div>    

        <div class="row">
            <div class="col-lg-4">
                <h2>Heading</h2>

                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
                    dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
예제 #6
0
    
    </div>
    <div class="show_more"><?= Html::a('POKAŽI JOŠ', Url::to('/services'), array('class'=>'btn btn-default')); ?></div>
    <?php endif; */
}
?>
<!-- POPULAR SERVICES -->
<hr style="margin-top:0">
<div class="featured">
	<h2 style="text-align:left; margin:30px 0 10px 0;"><i class="fa fa-thumbs-o-up"></i> Preporučene usluge</h2>
	<p class="paragraph fs_11 gray_color margin-bottom-20"><?php 
echo Yii::t('app', 'Choose category by clicking on the colored boxes and then select one of the service industry from the list below.');
?>
</p>
	<?php 
foreach (CsServices::find()->where('industry_id=631 OR industry_id=681')->limit(4)->all() as $key => $service) {
    ?>
		<?php 
    echo $this->render('_card_comm.php', ['model' => $service]);
    ?>
	<?php 
}
// foreach ($sektor as $key=>$sek)
?>
</div>
<div class="show_more"><?php 
echo Html::a('POKAŽI JOŠ', Url::to('/services'), array('class' => 'btn btn-default'));
?>
</div>

예제 #7
0
use yii\helpers\Url;
use kartik\widgets\ActiveForm;
use kartik\switchinput\SwitchInput;
use kartik\widgets\DatePicker;
use kartik\select2\Select2;
use yii\helpers\ArrayHelper;
use kartik\widgets\FileInput;
?>


<?php 
$form = kartik\widgets\ActiveForm::begin(['id' => 'form-horizontal', 'type' => ActiveForm::TYPE_HORIZONTAL, 'fullSpan' => 7, 'formConfig' => ['labelSpan' => 3, 'deviceSize' => ActiveForm::SIZE_MEDIUM], 'options' => ['enctype' => 'multipart/form-data']]);
?>

    <?php 
echo $form->field($model, 'service_id')->widget(Select2::classname(), ['data' => ArrayHelper::map(\common\models\CsServices::find()->all(), 'id', 'name'), 'options' => ['placeholder' => 'Izaberite...'], 'language' => 'sr-Latn', 'changeOnReset' => false]);
?>

    <?php 
echo $form->field($model, 'object_property_id')->textInput(['maxlength' => true]);
?>

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

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

    <div class="row" style="margin:20px;">