github.com/insionng/yougam@v0.0.0-20170714101924-2bc18d833463/themes/wind/templates/topic.html (about) 1 {% extends "base.html" %} 2 3 {% block title %} 4 <title>{% if article.Title %}{{ Text(article.Title,0,50)|safe }}{% endif %}{% if article.Node %} / {{article.Node}}{% endif %} - {{SiteName}} / {{SiteTitle}}</title> 5 {% endblock title %} 6 7 {% block content %} 8 <div id="content" class="col-lg-9"> 9 {% include "msgerr.html" %} 10 <div class="box"> 11 <div class="cell first breadcrumb last"> 12 <a href="/">{{SiteName}}</a> 13 {% if article.Node %} 14 <i class="fa fa-caret-right"></i> <a class="tag" href="/node/{{article.Node}}/">{{article.Node}}</a> 15 {% endif %} 16 </div> 17 {% if topics %} 18 {% for topic in topics %} 19 <div class="post-show"> 20 <div class="cell{% if not forloop.First %} subtle{% endif %}{% if forloop.First %} first{% endif %}{% if not topic.Content %} last{% endif %}"> 21 {% if forloop.First %} 22 {% if article.Author %} 23 <div class="avatar pull-right"> 24 <a href="/user/{{article.Author}}/" data-toggle="tooltip" data-placement="left" data-original-title="{% if author.Nickname %}{{author.Nickname}}{% else %}{{article.Author}}{% endif %}"> 25 <img class="small" src="{% if author.AvatarMedium %}{{File(author.AvatarMedium)}}{% else %}/identicon/{{author.Username}}/48/default.png{% endif %}"/> 26 </a> 27 </div> 28 {% endif %} 29 {% if article.Title %} 30 <h1 class="post-title"> 31 {{ article.Title | safe }} 32 </h1> 33 {% endif %} 34 {% endif %} 35 <div class="post-meta"> 36 {% if forloop.First %} 37 <span class="post-span votes"><a href="javascript:void(0);" onclick="javascript:$.get('/touch/like/topic/{{article.Id}}/?ver='+(new Date()).valueOf(), {Action:'get'}, function (data, textStatus){this;$('#score-{{article.Id}}').html(data);});" class="vote"><i class="fa fa-chevron-up"></i><span id="score-{{article.Id}}" style="padding-left:1em;">{{article.Hotscore}}</span></a> <a href="javascript:" onclick="javascript:$.get('/touch/hate/topic/{{article.Id}}/?ver='+(new Date()).valueOf(), {Action:'get'}, function (data, textStatus){this;$('#score-{{article.Id}}').html(data);});" class="vote"><i class="fa fa-chevron-down"></i></a> • </span> 38 39 {% if topic.Author %} 40 <a href="/createdby/{{topic.Author}}/">{{topic.Author}}</a> • 41 {% endif %} 42 {% if topic.Category %} 43 <a class="tag" href="/category/{{topic.Category}}/">{{topic.Category}}</a> • 44 {% endif %} 45 {% if topic.Node %} 46 <a class="tag" href="/node/{{topic.Node}}/">{{topic.Node}}</a> • 47 {% endif %} 48 {% if article.Ctype %} 49 <span class="tag"> 50 {% if Compare(article.Ctype|lower, "==","-1") %}回复可见{%endif%} 51 {% if Compare(article.Ctype|lower, "==","-2") %}付费可见{%endif%} 52 {% if Compare(article.Ctype|lower, "==","-3") %}会员可见{%endif%} 53 </span> • 54 {% endif %} 55 {% if topic.ReplyLastUsername!="" %} 56 <span class="last-reply"> 57 最后回复 <a href="/user/{{topic.ReplyLastUsername}}/">{{topic.ReplyLastUsername}}</a> • 58 </span> 59 {% endif %} 60 {% if topic.Created %} 61 <span class="time">{{TimeSince(topic.Created)}} • </span> 62 {% endif %} 63 {% if article.Id %} 64 <span class="topic-views"><span class="views">{%if article.Views%}{{article.Views}}{%else%}0{%endif%}</span> 点击</span> 65 <script type="text/javascript"> 66 $.get("/touch/view/topic/{{article.Id}}/?ver="+(new Date()).valueOf(), function(data){ 67 $(".topic-views").html(data+" 点击"); 68 }); 69 </script> 70 {% endif %} 71 {% else %} 72 {% if topic.Created %} 73 <span class="time">第 {{forloop.Counter-1}} 条附言 • {{TimeSince(topic.Created)}}</span> 74 {% endif %} 75 {% endif %} 76 </div> 77 <div class="clear"></div> 78 </div> 79 {% comment %} 80 {% if forloop.First %} 81 <div class="cell breadcrumb"> 82 {% if (article.Uid == SignedUserID) %} 83 <a class="post-action-link" href="/subject/{{article.Id}}/topic/">补充附言</a> 84 {% endif %} 85 </div> 86 {% endif %} 87 {% endcomment %} 88 {% if topic.Content %} 89 <div class="cell{% if not forloop.First %} subtle{% endif %}{% if forloop.Last %} last{% endif %}"{% if SignedUser && forloop.Last %} style="border-bottom-left-radius:0px;border-bottom-right-radius:0px;"{% endif %}> 90 <div class="post-content"> 91 {% if (topic.Attachment|length>0) %} 92 {% for img in Split(topic.Attachment,",") %} 93 <img src="{{domain47niu}}{{img}}?imageView/2/w/612/q/100" style="display:block;margin-bottom:1em;clear:both;width:100%;height:auto;"/> 94 {% endfor %} 95 <span class="clearfix"></span> 96 {% endif %} 97 {% if (Excerpt|length>0) and Compare(topic.Pid|lower,"==","0") %} 98 <div class="alert alert-warning">{{Excerpt|safe}}</div> 99 {% endif %} 100 {% if Allow or IsRoot %} 101 {{ topic.Content | safe }} 102 {% else %} 103 {% if Compare(topic.Ctype|lower, "==","-1") %} 104 <div class="alert alert-info"> 105 <button type="button" class="close" data-dismiss="alert">×</button> 106 <i class="fa fa-info-sign"></i> 107 <strong>提示!</strong> 108 此贴为回复可见贴,回复即可阅览! 109 </div> 110 {% endif %} 111 {% if (not Allow) and Compare(topic.Ctype|lower, "==","-2") %} 112 <div class="alert alert-info"> 113 <button type="button" class="close" data-dismiss="alert">×</button> <i class="fa fa-info-sign"></i> <strong>提示!</strong> 114 此贴为付费可见贴,付费即可阅览! 115 </div> 116 <div class="modal-dialog fade in"> 117 <form action="/pay/{{article.Author}}/10/{{article.Id}}/" method="POST"> 118 <div class="modal-content"> 119 <div class="modal-header"> 120 <h4 class="modal-title">支付</h4> 121 </div> 122 <div class="modal-body"> 123 请支付作者 {{article.Author}} [10] 金币后继续阅览。 124 <div class="clear"> 125 <label>输入密码:</label> 126 <input type="password" class="form-control parsley-validated" data-required="true" name="password"></div> 127 </div> 128 <div class="modal-footer"> 129 <input class="btn btn-primary" type="submit" value="支付"/> 130 </div> 131 </div> 132 </form> 133 </div> 134 {%endif%} 135 {% if Compare(topic.Ctype|lower, "==","-3") %} 136 <div class="alert alert-info"> 137 <button type="button" class="close" data-dismiss="alert">×</button> 138 <i class="fa fa-info-sign"></i> 139 <strong>提示!</strong> 140 此贴为会员可见贴,注册会员即可阅览! 141 </div> 142 {% endif %} 143 {% if Compare(topic.Pid|lower,">","0") %} 144 <div class="alert alert-warning">此乃隐藏内容</div> 145 {% endif %} 146 {% endif %} 147 </div> 148 <span class="clearfix"></span> 149 </div> 150 {% endif %} 151 152 {% if forloop.Last %} 153 <div class="holdbar"> 154 <div class="pull-left"> 155 {% if SignedUser %} 156 <a class="btn btn-mini" href="javascript:" onclick="javascript:$.getJSON('/touch/favorite/topic/{{article.Id}}/?ver='+(new Date()).valueOf(), function(data) { 157 $('#favorite-{{article.Id}}').html(' • '+data.FavoriteCount+' 人收藏'); 158 if (data.isFavorite==true){ 159 $('#favorite').html('取消收藏'); 160 }else{ 161 $('#favorite').html('收藏话题'); 162 } 163 });" style="margin-right:1em;"> 164 <span id="favorite" >收藏话题</span> 165 </a> 166 {% endif %} 167 {% if (article.Uid == SignedUserID)|| IsRoot %} 168 {% if (not replys)|| IsRoot %} 169 <a class="btn btn-mini" href="/modify/{{article.Id}}/">修改话题</a> 170 {% endif %} 171 <a class="btn btn-mini" href="/subject/{{article.Id}}/topic/">补充附言</a> 172 {% if IsRoot %} 173 <a class="btn btn-mini" href="/root/delete/topic/{{article.Id}}/">删除</a> 174 <span class="post-span votes"><a href="javascript:void(0);" onclick="javascript:$.get('/touch/top/topic/{{article.Id}}/?ver='+(new Date()).valueOf(), {Action:'get'}, function (data, textStatus){this;$('#sort-{{article.Id}}').html(data);});" class="btn btn-mini"><i class="fa fa-chevron-up"></i>置顶<span id="sort-{{article.Id}}" style="padding-left:1em;">{{article.Sort}}</span></a> <a href="javascript:" onclick="javascript:$.get('/touch/bottom/topic/{{article.Id}}/?ver='+(new Date()).valueOf(), {Action:'get'}, function (data, textStatus){this;$('#sort-{{article.Id}}').html(data);});" class="btn btn-mini"><i class="fa fa-chevron-down"></i>置底</a></span> 175 {% endif %} 176 {% endif %} 177 </div> 178 <div class="pull-right" style="line-height:26px; text-shadow: 0px 1px 0px #fff;"> 179 <span class="topic-views"><span class="views">{%if article.Views%}{{article.Views}}{%else%}0{%endif%}</span> 点击</span> 180 <span><span id="favorite-{{article.Id}}">{% if article.FavoriteCount %} • {{article.FavoriteCount}} 人收藏{% endif %}</span></span> 181 </div> 182 <div style="clear: both;"></div> 183 </div> 184 {% endif %} 185 </div> 186 {% endfor %} 187 {% endif %} 188 </div> 189 {% include "comment.html" %} 190 <span class="clearfix"></span> 191 </div> 192 {% endblock content %} 193 194 {% block sidebar %}{% include "sidebar-topic.html" %}{% endblock sidebar %}