You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

content.php 14KB

6 kuukautta sitten
2 vuotta sitten
8 kuukautta sitten
6 kuukautta sitten
6 kuukautta sitten
6 kuukautta sitten
6 kuukautta sitten
8 kuukautta sitten
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  1. <?php
  2. /**
  3. Copyright Souke (2018)
  4. contact@souke.fr
  5. Ce logiciel est un programme informatique servant à aider les producteurs
  6. à distribuer leur production en circuits courts.
  7. Ce logiciel est régi par la licence CeCILL soumise au droit français et
  8. respectant les principes de diffusion des logiciels libres. Vous pouvez
  9. utiliser, modifier et/ou redistribuer ce programme sous les conditions
  10. de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA
  11. sur le site "http://www.cecill.info".
  12. En contrepartie de l'accessibilité au code source et des droits de copie,
  13. de modification et de redistribution accordés par cette licence, il n'est
  14. offert aux utilisateurs qu'une garantie limitée. Pour les mêmes raisons,
  15. seule une responsabilité restreinte pèse sur l'auteur du programme, le
  16. titulaire des droits patrimoniaux et les concédants successifs.
  17. A cet égard l'attention de l'utilisateur est attirée sur les risques
  18. associés au chargement, à l'utilisation, à la modification et/ou au
  19. développement et à la reproduction du logiciel par l'utilisateur étant
  20. donné sa spécificité de logiciel libre, qui peut le rendre complexe à
  21. manipuler et qui le réserve donc à des développeurs et des professionnels
  22. avertis possédant des connaissances informatiques approfondies. Les
  23. utilisateurs sont donc invités à charger et tester l'adéquation du
  24. logiciel à leurs besoins dans des conditions permettant d'assurer la
  25. sécurité de leurs systèmes et ou de leurs données et, plus généralement,
  26. à l'utiliser et l'exploiter dans les mêmes conditions de sécurité.
  27. Le fait que vous puissiez accéder à cet en-tête signifie que vous avez
  28. pris connaissance de la licence CeCILL, et que vous en avez accepté les
  29. termes.
  30. */
  31. use yii\helpers\Html;
  32. use yii\widgets\Breadcrumbs;
  33. use dmstr\widgets\Alert;
  34. use common\helpers\GlobalParam;
  35. $producerModule = $this->getProducerModule();
  36. $adminSettingBag = $this->getSettingModule()->getAdminSettingBag();
  37. $sharedPointSaleModule = $this->getSharedPointSaleModule();
  38. $userModule = $this->getUserModule();
  39. $userCurrent = GlobalParam::getCurrentUser();
  40. $producer = GlobalParam::getCurrentProducer();
  41. ?>
  42. <div class="content-wrapper">
  43. <section class="content-header">
  44. <?php if (isset($this->blocks['content-header'])) { ?>
  45. <h1><?= $this->blocks['content-header'] ?></h1>
  46. <?php } else { ?>
  47. <h1>
  48. <?php
  49. if ($this->title !== null) {
  50. echo $this->title;
  51. } else {
  52. echo \yii\helpers\Inflector::camel2words(
  53. \yii\helpers\Inflector::id2camel($this->context->module->id)
  54. );
  55. echo ($this->context->module->id !== \Yii::$app->id) ? '<small>Module</small>' : '';
  56. } ?>
  57. <?php
  58. if($this->buttons && count($this->buttons)) {
  59. foreach($this->buttons as $button) {
  60. echo '<a href="'.Yii::$app->urlManagerBackend->createUrl($button['url']).'" class="'.$button['class'].'">'.$button['label'].'</a>' ;
  61. }
  62. }
  63. ?>
  64. </h1>
  65. <?php } ?>
  66. <?=
  67. Breadcrumbs::widget(
  68. [
  69. 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
  70. ]
  71. ) ?>
  72. </section>
  73. <section class="content">
  74. <?php echo $this->renderFile('@common/views/alert_message.php', [
  75. 'display' => $adminSettingBag->get('adminAlertMessageDisplay') && $producerModule->getResolver()->isAlertMessageDisplayed($producer),
  76. 'type' => $adminSettingBag->get('adminAlertMessageType'),
  77. 'title' => $adminSettingBag->get('adminAlertMessageTitle'),
  78. 'icon' => $adminSettingBag->get('adminAlertMessageIcon'),
  79. 'message' => $adminSettingBag->get('adminAlertMessage'),
  80. 'buttonClose' => true
  81. ]) ?>
  82. <?php $producer = GlobalParam::getCurrentProducer(); ?>
  83. <?php if($producer
  84. && !$producerModule->isUpToDateWithOpendistribVersion($producer)
  85. && $producer->option_display_message_new_opendistrib_version
  86. && !$userModule->getAuthorizationChecker()->isGrantedAsAdministrator($userCurrent)): ?>
  87. <div class="alert alert-success">
  88. <p>
  89. <i class="icon fa fa-cogs"></i>
  90. Souke a été mis à jour vers la version <?= GlobalParam::getSoukeVersion() ?> ! <a class="alert-link" href="<?= Yii::$app->urlManager->createUrl(['development/index']) ?>">Découvrir les nouveautés</a>
  91. </p>
  92. <a href="<?= Yii::$app->urlManager->createUrl(['producer/update-opendistrib-version']) ?>" class="close"><span aria-hidden="true">&times;</span></a>
  93. </div>
  94. <?php endif; ?>
  95. <?php $countSharedPointsSaleRequestsOthers = $sharedPointSaleModule->getResolver()->countSharedPointsSaleRequestsOthers(); ?>
  96. <?php if($countSharedPointsSaleRequestsOthers && Yii::$app->controller->id != 'shared-point-sale'): ?>
  97. <div class="alert alert-info">
  98. <p>
  99. <i class="icon fa fa-share-alt"></i>
  100. Vous avez une demande de partage de point de vente en attente. <a class="alert-link" href="<?= Yii::$app->urlManager->createUrl(['shared-point-sale/index']) ?>">Voir</a>
  101. </p>
  102. </div>
  103. <?php endif; ?>
  104. <?php
  105. $flashTypeArray = ['error' => 'ban', 'danger' => 'ban', 'warning' => 'warning', 'info' => 'info', 'success' => 'check'];
  106. foreach($flashTypeArray as $flashType => $icon) {
  107. if(Yii::$app->session->hasFlash($flashType)) {
  108. echo $this->renderFile('@common/views/alert_message.php', [
  109. 'display' => true,
  110. 'title' => false,
  111. 'type' => $flashType,
  112. 'icon' => $icon,
  113. 'message' => Yii::$app->session->getFlash($flashType),
  114. ]);
  115. }
  116. }
  117. ?>
  118. <?= $content ?>
  119. <div class="clr"></div>
  120. </section>
  121. </div>
  122. <footer class="main-footer">
  123. <div class="pull-right hidden-xs">
  124. <strong>Version</strong> <?= GlobalParam::getSoukeVersion(); ?>
  125. </div>
  126. <br />
  127. <!--<div class="pull-right hidden-xs">
  128. <b>Version</b> 2.0
  129. </div>
  130. <strong>Copyright &copy; 2014-2015 <a href="http://almsaeedstudio.com">Almsaeed Studio</a>.</strong> All rights
  131. reserved.-->
  132. </footer>
  133. <!-- Control Sidebar -->
  134. <aside class="control-sidebar control-sidebar-dark">
  135. <!-- Create the tabs -->
  136. <ul class="nav nav-tabs nav-justified control-sidebar-tabs">
  137. <li><a href="#control-sidebar-home-tab" data-toggle="tab"><i class="fa fa-home"></i></a></li>
  138. <li><a href="#control-sidebar-settings-tab" data-toggle="tab"><i class="fa fa-gears"></i></a></li>
  139. </ul>
  140. <!-- Tab panes -->
  141. <div class="tab-content">
  142. <!-- Home tab content -->
  143. <div class="tab-pane" id="control-sidebar-home-tab">
  144. <h3 class="control-sidebar-heading">Recent Activity</h3>
  145. <ul class='control-sidebar-menu'>
  146. <li>
  147. <a href='javascript::;'>
  148. <i class="menu-icon fa fa-birthday-cake bg-red"></i>
  149. <div class="menu-info">
  150. <h4 class="control-sidebar-subheading">Langdon's Birthday</h4>
  151. <p>Will be 23 on April 24th</p>
  152. </div>
  153. </a>
  154. </li>
  155. <li>
  156. <a href='javascript::;'>
  157. <i class="menu-icon fa fa-user bg-yellow"></i>
  158. <div class="menu-info">
  159. <h4 class="control-sidebar-subheading">Frodo Updated His Profile</h4>
  160. <p>New phone +1(800)555-1234</p>
  161. </div>
  162. </a>
  163. </li>
  164. <li>
  165. <a href='javascript::;'>
  166. <i class="menu-icon fa fa-envelope-o bg-light-blue"></i>
  167. <div class="menu-info">
  168. <h4 class="control-sidebar-subheading">Nora Joined Mailing List</h4>
  169. <p>nora@example.com</p>
  170. </div>
  171. </a>
  172. </li>
  173. <li>
  174. <a href='javascript::;'>
  175. <i class="menu-icon fa fa-file-code-o bg-green"></i>
  176. <div class="menu-info">
  177. <h4 class="control-sidebar-subheading">Cron Job 254 Executed</h4>
  178. <p>Execution time 5 seconds</p>
  179. </div>
  180. </a>
  181. </li>
  182. </ul>
  183. <!-- /.control-sidebar-menu -->
  184. <h3 class="control-sidebar-heading">Tasks Progress</h3>
  185. <ul class='control-sidebar-menu'>
  186. <li>
  187. <a href='javascript::;'>
  188. <h4 class="control-sidebar-subheading">
  189. Custom Template Design
  190. <span class="label label-danger pull-right">70%</span>
  191. </h4>
  192. <div class="progress progress-xxs">
  193. <div class="progress-bar progress-bar-danger" style="width: 70%"></div>
  194. </div>
  195. </a>
  196. </li>
  197. <li>
  198. <a href='javascript::;'>
  199. <h4 class="control-sidebar-subheading">
  200. Update Resume
  201. <span class="label label-success pull-right">95%</span>
  202. </h4>
  203. <div class="progress progress-xxs">
  204. <div class="progress-bar progress-bar-success" style="width: 95%"></div>
  205. </div>
  206. </a>
  207. </li>
  208. <li>
  209. <a href='javascript::;'>
  210. <h4 class="control-sidebar-subheading">
  211. Laravel Integration
  212. <span class="label label-waring pull-right">50%</span>
  213. </h4>
  214. <div class="progress progress-xxs">
  215. <div class="progress-bar progress-bar-warning" style="width: 50%"></div>
  216. </div>
  217. </a>
  218. </li>
  219. <li>
  220. <a href='javascript::;'>
  221. <h4 class="control-sidebar-subheading">
  222. Back End Framework
  223. <span class="label label-primary pull-right">68%</span>
  224. </h4>
  225. <div class="progress progress-xxs">
  226. <div class="progress-bar progress-bar-primary" style="width: 68%"></div>
  227. </div>
  228. </a>
  229. </li>
  230. </ul>
  231. <!-- /.control-sidebar-menu -->
  232. </div>
  233. <!-- /.tab-pane -->
  234. <!-- Settings tab content -->
  235. <div class="tab-pane" id="control-sidebar-settings-tab">
  236. <form method="post">
  237. <h3 class="control-sidebar-heading">General Settings</h3>
  238. <div class="form-group">
  239. <label class="control-sidebar-subheading">
  240. Report panel usage
  241. <input type="checkbox" class="pull-right" checked/>
  242. </label>
  243. <p>
  244. Some information about this general settings option
  245. </p>
  246. </div>
  247. <!-- /.form-group -->
  248. <div class="form-group">
  249. <label class="control-sidebar-subheading">
  250. Allow mail redirect
  251. <input type="checkbox" class="pull-right" checked/>
  252. </label>
  253. <p>
  254. Other sets of options are available
  255. </p>
  256. </div>
  257. <!-- /.form-group -->
  258. <div class="form-group">
  259. <label class="control-sidebar-subheading">
  260. Expose author name in posts
  261. <input type="checkbox" class="pull-right" checked/>
  262. </label>
  263. <p>
  264. Allow the user to show his name in blog posts
  265. </p>
  266. </div>
  267. <!-- /.form-group -->
  268. <h3 class="control-sidebar-heading">Chat Settings</h3>
  269. <div class="form-group">
  270. <label class="control-sidebar-subheading">
  271. Show me as online
  272. <input type="checkbox" class="pull-right" checked/>
  273. </label>
  274. </div>
  275. <!-- /.form-group -->
  276. <div class="form-group">
  277. <label class="control-sidebar-subheading">
  278. Turn off notifications
  279. <input type="checkbox" class="pull-right"/>
  280. </label>
  281. </div>
  282. <!-- /.form-group -->
  283. <div class="form-group">
  284. <label class="control-sidebar-subheading">
  285. Delete chat history
  286. <a href="javascript::;" class="text-red pull-right"><i class="fa fa-trash-o"></i></a>
  287. </label>
  288. </div>
  289. <!-- /.form-group -->
  290. </form>
  291. </div>
  292. <!-- /.tab-pane -->
  293. </div>
  294. </aside><!-- /.control-sidebar -->
  295. <!-- Add the sidebar's background. This div must be placed
  296. immediately after the control sidebar -->
  297. <div class='control-sidebar-bg'></div>
  298. <!-- alerts -->
  299. <div id="app-alerts">
  300. <template v-for="alert in alerts">
  301. <transition name="slide-fade">
  302. <div v-if="alert.display == true" :class="'alert alert-'+alert.type">
  303. {{ alert.message }}
  304. </div>
  305. </transition>
  306. </template>
  307. </div>