pages.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?
  2. use yii\helpers\Html;
  3. use yii\widgets\ActiveForm;
  4. use yii\web\View;
  5. $this->title = 'Tilda Страницы';
  6. $this->params['breadcrumbs'][] = ['label' => 'Tilda', 'url' => ['index'] ];
  7. $this->params['breadcrumbs'][] = $info['title'];
  8. ?>
  9. <div class="row">
  10. <div class="col-md-12">
  11. <div class="callout callout-danger">
  12. <h5><?=$info['title']?></h5>
  13. <p><?=$info['descr']?></p>
  14. <div class="alert alert-info alert-dismissible">
  15. <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
  16. <h5><i class="icon fas fa-info"></i> Справка!</h5>
  17. Выбирите страницы для экспорта, обьеденённых в один проект и нажмите кнопку <span class="badge badge-success">Экспорт</span>
  18. </div>
  19. </div>
  20. </div>
  21. </div>
  22. <div class="row">
  23. <?php $form = ActiveForm::begin([
  24. 'method' => 'post',
  25. 'action' => ['tilda/export'],
  26. ]); ?>
  27. <input type="hidden" value="<?=$info['id']?>" name="proj">
  28. <?
  29. foreach($pages as $item){
  30. ?>
  31. <div class="col-md-4">
  32. <div class="card card-widget widget-user-2">
  33. <div class="card-header">
  34. <h3 class="card-title">
  35. <input type="checkbox" value="<?=$item['id']?>" name="Check[]">
  36. </h3>
  37. </div>
  38. <div class="attachment-block clearfix">
  39. <?
  40. if( isset( $item['img'] ) && $item['img'] != '' ){
  41. $img = $item['img'];
  42. $img = str_replace( basename($img), '-/resize/160x/'.basename($img), $img );
  43. //
  44. //-/resize/160x/
  45. ?>
  46. <img src="<?=$img?>" class="attachment-img m-2">
  47. <?
  48. }
  49. ?>
  50. <h3 class="widget-user-username"><?=$item['title']?></h3>
  51. <p class="mx-2"><?=$item['date']?></p>
  52. <div class="card-footer p-0">
  53. <div class="card-body">
  54. <?=$item['descr']?>
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. <?
  61. }
  62. ?>
  63. <div class="form-group m-4">
  64. <?= Html::submitButton('Экспорт', ['class' => 'btn btn-success']) ?>
  65. </div>
  66. <?php ActiveForm::end(); ?>
  67. </div>