
<div class="mdui-container">
  <!--Title And Tags-->
  <!--End Title And Tags-->
  <h1 style="font-weight: 400;">{{post.title}}{%if post.lock%}<i class="mdui-icon material-icons"
      mdui-tooltip="{content: '讨论已被锁定'}" style="color: #1C6BF5">lock</i>{%endif%}{%if post.top%}<i class="mdui-icon material-icons"
      mdui-tooltip="{content: '讨论已被顶置'}"style="color: #FF0000;">assistant_photo</i>{%endif%}{%if user.user_group=='管理员'%}<i
      class="mdui-icon material-icons"
      mdui-tooltip="{content: '由管理员发布'}" style="color:#1CF53D">assignment_turned_in</i>{%endif%}</h1>
  <p style="font-weight:100;"><i class="mdui-icon material-icons">{{tags.icon}}</i><a class="mdui-ripple"
      href="/t/{{ tags.id }}" style="text-decoration: none;color:#0c0d0e;font-weight:100;">{{post.tags}}</a>><a
      class="mdui-ripple" href="/p/{{ post.id }}"
      style="text-decoration: none;color:#0c0d0e;font-weight:100;">{{post.title}}</a></p>
  <div class="mdui-divider"></div><br><br>
  <div class="mdui-row mdui-row-gapless">
    <div class="mdui-col-xs-1"><a href="/u/{{ user.id }}"><img width="60" height="60" class="mdui-img-circle"
          mdui-tooltip="{content: '{{ user.nickname }}'}" src="{{ user.avater }}" /></a></div>
    <div class="mdui-col-xs-9"><a href="/u/{{ user.id }}" style="font-weight: 500;text-decoration: none;color:#0c0d0e;"
        mdui-tooltip="{content: '{{ user.nickname }}'}">{{user.nickname}}</a>
      <div class=" mdui-typo">{{post.body}}</div>
    </div>
    <div class="mdui-col-xs-2">{{getTimer(post.pushingtime)}}</div>
  </div>
  <div class="mdui-row mdui-row-gapless">
    <div class="mdui-col-xs-11"></div>
    <div class="mdui-col-xs-1"><i class="mdui-icon material-icons" mdui-menu="{target: '#post-op'}">more_vert</i>
      <ul class="mdui-menu" id="post-op">
        <li class="mdui-menu-item">{%if userObj in post.star_user_list and auth%}{%else%}<a class="mdui-ripple"
            href="/stared/{{ post.id }}"><i class="mdui-menu-item-icon mdui-icon material-icons">star_border</i>设为星标</a>
        <li class="mdui-divider"></li>{%endif%}<li class="mdui-menu-item"><a class="mdui-ripple" href="#reply"
            style="text-decoration: none;color:#0c0d0e;"><i
              class="mdui-menu-item-icon mdui-icon material-icons">chat_bubble</i>回复</a></li>
        {%if userObj.user_group=='管理员'and auth and not post.top%}<li class="mdui-menu-item"><a class="mdui-ripple"
            href="/top/{{post.id}}"><i class="mdui-menu-item-icon mdui-icon material-icons">pin_drop</i>设为顶置</a></li>
        {%endif%}{%if userObj.user_group=='管理员'and auth and post.top%}<li class="mdui-menu-item"><a class="mdui-ripple"
            href="/untop/{{post.id}}"><i class="mdui-menu-item-icon mdui-icon material-icons">pin_drop</i>取消顶置</a></li>
        {%endif%}{%if post.lock==False and userObj.user_group=='管理员'and auth%}<li class="mdui-menu-item"><a
            class="mdui-ripple" href="/lock/{{post.id}}"><i
              class="mdui-menu-item-icon mdui-icon material-icons">lock</i>锁定</a></li>
        {%endif%}{%if post.lock and userObj.user_group=='管理员'and auth%}<li class="mdui-menu-item"><a class="mdui-ripple"
            href="/unlock/{{post.id}}"><i class="mdui-menu-item-icon mdui-icon material-icons">lock_open</i>取消锁定</a>
        </li>{%endif%}{%if userObj.user_group=='管理员'and auth%}<li class="mdui-menu-item"><a class="mdui-ripple"
            href="/rmpost/{{post.id}}"><i class="mdui-menu-item-icon mdui-icon material-icons">delete</i>删除</a></li>
        {%endif%}
      </ul>
    </div>
  </div><br />
  <p style="font-weight:300;">
    {%for i in post.star_user_list[:13]%}{{i.nickname}}{%endfor%}等{{len(list(post.star_user_list))}}人将帖子设为星标</p>
  <br /><br />{%for a in ReplyList%}<div class="mdui-divider"></div><br><br>
  <div class="mdui-row mdui-row-gapless">
    <div class="mdui-col-xs-1"><a href="/u/{{a.user.id}}"><img width="60" height="60" class="mdui-img-circle"
          mdui-tooltip="{content:'{{ a.user.nickname }}'}" src="{{a.user.avater}}" /></a></div>
    <div class="mdui-col-xs-9"><a href="/u/{{a.user.id}}" style="font-weight:500;text-decoration:none;color:#0c0d0e;"
        mdui-tooltip="{content:'{{ a.user.nickname }}'}">{{a.user.nickname}}</a><br><br>
      <div class="mdui-typo">{{a.reply.body}}</div>
    </div>
    <div class="mdui-col-xs-2">{{getTimer(a.reply.pushingtime)}}</div>
  </div>
  <div class="mdui-row mdui-row-gapless">
    <div class="mdui-col-xs-11"></div>
    <div class="mdui-col-xs-1">{%if userObj.user_group=='管理员'%}<i class="mdui-icon material-icons"
        mdui-menu="{target:'#post-op{{ a.reply.id }}'}">more</i><br><br><br>
      <ul class="mdui-menu" id="post-op{{a.reply.id}}">
        <li class="
            mdui-menu-item"><a class="mdui-ripple" href="/rmreply/{{ a.reply.id }}"><i
              class="mdui-menu-item-icon mdui-icon material-icons">delete</i>删除</a></li>
      </ul>{%endif%}
    </div>
  </div>{%endfor%}
  <!--Wrie Reply-->
  <link rel="stylesheet" type="text/css" href="/static/simditor/styles/simditor.css" />
  <script type="text/javascript" src="/static/simditor-2.3.28/site/assets/scripts
/jquery.min.js"></script>
  <script type="text/javascript" src="/static/simditor-2.3.28/site/assets/scripts
/module.js"></script>
  <script type="text/javascript" src="/static/simditor-2.3.28/site/assets/scripts
/hotkeys.js"></script>
  <script type="text/javascript" src="/static/simditor-2.3.28/site/assets/scripts
/uploader.js"></script>
  <script type="text/javascript" src="/static/simditor-2.3.28/site/assets/scripts
/simditor.js"></script>
  <script>var editor = new Simditor({ toolbar: ['title', 'bold', 'italic', 'underline', 'strikethrough', 'fontScale', 'color', '|', 'ol', 'ul', 'blockquote', 'code', 'table', '|', 'link', 'image', 'hr', '|', 'alignment'], textarea: '#editor', placeholder: '有什么补充的？尽情讨论吧!', imageButton: ['upload'], upload: { url: '', params: null, fileKey: 'upload_file', connectionCount: 3, leaveConfirm: 'Uploading is in progress, are you sure to leave this page?' } });</script>
 </div>

  <div id="reply" class="mdui-container">
    <form method="POST" action="/postreply/{{ post.id }}" style="padding-bottom: 100px;"><br /><br /><br /><textarea name="body" id="editor"
        placeholder="编辑回复(默认参与讨论组并订阅)" autofocus=""></textarea>
      <script>var editor = new Simditor({ toolbar: ['title', 'bold', 'italic', 'underline', 'strikethrough', 'fontScale', 'color', 'ol', 'ul', 'blockquote', 'code', 'table', 'link', 'image', 'hr',  'alignment'], textarea: '#editor', placeholder: '编辑回复(默认参与讨论组并订阅)', imageButton: ['upload'], upload: { url: '', params: null, fileKey: 'upload_file', connectionCount: 3, leaveConfirm: 'Uploading is in progress, are you sure to leave this page?' } });</script>
      {% if auth and (not post.lock) %}<button
        class="mdui-btn mdui-color-theme-accent mdui-shadow-12">回复</button>{% elif not auth %}<button
        class="mdui-btn mdui-color-theme-accent mdui-shadow-12" disabled>登入后回复</button>{% else %}<button
        class="mdui-btn mdui-color-theme-accent mdui-shadow-12" disabled>讨论被锁定</button>{% endif %}</form>
  </div>
</div>
<!--End Write Reply--><br /></div>
<!--End Body and Reply-->
