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.

182 lines
7.9KB

  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_team_search" model="ir.ui.view">
  9. <field name="model">github.team</field>
  10. <field name="arch" type="xml">
  11. <search>
  12. <field
  13. name="name"
  14. string="Name or Github Name"
  15. filter_domain="['|', ('name', 'ilike', self), ('github_login', 'ilike', self)]"
  16. />
  17. <field name="github_login" />
  18. <field name="organization_id" />
  19. <field name="partner_ids" />
  20. <field name="repository_ids" />
  21. <group expand="1" string="Group By">
  22. <filter
  23. string="Organization"
  24. name="organization"
  25. context="{'group_by' : 'organization_id'}"
  26. />
  27. </group>
  28. </search>
  29. </field>
  30. </record>
  31. <record id="view_github_team_tree" model="ir.ui.view">
  32. <field name="model">github.team</field>
  33. <field name="arch" type="xml">
  34. <tree decoration-muted="partner_qty == 0">
  35. <field name="complete_name" />
  36. <field name="name" />
  37. <field name="partner_qty" />
  38. <field name="repository_qty" />
  39. </tree>
  40. </field>
  41. </record>
  42. <record id="view_github_team_form" model="ir.ui.view">
  43. <field name="model">github.team</field>
  44. <field name="arch" type="xml">
  45. <form>
  46. <header>
  47. <button
  48. name="button_sync_member"
  49. type="object"
  50. string="Members Sync."
  51. class="btn btn-default"
  52. icon="fa-chevron-right"
  53. groups="github_connector.group_github_connector_manager"
  54. />
  55. <button
  56. name="button_sync_repository"
  57. type="object"
  58. string="Repository Sync."
  59. class="btn btn-default"
  60. icon="fa-chevron-right"
  61. groups="github_connector.group_github_connector_manager"
  62. />
  63. </header>
  64. <sheet>
  65. <div class="oe_button_box" name="button_box">
  66. <button
  67. type="object"
  68. name="action_github_team_partner_from_team"
  69. class="oe_stat_button"
  70. icon="fa-user"
  71. attrs="{'invisible': [('partner_qty', '=', False)]}"
  72. >
  73. <field
  74. name="partner_qty"
  75. string="Members"
  76. widget="statinfo"
  77. />
  78. </button>
  79. <button
  80. type="object"
  81. name="action_github_team_repository_from_team"
  82. class="oe_stat_button"
  83. icon="fa-folder-o"
  84. attrs="{'invisible': [('repository_qty', '=', False)]}"
  85. >
  86. <field
  87. name="repository_qty"
  88. string="Repositories"
  89. widget="statinfo"
  90. />
  91. </button>
  92. </div>
  93. <div class="oe_title">
  94. <h1>
  95. <field name="name" />
  96. </h1>
  97. <h3 class="oe_fade">
  98. <field name="description" class="oe_inline" />
  99. </h3>
  100. </div>
  101. <group>
  102. <field name="organization_id" />
  103. <field name="parent_id" />
  104. </group>
  105. <notebook>
  106. <page name="github" string="Github">
  107. <group col="4">
  108. <field name="github_url" widget="url" colspan="4" />
  109. <field name="github_id_external" />
  110. <field name="github_login" />
  111. <field name="github_last_sync_date" />
  112. <button
  113. name="button_update_from_github_light"
  114. type="object"
  115. string="Light Sync"
  116. class="btn btn-default"
  117. icon="fa-angle-right"
  118. groups="github_connector.group_github_connector_manager"
  119. />
  120. <button
  121. name="button_update_from_github_full"
  122. type="object"
  123. string="Full Sync"
  124. class="btn btn-default"
  125. icon="fa-angle-double-right"
  126. groups="github_connector.group_github_connector_manager"
  127. />
  128. </group>
  129. </page>
  130. </notebook>
  131. </sheet>
  132. </form>
  133. </field>
  134. </record>
  135. <record id="view_github_team_kanban" model="ir.ui.view">
  136. <field name="model">github.team</field>
  137. <field name="arch" type="xml">
  138. <kanban>
  139. <field name="name" />
  140. <field name="organization_id" />
  141. <field name="github_login" />
  142. <field name="github_url" />
  143. <field name="partner_qty" />
  144. <field name="repository_qty" />
  145. <templates>
  146. <t t-name="kanban-box">
  147. <div class="oe_module_vignette oe_kanban_global_click">
  148. <div class="oe_module_desc">
  149. <h3>
  150. <field name="name" />
  151. </h3>
  152. <h4>
  153. <field name="github_login" />
  154. </h4>
  155. <p class="oe_module_name">
  156. <t t-if="record.organization_id.raw_value">
  157. <field name="organization_id" />
  158. </t>
  159. <br />
  160. </p>
  161. <a target="_blank" t-att-href="record.github_url.value">
  162. <span class="badge">
  163. <i class="fa fa-fw fa-github-alt" />
  164. </span>
  165. </a>
  166. <span class="badge">
  167. <i class="fa fa-fw fa-user" />
  168. <t t-esc="record.partner_qty.value" />
  169. </span>
  170. <span class="badge">
  171. <i class="fa fa-fw fa-folder-o" />
  172. <t t-esc="record.repository_qty.value" />
  173. </span>
  174. </div>
  175. </div>
  176. </t>
  177. </templates>
  178. </kanban>
  179. </field>
  180. </record>
  181. </odoo>
上海开阖软件有限公司 沪ICP备12045867号-1