view.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. {extend name="default/base/base_member" /}
  2. {block name="member_main"}
  3. <div class="dsm-default-form">
  4. {notempty name="message_list"}
  5. {foreach name="message_list" item="v"}
  6. <dl>
  7. <dt>
  8. {if $drop_type == 'msg_seller'}
  9. {$v.from_member_name}{$Think.lang.home_message_speak}
  10. {elseif $drop_type== 'msg_system'}
  11. {$v.from_member_name}
  12. {else /}
  13. {$v.from_member_name}{$Think.lang.home_message_speak}
  14. {/if}
  15. {$Think.lang.ds_colon}
  16. </dt>
  17. <dd>
  18. <p>{if $v.message_type==1}{:htmlspecialchars_decode($v.message_body)}{else}{:parsesmiles($v.message_body)}{/if}</p>
  19. <p class="hint">({:date('Y-m-d H:i',$v.message_time)})</p>
  20. </dd>
  21. </dl>
  22. {/foreach}
  23. {/notempty}
  24. {if $drop_type == 'msg_list'&& $isallowsend}
  25. <form id="replyform" method="post" action="{:url('Membermessage/savereply')}">
  26. <input type="hidden" name="message_id" value="{$message_id}" />
  27. <dl class="bottom">
  28. <dt>{$Think.lang.home_message_reply}{$Think.lang.ds_colon}</dt>
  29. <dd>
  30. <p>
  31. <textarea name="msg_content" rows="3" class="textarea w500"></textarea>
  32. </p>
  33. <p> </p>
  34. </dd>
  35. </dl>
  36. <dl class="bottom">
  37. <dt>&nbsp;</dt>
  38. <dd>
  39. <input type="submit" class="submit" value="{$Think.lang.home_message_submit}" />
  40. </dd>
  41. </dl>
  42. </form>
  43. {/if}
  44. </div>
  45. <script type="text/javascript">
  46. $(function () {
  47. $('#replyform').validate({
  48. errorPlacement: function (error, element) {
  49. $(element).parent().next('p').html(error);
  50. },
  51. submitHandler: function (form) {
  52. ds_ajaxpost('replyform');
  53. },
  54. rules: {
  55. msg_content: {
  56. required: true
  57. }
  58. },
  59. messages: {
  60. msg_content: {
  61. required: '{$Think.lang.home_message_reply_content_null}'
  62. }
  63. }
  64. });
  65. });
  66. </script>
  67. {/block}