sysconf.category.edit.html 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. {% extends "base-with-sidebar.html" %}
  2. {% load authperm %}
  3. {% load staticres %}
  4. {% block title %}
  5. {% if addmode %}
  6. 新建分类 - 丘丘塔台
  7. {% else %}
  8. 编辑分类 - 丘丘塔台
  9. {% endif %}
  10. {% endblock %}
  11. {% block sidebar %}
  12. {% include "home/sysconf.sidebar.html" %}
  13. {% endblock %}
  14. {% block content %}
  15. <div class="btn-toolbar">
  16. <div class="btn-group">
  17. {% url "pichublog_catlist" as pichublog_catlist %}
  18. <a class="btn btn-primary {%if request.path = pichublog_catlist %} active {% endif %}" href="{{ pichublog_catlist }}">
  19. <span class="glyphicon glyphicon-th-list"></span>
  20. 分类列表
  21. </a>
  22. {% url "pichublog_catadd" as pichublog_catadd %}
  23. <a class="btn btn-primary {%if request.path = pichublog_catadd %} active {% endif %}" href="{{ pichublog_catadd }}">
  24. <span class="glyphicon glyphicon-plus"></span>
  25. 新建分类
  26. </a>
  27. </div>
  28. </div>
  29. <br />
  30. <form class="form-horizontal" role="form" action="" method="POST" >
  31. {% csrf_token %}
  32. {% for item in form %}
  33. <div class="form-group">
  34. <label class="control-label col-md-1">{{item.label}}</label>
  35. <div class="col-md-5">{{item}}</div>
  36. <div class="col-md-6">{{item.errors}}</div>
  37. </div>
  38. {% endfor %}
  39. <div class="form-group">
  40. <div class="col-md-offset-1 col-md-10">
  41. {% if addmode %}
  42. <button type="submit" class="btn btn-primary btn-lg">新建</button>
  43. {% else %}
  44. <button type="submit" class="btn btn-primary btn-lg">提交更改</button>
  45. {% endif %}
  46. </div>
  47. </div>
  48. </form>
  49. {% endblock %}