install.sql 57 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898
  1. -- TABLE: entries
  2. CREATE TABLE IF NOT EXISTS `bx_tasks_tasks` (
  3. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  4. `author` int(11) NOT NULL,
  5. `added` int(11) NOT NULL,
  6. `changed` int(11) NOT NULL,
  7. `published` int(11) NOT NULL,
  8. `thumb` int(11) NOT NULL,
  9. `title` varchar(255) NOT NULL,
  10. `stickers` int(11) NOT NULL default '0',
  11. `type` int(11) NOT NULL default '0',
  12. `priority` int(11) NOT NULL default '0',
  13. `estimate` int(11) NOT NULL default '0',
  14. `state` int(11) NOT NULL default '0',
  15. `cat` int(11) NOT NULL,
  16. `multicat` text NOT NULL,
  17. `text` mediumtext NOT NULL,
  18. `labels` text NOT NULL,
  19. `time` int(11) NOT NULL default '0',
  20. `views` int(11) NOT NULL default '0',
  21. `rate` float NOT NULL default '0',
  22. `votes` int(11) NOT NULL default '0',
  23. `rrate` float NOT NULL default '0',
  24. `rvotes` int(11) NOT NULL default '0',
  25. `score` int(11) NOT NULL default '0',
  26. `sc_up` int(11) NOT NULL default '0',
  27. `sc_down` int(11) NOT NULL default '0',
  28. `favorites` int(11) NOT NULL default '0',
  29. `comments` int(11) NOT NULL default '0',
  30. `reports` int(11) NOT NULL default '0',
  31. `featured` int(11) NOT NULL default '0',
  32. `due_date` int(11) NOT NULL,
  33. `tasks_list` int(11) NOT NULL,
  34. `gh_issue` int(11) NOT NULL default '0',
  35. `gh_issue_url` varchar(255) NOT NULL default '',
  36. `completed` tinyint(4) NOT NULL DEFAULT '0',
  37. `expired` tinyint(4) NOT NULL DEFAULT '0',
  38. `cf` int(11) NOT NULL default '1',
  39. `allow_view_to` varchar(16) NOT NULL DEFAULT '3',
  40. `allow_comments` tinyint(4) NOT NULL DEFAULT '1',
  41. `status` enum('active','awaiting','failed','hidden') NOT NULL DEFAULT 'active',
  42. `status_admin` enum('active','hidden','pending') NOT NULL DEFAULT 'active',
  43. PRIMARY KEY (`id`),
  44. FULLTEXT KEY `title_text` (`title`,`text`)
  45. );
  46. -- TABLE: task-lists
  47. CREATE TABLE IF NOT EXISTS `bx_tasks_lists` (
  48. `id` int(11) NOT NULL AUTO_INCREMENT,
  49. `context_id` int(11) NOT NULL,
  50. `title` varchar(255) NOT NULL,
  51. PRIMARY KEY (`id`)
  52. );
  53. -- TABLE: contexts
  54. CREATE TABLE IF NOT EXISTS `bx_tasks_contexts` (
  55. `id` int(11) NOT NULL DEFAULT '0',
  56. `gh_app_id` int(11) NOT NULL DEFAULT '0',
  57. `gh_username` varchar(64) NOT NULL DEFAULT '',
  58. `gh_repository` varchar(255) NOT NULL DEFAULT '',
  59. PRIMARY KEY (`id`)
  60. );
  61. -- TABLE: assignment
  62. CREATE TABLE IF NOT EXISTS `bx_tasks_assignments` (
  63. `id` int(11) NOT NULL AUTO_INCREMENT,
  64. `initiator` int(11) NOT NULL,
  65. `content` int(11) NOT NULL,
  66. `added` int(10) unsigned NOT NULL,
  67. PRIMARY KEY (`id`),
  68. UNIQUE KEY `initiator` (`initiator`,`content`),
  69. KEY `content` (`content`)
  70. );
  71. -- TABLE: lists and values
  72. CREATE TABLE IF NOT EXISTS `bx_tasks_pre_lists` (
  73. `id` int(11) NOT NULL AUTO_INCREMENT,
  74. `name` varchar(32) NOT NULL DEFAULT '',
  75. `title` varchar(255) NOT NULL DEFAULT '',
  76. `use_color` tinyint(4) unsigned NOT NULL DEFAULT '0',
  77. `use_multiselect` tinyint(4) unsigned NOT NULL DEFAULT '0',
  78. PRIMARY KEY (`id`),
  79. UNIQUE KEY `name` (`name`)
  80. );
  81. INSERT INTO `bx_tasks_pre_lists` (`name`, `title`, `use_color`, `use_multiselect`) VALUES
  82. ('type', '_bx_tasks_pre_lists_types', 0, 0),
  83. ('sticker', '_bx_tasks_pre_lists_stickers', 1, 1);
  84. CREATE TABLE IF NOT EXISTS `bx_tasks_pre_values` (
  85. `id` int(11) NOT NULL AUTO_INCREMENT,
  86. `context_id` int(11) NOT NULL DEFAULT '0',
  87. `list` varchar(32) NOT NULL DEFAULT '',
  88. `value` varchar(255) NOT NULL DEFAULT '',
  89. `order` int(11) NOT NULL DEFAULT '0',
  90. `title` varchar(255) NOT NULL DEFAULT '',
  91. `color` varchar(128) NOT NULL DEFAULT '',
  92. `active` tinyint(4) NOT NULL DEFAULT '1',
  93. PRIMARY KEY (`id`),
  94. UNIQUE KEY `list_value` (`list`, `value`(191))
  95. );
  96. -- TABLE: filters
  97. CREATE TABLE IF NOT EXISTS `bx_tasks_filters` (
  98. `id` int(11) NOT NULL AUTO_INCREMENT,
  99. `context_id` int(11) NOT NULL DEFAULT '0',
  100. `author` int(11) NOT NULL DEFAULT '0',
  101. `added` int(11) NOT NULL DEFAULT '0',
  102. `title` varchar(255) NOT NULL,
  103. `conditions` text NOT NULL,
  104. `permanent` TINYINT NOT NULL DEFAULT '0',
  105. `active` TINYINT NOT NULL DEFAULT '1',
  106. PRIMARY KEY (`id`)
  107. );
  108. INSERT INTO `bx_tasks_filters` (`author`, `added`, `title`, `conditions`, `permanent`, `active`) VALUES
  109. ('0', '0', '_bx_tasks_filter_title_by_author', '{"where":{"cnd":true,"t":"te","f":"author","v":"{logged_pid}","o":"="}}', 1, 1),
  110. ('0', '0', '_bx_tasks_filter_title_by_author_uncompleted', '{"where":{"grp":true,"o":"AND","cnds":[{"cnd":true,"t":"te","f":"author","v":"{logged_pid}","o":"="},{"cnd":true,"t":"te","f":"completed","v":"0","o":"="}]}}', 1, 1),
  111. ('0', '0', '_bx_tasks_filter_title_by_author_completed', '{"where":{"grp":true,"o":"AND","cnds":[{"cnd":true,"t":"te","f":"author","v":"{logged_pid}","o":"="},{"cnd":true,"t":"te","f":"completed","v":"1","o":"="}]}}', 1, 1),
  112. ('0', '0', '_bx_tasks_filter_title_by_assignee', '{"join":{"cnd":true,"j":"LEFT","tj":"bx_tasks_assignments","taj":"ta","fj":"content","tam":"te","fm":"id"},"where":{"cnd":true,"t":"ta","f":"initiator","v":"{logged_pid}","o":"="}}', 1, 1),
  113. ('0', '0', '_bx_tasks_filter_title_by_assignee_uncompleted', '{"join":{"cnd":true,"j":"LEFT","tj":"bx_tasks_assignments","taj":"ta","fj":"content","tam":"te","fm":"id"},"where":{"grp":true,"o":"AND","cnds":[{"cnd":true,"t":"ta","f":"initiator","v":"{logged_pid}","o":"="},{"cnd":true,"t":"te","f":"completed","v":"0","o":"="}]}}', 1, 1),
  114. ('0', '0', '_bx_tasks_filter_title_by_assignee_completed', '{"join":{"cnd":true,"j":"LEFT","tj":"bx_tasks_assignments","taj":"ta","fj":"content","tam":"te","fm":"id"},"where":{"grp":true,"o":"AND","cnds":[{"cnd":true,"t":"ta","f":"initiator","v":"{logged_pid}","o":"="},{"cnd":true,"t":"te","f":"completed","v":"1","o":"="}]}}', 1, 1);
  115. -- TABLE: storages & transcoders
  116. CREATE TABLE IF NOT EXISTS `bx_tasks_covers` (
  117. `id` int(11) NOT NULL AUTO_INCREMENT,
  118. `profile_id` int(10) unsigned NOT NULL,
  119. `remote_id` varchar(128) NOT NULL,
  120. `path` varchar(255) NOT NULL,
  121. `file_name` varchar(255) NOT NULL,
  122. `mime_type` varchar(128) NOT NULL,
  123. `ext` varchar(32) NOT NULL,
  124. `size` bigint(20) NOT NULL,
  125. `added` int(11) NOT NULL,
  126. `modified` int(11) NOT NULL,
  127. `private` int(11) NOT NULL,
  128. PRIMARY KEY (`id`),
  129. UNIQUE KEY `remote_id` (`remote_id`)
  130. );
  131. CREATE TABLE IF NOT EXISTS `bx_tasks_files` (
  132. `id` int(11) NOT NULL AUTO_INCREMENT,
  133. `profile_id` int(10) unsigned NOT NULL,
  134. `remote_id` varchar(128) NOT NULL,
  135. `path` varchar(255) NOT NULL,
  136. `file_name` varchar(255) NOT NULL,
  137. `mime_type` varchar(128) NOT NULL,
  138. `ext` varchar(32) NOT NULL,
  139. `size` bigint(20) NOT NULL,
  140. `dimensions` varchar(24) NOT NULL,
  141. `added` int(11) NOT NULL,
  142. `modified` int(11) NOT NULL,
  143. `private` int(11) NOT NULL,
  144. PRIMARY KEY (`id`),
  145. UNIQUE KEY `remote_id` (`remote_id`)
  146. );
  147. CREATE TABLE IF NOT EXISTS `bx_tasks_photos` (
  148. `id` int(11) NOT NULL AUTO_INCREMENT,
  149. `profile_id` int(10) unsigned NOT NULL,
  150. `remote_id` varchar(128) NOT NULL,
  151. `path` varchar(255) NOT NULL,
  152. `file_name` varchar(255) NOT NULL,
  153. `mime_type` varchar(128) NOT NULL,
  154. `ext` varchar(32) NOT NULL,
  155. `size` bigint(20) NOT NULL,
  156. `added` int(11) NOT NULL,
  157. `modified` int(11) NOT NULL,
  158. `private` int(11) NOT NULL,
  159. PRIMARY KEY (`id`),
  160. UNIQUE KEY `remote_id` (`remote_id`)
  161. );
  162. CREATE TABLE IF NOT EXISTS `bx_tasks_photos_resized` (
  163. `id` int(11) NOT NULL AUTO_INCREMENT,
  164. `profile_id` int(10) unsigned NOT NULL,
  165. `remote_id` varchar(128) NOT NULL,
  166. `path` varchar(255) NOT NULL,
  167. `file_name` varchar(255) NOT NULL,
  168. `mime_type` varchar(128) NOT NULL,
  169. `ext` varchar(32) NOT NULL,
  170. `size` bigint(20) NOT NULL,
  171. `added` int(11) NOT NULL,
  172. `modified` int(11) NOT NULL,
  173. `private` int(11) NOT NULL,
  174. PRIMARY KEY (`id`),
  175. UNIQUE KEY `remote_id` (`remote_id`)
  176. );
  177. CREATE TABLE IF NOT EXISTS `bx_tasks_videos` (
  178. `id` int(11) NOT NULL AUTO_INCREMENT,
  179. `profile_id` int(10) unsigned NOT NULL,
  180. `remote_id` varchar(128) NOT NULL,
  181. `path` varchar(255) NOT NULL,
  182. `file_name` varchar(255) NOT NULL,
  183. `mime_type` varchar(128) NOT NULL,
  184. `ext` varchar(32) NOT NULL,
  185. `size` bigint(20) NOT NULL,
  186. `dimensions` varchar(12) NOT NULL,
  187. `added` int(11) NOT NULL,
  188. `modified` int(11) NOT NULL,
  189. `private` int(11) NOT NULL,
  190. PRIMARY KEY (`id`),
  191. UNIQUE KEY `remote_id` (`remote_id`)
  192. );
  193. CREATE TABLE IF NOT EXISTS `bx_tasks_videos_resized` (
  194. `id` int(11) NOT NULL AUTO_INCREMENT,
  195. `profile_id` int(10) unsigned NOT NULL,
  196. `remote_id` varchar(128) NOT NULL,
  197. `path` varchar(255) NOT NULL,
  198. `file_name` varchar(255) NOT NULL,
  199. `mime_type` varchar(128) NOT NULL,
  200. `ext` varchar(32) NOT NULL,
  201. `size` bigint(20) NOT NULL,
  202. `added` int(11) NOT NULL,
  203. `modified` int(11) NOT NULL,
  204. `private` int(11) NOT NULL,
  205. PRIMARY KEY (`id`),
  206. UNIQUE KEY `remote_id` (`remote_id`)
  207. );
  208. -- TABLE: comments
  209. CREATE TABLE IF NOT EXISTS `bx_tasks_cmts` (
  210. `cmt_id` int(11) NOT NULL AUTO_INCREMENT,
  211. `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
  212. `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
  213. `cmt_object_id` int(11) NOT NULL DEFAULT '0',
  214. `cmt_author_id` int(11) NOT NULL DEFAULT '0',
  215. `cmt_level` int(11) NOT NULL DEFAULT '0',
  216. `cmt_text` text NOT NULL,
  217. `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',
  218. `cmt_rate` int(11) NOT NULL DEFAULT '0',
  219. `cmt_rate_count` int(11) NOT NULL DEFAULT '0',
  220. `cmt_time` int(11) unsigned NOT NULL DEFAULT '0',
  221. `cmt_replies` int(11) NOT NULL DEFAULT '0',
  222. `cmt_pinned` int(11) NOT NULL default '0',
  223. `cmt_cf` int(11) NOT NULL default '1',
  224. PRIMARY KEY (`cmt_id`),
  225. KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`),
  226. FULLTEXT KEY `search_fields` (`cmt_text`)
  227. );
  228. CREATE TABLE IF NOT EXISTS `bx_tasks_cmts_notes` (
  229. `cmt_id` int(11) NOT NULL AUTO_INCREMENT,
  230. `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
  231. `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
  232. `cmt_object_id` int(11) NOT NULL DEFAULT '0',
  233. `cmt_author_id` int(11) NOT NULL DEFAULT '0',
  234. `cmt_level` int(11) NOT NULL DEFAULT '0',
  235. `cmt_text` text NOT NULL,
  236. `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',
  237. `cmt_rate` int(11) NOT NULL DEFAULT '0',
  238. `cmt_rate_count` int(11) NOT NULL DEFAULT '0',
  239. `cmt_time` int(11) unsigned NOT NULL DEFAULT '0',
  240. `cmt_replies` int(11) NOT NULL DEFAULT '0',
  241. `cmt_pinned` int(11) NOT NULL default '0',
  242. PRIMARY KEY (`cmt_id`),
  243. KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`),
  244. FULLTEXT KEY `search_fields` (`cmt_text`)
  245. );
  246. -- TABLE: votes
  247. CREATE TABLE IF NOT EXISTS `bx_tasks_votes` (
  248. `id` int(11) NOT NULL AUTO_INCREMENT,
  249. `object_id` int(11) NOT NULL default '0',
  250. `count` int(11) NOT NULL default '0',
  251. `sum` int(11) NOT NULL default '0',
  252. PRIMARY KEY (`id`),
  253. UNIQUE KEY `object_id` (`object_id`)
  254. );
  255. CREATE TABLE IF NOT EXISTS `bx_tasks_votes_track` (
  256. `id` int(11) NOT NULL AUTO_INCREMENT,
  257. `object_id` int(11) NOT NULL default '0',
  258. `author_id` int(11) NOT NULL default '0',
  259. `author_nip` int(11) unsigned NOT NULL default '0',
  260. `value` tinyint(4) NOT NULL default '0',
  261. `date` int(11) NOT NULL default '0',
  262. PRIMARY KEY (`id`),
  263. KEY `vote` (`object_id`, `author_nip`)
  264. );
  265. CREATE TABLE IF NOT EXISTS `bx_tasks_reactions` (
  266. `id` int(11) NOT NULL AUTO_INCREMENT,
  267. `object_id` int(11) NOT NULL default '0',
  268. `reaction` varchar(32) NOT NULL default '',
  269. `count` int(11) NOT NULL default '0',
  270. `sum` int(11) NOT NULL default '0',
  271. PRIMARY KEY (`id`),
  272. UNIQUE KEY `reaction` (`object_id`, `reaction`)
  273. );
  274. CREATE TABLE IF NOT EXISTS `bx_tasks_reactions_track` (
  275. `id` int(11) NOT NULL AUTO_INCREMENT,
  276. `object_id` int(11) NOT NULL default '0',
  277. `author_id` int(11) NOT NULL default '0',
  278. `author_nip` int(11) unsigned NOT NULL default '0',
  279. `reaction` varchar(32) NOT NULL default '',
  280. `value` tinyint(4) NOT NULL default '0',
  281. `date` int(11) NOT NULL default '0',
  282. PRIMARY KEY (`id`),
  283. KEY `vote` (`object_id`, `author_nip`)
  284. );
  285. -- TABLE: views
  286. CREATE TABLE `bx_tasks_views_track` (
  287. `id` int(11) NOT NULL AUTO_INCREMENT,
  288. `object_id` int(11) NOT NULL default '0',
  289. `viewer_id` int(11) NOT NULL default '0',
  290. `viewer_nip` int(11) unsigned NOT NULL default '0',
  291. `date` int(11) NOT NULL default '0',
  292. PRIMARY KEY (`id`),
  293. KEY `id` (`object_id`,`viewer_id`,`viewer_nip`)
  294. );
  295. -- TABLE: metas
  296. CREATE TABLE `bx_tasks_meta_keywords` (
  297. `id` int(11) NOT NULL AUTO_INCREMENT,
  298. `object_id` int(10) unsigned NOT NULL,
  299. `keyword` varchar(255) NOT NULL,
  300. PRIMARY KEY (`id`),
  301. KEY `object_id` (`object_id`),
  302. KEY `keyword` (`keyword`)
  303. );
  304. CREATE TABLE `bx_tasks_meta_mentions` (
  305. `id` int(11) NOT NULL AUTO_INCREMENT,
  306. `object_id` int(10) unsigned NOT NULL,
  307. `profile_id` int(10) unsigned NOT NULL,
  308. PRIMARY KEY (`id`),
  309. KEY `object_id` (`object_id`),
  310. KEY `profile_id` (`profile_id`)
  311. );
  312. -- TABLE: reports
  313. CREATE TABLE IF NOT EXISTS `bx_tasks_reports` (
  314. `id` int(11) NOT NULL AUTO_INCREMENT,
  315. `object_id` int(11) NOT NULL default '0',
  316. `count` int(11) NOT NULL default '0',
  317. PRIMARY KEY (`id`),
  318. UNIQUE KEY `object_id` (`object_id`)
  319. );
  320. CREATE TABLE IF NOT EXISTS `bx_tasks_reports_track` (
  321. `id` int(11) NOT NULL AUTO_INCREMENT,
  322. `object_id` int(11) NOT NULL default '0',
  323. `author_id` int(11) NOT NULL default '0',
  324. `author_nip` int(11) unsigned NOT NULL default '0',
  325. `type` varchar(32) NOT NULL default '',
  326. `text` text NOT NULL default '',
  327. `date` int(11) NOT NULL default '0',
  328. `checked_by` int(11) NOT NULL default '0',
  329. `status` tinyint(11) NOT NULL default '0',
  330. PRIMARY KEY (`id`),
  331. KEY `report` (`object_id`, `author_nip`)
  332. );
  333. -- TABLE: time
  334. CREATE TABLE IF NOT EXISTS `bx_tasks_time` (
  335. `id` int(11) NOT NULL AUTO_INCREMENT,
  336. `object_id` int(11) NOT NULL default '0',
  337. `count` int(11) NOT NULL default '0',
  338. `sum` int(11) NOT NULL default '0',
  339. PRIMARY KEY (`id`),
  340. UNIQUE KEY `object_id` (`object_id`)
  341. );
  342. CREATE TABLE IF NOT EXISTS `bx_tasks_time_track` (
  343. `id` int(11) NOT NULL AUTO_INCREMENT,
  344. `object_id` int(11) NOT NULL default '0',
  345. `author_id` int(11) NOT NULL default '0',
  346. `author_nip` int(11) unsigned NOT NULL default '0',
  347. `value` int(11) NOT NULL default '0',
  348. `value_date` int(11) NOT NULL default '0',
  349. `text` text NOT NULL default '',
  350. `date` int(11) NOT NULL default '0',
  351. PRIMARY KEY (`id`)
  352. );
  353. -- TABLE: timers
  354. CREATE TABLE IF NOT EXISTS `bx_tasks_timers` (
  355. `id` int(11) NOT NULL AUTO_INCREMENT,
  356. `content_id` int(11) NOT NULL default '0',
  357. `profile_id` int(11) NOT NULL default '0',
  358. `started` int(11) NOT NULL default '0',
  359. `duration` int(11) NOT NULL default '0',
  360. PRIMARY KEY (`id`),
  361. UNIQUE KEY `timer` (`content_id`, `profile_id`)
  362. );
  363. -- TABLE: budget
  364. CREATE TABLE IF NOT EXISTS `bx_tasks_budget` (
  365. `id` int(11) NOT NULL AUTO_INCREMENT,
  366. `context_id` int(11) NOT NULL default '0',
  367. `value_total` int(11) NOT NULL default '0',
  368. `value_spent` int(11) NOT NULL default '0',
  369. PRIMARY KEY (`id`),
  370. UNIQUE KEY `context_id` (`context_id`)
  371. );
  372. CREATE TABLE IF NOT EXISTS `bx_tasks_budget_track` (
  373. `id` int(11) NOT NULL AUTO_INCREMENT,
  374. `context_id` int(11) NOT NULL default '0',
  375. `profile_id` int(11) NOT NULL default '0',
  376. `value` int(11) NOT NULL default '0',
  377. `text` text NOT NULL default '',
  378. `date` int(11) NOT NULL default '0',
  379. PRIMARY KEY (`id`)
  380. );
  381. -- TABLE: favorites
  382. CREATE TABLE `bx_tasks_favorites_track` (
  383. `id` int(11) NOT NULL AUTO_INCREMENT,
  384. `object_id` int(11) NOT NULL default '0',
  385. `author_id` int(11) NOT NULL default '0',
  386. `date` int(11) NOT NULL default '0',
  387. PRIMARY KEY (`id`),
  388. KEY `id` (`object_id`,`author_id`)
  389. );
  390. -- TABLE: scores
  391. CREATE TABLE IF NOT EXISTS `bx_tasks_scores` (
  392. `id` int(11) NOT NULL AUTO_INCREMENT,
  393. `object_id` int(11) NOT NULL default '0',
  394. `count_up` int(11) NOT NULL default '0',
  395. `count_down` int(11) NOT NULL default '0',
  396. PRIMARY KEY (`id`),
  397. UNIQUE KEY `object_id` (`object_id`)
  398. );
  399. CREATE TABLE IF NOT EXISTS `bx_tasks_scores_track` (
  400. `id` int(11) NOT NULL AUTO_INCREMENT,
  401. `object_id` int(11) NOT NULL default '0',
  402. `author_id` int(11) NOT NULL default '0',
  403. `author_nip` int(11) unsigned NOT NULL default '0',
  404. `type` varchar(8) NOT NULL default '',
  405. `date` int(11) NOT NULL default '0',
  406. PRIMARY KEY (`id`),
  407. KEY `vote` (`object_id`, `author_nip`)
  408. );
  409. -- STORAGES & TRANSCODERS
  410. SET @sStorageEngine = (SELECT `value` FROM `sys_options` WHERE `name` = 'sys_storage_default');
  411. INSERT INTO `sys_objects_storage` (`object`, `engine`, `params`, `token_life`, `cache_control`, `levels`, `table_files`, `ext_mode`, `ext_allow`, `ext_deny`, `quota_size`, `current_size`, `quota_number`, `current_number`, `max_file_size`, `ts`) VALUES
  412. ('bx_tasks_covers', @sStorageEngine, '', 360, 2592000, 3, 'bx_tasks_covers', 'allow-deny', '{image}', '', 0, 0, 0, 0, 0, 0),
  413. ('bx_tasks_photos', @sStorageEngine, '', 360, 2592000, 3, 'bx_tasks_photos', 'allow-deny', '{image}', '', 0, 0, 0, 0, 0, 0),
  414. ('bx_tasks_photos_resized', @sStorageEngine, '', 360, 2592000, 3, 'bx_tasks_photos_resized', 'allow-deny', '{image}', '', 0, 0, 0, 0, 0, 0),
  415. ('bx_tasks_videos', @sStorageEngine, '', 360, 2592000, 3, 'bx_tasks_videos', 'allow-deny', '{video}', '', 0, 0, 0, 0, 0, 0),
  416. ('bx_tasks_videos_resized', @sStorageEngine, '', 360, 2592000, 3, 'bx_tasks_videos_resized', 'allow-deny', '{imagevideo}', '', 0, 0, 0, 0, 0, 0),
  417. ('bx_tasks_files', @sStorageEngine, '', 360, 2592000, 3, 'bx_tasks_files', 'deny-allow', '', '{dangerous}', 0, 0, 0, 0, 0, 0),
  418. -- For Comments
  419. ('bx_tasks_files_cmts', @sStorageEngine, '', 360, 2592000, 3, 'bx_tasks_files', 'deny-allow', '', '{dangerous}', 0, 0, 0, 0, 0, 0);
  420. INSERT INTO `sys_objects_transcoder` (`object`, `storage_object`, `source_type`, `source_params`, `private`, `atime_tracking`, `atime_pruning`, `ts`, `override_class_name`, `override_class_file`) VALUES
  421. ('bx_tasks_preview', 'bx_tasks_photos_resized', 'Storage', 'a:1:{s:6:"object";s:15:"bx_tasks_covers";}', 'no', '1', '2592000', '0', '', ''),
  422. ('bx_tasks_gallery', 'bx_tasks_photos_resized', 'Storage', 'a:1:{s:6:"object";s:15:"bx_tasks_covers";}', 'no', '1', '2592000', '0', '', ''),
  423. ('bx_tasks_cover', 'bx_tasks_photos_resized', 'Storage', 'a:1:{s:6:"object";s:15:"bx_tasks_covers";}', 'no', '1', '2592000', '0', '', ''),
  424. ('bx_tasks_preview_photos', 'bx_tasks_photos_resized', 'Storage', 'a:1:{s:6:"object";s:15:"bx_tasks_photos";}', 'no', '1', '2592000', '0', '', ''),
  425. ('bx_tasks_gallery_photos', 'bx_tasks_photos_resized', 'Storage', 'a:1:{s:6:"object";s:15:"bx_tasks_photos";}', 'no', '1', '2592000', '0', '', ''),
  426. ('bx_tasks_videos_poster', 'bx_tasks_videos_resized', 'Storage', 'a:1:{s:6:"object";s:15:"bx_tasks_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
  427. ('bx_tasks_videos_poster_preview', 'bx_tasks_videos_resized', 'Storage', 'a:1:{s:6:"object";s:15:"bx_tasks_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
  428. ('bx_tasks_videos_mp4', 'bx_tasks_videos_resized', 'Storage', 'a:1:{s:6:"object";s:15:"bx_tasks_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
  429. ('bx_tasks_videos_mp4_hd', 'bx_tasks_videos_resized', 'Storage', 'a:1:{s:6:"object";s:15:"bx_tasks_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
  430. ('bx_tasks_preview_files', 'bx_tasks_photos_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_tasks_files";}', 'no', '1', '2592000', '0', '', ''),
  431. ('bx_tasks_gallery_files', 'bx_tasks_photos_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_tasks_files";}', 'no', '1', '2592000', '0', '', '');
  432. INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES
  433. ('bx_tasks_preview', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"200";s:11:"crop_resize";s:1:"1";}', '0'),
  434. ('bx_tasks_gallery', 'Resize', 'a:1:{s:1:"w";s:3:"500";}', '0'),
  435. ('bx_tasks_cover', 'Resize', 'a:1:{s:1:"w";s:4:"1200";}', '0'),
  436. ('bx_tasks_preview_photos', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"200";s:11:"crop_resize";s:1:"1";}', '0'),
  437. ('bx_tasks_gallery_photos', 'Resize', 'a:1:{s:1:"w";s:4:"1200";}', '0'),
  438. ('bx_tasks_videos_poster_preview', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"200";s:13:"square_resize";s:1:"1";}', 10),
  439. ('bx_tasks_videos_poster_preview', 'Poster', 'a:2:{s:1:"h";s:3:"480";s:10:"force_type";s:3:"jpg";}', 0),
  440. ('bx_tasks_videos_poster', 'Poster', 'a:2:{s:1:"h";s:3:"318";s:10:"force_type";s:3:"jpg";}', 0),
  441. ('bx_tasks_videos_mp4', 'Mp4', 'a:2:{s:1:"h";s:3:"318";s:10:"force_type";s:3:"mp4";}', 0),
  442. ('bx_tasks_videos_mp4_hd', 'Mp4', 'a:3:{s:1:"h";s:3:"720";s:13:"video_bitrate";s:4:"1536";s:10:"force_type";s:3:"mp4";}', 0),
  443. ('bx_tasks_preview_files', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"200";s:11:"crop_resize";s:1:"1";}', '0'),
  444. ('bx_tasks_gallery_files', 'Resize', 'a:1:{s:1:"w";s:3:"500";}', '0');
  445. -- FORMS: entry (task)
  446. INSERT INTO `sys_objects_form`(`object`, `module`, `title`, `action`, `form_attrs`, `table`, `key`, `uri`, `uri_title`, `submit_name`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
  447. ('bx_tasks', 'bx_tasks', '_bx_tasks_form_entry', '', 'a:1:{s:7:"enctype";s:19:"multipart/form-data";}', 'bx_tasks_tasks', 'id', '', '', 'a:2:{i:0;s:9:"do_submit";i:1;s:10:"do_publish";}', '', 0, 1, 'BxTasksFormEntry', 'modules/boonex/tasks/classes/BxTasksFormEntry.php');
  448. INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`, `title`) VALUES
  449. ('bx_tasks', 'bx_tasks_entry_add', 'bx_tasks', 0, '_bx_tasks_form_entry_display_add'),
  450. ('bx_tasks', 'bx_tasks_entry_delete', 'bx_tasks', 0, '_bx_tasks_form_entry_display_delete'),
  451. ('bx_tasks', 'bx_tasks_entry_edit', 'bx_tasks', 0, '_bx_tasks_form_entry_display_edit'),
  452. ('bx_tasks', 'bx_tasks_entry_edit_body', 'bx_tasks', 0, '_bx_tasks_form_entry_display_edit_body'),
  453. ('bx_tasks', 'bx_tasks_entry_edit_tasks_list', 'bx_tasks', 0, '_bx_tasks_form_entry_display_edit_tasks_list'),
  454. ('bx_tasks', 'bx_tasks_entry_edit_type', 'bx_tasks', 0, '_bx_tasks_form_entry_display_edit_type'),
  455. ('bx_tasks', 'bx_tasks_entry_edit_priority', 'bx_tasks', 0, '_bx_tasks_form_entry_display_edit_priority'),
  456. ('bx_tasks', 'bx_tasks_entry_edit_estimate', 'bx_tasks', 0, '_bx_tasks_form_entry_display_edit_estimate'),
  457. ('bx_tasks', 'bx_tasks_entry_edit_due_date', 'bx_tasks', 0, '_bx_tasks_form_entry_display_edit_due_date'),
  458. ('bx_tasks', 'bx_tasks_entry_edit_state', 'bx_tasks', 0, '_bx_tasks_form_entry_display_edit_state'),
  459. ('bx_tasks', 'bx_tasks_entry_view', 'bx_tasks', 1, '_bx_tasks_form_entry_display_view');
  460. INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES
  461. ('bx_tasks', 'bx_tasks', 'cf', '1', '#!sys_content_filter', 0, 'select', '_sys_form_entry_input_sys_cf', '_sys_form_entry_input_cf', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
  462. ('bx_tasks', 'bx_tasks', 'tasks_list', '', '', 0, 'select', '_bx_tasks_form_entry_input_sys_tasks_list', '_bx_tasks_form_entry_input_tasks_list', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
  463. ('bx_tasks', 'bx_tasks', 'allow_view_to', '', '', 0, 'custom', '_bx_tasks_form_entry_input_sys_allow_view_to', '_bx_tasks_form_entry_input_allow_view_to', '', 1, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  464. ('bx_tasks', 'bx_tasks', 'delete_confirm', 1, '', 0, 'checkbox', '_bx_tasks_form_entry_input_sys_delete_confirm', '_bx_tasks_form_entry_input_delete_confirm', '_bx_tasks_form_entry_input_delete_confirm_info', 1, 0, 0, '', '', '', 'Avail', '', '_bx_tasks_form_entry_input_delete_confirm_error', '', '', 1, 0),
  465. ('bx_tasks', 'bx_tasks', 'do_publish', '_bx_tasks_form_entry_input_do_publish', '', 0, 'submit', '_bx_tasks_form_entry_input_sys_do_publish', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  466. ('bx_tasks', 'bx_tasks', 'do_submit', '_bx_tasks_form_entry_input_do_submit', '', 0, 'submit', '_bx_tasks_form_entry_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  467. ('bx_tasks', 'bx_tasks', 'do_cancel', '_bx_tasks_form_entry_input_do_cancel', '', 0, 'button', '_bx_tasks_form_entry_input_sys_do_cancel', '', '', 0, 0, 0, 'a:2:{s:7:"onclick";s:45:"$(''.bx-popup-applied:visible'').dolPopupHide()";s:5:"class";s:22:"bx-def-margin-sec-left";}', '', '', '', '', '', '', '', 1, 0),
  468. ('bx_tasks', 'bx_tasks', 'do_cancel_edit', '_bx_tasks_form_entry_input_do_cancel_edit', '', 0, 'button', '_bx_tasks_form_entry_input_sys_do_cancel_edit', '', '', 0, 0, 0, 'a:2:{s:7:"onclick";s:41:"window.open(''{edit_cancel_url}'', ''_self'')";s:5:"class";s:22:"bx-def-margin-sec-left";}', '', '', '', '', '', '', '', 0, 0),
  469. ('bx_tasks', 'bx_tasks', 'controls', '', 'do_publish,do_cancel', 0, 'input_set', '_bx_tasks_form_entry_input_sys_controls', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  470. ('bx_tasks', 'bx_tasks', 'controls_edit', '', 'do_submit,do_cancel_edit', 0, 'input_set', '_bx_tasks_form_entry_input_sys_controls_edit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  471. ('bx_tasks', 'bx_tasks', 'controls_edit_popup', '', 'do_submit,do_cancel', 0, 'input_set', '_bx_tasks_form_entry_input_sys_controls_edit_popup', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  472. ('bx_tasks', 'bx_tasks', 'covers', 'a:1:{i:0;s:14:"bx_tasks_html5";}', 'a:1:{s:14:"bx_tasks_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_tasks_form_entry_input_sys_covers', '_bx_tasks_form_entry_input_covers', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  473. ('bx_tasks', 'bx_tasks', 'pictures', 'a:1:{i:0;s:21:"bx_tasks_photos_html5";}', 'a:1:{s:21:"bx_tasks_photos_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_tasks_form_entry_input_sys_pictures', '_bx_tasks_form_entry_input_pictures', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  474. ('bx_tasks', 'bx_tasks', 'videos', 'a:2:{i:0;s:21:"bx_tasks_videos_html5";i:1;s:28:"bx_tasks_videos_record_video";}', 'a:2:{s:21:"bx_tasks_videos_html5";s:25:"_sys_uploader_html5_title";s:28:"bx_tasks_videos_record_video";s:32:"_sys_uploader_record_video_title";}', 0, 'files', '_bx_tasks_form_entry_input_sys_videos', '_bx_tasks_form_entry_input_videos', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  475. ('bx_tasks', 'bx_tasks', 'files', 'a:1:{i:0;s:20:"bx_tasks_files_html5";}', 'a:1:{s:20:"bx_tasks_files_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_tasks_form_entry_input_sys_files', '_bx_tasks_form_entry_input_files', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  476. ('bx_tasks', 'bx_tasks', 'text', '', '', 0, 'textarea', '_bx_tasks_form_entry_input_sys_text', '_bx_tasks_form_entry_input_text', '', 0, 0, 2, '', '', '', '', '', '', 'XssHtml', '', 1, 0),
  477. ('bx_tasks', 'bx_tasks', 'title', '', '', 0, 'text', '_bx_tasks_form_entry_input_sys_title', '_bx_tasks_form_entry_input_title', '', 1, 0, 0, '', '', '', 'Length', 'a:2:{s:3:"min";i:3;s:3:"max";i:160;}', '_bx_tasks_form_entry_input_title_err', 'Xss', '', 1, 0),
  478. ('bx_tasks', 'bx_tasks', 'stickers', '', '#!bx_tasks_stickers', 0, 'checkbox_set', '_bx_tasks_form_entry_input_sys_stickers', '_bx_tasks_form_entry_input_stickers', '', 0, 0, 0, '', '', '', '', '', '', 'Set', '', 1, 0),
  479. ('bx_tasks', 'bx_tasks', 'type', '', '#!bx_tasks_types', 0, 'select', '_bx_tasks_form_entry_input_sys_type', '_bx_tasks_form_entry_input_type', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
  480. ('bx_tasks', 'bx_tasks', 'priority', '', '#!bx_tasks_priorities', 0, 'select', '_bx_tasks_form_entry_input_sys_priority', '_bx_tasks_form_entry_input_priority', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
  481. ('bx_tasks', 'bx_tasks', 'state', '', '#!bx_tasks_states', 0, 'select', '_bx_tasks_form_entry_input_sys_state', '_bx_tasks_form_entry_input_state', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
  482. ('bx_tasks', 'bx_tasks', 'cat', '', '#!bx_tasks_cats', 0, 'select', '_bx_tasks_form_entry_input_sys_cat', '_bx_tasks_form_entry_input_cat', '', 1, 0, 0, '', '', '', 'avail', '', '_bx_tasks_form_entry_input_cat_err', 'Xss', '', 1, 0),
  483. ('bx_tasks', 'bx_tasks', 'multicat', '', '', 0, 'custom', '_bx_tasks_form_entry_input_sys_multicat', '_bx_tasks_form_entry_input_multicat', '', 1, 0, 0, '', '', '', 'avail', '', '_bx_tasks_form_entry_input_multicat_err', 'Xss', '', 1, 0),
  484. ('bx_tasks', 'bx_tasks', 'added', '', '', 0, 'datetime', '_bx_tasks_form_entry_input_sys_date_added', '_bx_tasks_form_entry_input_date_added', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  485. ('bx_tasks', 'bx_tasks', 'changed', '', '', 0, 'datetime', '_bx_tasks_form_entry_input_sys_date_changed', '_bx_tasks_form_entry_input_date_changed', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  486. ('bx_tasks', 'bx_tasks', 'published', '', '', 0, 'datetime', '_bx_tasks_form_entry_input_sys_date_published', '_bx_tasks_form_entry_input_date_published', '_bx_tasks_form_entry_input_date_published_info', 0, 0, 0, '', '', '', '', '', '', 'DateTimeTs', '', 1, 0),
  487. ('bx_tasks', 'bx_tasks', 'initial_members', '', '', 0, 'custom', '_bx_tasks_form_entry_input_sys_initial_members', '_bx_tasks_form_entry_input_initial_members', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 1),
  488. ('bx_tasks', 'bx_tasks', 'estimate', '', '#!bx_tasks_estimates', 0, 'select', '_bx_tasks_form_entry_input_sys_estimate', '_bx_tasks_form_entry_input_estimate', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
  489. ('bx_tasks', 'bx_tasks', 'due_date', '', '', 0, 'datepicker', '_bx_tasks_form_entry_input_sys_date_due_date', '_bx_tasks_form_entry_input_date_due_date', '', 0, 0, 0, '', '', '', '', '', '', 'DateTimeUtc', '', 1, 0),
  490. ('bx_tasks', 'bx_tasks', 'attachments', '', '', 0, 'custom', '_bx_tasks_form_entry_input_sys_attachments', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  491. ('bx_tasks', 'bx_tasks', 'labels', '', '', 0, 'custom', '_sys_form_input_sys_labels', '_sys_form_input_labels', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  492. ('bx_tasks', 'bx_tasks', 'anonymous', '', '', 0, 'switcher', '_sys_form_input_sys_anonymous', '_sys_form_input_anonymous', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  493. ('bx_tasks', 'bx_tasks', 'allow_comments', '1', '', 1, 'switcher', '_bx_tasks_form_entry_input_sys_allow_comments', '_bx_tasks_form_entry_input_allow_comments', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
  494. ('bx_tasks', 'bx_tasks', 'gh_issue_url', '', '', 0, 'value', '_bx_tasks_form_entry_input_sys_gh_issue_url', '_bx_tasks_form_entry_input_gh_issue_url', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0);
  495. INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
  496. ('bx_tasks_entry_add', 'allow_view_to', 2147483647, 1, 1),
  497. ('bx_tasks_entry_add', 'title', 2147483647, 1, 2),
  498. ('bx_tasks_entry_add', 'text', 2147483647, 1, 3),
  499. ('bx_tasks_entry_add', 'type', 2147483647, 1, 4),
  500. ('bx_tasks_entry_add', 'priority', 2147483647, 1, 5),
  501. ('bx_tasks_entry_add', 'estimate', 2147483647, 1, 6),
  502. ('bx_tasks_entry_add', 'stickers', 2147483647, 1, 7),
  503. ('bx_tasks_entry_add', 'initial_members', 192, 1, 8),
  504. ('bx_tasks_entry_add', 'due_date', 192, 1, 9),
  505. ('bx_tasks_entry_add', 'controls', 2147483647, 1, 10),
  506. ('bx_tasks_entry_add', 'do_publish', 2147483647, 1, 11),
  507. ('bx_tasks_entry_add', 'do_cancel', 2147483647, 1, 12),
  508. ('bx_tasks_entry_delete', 'delete_confirm', 2147483647, 1, 1),
  509. ('bx_tasks_entry_delete', 'do_submit', 2147483647, 1, 2),
  510. ('bx_tasks_entry_edit', 'allow_view_to', 2147483647, 1, 1),
  511. ('bx_tasks_entry_edit', 'title', 2147483647, 1, 2),
  512. ('bx_tasks_entry_edit', 'text', 2147483647, 1, 3),
  513. ('bx_tasks_entry_edit', 'attachments', 2147483647, 1, 4),
  514. ('bx_tasks_entry_edit', 'pictures', 2147483647, 1, 5),
  515. ('bx_tasks_entry_edit', 'videos', 2147483647, 1, 6),
  516. ('bx_tasks_entry_edit', 'files', 2147483647, 1, 7),
  517. ('bx_tasks_entry_edit', 'type', 2147483647, 1, 8),
  518. ('bx_tasks_entry_edit', 'priority', 2147483647, 1, 9),
  519. ('bx_tasks_entry_edit', 'estimate', 2147483647, 1, 10),
  520. ('bx_tasks_entry_edit', 'stickers', 2147483647, 1, 11),
  521. ('bx_tasks_entry_edit', 'initial_members', 192, 1, 12),
  522. ('bx_tasks_entry_edit', 'due_date', 192, 1, 13),
  523. ('bx_tasks_entry_edit', 'cf', 2147483647, 1, 14),
  524. ('bx_tasks_entry_edit', 'controls_edit', 2147483647, 1, 15),
  525. ('bx_tasks_entry_edit', 'do_submit', 2147483647, 1, 16),
  526. ('bx_tasks_entry_edit', 'do_cancel_edit', 2147483647, 1, 17),
  527. ('bx_tasks_entry_edit_body', 'title', 2147483647, 1, 1),
  528. ('bx_tasks_entry_edit_body', 'text', 2147483647, 1, 2),
  529. ('bx_tasks_entry_edit_body', 'do_submit', 2147483647, 1, 3),
  530. ('bx_tasks_entry_edit_tasks_list', 'tasks_list', 2147483647, 1, 1),
  531. ('bx_tasks_entry_edit_tasks_list', 'controls_edit_popup', 2147483647, 1, 2),
  532. ('bx_tasks_entry_edit_tasks_list', 'do_submit', 2147483647, 1, 3),
  533. ('bx_tasks_entry_edit_tasks_list', 'do_cancel', 2147483647, 1, 4),
  534. ('bx_tasks_entry_edit_state', 'state', 2147483647, 1, 1),
  535. ('bx_tasks_entry_edit_state', 'controls_edit_popup', 2147483647, 1, 2),
  536. ('bx_tasks_entry_edit_state', 'do_submit', 2147483647, 1, 3),
  537. ('bx_tasks_entry_edit_state', 'do_cancel', 2147483647, 1, 4),
  538. ('bx_tasks_entry_edit_type', 'type', 2147483647, 1, 1),
  539. ('bx_tasks_entry_edit_type', 'controls_edit_popup', 2147483647, 1, 2),
  540. ('bx_tasks_entry_edit_type', 'do_submit', 2147483647, 1, 3),
  541. ('bx_tasks_entry_edit_type', 'do_cancel', 2147483647, 1, 4),
  542. ('bx_tasks_entry_edit_priority', 'priority', 2147483647, 1, 1),
  543. ('bx_tasks_entry_edit_priority', 'controls_edit_popup', 2147483647, 1, 2),
  544. ('bx_tasks_entry_edit_priority', 'do_submit', 2147483647, 1, 3),
  545. ('bx_tasks_entry_edit_priority', 'do_cancel', 2147483647, 1, 4),
  546. ('bx_tasks_entry_edit_estimate', 'estimate', 2147483647, 1, 1),
  547. ('bx_tasks_entry_edit_estimate', 'controls_edit_popup', 2147483647, 1, 2),
  548. ('bx_tasks_entry_edit_estimate', 'do_submit', 2147483647, 1, 3),
  549. ('bx_tasks_entry_edit_estimate', 'do_cancel', 2147483647, 1, 4),
  550. ('bx_tasks_entry_edit_due_date', 'due_date', 192, 1, 1),
  551. ('bx_tasks_entry_edit_due_date', 'controls_edit_popup', 2147483647, 1, 2),
  552. ('bx_tasks_entry_edit_due_date', 'do_submit', 2147483647, 1, 3),
  553. ('bx_tasks_entry_edit_due_date', 'do_cancel', 2147483647, 1, 4),
  554. ('bx_tasks_entry_view', 'tasks_list', 2147483647, 1, 1),
  555. ('bx_tasks_entry_view', 'initial_members', 2147483647, 1, 2),
  556. ('bx_tasks_entry_view', 'stickers', 2147483647, 1, 3),
  557. ('bx_tasks_entry_view', 'type', 2147483647, 1, 4),
  558. ('bx_tasks_entry_view', 'priority', 2147483647, 1, 5),
  559. ('bx_tasks_entry_view', 'estimate', 2147483647, 1, 6),
  560. ('bx_tasks_entry_view', 'cat', 2147483647, 1, 7),
  561. ('bx_tasks_entry_view', 'added', 2147483647, 1, 8),
  562. ('bx_tasks_entry_view', 'changed', 2147483647, 1, 9),
  563. ('bx_tasks_entry_view', 'due_date', 192, 1, 10),
  564. ('bx_tasks_entry_view', 'state', 2147483647, 1, 11),
  565. ('bx_tasks_entry_view', 'gh_issue_url', 2147483647, 1, 12);
  566. -- FORMS: entry (tasklist)
  567. INSERT INTO `sys_objects_form`(`object`, `module`, `title`, `action`, `form_attrs`, `table`, `key`, `uri`, `uri_title`, `submit_name`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
  568. ('bx_tasks_list', 'bx_tasks', '_bx_tasks_form_list_entry', '', 'a:1:{s:7:"enctype";s:19:"multipart/form-data";}', 'bx_tasks_lists', 'id', '', '', 'do_submit', '', 0, 1, 'BxTasksFormListEntry', 'modules/boonex/tasks/classes/BxTasksFormListEntry.php');
  569. INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`, `title`) VALUES
  570. ('bx_tasks_list', 'bx_tasks_list_entry_add', 'bx_tasks', 0, '_bx_tasks_form_list_entry_display_add'),
  571. ('bx_tasks_list', 'bx_tasks_list_entry_edit', 'bx_tasks', 0, '_bx_tasks_form_list_entry_display_edit');
  572. INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES
  573. ('bx_tasks_list', 'bx_tasks', 'do_submit', '_bx_tasks_form_list_entry_input_do_submit', '', 0, 'submit', '_bx_tasks_form_list_entry_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  574. ('bx_tasks_list', 'bx_tasks', 'title', '', '', 0, 'text', '_bx_tasks_form_list_entry_input_sys_title', '_bx_tasks_form_list_entry_input_title', '', 1, 0, 0, '', '', '', 'Length', 'a:2:{s:3:"min";i:3;s:3:"max";i:160;}', '_bx_tasks_form_list_entry_input_title_err', 'Xss', '', 1, 0),
  575. ('bx_tasks_list', 'bx_tasks', 'do_cancel', '_bx_tasks_form_entry_input_do_cancel', '', 0, 'button', '_bx_tasks_form_entry_input_sys_do_cancel', '', '', 0, 0, 0, 'a:2:{s:7:"onclick";s:45:"$(''.bx-popup-applied:visible'').dolPopupHide()";s:5:"class";s:22:"bx-def-margin-sec-left";}', '', '', '', '', '', '', '', 1, 0),
  576. ('bx_tasks_list', 'bx_tasks', 'controls', '', 'do_submit,do_cancel', 0, 'input_set', '', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0);
  577. INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
  578. ('bx_tasks_list_entry_add', 'title', 2147483647, 1, 1),
  579. ('bx_tasks_list_entry_add', 'controls', 2147483647, 1, 2),
  580. ('bx_tasks_list_entry_add', 'do_submit', 2147483647, 1, 3),
  581. ('bx_tasks_list_entry_add', 'do_cancel', 2147483647, 1, 4),
  582. ('bx_tasks_list_entry_edit', 'title', 2147483647, 1, 1),
  583. ('bx_tasks_list_entry_edit', 'controls', 2147483647, 1, 2),
  584. ('bx_tasks_list_entry_edit', 'do_submit', 2147483647, 1, 3),
  585. ('bx_tasks_list_entry_edit', 'do_cancel', 2147483647, 1, 4);
  586. -- FORMS: context
  587. INSERT INTO `sys_objects_form` (`object`, `module`, `title`, `action`, `form_attrs`, `submit_name`, `table`, `key`, `uri`, `uri_title`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
  588. ('bx_tasks_context', 'bx_tasks', '_bx_tasks_form_context', '', '', 'do_submit', 'bx_tasks_contexts', 'id', '', '', '', 0, 1, 'BxTasksFormContext', 'modules/boonex/tasks/classes/BxTasksFormContext.php');
  589. INSERT INTO `sys_form_displays` (`display_name`, `module`, `object`, `title`, `view_mode`) VALUES
  590. ('bx_tasks_context_edit', 'bx_tasks', 'bx_tasks_context', '_bx_tasks_form_display_context_edit', 0);
  591. INSERT INTO `sys_form_inputs` (`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES
  592. ('bx_tasks_context', 'bx_tasks', 'gh_app_id', '', '', 0, 'select', '_bx_tasks_form_context_input_sys_gh_app_id', '_bx_tasks_form_context_input_gh_app_id', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 0, 0),
  593. ('bx_tasks_context', 'bx_tasks', 'gh_username', '', '', 0, 'text', '_bx_tasks_form_context_input_sys_gh_username', '_bx_tasks_form_context_input_gh_username', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 0, 0),
  594. ('bx_tasks_context', 'bx_tasks', 'gh_repository', '', '', 0, 'text', '_bx_tasks_form_context_input_sys_gh_repository', '_bx_tasks_form_context_input_gh_repository', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 0, 0),
  595. ('bx_tasks_context', 'bx_tasks', 'do_submit', '_bx_tasks_form_context_input_do_submit', '', 0, 'submit', '_bx_tasks_form_context_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  596. ('bx_tasks_context', 'bx_tasks', 'do_cancel', '_bx_tasks_form_context_input_do_cancel', '', 0, 'button', '_bx_tasks_form_context_input_sys_do_cancel', '', '', 0, 0, 0, 'a:2:{s:7:"onclick";s:45:"$(''.bx-popup-applied:visible'').dolPopupHide()";s:5:"class";s:22:"bx-def-margin-sec-left";}', '', '', '', '', '', '', '', 1, 0),
  597. ('bx_tasks_context', 'bx_tasks', 'controls', '', 'do_submit,do_cancel', 0, 'input_set', '_bx_tasks_form_context_input_sys_controls', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0);
  598. INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
  599. ('bx_tasks_context_edit', 'gh_username', 2147483647, 1, 1),
  600. ('bx_tasks_context_edit', 'gh_repository', 2147483647, 1, 2),
  601. ('bx_tasks_context_edit', 'gh_app_id', 2147483647, 1, 3),
  602. ('bx_tasks_context_edit', 'do_submit', 2147483647, 1, 4);
  603. -- FORMS: time
  604. INSERT INTO `sys_objects_form` (`object`, `module`, `title`, `action`, `form_attrs`, `submit_name`, `table`, `key`, `uri`, `uri_title`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
  605. ('bx_tasks_time', 'bx_tasks', '_bx_tasks_form_time', 'report.php', 'a:3:{s:2:"id";s:0:"";s:4:"name";s:0:"";s:5:"class";s:17:"bx-report-do-form";}', 'submit', '', 'id', '', '', '', 0, 1, 'BxTasksFormTime', 'modules/boonex/tasks/classes/BxTasksFormTime.php');
  606. INSERT INTO `sys_form_displays` (`display_name`, `module`, `object`, `title`, `view_mode`) VALUES
  607. ('bx_tasks_time_add', 'bx_tasks', 'bx_tasks_time', '_bx_tasks_form_display_time_add', 0),
  608. ('bx_tasks_time_edit', 'bx_tasks', 'bx_tasks_time', '_bx_tasks_form_display_time_edit', 0);
  609. INSERT INTO `sys_form_inputs` (`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES
  610. ('bx_tasks_time', 'bx_tasks', 'sys', '', '', 0, 'hidden', '_bx_tasks_form_time_input_sys_sys', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  611. ('bx_tasks_time', 'bx_tasks', 'object_id', '', '', 0, 'hidden', '_bx_tasks_form_time_input_sys_object_id', '_bx_tasks_form_time_input_object_id', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 0, 0),
  612. ('bx_tasks_time', 'bx_tasks', 'action', '', '', 0, 'hidden', '_bx_tasks_form_time_input_sys_action', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  613. ('bx_tasks_time', 'bx_tasks', 'value', '', 'value_h,value_div,value_m', 0, 'input_set', '_bx_tasks_form_time_input_sys_value', '_bx_tasks_form_time_input_value', '', 1, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  614. ('bx_tasks_time', 'bx_tasks', 'value_h', '', '', 0, 'text', '_bx_tasks_form_time_input_sys_value_h', '', '', 0, 0, 0, 'a:1:{s:11:"placeholder";s:45:"_bx_tasks_form_time_input_value_h_placeholder";}', '', '', '', '', '', '', '', 1, 0),
  615. ('bx_tasks_time', 'bx_tasks', 'value_div', '_bx_tasks_form_time_input_value_div', '', 0, 'value', '_bx_tasks_form_time_input_sys_value_div', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  616. ('bx_tasks_time', 'bx_tasks', 'value_m', '', '', 0, 'text', '_bx_tasks_form_time_input_sys_value_m', '', '', 0, 0, 0, 'a:1:{s:11:"placeholder";s:45:"_bx_tasks_form_time_input_value_m_placeholder";}', '', '', '', '', '', '', '', 1, 0),
  617. ('bx_tasks_time', 'bx_tasks', 'value_date', '', '', 0, 'datepicker', '_bx_tasks_form_time_input_sys_value_date', '_bx_tasks_form_time_input_value_date', '', 0, 0, 0, '', '', '', '', '', '', 'DateUtc', '', 1, 0),
  618. ('bx_tasks_time', 'bx_tasks', 'text', '', '', 0, 'textarea', '_bx_tasks_form_time_input_sys_text', '_bx_tasks_form_time_input_text', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
  619. ('bx_tasks_time', 'bx_tasks', 'submit', '_bx_tasks_form_time_input_submit', '', 0, 'submit', '_bx_tasks_form_time_input_sys_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  620. ('bx_tasks_time', 'bx_tasks', 'cancel', '_bx_tasks_form_time_input_cancel', '', 0, 'button', '_bx_tasks_form_time_input_sys_cancel', '', '', 0, 0, 0, 'a:2:{s:7:"onclick";s:45:"$(''.bx-popup-applied:visible'').dolPopupHide()";s:5:"class";s:22:"bx-def-margin-sec-left";}', '', '', '', '', '', '', '', 1, 0),
  621. ('bx_tasks_time', 'bx_tasks', 'controls', '', 'submit,cancel', 0, 'input_set', '_bx_tasks_form_time_input_sys_controls', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0);
  622. INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
  623. ('bx_tasks_time_add', 'sys', 2147483647, 1, 1),
  624. ('bx_tasks_time_add', 'object_id', 2147483647, 1, 2),
  625. ('bx_tasks_time_add', 'action', 2147483647, 1, 3),
  626. ('bx_tasks_time_add', 'value', 2147483647, 1, 4),
  627. ('bx_tasks_time_add', 'value_h', 2147483647, 1, 5),
  628. ('bx_tasks_time_add', 'value_div', 2147483647, 1, 6),
  629. ('bx_tasks_time_add', 'value_m', 2147483647, 1, 7),
  630. ('bx_tasks_time_add', 'value_date', 2147483647, 1, 8),
  631. ('bx_tasks_time_add', 'text', 2147483647, 1, 9),
  632. ('bx_tasks_time_add', 'controls', 2147483647, 1, 10),
  633. ('bx_tasks_time_add', 'submit', 2147483647, 1, 11),
  634. ('bx_tasks_time_add', 'cancel', 2147483647, 1, 12),
  635. ('bx_tasks_time_edit', 'value', 2147483647, 1, 1),
  636. ('bx_tasks_time_edit', 'value_h', 2147483647, 1, 2),
  637. ('bx_tasks_time_edit', 'value_div', 2147483647, 1, 3),
  638. ('bx_tasks_time_edit', 'value_m', 2147483647, 1, 4),
  639. ('bx_tasks_time_edit', 'value_date', 2147483647, 1, 5),
  640. ('bx_tasks_time_edit', 'text', 2147483647, 1, 6),
  641. ('bx_tasks_time_edit', 'controls', 2147483647, 1, 7),
  642. ('bx_tasks_time_edit', 'submit', 2147483647, 1, 8),
  643. ('bx_tasks_time_edit', 'cancel', 2147483647, 1, 9);
  644. -- FORMS: budget
  645. INSERT INTO `sys_objects_form` (`object`, `module`, `title`, `action`, `form_attrs`, `submit_name`, `table`, `key`, `uri`, `uri_title`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
  646. ('bx_tasks_budget', 'bx_tasks', '_bx_tasks_form_budget', '', '', 'submit', 'bx_tasks_budget_track', 'id', '', '', '', 0, 1, 'BxTasksFormBudget', 'modules/boonex/tasks/classes/BxTasksFormBudget.php');
  647. INSERT INTO `sys_form_displays` (`display_name`, `module`, `object`, `title`, `view_mode`) VALUES
  648. ('bx_tasks_budget_add', 'bx_tasks', 'bx_tasks_budget', '_bx_tasks_form_display_budget_add', 0),
  649. ('bx_tasks_budget_edit', 'bx_tasks', 'bx_tasks_budget', '_bx_tasks_form_display_budget_edit', 0);
  650. INSERT INTO `sys_form_inputs` (`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES
  651. ('bx_tasks_budget', 'bx_tasks', 'value', '', '', 0, 'text', '_bx_tasks_form_budget_input_sys_value', '_bx_tasks_form_budget_input_value', '_bx_tasks_form_budget_input_value_info', 1, 0, 0, '', '', '', 'avail', '', '_bx_tasks_form_budget_input_value_err', 'Int', '', 1, 0),
  652. ('bx_tasks_budget', 'bx_tasks', 'text', '', '', 0, 'textarea', '_bx_tasks_form_budget_input_sys_text', '_bx_tasks_form_budget_input_text', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
  653. ('bx_tasks_budget', 'bx_tasks', 'submit', '_bx_tasks_form_budget_input_submit', '', 0, 'submit', '_bx_tasks_form_budget_input_sys_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  654. ('bx_tasks_budget', 'bx_tasks', 'cancel', '_bx_tasks_form_budget_input_cancel', '', 0, 'button', '_bx_tasks_form_budget_input_sys_cancel', '', '', 0, 0, 0, 'a:2:{s:7:"onclick";s:45:"$(''.bx-popup-applied:visible'').dolPopupHide()";s:5:"class";s:22:"bx-def-margin-sec-left";}', '', '', '', '', '', '', '', 1, 0),
  655. ('bx_tasks_budget', 'bx_tasks', 'controls', '', 'submit,cancel', 0, 'input_set', '_bx_tasks_form_budget_input_sys_controls', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0);
  656. INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
  657. ('bx_tasks_budget_add', 'value', 2147483647, 1, 1),
  658. ('bx_tasks_budget_add', 'text', 2147483647, 1, 2),
  659. ('bx_tasks_budget_add', 'controls', 2147483647, 1, 3),
  660. ('bx_tasks_budget_add', 'submit', 2147483647, 1, 4),
  661. ('bx_tasks_budget_add', 'cancel', 2147483647, 1, 5),
  662. ('bx_tasks_budget_edit', 'value', 2147483647, 1, 1),
  663. ('bx_tasks_budget_edit', 'text', 2147483647, 1, 2),
  664. ('bx_tasks_budget_edit', 'controls', 2147483647, 1, 3),
  665. ('bx_tasks_budget_edit', 'submit', 2147483647, 1, 4),
  666. ('bx_tasks_budget_edit', 'cancel', 2147483647, 1, 5);
  667. -- PRE-VALUES
  668. INSERT INTO `sys_form_pre_lists`(`key`, `title`, `module`, `use_for_sets`) VALUES
  669. ('bx_tasks_types', '_bx_tasks_pre_lists_types', 'bx_tasks', '0');
  670. INSERT INTO `sys_form_pre_values`(`Key`, `Value`, `Order`, `LKey`, `LKey2`) VALUES
  671. ('bx_tasks_types', '', 0, '_sys_please_select', ''),
  672. ('bx_tasks_types', '1', 1, '_bx_tasks_type_1', ''),
  673. ('bx_tasks_types', '2', 2, '_bx_tasks_type_2', ''),
  674. ('bx_tasks_types', '3', 3, '_bx_tasks_type_3', '');
  675. INSERT INTO `sys_form_pre_lists`(`key`, `title`, `module`, `use_for_sets`) VALUES
  676. ('bx_tasks_stickers', '_bx_tasks_pre_lists_stickers', 'bx_tasks', '1');
  677. INSERT INTO `sys_form_pre_values`(`Key`, `Value`, `Order`, `LKey`, `LKey2`) VALUES
  678. ('bx_tasks_stickers', '', 0, '_sys_please_select', ''),
  679. ('bx_tasks_stickers', '1', 1, '_bx_tasks_sticker_1', ''),
  680. ('bx_tasks_stickers', '2', 2, '_bx_tasks_sticker_2', ''),
  681. ('bx_tasks_stickers', '3', 3, '_bx_tasks_sticker_3', ''),
  682. ('bx_tasks_stickers', '4', 4, '_bx_tasks_sticker_4', ''),
  683. ('bx_tasks_stickers', '5', 5, '_bx_tasks_sticker_5', '');
  684. INSERT INTO `sys_form_pre_lists`(`key`, `title`, `module`, `use_for_sets`) VALUES
  685. ('bx_tasks_priorities', '_bx_tasks_pre_lists_priorities', 'bx_tasks', '0');
  686. INSERT INTO `sys_form_pre_values`(`Key`, `Value`, `Order`, `LKey`, `LKey2`) VALUES
  687. ('bx_tasks_priorities', '', 0, '_sys_please_select', ''),
  688. ('bx_tasks_priorities', '1', 1, '_bx_tasks_priority_1', ''),
  689. ('bx_tasks_priorities', '2', 2, '_bx_tasks_priority_2', ''),
  690. ('bx_tasks_priorities', '3', 3, '_bx_tasks_priority_3', ''),
  691. ('bx_tasks_priorities', '4', 4, '_bx_tasks_priority_4', ''),
  692. ('bx_tasks_priorities', '5', 5, '_bx_tasks_priority_5', '');
  693. INSERT INTO `sys_form_pre_lists`(`key`, `title`, `module`, `use_for_sets`) VALUES
  694. ('bx_tasks_estimates', '_bx_tasks_pre_lists_estimates', 'bx_tasks', '0');
  695. INSERT INTO `sys_form_pre_values`(`Key`, `Value`, `Order`, `LKey`, `LKey2`) VALUES
  696. ('bx_tasks_estimates', '', 0, '_sys_please_select', ''),
  697. ('bx_tasks_estimates', '2', 1, '_bx_tasks_estimate_2', ''),
  698. ('bx_tasks_estimates', '4', 1, '_bx_tasks_estimate_4', ''),
  699. ('bx_tasks_estimates', '8', 1, '_bx_tasks_estimate_8', ''),
  700. ('bx_tasks_estimates', '16', 1, '_bx_tasks_estimate_16', ''),
  701. ('bx_tasks_estimates', '32', 1, '_bx_tasks_estimate_32', ''),
  702. ('bx_tasks_estimates', '64', 1, '_bx_tasks_estimate_64', '');
  703. INSERT INTO `sys_form_pre_lists`(`key`, `title`, `module`, `use_for_sets`) VALUES
  704. ('bx_tasks_states', '_bx_tasks_pre_lists_states', 'bx_tasks', '0');
  705. INSERT INTO `sys_form_pre_values`(`Key`, `Value`, `Order`, `LKey`, `LKey2`) VALUES
  706. ('bx_tasks_states', '', 0, '_sys_please_select', ''),
  707. ('bx_tasks_states', '1', 1, '_bx_tasks_state_1', ''),
  708. ('bx_tasks_states', '2', 2, '_bx_tasks_state_2', ''),
  709. ('bx_tasks_states', '3', 3, '_bx_tasks_state_3', ''),
  710. ('bx_tasks_states', '4', 4, '_bx_tasks_state_4', ''),
  711. ('bx_tasks_states', '5', 5, '_bx_tasks_state_5', ''),
  712. ('bx_tasks_states', '6', 6, '_bx_tasks_state_6', ''),
  713. ('bx_tasks_states', '7', 7, '_bx_tasks_state_7', '');
  714. INSERT INTO `sys_form_pre_lists`(`key`, `title`, `module`, `use_for_sets`) VALUES
  715. ('bx_tasks_cats', '_bx_tasks_pre_lists_cats', 'bx_tasks', '0');
  716. INSERT INTO `sys_form_pre_values`(`Key`, `Value`, `Order`, `LKey`, `LKey2`) VALUES
  717. ('bx_tasks_cats', '', 0, '_sys_please_select', ''),
  718. ('bx_tasks_cats', '1', 1, '_bx_tasks_cat_Animals_Pets', ''),
  719. ('bx_tasks_cats', '2', 2, '_bx_tasks_cat_Architecture', ''),
  720. ('bx_tasks_cats', '3', 3, '_bx_tasks_cat_Art', ''),
  721. ('bx_tasks_cats', '4', 4, '_bx_tasks_cat_Cars_Motorcycles', ''),
  722. ('bx_tasks_cats', '5', 5, '_bx_tasks_cat_Celebrities', ''),
  723. ('bx_tasks_cats', '6', 6, '_bx_tasks_cat_Design', ''),
  724. ('bx_tasks_cats', '7', 7, '_bx_tasks_cat_DIY_Crafts', ''),
  725. ('bx_tasks_cats', '8', 8, '_bx_tasks_cat_Education', ''),
  726. ('bx_tasks_cats', '9', 9, '_bx_tasks_cat_Film_Music_Books', ''),
  727. ('bx_tasks_cats', '10', 10, '_bx_tasks_cat_Food_Drink', ''),
  728. ('bx_tasks_cats', '11', 11, '_bx_tasks_cat_Gardening', ''),
  729. ('bx_tasks_cats', '12', 12, '_bx_tasks_cat_Geek', ''),
  730. ('bx_tasks_cats', '13', 13, '_bx_tasks_cat_Hair_Beauty', ''),
  731. ('bx_tasks_cats', '14', 14, '_bx_tasks_cat_Health_Fitness', ''),
  732. ('bx_tasks_cats', '15', 15, '_bx_tasks_cat_History', ''),
  733. ('bx_tasks_cats', '16', 16, '_bx_tasks_cat_Holidays_Events', ''),
  734. ('bx_tasks_cats', '17', 17, '_bx_tasks_cat_Home_Decor', ''),
  735. ('bx_tasks_cats', '18', 18, '_bx_tasks_cat_Humor', ''),
  736. ('bx_tasks_cats', '19', 19, '_bx_tasks_cat_Illustrations_Posters', ''),
  737. ('bx_tasks_cats', '20', 20, '_bx_tasks_cat_Kids_Parenting', ''),
  738. ('bx_tasks_cats', '21', 21, '_bx_tasks_cat_Mens_Fashion', ''),
  739. ('bx_tasks_cats', '22', 22, '_bx_tasks_cat_Outdoors', ''),
  740. ('bx_tasks_cats', '23', 23, '_bx_tasks_cat_Photography', ''),
  741. ('bx_tasks_cats', '24', 24, '_bx_tasks_cat_Products', ''),
  742. ('bx_tasks_cats', '25', 25, '_bx_tasks_cat_Quotes', ''),
  743. ('bx_tasks_cats', '26', 26, '_bx_tasks_cat_Science_Nature', ''),
  744. ('bx_tasks_cats', '27', 27, '_bx_tasks_cat_Sports', ''),
  745. ('bx_tasks_cats', '28', 28, '_bx_tasks_cat_Tattoos', ''),
  746. ('bx_tasks_cats', '29', 29, '_bx_tasks_cat_Technology', ''),
  747. ('bx_tasks_cats', '30', 30, '_bx_tasks_cat_Travel', ''),
  748. ('bx_tasks_cats', '31', 31, '_bx_tasks_cat_Weddings', ''),
  749. ('bx_tasks_cats', '32', 32, '_bx_tasks_cat_Womens_Fashion', '');
  750. -- COMMENTS
  751. INSERT INTO `sys_objects_cmts` (`Name`, `Module`, `Table`, `CharsPostMin`, `CharsPostMax`, `CharsDisplayMax`, `Html`, `PerView`, `PerViewReplies`, `BrowseType`, `IsBrowseSwitch`, `PostFormPosition`, `NumberOfLevels`, `IsDisplaySwitch`, `IsRatable`, `ViewingThreshold`, `IsOn`, `RootStylePrefix`, `BaseUrl`, `ObjectVote`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldTitle`, `TriggerFieldComments`, `ClassName`, `ClassFile`) VALUES
  752. ('bx_tasks', 'bx_tasks', 'bx_tasks_cmts', 1, 5000, 1000, 3, 50, 10, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', 'page.php?i=view-task&id={object_id}', '', 'bx_tasks_tasks', 'id', 'author', 'title', 'comments', 'BxTasksCmts', 'modules/boonex/tasks/classes/BxTasksCmts.php'),
  753. ('bx_tasks_notes', 'bx_tasks', 'bx_tasks_cmts_notes', 1, 5000, 1000, 0, 5, 3, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', 'page.php?i=view-task&id={object_id}', '', 'bx_tasks_tasks', 'id', 'author', 'title', '', 'BxTemplCmtsNotes', '');
  754. -- VOTES
  755. INSERT INTO `sys_objects_vote` (`Name`, `Module`, `TableMain`, `TableTrack`, `PostTimeout`, `MinValue`, `MaxValue`, `IsUndo`, `IsOn`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldRate`, `TriggerFieldRateCount`, `ClassName`, `ClassFile`) VALUES
  756. ('bx_tasks', 'bx_tasks', 'bx_tasks_votes', 'bx_tasks_votes_track', '604800', '1', '1', '0', '1', 'bx_tasks_tasks', 'id', 'author', 'rate', 'votes', '', ''),
  757. ('bx_tasks_reactions', 'bx_tasks', 'bx_tasks_reactions', 'bx_tasks_reactions_track', '604800', '1', '1', '1', '1', 'bx_tasks_tasks', 'id', 'author', 'rrate', 'rvotes', 'BxTemplVoteReactions', '');
  758. -- SCORES
  759. INSERT INTO `sys_objects_score` (`name`, `module`, `table_main`, `table_track`, `post_timeout`, `is_on`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_score`, `trigger_field_cup`, `trigger_field_cdown`, `class_name`, `class_file`) VALUES
  760. ('bx_tasks', 'bx_tasks', 'bx_tasks_scores', 'bx_tasks_scores_track', '604800', '0', 'bx_tasks_tasks', 'id', 'author', 'score', 'sc_up', 'sc_down', '', '');
  761. -- REPORTS
  762. INSERT INTO `sys_objects_report` (`name`, `module`, `table_main`, `table_track`, `pruning`, `is_on`, `base_url`, `object_comment`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES
  763. ('bx_tasks', 'bx_tasks', 'bx_tasks_reports', 'bx_tasks_reports_track', '31536000', '1', 'page.php?i=view-task&id={object_id}', 'bx_tasks_notes', 'bx_tasks_tasks', 'id', 'author', 'reports', '', ''),
  764. ('bx_tasks_time', 'bx_tasks', 'bx_tasks_time', 'bx_tasks_time_track', '0', '1', 'page.php?i=view-task&id={object_id}', '', 'bx_tasks_tasks', 'id', 'author', 'time', 'BxTasksTime', 'modules/boonex/tasks/classes/BxTasksTime.php');
  765. -- VIEWS
  766. INSERT INTO `sys_objects_view` (`name`, `module`, `table_track`, `period`, `is_on`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES
  767. ('bx_tasks', 'bx_tasks', 'bx_tasks_views_track', '86400', '1', 'bx_tasks_tasks', 'id', 'author', 'views', '', '');
  768. -- FAFORITES
  769. INSERT INTO `sys_objects_favorite` (`name`, `table_track`, `is_on`, `is_undo`, `is_public`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES
  770. ('bx_tasks', 'bx_tasks_favorites_track', '1', '1', '1', 'page.php?i=view-task&id={object_id}', 'bx_tasks_tasks', 'id', 'author', 'favorites', '', '');
  771. -- FEATURED
  772. INSERT INTO `sys_objects_feature` (`name`, `module`, `is_on`, `is_undo`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_flag`, `class_name`, `class_file`) VALUES
  773. ('bx_tasks', 'bx_tasks', '1', '1', 'page.php?i=view-task&id={object_id}', 'bx_tasks_tasks', 'id', 'author', 'featured', '', '');
  774. -- CONTENT INFO
  775. INSERT INTO `sys_objects_content_info` (`name`, `title`, `alert_unit`, `alert_action_add`, `alert_action_update`, `alert_action_delete`, `class_name`, `class_file`) VALUES
  776. ('bx_tasks', '_bx_tasks', 'bx_tasks', 'added', 'edited', 'deleted', '', ''),
  777. ('bx_tasks_cmts', '_bx_tasks_cmts', 'bx_tasks', 'commentPost', 'commentUpdated', 'commentRemoved', 'BxDolContentInfoCmts', '');
  778. -- SEARCH EXTENDED
  779. INSERT INTO `sys_objects_search_extended` (`object`, `object_content_info`, `module`, `title`, `active`, `class_name`, `class_file`) VALUES
  780. ('bx_tasks', 'bx_tasks', 'bx_tasks', '_bx_tasks_search_extended', 1, '', ''),
  781. ('bx_tasks_cmts', 'bx_tasks_cmts', 'bx_tasks', '_bx_tasks_search_extended_cmts', 1, 'BxTemplSearchExtendedCmts', '');
  782. -- STUDIO: page & widget
  783. INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
  784. (3, 'bx_tasks', '_bx_tasks', '_bx_tasks', 'bx_tasks@modules/boonex/tasks/|std-icon.svg');
  785. SET @iPageId = LAST_INSERT_ID();
  786. SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
  787. SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
  788. INSERT INTO `sys_std_widgets` (`page_id`, `module`, `type`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
  789. (@iPageId, 'bx_tasks', 'content', '{url_studio}module.php?name=bx_tasks', '', 'bx_tasks@modules/boonex/tasks/|std-icon.svg', '_bx_tasks', '', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_actions";s:6:"params";a:0:{}s:5:"class";s:18:"TemplStudioModules";}');
  790. INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
  791. (@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));