github.com/insionng/yougam@v0.0.0-20170714101924-2bc18d833463/themes/wind/templates/new-topic.html (about)

     1  {% extends "base.html" %}
     2  
     3  {% block title %}
     4  <title>创建话题 - {{SiteName}}</title>
     5  {% endblock title %}
     6  
     7  {% block mainland %}
     8      <link rel="stylesheet" href="/js/chosen/chosen.css" type="text/css" />
     9      <div id="main" class="container">
    10          <div class="row">
    11              <div id="content" class="col-md-9">
    12                  {% include "msgerr.html" %}
    13                  <div class="box">
    14                      <div class="cell first breadcrumb">
    15                          <a href="/"> <i class="icon icon-home"></i>
    16                          </a> <i class="fa fa-caret-right"></i>
    17                          {% if haspid==false %}创建话题{%else%}补充附言{%endif%}
    18                      </div>
    19                      <div class="cell last">
    20                          <form id="post-new" method="POST">
    21                              <div class="control-group">
    22                                  {% if hasnid==false %}
    23                                      {% if haspid==false %}
    24                                        <label class="control-label">归属设定</label>
    25                                        <div class="controls">
    26                                          <p class="btn-group">
    27                                              <select style="width:200px" class="chosen-select" name="nodeid">
    28                                                  {%if categorys %}
    29                                                          {% for category in categorys %}
    30                                                              <optgroup label="{{category.Title}}">
    31                                                                  {% for node in GetNodesByCid(category.Id, 0, 0, "id") %}
    32                                                                      <option value="{{node.Id}}">{{node.Title}}
    33                                                                      </option>
    34                                                                  {%endfor%}
    35                                                              </optgroup>
    36                                                          {%endfor%}
    37                                                      {% if nodes %}
    38                                                          <optgroup label="节点导航">
    39                                                              {% for nd in nodes %}
    40                                                                  <option value="{{nd.Id}}">{{nd.Title}}</option>
    41                                                              {% endfor %}
    42                                                          </optgroup>
    43                                                      {% else %}
    44                                                          <optgroup label="缺省设置">
    45                                                              <option value="-1" selected>[选择节点]</option>
    46                                                          </optgroup>
    47                                                      {% endif %}
    48                                                  {%else%}
    49                                                      {% if (nodes||node) %}
    50                                                          <optgroup label="节点导航">
    51                                                              {% if node %}
    52                                                                      {% if node.Pid>0 %}
    53                                                                        <option value="{{node.Pid}}" selected>
    54                                                                        {% if nodes %}
    55                                                                            {% for nd in nodes %}
    56                                                                                  {% if nd.Id==node.Pid %}
    57                                                                                      {{nd.Title}}
    58                                                                                  {% endif %}
    59                                                                            {% endfor %}
    60                                                                        {% else %}
    61                                                                              {% if node.Title %}{{node.Title}}{% else %}节点{{node.Pid}}{% endif %}
    62                                                                        {% endif %}
    63                                                                        </option>
    64                                                                      {% endif %}
    65                                                              {% endif %}
    66                                                              {% if nodes %}
    67                                                                  {% if node %}
    68                                                                      {% for nd in nodes %}
    69                                                                        {% if nd.Id!=node.Id %}
    70                                                                          <option value="{{nd.Id}}">{{nd.Title}}</option>
    71                                                                        {% endif %}
    72                                                                      {% endfor %}
    73                                                                  {% else %}
    74                                                                      {% for nd in nodes %}
    75                                                                          <option value="{{nd.Id}}">{{nd.Title}}</option>
    76                                                                      {% endfor %}
    77                                                                  {% endif %}
    78                                                              {% endif %}
    79                                                          </optgroup>
    80                                                      {% else %}
    81                                                          <optgroup label="缺省设置">
    82                                                              <option value="-1" selected>[选择节点]</option>
    83                                                          </optgroup>
    84                                                      {% endif %}
    85                                                  {%endif%}
    86                                              </select>
    87                                              <select style="width:100px" id="se" name="ctype" class="chosen-select" placeholder="选择类型..."  onchange="showholder(this.id)">
    88                                                  <option value="0" selected>[普通话题]</option>
    89                                                  <option value="-1">[回复可见]</option>
    90                                                  <option value="-2">[付费可见]</option>
    91                                                  <option value="-3">[会员可见]</option>
    92                                              </select>
    93                                          </p>
    94                                          <div class="text-left">
    95                                              <span class="btn-group">
    96                                                  <p class="help-block text-right">请选择节点并撰写标题,如果标题能表述完事情,摘录、正文等内容可忽略..</p>
    97                                              </span>
    98                                          </div>
    99                                        </div>
   100                                      {% endif %}
   101                                  {% else %}
   102                                      <input value="{{curnid}}" name="nodeid" type="hidden" />
   103                                  {% endif %}
   104                              </div>
   105                              <div class="clearfix"></div>
   106                          {% if haspid==false %}
   107                              <label class="control-label">标题</label>
   108                              <div class="controls">
   109                                  <div class="form-group">
   110                                      <h1 id="PostForm-Title" class="PostForm-Title inline"></h1>
   111                                      <input name="title" id="title" type="text" class="form-control hidden" placeholder="请输入标题" autocomplete="off">
   112                                  </div>
   113                              </div>
   114                              <div id="excerptor" style="display:none;">
   115                                  <label class="control-label">摘录</label>
   116                                  <div class="controls">
   117                                      <div class="form-group">
   118                                          <textarea name="excerpt" id="excerpt" rows="2" class="form-control editor" placeholder="请输入摘录..." style="overflow: hidden; word-wrap: break-word; resize: none; height:80px;"></textarea>
   119                                      </div>
   120                                  </div>
   121                              </div>
   122                          {% endif %}
   123                              <label class="control-label">正文</label>
   124                              <div class="controls">
   125                                  <div class="form-group">
   126                                      <textarea id="PostForm-Content" rows="5" class="form-control editor" placeholder="请输入正文内容.." style="overflow: hidden; word-wrap: break-word; resize: none; height: 345px;"></textarea>
   127                                      <textarea name="content" id="postcontent" class="hidden"></textarea>
   128                                  </div>
   129                              </div>
   130                              <div class="form-group">
   131                                      <div class="button-bar" style="position: relative;">
   132                                      {% if haspid==false %}
   133                                              <button type="submit" class="btn btn-s-md btn-dark btn-rounded" onclick="javascript:SubmitHolder();">
   134                                                  提交&nbsp;&nbsp;<i class="icon-chevron-sign-right"></i>
   135                                              </button>
   136                                      {% else %}
   137                                              <div class="text-left">
   138                                                  <span class="btn-group">
   139                                                      <a target="_blank" href="/topic/{{curpid}}/" class="btn btn-s-md btn-success btn-rounded"> <i class="icon-chevron-sign-left"></i> 浏览</a>
   140                                                      <button type="submit" class="btn btn-s-md btn-dark btn-rounded pull-right" onclick="javascript:SubmitHolder2();">提交 <i class="icon-chevron-sign-right"></i> </button>
   141                                                  </span>
   142                                              </div>
   143                                      {% endif %}
   144                                          <div class="clearfix"></div>
   145                                      {% comment %}
   146                                      {% if hasnid==false %}
   147                                          {% if haspid==false %}
   148                                          <p class="help-block text-right">选择节点</p>
   149                                          {% endif %}
   150                                      {% endif %}
   151                                      {% endcomment %}
   152                                      </div>
   153                                  <div class="clearfix"></div>
   154                              </div>
   155  
   156                          </form>
   157                          {% include "editor-front.html" %}
   158                      </div>
   159                  </div>
   160              </div>
   161              {% include "sidebar-editor.html" %}
   162          </div>
   163      </div>
   164      <script src="/js/chosen/chosen.jquery.min.js"></script>
   165      <script src="/js/app.plugin.js"></script>
   166  {% endblock mainland %}