page.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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. 'year' => array
  35. (
  36. 'type' => 'int-11',
  37. 'name' => '年份-影响时光板块的内容选择',
  38. 'default' => '',
  39. 'desc' => '年份',
  40. 'match' => 'is_numeric',
  41. 'update' => 'year',
  42. 'search' => 'text',
  43. 'order' => 'desc',
  44. 'list' => true,
  45. ),
  46. 'name' => array
  47. (
  48. 'type' => 'varchar-150',
  49. 'name' => '章节名称',
  50. 'default' => '',
  51. 'desc' => '章节名称',
  52. 'match' => 'is_string',
  53. 'update' => 'text',
  54. 'search' => 'fulltext',
  55. 'list' => true,
  56. 'edit' => true,
  57. ),
  58. 'page_id' => array
  59. (
  60. 'type' => 'int-11',
  61. 'name' => '上级章节',
  62. 'default' => '-1',
  63. 'desc' => '请选择上级章节',
  64. 'match' => 'is_numeric',
  65. 'update' => 'hidden',
  66. 'value' => Dever::input('option_page_id', -1),
  67. 'list' => '{page_id} > 0 ? Dever::load("collection/page-one#name", {page_id}) : "主章节"',
  68. ),
  69. 'reorder' => array
  70. (
  71. 'type' => 'int-11',
  72. 'name' => '排序(数值越小越靠前)',
  73. 'default' => '1',
  74. 'desc' => '请输入排序',
  75. 'match' => 'option',
  76. 'update' => 'text',
  77. 'search' => 'order',
  78. 'list_name' => '排序',
  79. 'list' => true,
  80. 'order' => 'asc',
  81. 'edit' => true,
  82. ),
  83. 'state' => array
  84. (
  85. 'type' => 'tinyint-1',
  86. 'name' => '状态',
  87. 'default' => '1',
  88. 'desc' => '请选择状态',
  89. 'match' => 'is_numeric',
  90. ),
  91. 'cdate' => array
  92. (
  93. 'type' => 'int-11',
  94. 'name' => '录入时间',
  95. 'match' => array('is_numeric', time()),
  96. 'desc' => '',
  97. # 只有insert时才生效
  98. 'insert' => true,
  99. 'order' => 'asc',
  100. //'search' => 'date',
  101. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  102. ),
  103. ),
  104. 'manage' => array
  105. (
  106. # 列表页的类型
  107. 'list_type' => 'tree',
  108. 'list_button' => array
  109. (
  110. 'update' => '编辑',
  111. 'add' => array('新增子章节', '"{page_id}" == -1 ? "page&option_page_id={id}" : "page&option_page_id={page_id},{id}"', '{page_id} == -1'),
  112. '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'),
  113. 'delete' => '删除',
  114. ),
  115. ),
  116. 'request' => array
  117. (
  118. 'child' => array
  119. (
  120. 'option' => array
  121. (
  122. 'state' => 1,
  123. 'page_id' => array(1, '>='),
  124. 'info_id' => 'yes',
  125. 'year' => 'yes',
  126. ),
  127. 'type' => 'all',
  128. 'order' => array('reorder' => 'asc', 'id' => 'asc'),
  129. 'col' => '*',
  130. ),
  131. 'main' => array
  132. (
  133. 'option' => array
  134. (
  135. 'state' => 1,
  136. 'page_id' => -1,
  137. 'info_id' => 'yes',
  138. ),
  139. 'type' => 'all',
  140. 'order' => array('reorder' => 'asc', 'id' => 'asc'),
  141. 'col' => '*',
  142. ),
  143. )
  144. );