Commit 6da89819980c9ba176a7024bd12bd5f276e91f6e
1 parent
fc08989a
objects main page
Showing
2 changed files
with
176 additions
and
108 deletions
Show diff stats
frontend/controllers/SiteController.php
| @@ -61,7 +61,7 @@ | @@ -61,7 +61,7 @@ | ||
| 61 | $objects = Objectkb::find() | 61 | $objects = Objectkb::find() |
| 62 | ->with('lang.alias') | 62 | ->with('lang.alias') |
| 63 | ->where([ | 63 | ->where([ |
| 64 | - 'id' => array(27,23,24,8) | 64 | + 'id' => array(7,37,38,39) |
| 65 | ])->all(); | 65 | ])->all(); |
| 66 | 66 | ||
| 67 | return $this->render( | 67 | return $this->render( |
frontend/views/site/index.php
| @@ -125,122 +125,190 @@ JS; | @@ -125,122 +125,190 @@ JS; | ||
| 125 | </div> | 125 | </div> |
| 126 | </section> | 126 | </section> |
| 127 | 127 | ||
| 128 | - <section class="bar background-white objects-main-wr"> | ||
| 129 | - <div class="container"> | ||
| 130 | - <div class="col-md-12"> | ||
| 131 | - <div class="heading text-center"> | ||
| 132 | - <h2><?=\Yii::t('app', 'index_objects')?></h2> | ||
| 133 | - </div> | 128 | +<!-- <section class="bar background-white objects-main-wr">--> |
| 129 | +<!-- <div class="container">--> | ||
| 130 | +<!-- <div class="col-md-12">--> | ||
| 131 | +<!-- <div class="heading text-center">--> | ||
| 132 | +<!-- <h2>--><?//=\Yii::t('app', 'index_objects')?><!--</h2>--> | ||
| 133 | +<!-- </div>--> | ||
| 134 | +<!----> | ||
| 135 | +<!-- <div class="row portfolio">--> | ||
| 136 | +<!-- <div class="col-sm-6">--> | ||
| 137 | +<!-- <div class="box-image">--> | ||
| 138 | +<!-- <div class="image">--> | ||
| 139 | +<!-- <div class="image_link_wr">--> | ||
| 140 | +<!-- <a href="https://youtu.be/HymA-lcE14c" target="_blank" class="image_link" style="background-image:url('/img/video_yt.jpg');"></a>--> | ||
| 141 | +<!-- </div>--> | ||
| 142 | +<!-- <div class="img-title">--> | ||
| 143 | +<!-- <table>--> | ||
| 144 | +<!-- <tr>--> | ||
| 145 | +<!-- <td class="buts text-left">--> | ||
| 146 | +<!-- <a href="https://youtu.be/HymA-lcE14c" class="sqre_btn blue_arrow" target="_blank" title="--><?//= Yii::t('app', 'yt1') ?><!--"></a>--> | ||
| 147 | +<!-- <a href="#" class="btn sqre_btn yellow_calc modaled init-button-сalculate" data-title="--><?//= Yii::t('app', 'modal1') ?><!--" data-toggle="modal" data-target="#feedback-modal"></a>--> | ||
| 148 | +<!-- </td>--> | ||
| 149 | +<!-- <td class="i-title" valign="center">--> | ||
| 150 | +<!-- <p class="pr_title2"><a href="https://youtu.be/HymA-lcE14c" target="_blank">--><?//= Yii::t('app', 'sect2_7') ?><!--</a></p>--> | ||
| 151 | +<!-- </td>--> | ||
| 152 | +<!-- </tr>--> | ||
| 153 | +<!-- </table>--> | ||
| 154 | +<!-- </div>--> | ||
| 155 | +<!-- </div>--> | ||
| 156 | +<!-- </div>--> | ||
| 157 | +<!-- <!-- /.box-image -->--> | ||
| 158 | +<!-- </div>--> | ||
| 159 | +<!-- <div class="col-sm-6">--> | ||
| 160 | +<!-- <div class="box-image">--> | ||
| 161 | +<!-- <div class="image">--> | ||
| 162 | +<!-- <div class="image_link_wr">--> | ||
| 163 | +<!-- <a href="#" class="image_link open_gal" id="gal02" style="background-image:url('/img/pic01.jpg');" data-title="--><?//= Yii::t('app', 'modal_text2') ?><!--"></a>--> | ||
| 164 | +<!-- </div>--> | ||
| 165 | +<!-- <div class="img-title">--> | ||
| 166 | +<!-- <table>--> | ||
| 167 | +<!-- <tr>--> | ||
| 168 | +<!-- <td class="buts text-left">--> | ||
| 169 | +<!-- <a href="#" class="open_gal sqre_btn blue_arrow" id="gal02" data-title="--><?//= Yii::t('app', 'modal_text2') ?><!--"></a>--> | ||
| 170 | +<!-- <a href="#" class="btn sqre_btn yellow_calc modaled init-button-сalculate" data-title="--><?//= Yii::t('app', 'sect2_8') ?><!--" data-toggle="modal" data-target="#feedback-modal"></a>--> | ||
| 171 | +<!-- </td>--> | ||
| 172 | +<!-- <td class="i-title" valign="center">--> | ||
| 173 | +<!-- <p class="pr_title2"><a href="#" class="open_gal" id="gal02">--><?//= Yii::t('app', 'sect2_8') ?><!--</a></p>--> | ||
| 174 | +<!-- </td>--> | ||
| 175 | +<!-- </tr>--> | ||
| 176 | +<!-- </table>--> | ||
| 177 | +<!-- </div>--> | ||
| 178 | +<!-- </div>--> | ||
| 179 | +<!-- </div>--> | ||
| 180 | +<!-- <!-- /.box-image -->--> | ||
| 181 | +<!-- </div>--> | ||
| 182 | +<!-- <div class="col-sm-6">--> | ||
| 183 | +<!-- <div class="box-image">--> | ||
| 184 | +<!-- <div class="image">--> | ||
| 185 | +<!-- <div class="image_link_wr">--> | ||
| 186 | +<!-- <a href="#" class="image_link open_gal" id="gal01" style="background-image:url('/img/pic02.jpg');" data-title="--><?//= Yii::t('app', 'modal_text1') ?><!--"></a>--> | ||
| 187 | +<!-- </div>--> | ||
| 188 | +<!-- <div class="img-title">--> | ||
| 189 | +<!-- <table>--> | ||
| 190 | +<!-- <tr>--> | ||
| 191 | +<!-- <td class="buts text-left">--> | ||
| 192 | +<!-- <a href="#" class="open_gal sqre_btn blue_arrow" id="gal01" data-title="--><?//= Yii::t('app', 'modal_text1') ?><!--"></a>--> | ||
| 193 | +<!-- <a href="#" class="btn sqre_btn yellow_calc modaled init-button-сalculate" data-title="--><?//= Yii::t('app', 'sect2_9') ?><!--" data-toggle="modal" data-target="#feedback-modal"></a>--> | ||
| 194 | +<!-- </td>--> | ||
| 195 | +<!-- <td class="i-title" valign="center">--> | ||
| 196 | +<!-- <p class="pr_title2">--> | ||
| 197 | +<!-- <a href="#" class="open_gal" id="gal01">--><?//= Yii::t('app', 'sect2_9') ?><!--</a>--> | ||
| 198 | +<!-- </p>--> | ||
| 199 | +<!-- </td>--> | ||
| 200 | +<!-- </tr>--> | ||
| 201 | +<!-- </table>--> | ||
| 202 | +<!-- </div>--> | ||
| 203 | +<!-- </div>--> | ||
| 204 | +<!-- </div>--> | ||
| 205 | +<!-- <!-- /.box-image -->--> | ||
| 206 | +<!-- </div>--> | ||
| 207 | +<!-- <div class="col-sm-6">--> | ||
| 208 | +<!-- <div class="box-image">--> | ||
| 209 | +<!-- <div class="image">--> | ||
| 210 | +<!-- <div class="image_link_wr">--> | ||
| 211 | +<!-- <a href="#" class="image_link open_gal" id="gal03" style="background-image:url('/img/pic03.jpg');" data-title="--><?//= Yii::t('app', 'modal_text3') ?><!--"></a>--> | ||
| 212 | +<!-- </div>--> | ||
| 213 | +<!-- <div class="img-title">--> | ||
| 214 | +<!-- <table>--> | ||
| 215 | +<!-- <tr>--> | ||
| 216 | +<!-- <td class="buts text-left">--> | ||
| 217 | +<!-- <a href="#" class="open_gal sqre_btn blue_arrow" id="gal03" data-title="--><?//= Yii::t('app', 'modal_text3') ?><!--"></a>--> | ||
| 218 | +<!-- <a href="#" class="btn sqre_btn yellow_calc modaled init-button-сalculate" data-title="--><?//= Yii::t('app', 'sect2_10') ?><!--" data-toggle="modal" data-target="#feedback-modal"></a>--> | ||
| 219 | +<!-- </td>--> | ||
| 220 | +<!-- <td class="i-title" valign="center">--> | ||
| 221 | +<!-- <p class="pr_title2"><a href="#" class="open_gal" id="gal03">--><?//= Yii::t('app', 'sect2_10') ?><!--</a></p>--> | ||
| 222 | +<!-- </td>--> | ||
| 223 | +<!-- </tr>--> | ||
| 224 | +<!-- </table>--> | ||
| 225 | +<!-- </div>--> | ||
| 226 | +<!-- </div>--> | ||
| 227 | +<!-- </div>--> | ||
| 228 | +<!-- <!-- /.box-image -->--> | ||
| 229 | +<!-- </div>--> | ||
| 230 | +<!-- </div>--> | ||
| 231 | +<!-- <div class="row">--> | ||
| 232 | +<!-- <div class="col-md-12 col-xs-12" style="text-align:center;margin-top: 20px;margin-bottom: -35px;">--> | ||
| 233 | +<!-- <a--> | ||
| 234 | +<!-- href="--><?//= Url::toRoute(['blog/index'])?><!--"--> | ||
| 235 | +<!-- class="button1 more-projects"--> | ||
| 236 | +<!-- >--> | ||
| 237 | +<!-- --><?//= Yii::t('app', 'sect2_6') ?> | ||
| 238 | +<!-- </a>--> | ||
| 239 | +<!-- </div>--> | ||
| 240 | +<!-- </div>--> | ||
| 241 | +<!-- </div>--> | ||
| 242 | +<!-- </div>--> | ||
| 243 | +<!-- </section>--> | ||
| 134 | 244 | ||
| 135 | - <div class="row portfolio"> | ||
| 136 | - <div class="col-sm-6"> | ||
| 137 | - <div class="box-image"> | ||
| 138 | - <div class="image"> | ||
| 139 | - <div class="image_link_wr"> | ||
| 140 | - <a href="https://youtu.be/HymA-lcE14c" target="_blank" class="image_link" style="background-image:url('/img/video_yt.jpg');"></a> | ||
| 141 | - </div> | ||
| 142 | - <div class="img-title"> | ||
| 143 | - <table> | ||
| 144 | - <tr> | ||
| 145 | - <td class="buts text-left"> | ||
| 146 | - <a href="https://youtu.be/HymA-lcE14c" class="sqre_btn blue_arrow" target="_blank" title="<?= Yii::t('app', 'yt1') ?>"></a> | ||
| 147 | - <a href="#" class="btn sqre_btn yellow_calc modaled init-button-сalculate" data-title="<?= Yii::t('app', 'modal1') ?>" data-toggle="modal" data-target="#feedback-modal"></a> | ||
| 148 | - </td> | ||
| 149 | - <td class="i-title" valign="center"> | ||
| 150 | - <p class="pr_title2"><a href="https://youtu.be/HymA-lcE14c" target="_blank"><?= Yii::t('app', 'sect2_7') ?></a></p> | ||
| 151 | - </td> | ||
| 152 | - </tr> | ||
| 153 | - </table> | ||
| 154 | - </div> | ||
| 155 | - </div> | ||
| 156 | - </div> | ||
| 157 | - <!-- /.box-image --> | 245 | +<!-- новый блок с объектами для главной--> |
| 246 | + <section class="bar background-white objects-main-wr"> | ||
| 247 | + <div class="container"> | ||
| 248 | + <div class="col-md-12"> | ||
| 249 | + <div class="heading text-center"> | ||
| 250 | + <h2><?=\Yii::t('app', 'index_objects')?></h2> | ||
| 158 | </div> | 251 | </div> |
| 159 | - <div class="col-sm-6"> | ||
| 160 | - <div class="box-image"> | ||
| 161 | - <div class="image"> | ||
| 162 | - <div class="image_link_wr"> | ||
| 163 | - <a href="#" class="image_link open_gal" id="gal02" style="background-image:url('/img/pic01.jpg');" data-title="<?= Yii::t('app', 'modal_text2') ?>"></a> | ||
| 164 | - </div> | ||
| 165 | - <div class="img-title"> | ||
| 166 | - <table> | ||
| 167 | - <tr> | ||
| 168 | - <td class="buts text-left"> | ||
| 169 | - <a href="#" class="open_gal sqre_btn blue_arrow" id="gal02" data-title="<?= Yii::t('app', 'modal_text2') ?>"></a> | ||
| 170 | - <a href="#" class="btn sqre_btn yellow_calc modaled init-button-сalculate" data-title="<?= Yii::t('app', 'sect2_8') ?>" data-toggle="modal" data-target="#feedback-modal"></a> | ||
| 171 | - </td> | ||
| 172 | - <td class="i-title" valign="center"> | ||
| 173 | - <p class="pr_title2"><a href="#" class="open_gal" id="gal02"><?= Yii::t('app', 'sect2_8') ?></a></p> | ||
| 174 | - </td> | ||
| 175 | - </tr> | ||
| 176 | - </table> | 252 | + <div class="row portfolio"> |
| 253 | + <?php | ||
| 254 | + foreach ($objects as $object) { | ||
| 255 | + ?> | ||
| 256 | + <div class="col-sm-6"> | ||
| 257 | + <div class="box-image"> | ||
| 258 | + <div class="image"> | ||
| 259 | + <div class="image_link_wr"> | ||
| 260 | + <a href="<?=\yii\helpers\Url::toRoute( | ||
| 261 | + [ | ||
| 262 | + 'object/view', | ||
| 263 | + 'alias' => $object->lang->alias, | ||
| 264 | + ] | ||
| 265 | + ) ?>" class="image_link"> | ||
| 266 | + <?=$object->image->getImg([])?> | ||
| 267 | + </a> | ||
| 268 | + </div> | ||
| 269 | + <div class="img-title"> | ||
| 270 | + <table> | ||
| 271 | + <tr> | ||
| 272 | + <td class="buts text-left"> | ||
| 273 | + <a href="<?=\yii\helpers\Url::toRoute( | ||
| 274 | + [ | ||
| 275 | + 'object/view', | ||
| 276 | + 'alias' => $object->lang->alias, | ||
| 277 | + ] | ||
| 278 | + ) ?>" class="sqre_btn blue_arrow" alt="<?=$object->lang->object_name?>"></a> | ||
| 279 | + <a href="#" class="btn sqre_btn yellow_calc modaled init-button-сalculate" data-title="Заказать консультацию" data-toggle="modal" data-target="#feedback-modal"></a> | ||
| 280 | + </td> | ||
| 281 | + <td class="i-title" valign="center"> | ||
| 282 | + <p class="pr_title2"> | ||
| 283 | + <a href="<?=\yii\helpers\Url::toRoute( | ||
| 284 | + [ | ||
| 285 | + 'object/view', | ||
| 286 | + 'alias' => $object->lang->alias, | ||
| 287 | + ] | ||
| 288 | + ) ?>"> | ||
| 289 | + <?=$object->lang->object_name?> | ||
| 290 | + </a> | ||
| 291 | + </p> | ||
| 292 | + </td> | ||
| 293 | + </tr> | ||
| 294 | + </table> | ||
| 295 | + </div> | ||
| 296 | + </div> | ||
| 177 | </div> | 297 | </div> |
| 178 | </div> | 298 | </div> |
| 179 | - </div> | ||
| 180 | - <!-- /.box-image --> | 299 | + <?php |
| 300 | + } | ||
| 301 | + ?> | ||
| 181 | </div> | 302 | </div> |
| 182 | - <div class="col-sm-6"> | ||
| 183 | - <div class="box-image"> | ||
| 184 | - <div class="image"> | ||
| 185 | - <div class="image_link_wr"> | ||
| 186 | - <a href="#" class="image_link open_gal" id="gal01" style="background-image:url('/img/pic02.jpg');" data-title="<?= Yii::t('app', 'modal_text1') ?>"></a> | ||
| 187 | - </div> | ||
| 188 | - <div class="img-title"> | ||
| 189 | - <table> | ||
| 190 | - <tr> | ||
| 191 | - <td class="buts text-left"> | ||
| 192 | - <a href="#" class="open_gal sqre_btn blue_arrow" id="gal01" data-title="<?= Yii::t('app', 'modal_text1') ?>"></a> | ||
| 193 | - <a href="#" class="btn sqre_btn yellow_calc modaled init-button-сalculate" data-title="<?= Yii::t('app', 'sect2_9') ?>" data-toggle="modal" data-target="#feedback-modal"></a> | ||
| 194 | - </td> | ||
| 195 | - <td class="i-title" valign="center"> | ||
| 196 | - <p class="pr_title2"> | ||
| 197 | - <a href="#" class="open_gal" id="gal01"><?= Yii::t('app', 'sect2_9') ?></a> | ||
| 198 | - </p> | ||
| 199 | - </td> | ||
| 200 | - </tr> | ||
| 201 | - </table> | ||
| 202 | - </div> | ||
| 203 | - </div> | ||
| 204 | - </div> | ||
| 205 | - <!-- /.box-image --> | ||
| 206 | - </div> | ||
| 207 | - <div class="col-sm-6"> | ||
| 208 | - <div class="box-image"> | ||
| 209 | - <div class="image"> | ||
| 210 | - <div class="image_link_wr"> | ||
| 211 | - <a href="#" class="image_link open_gal" id="gal03" style="background-image:url('/img/pic03.jpg');" data-title="<?= Yii::t('app', 'modal_text3') ?>"></a> | ||
| 212 | - </div> | ||
| 213 | - <div class="img-title"> | ||
| 214 | - <table> | ||
| 215 | - <tr> | ||
| 216 | - <td class="buts text-left"> | ||
| 217 | - <a href="#" class="open_gal sqre_btn blue_arrow" id="gal03" data-title="<?= Yii::t('app', 'modal_text3') ?>"></a> | ||
| 218 | - <a href="#" class="btn sqre_btn yellow_calc modaled init-button-сalculate" data-title="<?= Yii::t('app', 'sect2_10') ?>" data-toggle="modal" data-target="#feedback-modal"></a> | ||
| 219 | - </td> | ||
| 220 | - <td class="i-title" valign="center"> | ||
| 221 | - <p class="pr_title2"><a href="#" class="open_gal" id="gal03"><?= Yii::t('app', 'sect2_10') ?></a></p> | ||
| 222 | - </td> | ||
| 223 | - </tr> | ||
| 224 | - </table> | ||
| 225 | - </div> | ||
| 226 | - </div> | 303 | + <div class="row"> |
| 304 | + <div class="col-md-12 col-xs-12" style="text-align:center;margin-top: 20px;margin-bottom: -35px;"> | ||
| 305 | + <a href='site/object/' class="button1 more-projects"><?= Yii::t('app', 'sect2_6') ?></a> | ||
| 227 | </div> | 306 | </div> |
| 228 | - <!-- /.box-image --> | ||
| 229 | - </div> | ||
| 230 | - </div> | ||
| 231 | - <div class="row"> | ||
| 232 | - <div class="col-md-12 col-xs-12" style="text-align:center;margin-top: 20px;margin-bottom: -35px;"> | ||
| 233 | - <a | ||
| 234 | - href="<?= Url::toRoute(['blog/index'])?>" | ||
| 235 | - class="button1 more-projects" | ||
| 236 | - > | ||
| 237 | - <?= Yii::t('app', 'sect2_6') ?> | ||
| 238 | - </a> | ||
| 239 | </div> | 307 | </div> |
| 240 | </div> | 308 | </div> |
| 241 | </div> | 309 | </div> |
| 242 | - </div> | ||
| 243 | - </section> | 310 | + </section> |
| 311 | + | ||
| 244 | 312 | ||
| 245 | <section class="blue-fon no-mg economy-wr"> | 313 | <section class="blue-fon no-mg economy-wr"> |
| 246 | <div class="container"> | 314 | <div class="container"> |