sitemodel_edit.tpl.php 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?php
  2. defined('IN_ADMIN') or exit('No permission resources.');
  3. include $this->admin_tpl('header','admin');
  4. ?>
  5. <script type="text/javascript">
  6. <!--
  7. $(function(){
  8. $.formValidator.initConfig({formid:"myform",autotip:true,onerror:function(msg,obj){window.top.art.dialog({content:msg,lock:true,width:'200',height:'50'}, function(){this.close();$(obj).focus();})}});
  9. $("#name").formValidator({onshow:"<?php echo L("input").L('model_name')?>",onfocus:"<?php echo L("input").L('model_name')?>",oncorrect:"<?php echo L('input_right');?>"}).inputValidator({min:1,onerror:"<?php echo L("input").L('model_name')?>"});
  10. })
  11. //-->
  12. </script>
  13. <div class="pad-lr-10">
  14. <form action="?m=content&c=sitemodel&a=edit" method="post" id="myform">
  15. <fieldset>
  16. <legend><?php echo L('basic_configuration')?></legend>
  17. <table width="100%" class="table_form">
  18. <tr>
  19. <th width="120"><?php echo L('model_name')?>:</th>
  20. <td class="y-bg"><input type="text" class="input-text" name="info[name]" id="name" size="30" value="<?php echo $name;?>"/></td>
  21. </tr>
  22. <tr>
  23. <th><?php echo L('model_tablename')?>:</th>
  24. <td class="y-bg"><input type="text" class="input-text" name="info[tablename]" id="tablename" size="30" value="<?php echo $tablename;?>" disabled/></td>
  25. </tr>
  26. <tr>
  27. <th><?php echo L('description')?>:</th>
  28. <td class="y-bg"><input type="text" class="input-text" name="info[description]" id="description" size="30" value="<?php echo $description;?>"/></td>
  29. </tr>
  30. </table>
  31. </fieldset>
  32. <div class="bk15"></div>
  33. <fieldset>
  34. <legend><?php echo L('template_setting')?></legend>
  35. <table width="100%" class="table_form">
  36. <tr>
  37. <th width="200"><?php echo L('available_styles');?></th>
  38. <td>
  39. <?php echo form::select($style_list, $default_style, 'name="info[default_style]" id="template_list" onchange="load_file_list(this.value)"', L('please_select'))?>
  40. </td>
  41. </tr>
  42. <tr>
  43. <th width="200"><?php echo L('category_index_tpl');?></th>
  44. <td id="category_template">
  45. <?php echo form::select_template($default_style,'content', $category_template, 'name="setting[category_template]" id="template_category"', 'category')?></td>
  46. </tr>
  47. <tr>
  48. <th ><?php echo L('category_list_tpl');?></th>
  49. <td id="list_template"><?php echo form::select_template($default_style,'content', $list_template, 'name="setting[list_template]" id="template_list"', 'list')?></td>
  50. </tr>
  51. <tr>
  52. <th><?php echo L('content_tpl');?></th>
  53. <td id="show_template"><?php echo form::select_template($default_style,'content', $show_template, 'name="setting[show_template]" id="template_show"','show')?></td>
  54. </tr>
  55. </table>
  56. </fieldset>
  57. <div class="bk15"></div>
  58. <fieldset>
  59. <legend><?php echo L('other_template_setting')?> <input type="checkbox"<?php if($admin_list_template){?> checked<?php }?> id="other" value="1" name="other"></legend>
  60. <table width="100%" id="other_tab" class="table_form" style="display:none;">
  61. <tr>
  62. <th width="200"><?php echo L('admin_content_list')?></th>
  63. <td id="admin_list_template"><?php echo $admin_list_template_f;?>
  64. </td>
  65. </tr>
  66. <tr>
  67. <th width="200"><?php echo L('member_content_add')?></th>
  68. <td id="member_add_template"><?php echo form::select_template($default_style,'member', $member_add_template, 'name="setting[member_add_template]" id="template_member_add"', 'content_publish')?>
  69. </td>
  70. </tr>
  71. </table>
  72. </fieldset>
  73. <div class="bk15"></div>
  74. <input type="hidden" name="modelid" value="<?php echo $modelid;?>" />
  75. <input type="submit" class="dialog" id="dosubmit" name="dosubmit" value="<?php echo L('submit');?>" />
  76. </form>
  77. </div>
  78. <script language="JavaScript">
  79. <!--
  80. function load_file_list(id) {
  81. $.getJSON('?m=admin&c=category&a=public_tpl_file_list&style='+id, function(data){$('#category_template').html(data.category_template);$('#list_template').html(data.list_template);$('#show_template').html(data.show_template);});
  82. }
  83. $("#other").click(function() {
  84. if ($('#other').attr('checked')) {
  85. $('#other_tab').show();
  86. } else {
  87. $('#other_tab').hide();
  88. }
  89. })
  90. if ($('#other').attr('checked')) {
  91. $('#other_tab').show();
  92. } else {
  93. $('#other_tab').hide();
  94. }
  95. //-->
  96. </script>
  97. </body>
  98. </html>