PageRenderTime 29ms CodeModel.GetById 11ms RepoModel.GetById 0ms app.codeStats 0ms

/modules/shop/views/product_main.php

https://bitbucket.org/seyar/kinda.local
PHP | 203 lines | 153 code | 36 blank | 14 comment | 0 complexity | b7f139c3b19f57370fdaadca844c7d4a MD5 | raw file
  1. <?php
  2. defined('SYSPATH') or die('No direct script access.');
  3. /**
  4. * @version $Id: v 0.1 17.11.2010 - 17:59:38 Exp $
  5. *
  6. * Project: Chimera2.local
  7. * File: settings_common.php *
  8. *
  9. * This library is commercial distributed software; you can't
  10. * redistribute it and/or modify it without owner (or author) approval.
  11. *
  12. * @link http://bestartdesign.com
  13. * @Best IT Solutions (C) 2010
  14. *
  15. * @author Seyar Chapuh <seyarchapuh@gmail.com>
  16. */
  17. ?>
  18. <div class="flLeft" style="width: 100%;padding-bottom: 13px;font-style: italic">
  19. <table width="100%" class="italic grayText2 borderNone shop_seo">
  20. <tr >
  21. <td style="width: 49%;vertical-align:top;"><?php echo I18n::get('Product Name') . ':' ?> <br />
  22. <div class="winput seo_padding_top" style="padding-bottom: 16px">
  23. <input type="text" name="name" value="<?= htmlentities(Model_Content::arrGet( $obj, 'name', Model_Content::arrGet($_POST, 'name', $obj['alter_name']) ), ENT_COMPAT, 'utf-8');?>" style="padding-right: 0px;"/>
  24. </div>
  25. <?php echo I18n::get('Category') . ':' ?> <br />
  26. <div class="winput seo_padding_top">
  27. <? //echo(Kohana::debug($obj['categories_id']));?>
  28. <?// echo (Kohana::debug($categories)); ?>
  29. <?// array_unshift($publ_types_unsorted, array('id'=>'', 'name'=>'---','url'=>'---', 'preTitle'=>'') );?>
  30. <?//= Model_Content::customSelect('publ_types_id', $publ_types_unsorted, $filter['pub_id'], NULL, 'id', array('preTitle','name'))?>
  31. <?//= Model_Content::customSelect('categories_id', $,)?>
  32. <?// echo (Kohana::debug($edit_categories_list)); ?>
  33. <? // $a = array(); foreach ($edit_categories_list as $value) { $a[$value['id']]=$value['name']; } ?>
  34. <?= Model_Content::customSelect('categories_id', $edit_categories_list, Model_Content::arrGet($obj,'categories_id',Model_Content::arrGet($_POST,'categories_id',$_GET['parent_id']) ), NULL, 'id', 'name')?>
  35. <? //array_unshift($a, array('id'=>'', 'name'=>'---','url'=>'---', 'preTitle'=>'') );?>
  36. <?//= Model_Content::customSelect($name, $options, $selected, $attributes, $valuekey, $titleKey)?>
  37. <?//=Model_Content::customSelect('categories_id',$a,$obj['categories_id'],array(''),null,null)?>
  38. </div>
  39. </td>
  40. <td style="padding: 0 20px 0 20px;width: 1px;">
  41. </td>
  42. <td style="width: 49%;vertical-align:top;"><?php echo I18n::get('Alternative name') . ':' ?> <br />
  43. <div class="winput seo_padding_top" style="padding-bottom: 16px">
  44. <input type="text" name="alter_name" value="<?= htmlentities(Model_Content::arrGet($obj,'alter_name', $_POST['alter_name']), ENT_COMPAT, 'utf-8');?>" style="padding-right: 0px;"/>
  45. </div>
  46. <?php echo I18n::get('Brand') . ':' ?> <br />
  47. <div class="winput seo_padding_top">
  48. <?= Model_Content::customSelect('brand_id', $brands, Arr::get($obj, 'brand_id', $_POST['brand_id']),null,'id','name')?>
  49. </div>
  50. </td>
  51. </tr>
  52. <tr>
  53. <td colspan="3">
  54. <?php echo I18n::get('Short description') . ':' ?>
  55. <div class="winput seo_padding_top"><textarea style="width:99%" name="short_description"><?=Model_Content::arrGet($obj, 'short_description', $_POST['short_description']);?></textarea></div>
  56. </td>
  57. </tr></table>
  58. <table width="100%" class="italic grayText2 borderNone shop_seo">
  59. <tr>
  60. <td>
  61. <?php echo I18n::get('News content') . ':' ?>
  62. <!-- <div class="winput seo_padding_top"></div>-->
  63. </td>
  64. </tr>
  65. <tr>
  66. <td>
  67. <!-- -->
  68. <script type="text/javascript" src="/vendor/ckeditor/ckeditor.js"></script>
  69. <script type="text/javascript" src="/vendor/ckeditor/adapters/jquery.js"></script>
  70. <script type="text/javascript">
  71. var config;
  72. jQuery(document).ready(function()
  73. {
  74. config = {
  75. toolbar:
  76. [
  77. ['Styles','Format','Font','FontSize'],
  78. ['TextColor','BGColor'],
  79. ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'],
  80. ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
  81. '/',
  82. ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
  83. ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
  84. ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
  85. ['Link','Unlink','Anchor'],
  86. ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar'],
  87. ['Templates','Maximize','ShowBlocks','-','Source']
  88. ]
  89. , defaultLanguage: 'ru'
  90. , language: 'ru'
  91. , filebrowserBrowseUrl : '/vendor/elfinder/elfinder.html'
  92. };
  93. var ckeditor = CKEDITOR.replace("ckeditor", config);
  94. });
  95. </script>
  96. <!-- -->
  97. <textarea rows="15" cols="44" style="width:98%;" name="full_description" id="ckeditor"
  98. class="jquery_ckeditor"><?= Model_Content::arrGet($obj, 'full_description', $_POST['full_description']);?></textarea>
  99. </td>
  100. </tr>
  101. </table>
  102. <table width="100%" class="italic grayText2 borderNone shop_seo">
  103. <tr>
  104. <td style="width: 49%;vertical-align:top;"><?php echo I18n::get('scu') . ':' ?> <br />
  105. <div class="winput seo_padding_top" style="padding-bottom: 16px">
  106. <input type="text" name="scu" value="<?= Model_Content::arrGet($obj, 'scu', $_POST['scu']);?>" style="padding-right: 0px;"/>
  107. </div>
  108. <?php echo I18n::get('Warranty period (months)') . ':' ?> <br />
  109. <div class="winput seo_padding_top" >
  110. <input type="text" name="site_name" value="12" style="padding-right: 0px;"/>
  111. </div>
  112. </td>
  113. <td style="padding: 0 20px 0 20px;width: 1px;"></td>
  114. <td style="width: 49%;vertical-align:top;"><?php echo I18n::get('Weight (kg)') . ':' ?> <br />
  115. <div class="winput seo_padding_top" style="padding-bottom: 16px">
  116. <input type="text" name="weight" value="<?=Model_Content::arrGet($obj, 'weight',$_POST['weight']);?>" style="padding-right: 0px;"/>
  117. </div>
  118. <?php echo I18n::get('Rating') . ':' ?> <br />
  119. <div class="winput seo_padding_top" >
  120. <input type="text" name="rating" value="<?=Model_Content::arrGet($obj, 'rating', $_POST['rating']);?>" style="padding-right: 0px;"/>
  121. </div>
  122. </td>
  123. </tr>
  124. <tr>
  125. <td colspan ="3"style="border-bottom: 1px dotted #929FA7;width: 100%">
  126. </td>
  127. </tr>
  128. <tr>
  129. <td style=" padding-top: 8px;">
  130. <input name="is_new" value = "1" type="checkbox" <?=($obj['is_new']=='1' ? 'checked' : '')?> class="" />
  131. <span style="margin-left: 6px; margin-right: 15px;"><?= I18n::get('New product')?></span>
  132. <input name="is_bestseller" value = "1" type="checkbox" <?=($obj['is_bestseller']=='1' ? 'checked' : '')?> class="listCheckbox checkBox" />
  133. <span style="margin-left: 6px; margin-right: 15px;"><?= I18n::get('Best-seller')?></span>
  134. <input name="show_on_startpage" value = "1" type="checkbox" <?=($obj['show_on_startpage']=='1' ? 'checked' : '')?> class="listCheckbox checkBox" />
  135. <span style="margin-left: 6px; margin-right: 15px;"><?= I18n::get('Skip to main')?></span>
  136. </td>
  137. <td></td>
  138. <td style=" padding-top: 8px;">
  139. <label><input name="parsed" value = "1" type="checkbox" <?=($obj['parsed']=='1' ? 'checked' : '')?> class="listCheckbox checkBox" />
  140. <span style="margin-left: 6px; margin-right: 15px;"><?= I18n::get('Don`t parse')?></span></label>
  141. </td>
  142. </tr>
  143. <tr>
  144. <td>
  145. <?php echo I18n::get('Status') . ':' ?>
  146. <div class="winput seo_padding_top" >
  147. <? $options = array(
  148. 'active' => I18n::get('Active'),
  149. 'archive' => I18n::get('Archive'),
  150. 'unverified' => I18n::get('Unverified'),
  151. 'out_of_store' => I18n::get('Out of store'),
  152. 'allow_to_order' => I18n::get('Allow to order'),
  153. 'from1c' => I18n::get('From1c')
  154. );
  155. echo Form::select('status', $options, Arr::get($obj, 'status', $_POST['status']), array('size'=>4));
  156. ?>
  157. </div>
  158. </td>
  159. <td></td>
  160. <td style=" padding-top: 8px;">
  161. Формат <br />
  162. <input type="text" name="format" value="<?=Model_Content::arrGet($obj, 'format', $_POST['format']);?>" style="padding-right: 0px;"/>
  163. </td>
  164. </tr>
  165. </table>
  166. </div>
  167. <div class="clear"></div>