galleryItem.php 1.6 KB

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