galleryItem.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * @var $this \yii\web\View
  4. * @var $model \manager\models\Gallery
  5. */
  6. ?>
  7. <div class="row mb-3" id="gallery-<?=$model->id?>">
  8. <div class="col-md-12">
  9. <div class="title">
  10. <h3>
  11. <?=$model->name?>
  12. <div class="form-group">
  13. <input type="text" class="form-control" value='<?=str_replace( "'", "&apos;", $model->name )?>' name="gallery_name[<?=$model->id?>]">
  14. </div>
  15. <div class="manage d-inline">
  16. <!--<span class="galleryEdit u-cursor-pt" onclick="galleryEdit(<?=$model->id?>)"><i class="fas fa-edit text-primary"></i></span>-->
  17. <span class="galleryRemove" onclick="galleryRemove(<?=$model->id?>)"><i class="fas fa-trash text-danger"></i></span>
  18. </div>
  19. </h3>
  20. </div>
  21. <div class="description">
  22. <p>
  23. <?=$model->description?>
  24. </p>
  25. </div>
  26. <div class="inject_code">
  27. <label for="inject">Код вставки</label>
  28. <div class="form-group">
  29. <input type="text" class="form-control" value="<?=$model->inject?>">
  30. </div>
  31. </div>
  32. <div class="widget">
  33. <?= \app\forks\galleryManager\GallaryManager::widget(
  34. [
  35. 'id' => 'galleryManager-'.$model->id,
  36. 'model' => $model,
  37. 'behaviorName' => 'galleryBehavior',
  38. 'apiRoute' => 'news/galleryApi'
  39. ]
  40. );?>
  41. </div>
  42. </div>
  43. </div>