page.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'page',
  6. # 显示给用户看的名称
  7. 'lang' => '章节管理',
  8. # 是否显示在后台菜单
  9. 'order' => 1,
  10. 'menu' => false,
  11. # 数据结构
  12. 'struct' => array
  13. (
  14. 'id' => array
  15. (
  16. 'type' => 'int-11',
  17. 'name' => 'ID',
  18. 'default' => '',
  19. 'desc' => '',
  20. 'match' => 'is_numeric',
  21. 'order' => 'asc',
  22. 'list' => true,
  23. ),
  24. 'info_id' => array
  25. (
  26. 'type' => 'int-11',
  27. 'name' => '合集',
  28. 'default' => '',
  29. 'desc' => '合集',
  30. 'match' => 'is_numeric',
  31. 'update' => 'hidden',
  32. 'value' => Dever::input('search_option_info_id')
  33. ),
  34. 'name' => array
  35. (
  36. 'type' => 'varchar-150',
  37. 'name' => '章节名称',
  38. 'default' => '',
  39. 'desc' => '章节名称',
  40. 'match' => 'is_string',
  41. 'update' => 'text',
  42. 'search' => 'fulltext',
  43. 'list' => true,
  44. 'edit' => true,
  45. ),
  46. 'page_id' => array
  47. (
  48. 'type' => 'int-11',
  49. 'name' => '上级章节',
  50. 'default' => '-1',
  51. 'desc' => '请选择上级章节',
  52. 'match' => 'is_numeric',
  53. 'update' => 'hidden',
  54. 'value' => Dever::input('search_option_page_id', -1),
  55. 'list' => '{page_id} > 0 ? Dever::load("collection/page-one#name", {page_id}) : "主章节"',
  56. ),
  57. 'reorder' => array
  58. (
  59. 'type' => 'int-11',
  60. 'name' => '排序(数值越大越靠前)',
  61. 'default' => '1',
  62. 'desc' => '请输入排序',
  63. 'match' => 'option',
  64. 'update' => 'text',
  65. 'search' => 'order',
  66. 'list_name' => '排序',
  67. 'list' => true,
  68. 'order' => 'desc',
  69. 'edit' => true,
  70. ),
  71. 'state' => array
  72. (
  73. 'type' => 'tinyint-1',
  74. 'name' => '状态',
  75. 'default' => '1',
  76. 'desc' => '请选择状态',
  77. 'match' => 'is_numeric',
  78. ),
  79. 'cdate' => array
  80. (
  81. 'type' => 'int-11',
  82. 'name' => '录入时间',
  83. 'match' => array('is_numeric', time()),
  84. 'desc' => '',
  85. # 只有insert时才生效
  86. 'insert' => true,
  87. 'search' => 'date',
  88. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  89. ),
  90. ),
  91. 'manage' => array
  92. (
  93. # 列表页的类型
  94. 'list_type' => 'tree',
  95. 'list_button' => array
  96. (
  97. 'update' => '编辑',
  98. 'add' => array('新增子章节', '"{page_id}" == -1 ? "page&search_option_page_id={id}" : "page&search_option_page_id={page_id},{id}"', '{page_id} == -1'),
  99. 'list' => array('内容管理', '"content&search_option_info_id={info_id}&send_page_id={id}&oper_table=page&top_table=info&top_project=collection&page_type=1"' , '{page_id} > 0'),
  100. 'delete' => '删除',
  101. ),
  102. ),
  103. 'request' => array
  104. (
  105. 'child' => array
  106. (
  107. 'option' => array
  108. (
  109. 'state' => 1,
  110. 'page_id' => array(1, '>='),
  111. 'info_id' => 'yes',
  112. ),
  113. 'type' => 'all',
  114. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  115. 'col' => '*|page_id|',
  116. ),
  117. 'main' => array
  118. (
  119. 'option' => array
  120. (
  121. 'state' => 1,
  122. 'page_id' => -1,
  123. 'info_id' => 'yes',
  124. ),
  125. 'type' => 'all',
  126. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  127. 'col' => '*',
  128. ),
  129. )
  130. );