galleryManager.php 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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. <!-- Расположите это -->
  91. <div class="position-fixed p-3" style="bottom: 0; right: 0; z-index: 1000;" id="notycont">
  92. <div class="toast hide fade" role="status" aria-live="assertive" aria-atomic="true" data-autohide="false" id="noty0" style="min-width:300px;">
  93. <div class="toast-header">
  94. <strong class="mr-auto">Загрузка</strong>
  95. <small class="text-muted">Загружаю</small>
  96. </div>
  97. <div class="toast-body">
  98. Увидеть? Именно так.
  99. </div>
  100. <div class="progress" style="height: 3px;">
  101. <div class="progress-bar" style="width: 0%"></div>
  102. </div>
  103. </div>
  104. </div>
  105. <script>
  106. $(function() {
  107. // e = $('#noty0').toast('show');
  108. // console.log(e);
  109. });
  110. if(typeof $().galleryManager !== 'undefined'){
  111. <?=$js?>
  112. }
  113. </script>