Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

307 rindas
17KB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Copyright 2017-Today BizzAppDev - Ruchir Shukla <ruchir@bizzappdev.com>
  4. License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
  5. -->
  6. <odoo>
  7. <data>
  8. <!-- Filter: Category by -->
  9. <template id="category_display" name="Show Category by">
  10. <div class="dropdown btn-group dropdown_category_by">
  11. <!-- Search selected category -->
  12. <t t-set="selected_category" t-value="False"/>
  13. <t t-foreach="category_all" t-as="cat">
  14. <t t-if="cat.id == int(category or 0)"
  15. t-set="selected_category" t-value="cat"/>
  16. </t>
  17. <!-- Dropdown menu -->
  18. <a class="btn btn-secondary dropdown-toggle ml-2" href="#" role="button" id="dropdownMenuFilterCategoryBy" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  19. Category: <t t-esc="(selected_category and selected_category.name) or 'All'"/>
  20. </a>
  21. <div class="dropdown-menu dropdown-scrollable" aria-labelledby="dropdownMenuFilterCategoryBy">
  22. <a t-att-class="'dropdown-item %s' % ('active' if not category else '')" t-att-href="keep('/shop/', category='')">All</a>
  23. <t t-foreach="category_all" t-as="c">
  24. <a t-att-class="'dropdown-item %s' % ('active' if c.id == int(category or 0) else '')" t-att-href="keep('/shop/category/' + slug(c), category=0)" t-field="c.name" />
  25. </t>
  26. </div>
  27. </div>
  28. </template>
  29. <!-- Filter: Version by -->
  30. <template id="version_display" name="Show Version by">
  31. <div class="dropdown btn-group dropdown_version_by">
  32. <!-- Search selected version -->
  33. <t t-set="selected_version" t-value="False"/>
  34. <t t-foreach="versions" t-as="ver">
  35. <t t-if="ver.id == int(version or 0)"
  36. t-set="selected_version" t-value="ver"/>
  37. </t>
  38. <!-- Dropdown menu -->
  39. <a class="btn btn-secondary dropdown-toggle ml-2" href="#" role="button" id="dropdownMenuFilterVersionBy" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  40. Version: <t t-esc="(selected_version and selected_version.name) or 'All'"/>
  41. </a>
  42. <div class="dropdown-menu dropdown-scrollable" aria-labelledby="dropdownMenuFilterVersionBy">
  43. <a t-att-class="'dropdown-item %s' % ('active' if not version else '')" t-att-href="keep('/shop', version='')">All</a>
  44. <t t-foreach="versions" t-as="v">
  45. <a t-att-class="'dropdown-item %s' % ('active' if v.id == int(version or 0) else '')" t-att-href="keep('/shop', version=v.id)">
  46. <t t-esc="v.name"/>
  47. </a>
  48. </t>
  49. </div>
  50. </div>
  51. </template>
  52. <!-- Filter: Maturity by -->
  53. <template id="maturity_display">
  54. <div class="dropdown btn-group dropdown_maturity_by">
  55. <!-- Search selected maturity -->
  56. <t t-set="selected_maturity" t-value="False"/>
  57. <t t-if="maturity == 'alpha'"
  58. t-set="selected_maturity" t-value="'Alpha'"/>
  59. <t t-if="maturity == 'beta'"
  60. t-set="selected_maturity" t-value="'Beta'"/>
  61. <t t-if="maturity == 'production/stable'"
  62. t-set="selected_maturity" t-value="'Production/Stable'"/>
  63. <t t-if="maturity == 'mature'"
  64. t-set="selected_maturity" t-value="'Mature'"/>
  65. <!-- Dropdown menu -->
  66. <a class="btn btn-secondary dropdown-toggle ml-2" href="#" role="button" id="dropdownMenuFilterMaturityBy" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  67. Maturity: <t t-esc="selected_maturity or 'All'"/>
  68. </a>
  69. <div class="dropdown-menu" aria-labelledby="dropdownMenuFilterMaturityBy">
  70. <a t-att-class="'dropdown-item %s' % ('active' if not maturity else '')" t-att-href="keep('/shop', maturity='')">All</a>
  71. <a t-att-class="'dropdown-item %s' % ('active' if maturity == 'alpha' else '')" t-att-href="keep('/shop', maturity='alpha')">Alpha</a>
  72. <a t-att-class="'dropdown-item %s' % ('active' if maturity == 'beta' else '')" t-att-href="keep('/shop', maturity='beta')">Beta</a>
  73. <a t-att-class="'dropdown-item %s' % ('active' if maturity == 'production/stable' else '')" t-att-href="keep('/shop', maturity='production/stable')">Production/Stable</a>
  74. <a t-att-class="'dropdown-item %s' % ('active' if maturity == 'mature' else '')" t-att-href="keep('/shop', maturity='mature')">Mature</a>
  75. </div>
  76. </div>
  77. </template>
  78. <!-- Add new filters -->
  79. <!-- <template id="sort_customize" inherit_id="website_sale.sort">
  80. <xpath expr='//div[hasclass("dropdown_sorty_by")]' position="after">
  81. <t t-call="website_apps_store.category_display"/>
  82. <t t-call="website_apps_store.version_display"/>
  83. <t t-call="website_apps_store.maturity_display"/>
  84. </xpath>
  85. <xpath expr="//t[@t-set='website_sale_sortable']" position="before">
  86. <t t-set="download_count_desc_label">Download Count - Max to Min</t>
  87. <t t-set="download_count_asc_label">Download Count - Min to Max</t>
  88. </xpath>
  89. <xpath expr="//t[@t-set='website_sale_sortable']" position="replace">
  90. <t t-set="website_sale_sortable" t-value="[
  91. (name_asc_label, 'name asc'),
  92. (name_desc_label, 'name desc'),
  93. (download_count_desc_label, 'total_download_count desc'),
  94. (download_count_asc_label, 'total_download_count asc'),
  95. ]"/>
  96. </xpath>
  97. </template> -->
  98. <!-- Modify search box placeholder -->
  99. <template id="search_placeholder" inherit_id="website.website_search_box">
  100. <xpath expr="//input" position="attributes">
  101. <attribute name="placeholder">Name, Author, Version...</attribute>
  102. </xpath>
  103. </template>
  104. <!-- Product Item Cell -->
  105. <template id="products_item_customize" inherit_id="website_sale.products_item">
  106. <!-- <xpath expr="//section" position="attributes">
  107. <attribute name="t-att-style">'padding-bottom: 1px;' if product.odoo_module_id else ''</attribute>
  108. </xpath> -->
  109. <xpath expr="//h6" position="attributes">
  110. <attribute name="t-att-style">'margin-bottom: 4px;' if product.odoo_module_id else ''</attribute>
  111. </xpath>
  112. <xpath expr="//h6//a[1]" position="after">
  113. <t t-if="product.odoo_module_id">
  114. <br />
  115. <span t-esc="product.technical_name" class="font_12"/>
  116. <br/>
  117. <t t-set="author_ids" t-value="product.get_author_details()"/>
  118. <span t-esc="', '.join(author.name for author in author_ids)" class="font_12"/>
  119. <br/>
  120. <t t-foreach="product.attribute_line_ids" t-as="attr">
  121. <span t-esc="' / '.join(value.name for value in attr.value_ids.sorted(reverse=True))" class="font_12"/>
  122. </t>
  123. <!-- Download counter -->
  124. <div class="pull-right">
  125. <span class="fa fa-download"></span>
  126. <span t-esc="product.total_download_count"></span>
  127. </div>
  128. </t>
  129. </xpath>
  130. <xpath expr='//div[hasclass("product_price")]//span[1]' position="replace">
  131. <span t-if="combination_info['price'] and not product.odoo_module_id" t-esc="combination_info['price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/>
  132. </xpath>
  133. <xpath expr="//span[@t-field='image_holder.image_1920']" position="attributes">
  134. <attribute name="t-options">{'widget': 'image', 'resize': None, 'zoom': 'image'}</attribute>
  135. </xpath>
  136. </template>
  137. <!-- Product Detail Page Customization -->
  138. <template id="product" inherit_id="website_sale.product">
  139. <xpath expr="//t[@t-call='website_sale.product_price']" position="attributes">
  140. <attribute name="t-if">not product.odoo_module_id</attribute>
  141. </xpath>
  142. <xpath expr='//p[hasclass("css_not_available_msg")]' position="attributes">
  143. <attribute name="t-if">len(product.product_variant_ids) &gt; 1 and not product.odoo_module_id</attribute>
  144. </xpath>
  145. <!-- <xpath expr='//a[hasclass("js_check_product")]' position="attributes">
  146. <attribute name="t-if">not product.odoo_module_id</attribute>
  147. </xpath> -->
  148. <xpath expr="//p[@t-field='product.description_sale']/.." position="attributes">
  149. <attribute name="t-if">not product.odoo_module_id</attribute>
  150. </xpath>
  151. <!-- <xpath expr="//hr[2]" position="attributes">
  152. <attribute name="t-if">not product.odoo_module_id</attribute>
  153. </xpath> -->
  154. <xpath expr='//div[@id="product_details"]/p[hasclass("text-muted")]' position="attributes">
  155. <attribute name="t-if">not product.odoo_module_id</attribute>
  156. </xpath>
  157. <xpath expr="//div[@id='product_details']/h1[@t-field='product.name']" position="attributes">
  158. <attribute name="class">name_product</attribute>
  159. </xpath>
  160. <xpath expr='//form[@t-if="product._is_add_to_cart_possible()"]'
  161. position="after">
  162. <div class="form-group form-field o_website_form_required_custom">
  163. <div class="col-md-7 col-sm-8">
  164. <span class="o_website_form_recaptcha" />
  165. </div>
  166. </div>
  167. <div class="col-md-12 p-0" t-if="product.odoo_module_id">
  168. <div class="col-md-4 mt16 mb16">
  169. <button class="btn btn-primary btn-lg"
  170. name="download_zip"
  171. id="download_zip"
  172. t-att-data-tmpl-id="product.id">Download
  173. <span class="fa fa-download"/>
  174. </button>
  175. </div>
  176. </div>
  177. </xpath>
  178. <xpath expr="//section" position="inside">
  179. <div class="desc_rst" t-if="product.odoo_module_id">
  180. <p t-esc="product_var_id.app_description_rst_html" t-options='{"widget": "html"}'/>
  181. </div>
  182. </xpath>
  183. <xpath expr="//div[hasclass('row')]" position="after">
  184. <t t-if="product.odoo_module_id">
  185. <t t-set="product_var_id" t-value="product.get_version_info()"/>
  186. </t>
  187. <div class="col-md-4">
  188. <div class="col-md-12 p-0" t-if="product.odoo_module_id">
  189. <div class="row">
  190. <div class="col-md-4 p-0">
  191. <b>Technical Name: </b>
  192. </div>
  193. <div class="col-md-8 p-0">
  194. <span class="tech_detail" t-esc="product_var_id.odoo_module_version_id.module_id.technical_name"/>
  195. </div>
  196. </div>
  197. </div>
  198. <div class="col-md-12 p-0" t-if="product.odoo_module_id and len(product.odoo_module_id.organization_serie_ids) == 1">
  199. <div class="row">
  200. <div class="col-md-4 p-0">
  201. <b>Version: </b>
  202. </div>
  203. <div class="col-md-8 p-0">
  204. <span class="tech_detail" t-esc="product_var_id.odoo_module_id.organization_serie_ids[0].name"/>
  205. </div>
  206. </div>
  207. </div>
  208. <div class="col-md-12 p-0" t-if="product.odoo_module_id">
  209. <div class="row">
  210. <div class="col-md-4 p-0">
  211. <b>License: </b>
  212. </div>
  213. <div class="col-md-8 p-0">
  214. <a t-att-href="product_var_id.app_license_id.website" class="license_url" target="_blank">
  215. <span class="license_detail" t-esc="product_var_id.app_license_id.name"/>
  216. </a>
  217. </div>
  218. </div>
  219. </div>
  220. <div class="col-md-12 p-0" t-if="product.odoo_module_id">
  221. <div class="row">
  222. <div class="col-md-4 p-0">
  223. <b>Author: </b>
  224. </div>
  225. <div class="col-md-8 p-0">
  226. <span class="author_detail" t-esc="', '.join(author.name for author in product_var_id.app_author_ids)"/>
  227. </div>
  228. </div>
  229. </div>
  230. <div class="col-md-12 p-0" t-if="product.odoo_module_id">
  231. <div class="row">
  232. <div class="col-md-4 p-0">
  233. <b>Maintainer: </b>
  234. </div>
  235. <div class="col-md-8 p-0">
  236. <a href="https://odoo-community.org" target="_blank">
  237. <span class="main_detail">https://odoo-community.org</span>
  238. </a>
  239. </div>
  240. </div>
  241. </div>
  242. <div class="col-md-12 p-0" t-if="product.odoo_module_id">
  243. <div class="row">
  244. <div class="col-md-4 p-0">
  245. <b>Website: </b>
  246. </div>
  247. <div class="col-md-8 p-0">
  248. <a t-att-href="product_var_id.app_website" target="_blank">
  249. <span class="website_detail" t-esc="product_var_id.app_website"/>
  250. </a>
  251. </div>
  252. </div>
  253. </div>
  254. <div class="col-md-12 p-0" t-if="product.odoo_module_id">
  255. <div class="row">
  256. <div class="col-md-4 p-0">
  257. <b>Repository: </b>
  258. </div>
  259. <div class="col-md-8 p-0" style="overflow-wrap:break-word;">
  260. <a t-att-href="product_var_id.app_github_url" target="_blank">
  261. <span class="repo_detail" t-esc="product_var_id.app_github_url"/>
  262. </a>
  263. </div>
  264. </div>
  265. </div>
  266. </div>
  267. </xpath>
  268. <!-- <xpath expr="//div[hasclass('col-md-6')]" position="attributes">
  269. <attribute name="class" remove="col-md-6"></attribute>
  270. <attribute name="class" add="col-md-4" separator=" "></attribute>
  271. </xpath> -->
  272. <xpath expr="//div[hasclass('row')][2]" position="before">
  273. <div class="col-sm-12 text-center mb48">
  274. <t t-if="product.odoo_module_id">
  275. <t t-set="product_var_id" t-value="product.get_version_info()"/>
  276. </t>
  277. <h1 itemprop="name" t-field="product.name">Product Name</h1>
  278. <p t-if="product.odoo_module_id" class="app_summary" t-esc="product_var_id.app_summary"/>
  279. </div>
  280. </xpath>
  281. <xpath expr="//div[@id='product_details']/h1" position="replace">
  282. </xpath>
  283. <xpath expr="//div[@id='product_details']" position="attributes">
  284. <attribute name="class" remove="col-md-6 offset-xl-2" add="col-sm-4 col-md-4" separator=" "></attribute>
  285. </xpath>
  286. </template>
  287. <!-- <template id="product_quantity_customize" inherit_id="website_sale.product_quantity">
  288. <xpath expr='//div[hasclass("css_quantity")]' position="attributes">
  289. <attribute name="t-if">not product.odoo_module_id</attribute>
  290. </xpath>
  291. </template> -->
  292. </data>
  293. </odoo>
上海开阖软件有限公司 沪ICP备12045867号-1