post.list.html 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. {% extends "base-with-sidebar.html" %}
  2. {% load authperm %}
  3. {% load crypto %}
  4. {% load staticres %}
  5. {% load htmlutils %}
  6. {% block title %}
  7. {% ifequal ctname "*" %}
  8. 全部文章 - 丘丘塔台
  9. {% else %}
  10. 分类浏览:{{cttitle}} - 丘丘塔台
  11. {% endifequal %}
  12. {% endblock %}
  13. {% block sidebar %}
  14. {% include "home/front.sidebar.html" %}
  15. {% endblock %}
  16. {% block content %}
  17. <div class="btn-toolbar">
  18. <div class="btn-group">
  19. {% ifperm "pichublog" "Writer" %}
  20. {% url "pichublog_postadd" as pichublog_catadd %}
  21. <a class="btn btn-primary {%if request.path = pichublog_postadd %} active {% endif %}" href="{{ pichublog_catadd }}">
  22. <span class="glyphicon glyphicon-plus"></span>
  23. 新建文章
  24. </a>
  25. {% endifperm %}
  26. <button type="button" class="btn btn-primary" data-toggle="button" aria-pressed="false" autocomplete="off" onclick="$('#FilterCollapse').collapse('toggle');">
  27. <span class="glyphicon glyphicon-filter"></span>
  28. 显示筛选器
  29. </button>
  30. </div>
  31. </div>
  32. <br />
  33. <div class="collapse" id="FilterCollapse">
  34. {{FilterHTML|safe}}
  35. </div>
  36. <div>{% include "common/paginator.html" %}</div>
  37. <br />
  38. <ul class="list-group">
  39. {% for i in TopList %}
  40. <li class="list-group-item">
  41. <h3>
  42. <span class="label label-success" style="display:inline-block">置顶</span>
  43. {% if i.private %}
  44. {% if i.passwdlck %}
  45. <span class="label label-warning" style="display:inline-block">密码保护</span>
  46. {% else %}
  47. <span class="label label-warning" style="display:inline-block">访问限制</span>
  48. {% endif %}
  49. {% endif %}
  50. <a href="{% url 'pichublog_postview' i.id %}">{{i.title}}</a>
  51. </h3>
  52. <p>
  53. <b>作者:</b>{{i.author.nick}}&nbsp;&nbsp;&nbsp;
  54. <b>发布时间:</b>{{i.pubtime|date:"Y-m-d H:i:s"}}&nbsp;&nbsp;&nbsp;<br />
  55. <strong>分类:</strong>
  56. {% for j in i.category.all %}
  57. <a href="{% url 'pichublog_postlist' j.engname %}"><span class="label label-info" style="display:inline-block">{{j.title}}</span></a>
  58. {% endfor %}
  59. </p>
  60. {% if i.private %}
  61. <div class="alert alert-warning" role="alert">这是私密文章,不提供摘要预览。</div>
  62. {% else %}
  63. <blockquote>{% mksummary i.markdown "233" %}</blockquote>
  64. {% endif %}
  65. </li>
  66. {% endfor %}
  67. {% for i in lPage %}
  68. <li class="list-group-item">
  69. <h3>
  70. {% if i.private %}
  71. {% if i.passwdlck %}
  72. <span class="label label-warning" style="display:inline-block">密码保护</span>
  73. {% else %}
  74. <span class="label label-warning" style="display:inline-block">访问限制</span>
  75. {% endif %}
  76. {% endif %}
  77. <a href="{% url 'pichublog_postview' i.id %}">{{i.title}}</a>
  78. </h3>
  79. <p>
  80. <b>作者:</b>{{i.author.nick}}&nbsp;&nbsp;&nbsp;
  81. <b>发布时间:</b>{{i.pubtime|date:"Y-m-d H:i:s"}}&nbsp;&nbsp;&nbsp;<br />
  82. <strong>分类:</strong>
  83. {% for j in i.category.all %}
  84. <a href="{% url 'pichublog_postlist' j.engname %}"><span class="label label-info" style="display:inline-block">{{j.title}}</span></a>
  85. {% endfor %}
  86. </p>
  87. {% if i.private %}
  88. <div class="alert alert-warning" role="alert">这是私密文章,不提供摘要预览。</div>
  89. {% else %}
  90. <blockquote>{% mksummary i.markdown "233" %}</blockquote>
  91. {% endif %}
  92. </li>
  93. {% endfor %}
  94. </ul>
  95. <br />
  96. <div>{% include "common/paginator.html" %}</div>
  97. {% endblock %}