galleryManager.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <?php
  2. /**
  3. * @var $this View
  4. * @var $js string
  5. * @author Bogdan Savluk <savluk.bogdan@gmail.com>
  6. */
  7. use yii\helpers\Html;
  8. use yii\web\View;
  9. ?>
  10. <?php echo Html::beginTag('div', $this->context->options); ?>
  11. <!-- Gallery Toolbar -->
  12. <div class="btn-toolbar" style="padding:4px">
  13. <div class="btn-group" style="display: inline-block;">
  14. <div class="btn btn-success btn-file" style="display: inline-block">
  15. <i class="glyphicon glyphicon-plus"></i><?php echo Yii::t('galleryManager/main', 'Add…'); ?>
  16. <input type="file" name="gallery-image" class="afile" accept="image/*" multiple="multiple"/>
  17. </div>
  18. </div>
  19. <div class="btn-group" style="display: inline-block;">
  20. <label class="btn btn-default">
  21. <input type="checkbox" style="margin-right: 4px;" class="select_all"><?php echo Yii::t(
  22. 'galleryManager/main',
  23. 'Select all'
  24. ); ?>
  25. </label>
  26. <div class="btn btn-default disabled edit_selected">
  27. <i class="fas fa-edit"></i> <?php echo Yii::t('galleryManager/main', 'Edit'); ?>
  28. </div>
  29. <div class="btn btn-default disabled remove_selected">
  30. <i class="fas fa-trash"></i> <?php echo Yii::t('galleryManager/main', 'Remove'); ?>
  31. </div>
  32. </div>
  33. </div>
  34. <hr/>
  35. <!-- Gallery Photos -->
  36. <div class="sorter">
  37. <div class="images"></div>
  38. <br style="clear: both;"/>
  39. </div>
  40. <!-- Modal window to edit photo information -->
  41. <div class="editor-modal modal fade">
  42. <div class="modal-dialog">
  43. <div class="modal-content">
  44. <div class="modal-header">
  45. <a class="close" data-dismiss="modal">×</a>
  46. <h3 class="modal-title"><?php echo Yii::t('galleryManager/main', 'Edit information') ?></h3>
  47. </div>
  48. <div class="modal-body">
  49. <div class="form"></div>
  50. </div>
  51. <div class="modal-footer">
  52. <a href="#" class="btn btn-primary save-changes">
  53. <?php echo Yii::t('galleryManager/main', 'Save changes') ?>
  54. </a>
  55. <a href="#" class="btn" data-dismiss="modal"><?php echo Yii::t(
  56. 'galleryManager/main',
  57. 'Close'
  58. ) ?></a>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. <div class="overlay">
  64. <div class="overlay-bg">&nbsp;</div>
  65. <div class="drop-hint">
  66. <span class="drop-hint-info"><?php echo Yii::t('galleryManager/main', 'Drop Files Here…') ?></span>
  67. </div>
  68. </div>
  69. <div class="progress-overlay">
  70. <div class="overlay-bg">&nbsp;</div>
  71. <!-- Upload Progress Modal-->
  72. <div class="modal progress-modal">
  73. <div class="modal-dialog">
  74. <div class="modal-content">
  75. <div class="modal-header">
  76. <h3><?php echo Yii::t('galleryManager/main', 'Uploading images…') ?></h3>
  77. </div>
  78. <div class="modal-body">
  79. <div class="progress ">
  80. <div class="progress-bar progress-bar-info progress-bar-striped active upload-progress"
  81. role="progressbar">
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. <?php echo Html::endTag('div'); ?>
  90. <script>
  91. if(typeof $().galleryManager !== 'undefined'){
  92. <?=$js?>
  93. }
  94. </script>