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.

276 lines
13KB

  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_organization_search" model="ir.ui.view">
  9. <field name="model">github.organization</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. </search>
  18. </field>
  19. </record>
  20. <record id="view_github_organization_tree" model="ir.ui.view">
  21. <field name="model">github.organization</field>
  22. <field name="arch" type="xml">
  23. <tree>
  24. <field name="github_login" />
  25. <field name="name" />
  26. <field name="member_qty" />
  27. <field name="repository_qty" />
  28. <field name="team_qty" />
  29. </tree>
  30. </field>
  31. </record>
  32. <record id="view_github_organization_form" model="ir.ui.view">
  33. <field name="model">github.organization</field>
  34. <field name="arch" type="xml">
  35. <form>
  36. <header>
  37. <button
  38. name="button_sync_member"
  39. type="object"
  40. string="Members Sync."
  41. class="btn btn-default"
  42. icon="fa-chevron-right"
  43. groups="github_connector.group_github_connector_manager"
  44. />
  45. <button
  46. name="button_sync_repository"
  47. type="object"
  48. string="Repositories Sync."
  49. class="btn btn-default"
  50. icon="fa-chevron-right"
  51. groups="github_connector.group_github_connector_manager"
  52. />
  53. <button
  54. name="button_sync_team"
  55. type="object"
  56. string="Teams Sync."
  57. class="btn btn-default"
  58. icon="fa-chevron-right"
  59. groups="github_connector.group_github_connector_manager"
  60. />
  61. </header>
  62. <sheet>
  63. <div class="oe_button_box" name="button_box">
  64. <button
  65. type="object"
  66. name="action_github_repository"
  67. class="oe_stat_button"
  68. icon="fa-folder-o"
  69. attrs="{'invisible': [('repository_qty', '=', False)]}"
  70. >
  71. <div class="o_stat_info">
  72. <field name="repository_qty" class="o_stat_value" />
  73. <span
  74. class="o_stat_text"
  75. attrs="{'invisible': [('repository_qty', '&lt;', 2)]}"
  76. > Repositories</span>
  77. <span
  78. class="o_stat_text"
  79. attrs="{'invisible': [('repository_qty', '&gt;', 1)]}"
  80. > Repository</span>
  81. </div>
  82. </button>
  83. <button
  84. type="object"
  85. name="action_github_team"
  86. class="oe_stat_button"
  87. icon="fa-users"
  88. attrs="{'invisible': [('team_qty', '=', False)]}"
  89. >
  90. <div class="o_stat_info">
  91. <field name="team_qty" class="o_stat_value" />
  92. <span
  93. class="o_stat_text"
  94. attrs="{'invisible': [('team_qty', '&lt;', 2)]}"
  95. > Teams</span>
  96. <span
  97. class="o_stat_text"
  98. attrs="{'invisible': [('team_qty', '&gt;', 1)]}"
  99. > Team</span>
  100. </div>
  101. </button>
  102. <button
  103. type="object"
  104. name="action_res_partner"
  105. class="oe_stat_button"
  106. icon="fa-user"
  107. attrs="{'invisible': [('member_qty', '=', False)]}"
  108. >
  109. <div class="o_stat_info">
  110. <field name="member_qty" class="o_stat_value" />
  111. <span
  112. class="o_stat_text"
  113. attrs="{'invisible': [('member_qty', '&lt;', 2)]}"
  114. > Members</span>
  115. <span
  116. class="o_stat_text"
  117. attrs="{'invisible': [('member_qty', '&gt;', 1)]}"
  118. > Member</span>
  119. </div>
  120. </button>
  121. </div>
  122. <field name="image" widget="image" class="oe_avatar" />
  123. <div class="oe_title">
  124. <h1>
  125. <field name="name" />
  126. </h1>
  127. <h3 class="oe_fade">
  128. <field name="description" class="oe_inline" />
  129. </h3>
  130. </div>
  131. <div class="oe_clear" />
  132. <group col="4">
  133. <field name="email" widget="email" />
  134. <field name="website_url" widget="url" />
  135. <field name="location" />
  136. </group>
  137. <notebook>
  138. <page name="extra_setting" string="Settings">
  139. <group cols="4" string="Ignored Repositories">
  140. <field
  141. name="ignored_repository_names"
  142. colspan="4"
  143. nolabel="1"
  144. />
  145. </group>
  146. <group
  147. name="external_services"
  148. cols="4"
  149. string="External Services"
  150. >
  151. <field name="coverage_url_pattern" />
  152. <field name="ci_url_pattern" />
  153. </group>
  154. </page>
  155. <page string="Organization Series">
  156. <field
  157. name="organization_serie_ids"
  158. colspan="4"
  159. nolabel="1"
  160. >
  161. <tree string="organization_serie_ids" editable="bottom">
  162. <field name="sequence" />
  163. <field name="name" />
  164. </tree>
  165. </field>
  166. </page>
  167. <page name="github" string="Github">
  168. <group col="4">
  169. <field name="github_url" widget="url" colspan="4" />
  170. <field name="github_id_external" />
  171. <field name="github_login" />
  172. <field name="github_create_date" />
  173. <field name="github_write_date" />
  174. <field name="github_last_sync_date" />
  175. <button
  176. name="button_update_from_github_light"
  177. type="object"
  178. string="Light Sync"
  179. class="btn btn-default"
  180. icon="fa-angle-right"
  181. groups="github_connector.group_github_connector_manager"
  182. />
  183. <button
  184. name="button_update_from_github_full"
  185. type="object"
  186. string="Full Sync"
  187. class="btn btn-default"
  188. icon="fa-angle-double-right"
  189. groups="github_connector.group_github_connector_manager"
  190. />
  191. </group>
  192. </page>
  193. <page name="code_analysis" string="Code Analysis">
  194. <label for="analysis_rule_ids" />
  195. <field name="analysis_rule_ids" colspan="4" />
  196. </page>
  197. </notebook>
  198. </sheet>
  199. </form>
  200. </field>
  201. </record>
  202. <record id="view_github_organization_kanban" model="ir.ui.view">
  203. <field name="model">github.organization</field>
  204. <field name="arch" type="xml">
  205. <kanban>
  206. <field name="id" />
  207. <field name="name" />
  208. <field name="github_login" />
  209. <field name="github_url" />
  210. <field name="website_url" />
  211. <field name="repository_qty" />
  212. <field name="member_qty" />
  213. <field name="team_qty" />
  214. <field name="email" />
  215. <field name="location" />
  216. <templates>
  217. <t t-name="kanban-box">
  218. <div class="oe_module_vignette oe_kanban_global_click">
  219. <div class="o_kanban_image">
  220. <img
  221. t-att-alt="record.name.value"
  222. t-att-src="kanban_image('github.organization', 'image', record.id.raw_value)"
  223. />
  224. </div>
  225. <div class="oe_kanban_details">
  226. <h3>
  227. <field name="name" />
  228. </h3>
  229. <h4>
  230. <field name="github_login" />
  231. </h4>
  232. <p class="oe_module_name">
  233. <t t-if="record.website_url.raw_value">
  234. <a
  235. target="_blank"
  236. t-att-href="record.website_url.value"
  237. >
  238. <field name="website_url" />
  239. </a>
  240. </t>
  241. <br />
  242. <t t-if="record.email.raw_value">
  243. <field name="email" />
  244. </t>
  245. <br />
  246. <t t-if="record.location.raw_value">
  247. <field name="location" />
  248. </t>
  249. <br />
  250. </p>
  251. <a target="_blank" t-att-href="record.github_url.value">
  252. <span class="badge">
  253. <i class="fa fa-fw fa-github-alt" />
  254. </span>
  255. </a>
  256. <span class="badge">
  257. <i class="fa fa-fw fa-folder-o" />
  258. <t t-esc="record.repository_qty.value" />
  259. </span>
  260. <span class="badge">
  261. <i class="fa fa-fw fa-users" />
  262. <t t-esc="record.team_qty.value" />
  263. </span>
  264. <span class="badge">
  265. <i class="fa fa-fw fa-user" />
  266. <t t-esc="record.member_qty.value" />
  267. </span>
  268. </div>
  269. </div>
  270. </t>
  271. </templates>
  272. </kanban>
  273. </field>
  274. </record>
  275. </odoo>
上海开阖软件有限公司 沪ICP备12045867号-1