PageRenderTime 36ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 1ms

/prestashop/_/cache/smarty/compile/20/8c/d3/208cd338324b113be4926ab03214a9f49905065e.file.features.tpl.php

https://gitlab.com/A.Julien/sendstockbymail-module-prestashop
PHP | 283 lines | 259 code | 24 blank | 0 comment | 30 complexity | 9efef658761f1416c326ce2f2ae5143e MD5 | raw file
  1. <?php /* Smarty version Smarty-3.1.19, created on 2016-08-29 22:06:52
  2. compiled from "C:\xampp\htdocs\prestashop\prestashop\_\admin\themes\default\template\controllers\products\features.tpl" */ ?>
  3. <?php /*%%SmartyHeaderCode:2077257c495dc926390-52498181%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
  4. $_valid = $_smarty_tpl->decodeProperties(array (
  5. 'file_dependency' =>
  6. array (
  7. '208cd338324b113be4926ab03214a9f49905065e' =>
  8. array (
  9. 0 => 'C:\\xampp\\htdocs\\prestashop\\prestashop\\_\\admin\\themes\\default\\template\\controllers\\products\\features.tpl',
  10. 1 => 1472500725,
  11. 2 => 'file',
  12. ),
  13. ),
  14. 'nocache_hash' => '2077257c495dc926390-52498181',
  15. 'function' =>
  16. array (
  17. ),
  18. 'variables' =>
  19. array (
  20. 'product' => 0,
  21. 'available_features' => 0,
  22. 'available_feature' => 0,
  23. 'value' => 0,
  24. 'link' => 0,
  25. 'languages' => 0,
  26. 'language' => 0,
  27. 'default_form_language' => 0,
  28. ),
  29. 'has_nocache_code' => false,
  30. 'version' => 'Smarty-3.1.19',
  31. 'unifunc' => 'content_57c495dd0cdfe1_95483663',
  32. ),false); /*/%%SmartyHeaderCode%%*/?>
  33. <?php if ($_valid && !is_callable('content_57c495dd0cdfe1_95483663')) {function content_57c495dd0cdfe1_95483663($_smarty_tpl) {?>
  34. <?php if (isset($_smarty_tpl->tpl_vars['product']->value->id)) {?>
  35. <div id="product-features" class="panel product-tab">
  36. <input type="hidden" name="submitted_tabs[]" value="Features" />
  37. <h3><?php echo smartyTranslate(array('s'=>'Assign features to this product'),$_smarty_tpl);?>
  38. </h3>
  39. <div class="alert alert-info">
  40. <?php echo smartyTranslate(array('s'=>'You can specify a value for each relevant feature regarding this product. Empty fields will not be displayed.'),$_smarty_tpl);?>
  41. <br/>
  42. <?php echo smartyTranslate(array('s'=>'You can either create a specific value, or select among the existing pre-defined values you\'ve previously added.'),$_smarty_tpl);?>
  43. </div>
  44. <table class="table">
  45. <thead>
  46. <tr>
  47. <th><span class="title_box"><?php echo smartyTranslate(array('s'=>'Feature'),$_smarty_tpl);?>
  48. </span></th>
  49. <th><span class="title_box"><?php echo smartyTranslate(array('s'=>'Pre-defined value'),$_smarty_tpl);?>
  50. </span></th>
  51. <th><span class="title_box"><u><?php echo smartyTranslate(array('s'=>'or'),$_smarty_tpl);?>
  52. </u> <?php echo smartyTranslate(array('s'=>'Customized value'),$_smarty_tpl);?>
  53. </span></th>
  54. </tr>
  55. </thead>
  56. <tbody>
  57. <?php $_smarty_tpl->tpl_vars['available_feature'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['available_feature']->_loop = false;
  58. $_from = $_smarty_tpl->tpl_vars['available_features']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  59. foreach ($_from as $_smarty_tpl->tpl_vars['available_feature']->key => $_smarty_tpl->tpl_vars['available_feature']->value) {
  60. $_smarty_tpl->tpl_vars['available_feature']->_loop = true;
  61. ?>
  62. <tr>
  63. <td><?php echo $_smarty_tpl->tpl_vars['available_feature']->value['name'];?>
  64. </td>
  65. <td>
  66. <?php if (sizeof($_smarty_tpl->tpl_vars['available_feature']->value['featureValues'])) {?>
  67. <select id="feature_<?php echo $_smarty_tpl->tpl_vars['available_feature']->value['id_feature'];?>
  68. _value" name="feature_<?php echo $_smarty_tpl->tpl_vars['available_feature']->value['id_feature'];?>
  69. _value"
  70. onchange="$('.custom_<?php echo $_smarty_tpl->tpl_vars['available_feature']->value['id_feature'];?>
  71. _').val('');">
  72. <option value="0">---</option>
  73. <?php $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['value']->_loop = false;
  74. $_from = $_smarty_tpl->tpl_vars['available_feature']->value['featureValues']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  75. foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value) {
  76. $_smarty_tpl->tpl_vars['value']->_loop = true;
  77. ?>
  78. <option value="<?php echo $_smarty_tpl->tpl_vars['value']->value['id_feature_value'];?>
  79. "<?php if ($_smarty_tpl->tpl_vars['available_feature']->value['current_item']==$_smarty_tpl->tpl_vars['value']->value['id_feature_value']) {?>selected="selected"<?php }?> >
  80. <?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER]['truncate'][0][0]->smarty_modifier_truncate($_smarty_tpl->tpl_vars['value']->value['value'],40);?>
  81. </option>
  82. <?php } ?>
  83. </select>
  84. <?php } else { ?>
  85. <input type="hidden" name="feature_<?php echo $_smarty_tpl->tpl_vars['available_feature']->value['id_feature'];?>
  86. _value" value="0" />
  87. <span><?php echo smartyTranslate(array('s'=>'N/A'),$_smarty_tpl);?>
  88. -
  89. <a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['link']->value->getAdminLink('AdminFeatures'), ENT_QUOTES, 'UTF-8', true);?>
  90. &amp;addfeature_value&amp;id_feature=<?php echo $_smarty_tpl->tpl_vars['available_feature']->value['id_feature'];?>
  91. "
  92. class="confirm_leave btn btn-link"><i class="icon-plus-sign"></i> <?php echo smartyTranslate(array('s'=>'Add pre-defined values first'),$_smarty_tpl);?>
  93. <i class="icon-external-link-sign"></i></a>
  94. </span>
  95. <?php }?>
  96. </td>
  97. <td>
  98. <div class="row lang-0" style='display: none;'>
  99. <div class="col-lg-9">
  100. <textarea class="custom_<?php echo $_smarty_tpl->tpl_vars['available_feature']->value['id_feature'];?>
  101. _ALL textarea-autosize" name="custom_<?php echo $_smarty_tpl->tpl_vars['available_feature']->value['id_feature'];?>
  102. _ALL"
  103. cols="40" style='background-color:#CCF' rows="1" onkeyup="<?php $_smarty_tpl->tpl_vars['language'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['language']->_loop = false;
  104. $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
  105. $_from = $_smarty_tpl->tpl_vars['languages']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  106. foreach ($_from as $_smarty_tpl->tpl_vars['language']->key => $_smarty_tpl->tpl_vars['language']->value) {
  107. $_smarty_tpl->tpl_vars['language']->_loop = true;
  108. $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['language']->key;
  109. ?>$('.custom_<?php echo $_smarty_tpl->tpl_vars['available_feature']->value['id_feature'];?>
  110. _<?php echo $_smarty_tpl->tpl_vars['language']->value['id_lang'];?>
  111. ').val($(this).val());<?php } ?>" ><?php echo (($tmp = @htmlspecialchars($_smarty_tpl->tpl_vars['available_feature']->value['val'][1]['value'], ENT_QUOTES, 'UTF-8', true))===null||$tmp==='' ? '' : $tmp);?>
  112. </textarea>
  113. </div>
  114. <?php if (count($_smarty_tpl->tpl_vars['languages']->value)>1) {?>
  115. <div class="col-lg-3">
  116. <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
  117. <?php echo smartyTranslate(array('s'=>'ALL'),$_smarty_tpl);?>
  118. <span class="caret"></span>
  119. </button>
  120. <ul class="dropdown-menu">
  121. <?php $_smarty_tpl->tpl_vars['language'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['language']->_loop = false;
  122. $_from = $_smarty_tpl->tpl_vars['languages']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  123. foreach ($_from as $_smarty_tpl->tpl_vars['language']->key => $_smarty_tpl->tpl_vars['language']->value) {
  124. $_smarty_tpl->tpl_vars['language']->_loop = true;
  125. ?>
  126. <li>
  127. <a href="javascript:void(0);" onclick="restore_lng($(this),<?php echo $_smarty_tpl->tpl_vars['language']->value['id_lang'];?>
  128. );"><?php echo $_smarty_tpl->tpl_vars['language']->value['iso_code'];?>
  129. </a>
  130. </li>
  131. <?php } ?>
  132. </ul>
  133. </div>
  134. <?php }?>
  135. </div>
  136. <?php $_smarty_tpl->tpl_vars['language'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['language']->_loop = false;
  137. $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
  138. $_from = $_smarty_tpl->tpl_vars['languages']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  139. foreach ($_from as $_smarty_tpl->tpl_vars['language']->key => $_smarty_tpl->tpl_vars['language']->value) {
  140. $_smarty_tpl->tpl_vars['language']->_loop = true;
  141. $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['language']->key;
  142. ?>
  143. <?php if (count($_smarty_tpl->tpl_vars['languages']->value)>1) {?>
  144. <div class="row translatable-field lang-<?php echo $_smarty_tpl->tpl_vars['language']->value['id_lang'];?>
  145. ">
  146. <div class="col-lg-9">
  147. <?php }?>
  148. <textarea
  149. class="custom_<?php echo $_smarty_tpl->tpl_vars['available_feature']->value['id_feature'];?>
  150. _<?php echo $_smarty_tpl->tpl_vars['language']->value['id_lang'];?>
  151. textarea-autosize"
  152. name="custom_<?php echo $_smarty_tpl->tpl_vars['available_feature']->value['id_feature'];?>
  153. _<?php echo $_smarty_tpl->tpl_vars['language']->value['id_lang'];?>
  154. "
  155. cols="40"
  156. rows="1"
  157. onkeyup="if (isArrowKey(event)) return ;$('#feature_<?php echo $_smarty_tpl->tpl_vars['available_feature']->value['id_feature'];?>
  158. _value').val(0);" ><?php echo (($tmp = @htmlspecialchars($_smarty_tpl->tpl_vars['available_feature']->value['val'][$_smarty_tpl->tpl_vars['language']->value['id_lang']]['value'], ENT_QUOTES, 'UTF-8', true))===null||$tmp==='' ? '' : $tmp);?>
  159. </textarea>
  160. <?php if (count($_smarty_tpl->tpl_vars['languages']->value)>1) {?>
  161. </div>
  162. <div class="col-lg-3">
  163. <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
  164. <?php echo $_smarty_tpl->tpl_vars['language']->value['iso_code'];?>
  165. <span class="caret"></span>
  166. </button>
  167. <ul class="dropdown-menu">
  168. <li><a href="javascript:void(0);" onclick="all_languages($(this));"><?php echo smartyTranslate(array('s'=>'ALL'),$_smarty_tpl);?>
  169. </a></li>
  170. <?php $_smarty_tpl->tpl_vars['language'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['language']->_loop = false;
  171. $_from = $_smarty_tpl->tpl_vars['languages']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  172. foreach ($_from as $_smarty_tpl->tpl_vars['language']->key => $_smarty_tpl->tpl_vars['language']->value) {
  173. $_smarty_tpl->tpl_vars['language']->_loop = true;
  174. ?>
  175. <li>
  176. <a href="javascript:hideOtherLanguage(<?php echo $_smarty_tpl->tpl_vars['language']->value['id_lang'];?>
  177. );"><?php echo $_smarty_tpl->tpl_vars['language']->value['iso_code'];?>
  178. </a>
  179. </li>
  180. <?php } ?>
  181. </ul>
  182. </div>
  183. </div>
  184. <?php }?>
  185. <?php } ?>
  186. </td>
  187. </tr>
  188. <?php }
  189. if (!$_smarty_tpl->tpl_vars['available_feature']->_loop) {
  190. ?>
  191. <tr>
  192. <td colspan="3" style="text-align:center;"><i class="icon-warning-sign"></i> <?php echo smartyTranslate(array('s'=>'No features have been defined'),$_smarty_tpl);?>
  193. </td>
  194. </tr>
  195. <?php } ?>
  196. </tbody>
  197. </table>
  198. <a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['link']->value->getAdminLink('AdminFeatures'), ENT_QUOTES, 'UTF-8', true);?>
  199. &amp;addfeature" class="btn btn-link confirm_leave button">
  200. <i class="icon-plus-sign"></i> <?php echo smartyTranslate(array('s'=>'Add a new feature'),$_smarty_tpl);?>
  201. <i class="icon-external-link-sign"></i>
  202. </a>
  203. <div class="panel-footer">
  204. <a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['link']->value->getAdminLink('AdminProducts'), ENT_QUOTES, 'UTF-8', true);?>
  205. <?php if (isset($_REQUEST['page'])&&$_REQUEST['page']>1) {?>&amp;submitFilterproduct=<?php echo intval($_REQUEST['page']);?>
  206. <?php }?>" class="btn btn-default"><i class="process-icon-cancel"></i> <?php echo smartyTranslate(array('s'=>'Cancel'),$_smarty_tpl);?>
  207. </a>
  208. <button type="submit" name="submitAddproduct" class="btn btn-default pull-right" disabled="disabled"><i class="process-icon-loading"></i> <?php echo smartyTranslate(array('s'=>'Save'),$_smarty_tpl);?>
  209. </button>
  210. <button type="submit" name="submitAddproductAndStay" class="btn btn-default pull-right" disabled="disabled"><i class="process-icon-loading"></i> <?php echo smartyTranslate(array('s'=>'Save and stay'),$_smarty_tpl);?>
  211. </button>
  212. </div>
  213. </div>
  214. <script type="text/javascript">
  215. if (tabs_manager.allow_hide_other_languages)
  216. hideOtherLanguage(<?php echo $_smarty_tpl->tpl_vars['default_form_language']->value;?>
  217. );
  218. $(".textarea-autosize").autosize();
  219. function all_languages(pos)
  220. {
  221. <?php if (isset($_smarty_tpl->tpl_vars['languages']->value)&&is_array($_smarty_tpl->tpl_vars['languages']->value)) {?>
  222. <?php $_smarty_tpl->tpl_vars['language'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['language']->_loop = false;
  223. $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
  224. $_from = $_smarty_tpl->tpl_vars['languages']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  225. foreach ($_from as $_smarty_tpl->tpl_vars['language']->key => $_smarty_tpl->tpl_vars['language']->value) {
  226. $_smarty_tpl->tpl_vars['language']->_loop = true;
  227. $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['language']->key;
  228. ?>
  229. pos.parents('td').find('.lang-<?php echo $_smarty_tpl->tpl_vars['language']->value['id_lang'];?>
  230. ').addClass('nolang-<?php echo $_smarty_tpl->tpl_vars['language']->value['id_lang'];?>
  231. ').removeClass('lang-<?php echo $_smarty_tpl->tpl_vars['language']->value['id_lang'];?>
  232. ');
  233. <?php } ?>
  234. <?php }?>
  235. pos.parents('td').find('.translatable-field').hide();
  236. pos.parents('td').find('.lang-0').show();
  237. }
  238. function restore_lng(pos,i)
  239. {
  240. <?php if (isset($_smarty_tpl->tpl_vars['languages']->value)&&is_array($_smarty_tpl->tpl_vars['languages']->value)) {?>
  241. <?php $_smarty_tpl->tpl_vars['language'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['language']->_loop = false;
  242. $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
  243. $_from = $_smarty_tpl->tpl_vars['languages']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  244. foreach ($_from as $_smarty_tpl->tpl_vars['language']->key => $_smarty_tpl->tpl_vars['language']->value) {
  245. $_smarty_tpl->tpl_vars['language']->_loop = true;
  246. $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['language']->key;
  247. ?>
  248. pos.parents('td').find('.nolang-<?php echo $_smarty_tpl->tpl_vars['language']->value['id_lang'];?>
  249. ').addClass('lang-<?php echo $_smarty_tpl->tpl_vars['language']->value['id_lang'];?>
  250. ').removeClass('nolang-<?php echo $_smarty_tpl->tpl_vars['language']->value['id_lang'];?>
  251. ');
  252. <?php } ?>
  253. <?php }?>
  254. pos.parents('td').find('.lang-0').hide();
  255. hideOtherLanguage(i);
  256. }
  257. </script>
  258. <?php }?>
  259. <?php }} ?>