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.

195 lines
9.0KB

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!--
  3. Copyright (C) 2016-Today: Odoo Community Association (OCA)
  4. @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
  5. License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  6. -->
  7. <odoo>
  8. <record id="view_github_repository_search" model="ir.ui.view">
  9. <field name="model">github.repository</field>
  10. <field name="arch" type="xml">
  11. <search>
  12. <field
  13. name="name"
  14. string="Name or Description"
  15. filter_domain="['|', ('name', 'ilike', self), ('description', 'ilike', self)]"
  16. />
  17. <field name="organization_id" />
  18. <group expand="1" string="Group By">
  19. <filter
  20. string="Organization"
  21. name="organization"
  22. context="{'group_by' : 'organization_id'}"
  23. />
  24. </group>
  25. </search>
  26. </field>
  27. </record>
  28. <record id="view_github_repository_tree" model="ir.ui.view">
  29. <field name="model">github.repository</field>
  30. <field name="arch" type="xml">
  31. <tree decoration-muted="repository_branch_qty == 0">
  32. <field name="complete_name" />
  33. <field name="description" />
  34. <field name="repository_branch_qty" string="# Branches" />
  35. </tree>
  36. </field>
  37. </record>
  38. <record id="view_github_repository_form" model="ir.ui.view">
  39. <field name="model">github.repository</field>
  40. <field name="arch" type="xml">
  41. <form>
  42. <header>
  43. <button
  44. name="button_sync_branch"
  45. type="object"
  46. string="Branches Sync."
  47. class="btn btn-default"
  48. icon="fa-chevron-right"
  49. groups="github_connector.group_github_connector_manager"
  50. />
  51. </header>
  52. <sheet>
  53. <div class="oe_button_box" name="button_box">
  54. <button
  55. type="object"
  56. class="oe_stat_button"
  57. icon="fa-code-fork"
  58. name="action_github_repository_branch"
  59. attrs="{'invisible': [('repository_branch_qty', '=', False)]}"
  60. >
  61. <div class="o_stat_info">
  62. <field
  63. name="repository_branch_qty"
  64. class="o_stat_value"
  65. />
  66. <span
  67. class="o_stat_text"
  68. attrs="{'invisible': [('repository_branch_qty', '&lt;', 2)]}"
  69. > Branches</span>
  70. <span
  71. class="o_stat_text"
  72. attrs="{'invisible': [('repository_branch_qty', '&gt;', 1)]}"
  73. > Branch</span>
  74. </div>
  75. </button>
  76. <button
  77. type="object"
  78. class="oe_stat_button"
  79. icon="fa-users"
  80. name="action_github_team_repository_from_repository"
  81. attrs="{'invisible': [('team_qty', '=', False)]}"
  82. >
  83. <div class="o_stat_info">
  84. <field name="team_qty" class="o_stat_value" />
  85. <span
  86. class="o_stat_text"
  87. attrs="{'invisible': [('repository_branch_qty', '&lt;', 2)]}"
  88. > Teams</span>
  89. <span
  90. class="o_stat_text"
  91. attrs="{'invisible': [('repository_branch_qty', '&gt;', 1)]}"
  92. > Team</span>
  93. </div>
  94. </button>
  95. </div>
  96. <div class="oe_title">
  97. <h1>
  98. <field name="name" />
  99. </h1>
  100. <h3 class="oe_fade">
  101. <field name="description" class="oe_inline" />
  102. </h3>
  103. </div>
  104. <group col="4">
  105. <field name="organization_id" />
  106. <field name="is_ignored" />
  107. <field name="website" widget="url" />
  108. </group>
  109. <notebook>
  110. <page name="github" string="Github">
  111. <group col="4">
  112. <field name="github_url" widget="url" colspan="4" />
  113. <field name="github_id_external" />
  114. <field name="github_login" />
  115. <field name="github_create_date" />
  116. <field name="github_write_date" />
  117. <field name="github_last_sync_date" />
  118. <button
  119. name="button_update_from_github_light"
  120. type="object"
  121. string="Light Sync"
  122. class="btn btn-light"
  123. icon="fa-angle-right"
  124. groups="github_connector.group_github_connector_manager"
  125. />
  126. <button
  127. name="button_update_from_github_full"
  128. type="object"
  129. string="Full Sync"
  130. class="btn btn-light"
  131. icon="fa-angle-double-right"
  132. groups="github_connector.group_github_connector_manager"
  133. />
  134. </group>
  135. </page>
  136. <page name="code_analysis" string="Code Analysis">
  137. <label for="analysis_rule_ids" />
  138. <field name="analysis_rule_ids" colspan="4" />
  139. </page>
  140. </notebook>
  141. </sheet>
  142. </form>
  143. </field>
  144. </record>
  145. <record id="view_github_repository_kanban" model="ir.ui.view">
  146. <field name="model">github.repository</field>
  147. <field name="arch" type="xml">
  148. <kanban>
  149. <field name="name" />
  150. <field name="color" />
  151. <field name="description" />
  152. <field name="organization_id" />
  153. <field name="is_ignored" />
  154. <field name="website" />
  155. <field name="repository_branch_qty" />
  156. <templates>
  157. <t t-name="kanban-box">
  158. <div
  159. t-attf-class="#{kanban_color(record.color.raw_value)} oe_kanban_global_click"
  160. >
  161. <div class="oe_module_desc">
  162. <h3>
  163. <field name="name" />
  164. </h3>
  165. <t t-if="record.description.raw_value">
  166. <h4>
  167. <field name="description" />
  168. </h4>
  169. </t>
  170. <p class="oe_module_name">
  171. <field name="organization_id" />
  172. <br />
  173. <t t-if="record.website.raw_value">
  174. <field name="website" />
  175. </t>
  176. <br />
  177. </p>
  178. <span class="badge">
  179. <i class="fa fa-fw fa-code-fork" />
  180. <t t-esc="record.repository_branch_qty.value" />
  181. </span>
  182. <t t-if="record.is_ignored.raw_value">
  183. <span class="badge">
  184. <i class="fa fa-fw fa-ban" />
  185. </span>
  186. </t>
  187. </div>
  188. </div>
  189. </t>
  190. </templates>
  191. </kanban>
  192. </field>
  193. </record>
  194. </odoo>
上海开阖软件有限公司 沪ICP备12045867号-1