From 2acb62174ab2cac9c7a88faafcb5f0a22a54db6f Mon Sep 17 00:00:00 2001 From: Mike Chen Date: Sun, 5 Jul 2009 10:23:06 +0800 Subject: initiliaze git rep --- templates/question.html | 469 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 469 insertions(+) create mode 100644 templates/question.html (limited to 'templates/question.html') diff --git a/templates/question.html b/templates/question.html new file mode 100644 index 00000000..9cbe1664 --- /dev/null +++ b/templates/question.html @@ -0,0 +1,469 @@ +{% extends "base.html" %}{% load extra_tags %}{% load extra_filters %}{% load humanize %} +{% block title %}{% spaceless %}{{ question.get_question_title }}{% endspaceless %}{% endblock %} +{% block forejs %} + {% if not question.closed and request.user.is_authenticated %} + + + + + {% endif %} + + + +{% endblock %} + +{% block content %} +
+ {{ question.get_question_title }} +
+
+
+
+ + + + + +
+
+ {% if question_vote %} + +
+ {{ question.score }} +
+ + + {% else %} + +
+ {{ question.score }} +
+ + + {% endif %} +

+ {% if favorited %} + +
+ {{ question.favourite_count }} +
+ {% else %} + + +
{% ifnotequal question.favourite_count 0 %}{{ question.favourite_count }}{% endifnotequal %} +
+ + {% endif %} + +
+
+
+
+ {{ question.html|safe }} +
+
+ {% for tag in question.tagname_list %} + + {% endfor %} +
+
+ + + + + + +
+ + {% if request.user|can_edit_post:question %} + 编辑 + | + {% endif %} + {% if request.user|can_delete_post:question %} + 删除 + | + {% endif %} + {% if question.closed %} + {% if request.user|can_reopen_question:question %} + 打开 + | + {% endif %} + {% else %} + {% if request.user|can_close_question:question %} + 关闭 + | + {% endif %} + {% endif %} + + 垃圾帖?{% if request.user|can_view_offensive_flags %}{% if question.offensive_flag_count %}({{ question.offensive_flag_count }}){% endif %}{% endif %} + + + + + {% if question.last_edited_by %} +
+ + + + + + {% if question.wiki %} + + + + + {% else %} + {% ifequal question.last_edited_by question.author %} + + + + + {% else %} + + + + + {% endifequal %} + {% endif %} +
+ 更新于{% diff_date question.last_edited_at %} +
+ {% gravatar question.last_edited_by 32 %} + + {{ question.last_edited_by.username }} +
+ {% gravatar question.last_edited_by 32 %} + + + +
+ {% get_score_badge question.last_edited_by %} +
+ +
+
+ {% endif %} + +
+ {% if question.wiki %} + 社区Wiki +
+ {% else %} +
+ + + + + + + + + + + +
+ 提问于{% diff_date question.added_at %} +
+ {% gravatar question.author 32 %} + + +
+ {% get_score_badge question.author %} +
+
+
+ {% endif %} + +
+ +
+ +
+ + {% if question.comment_count %}评论 ({{question.comment_count}}){% else %}添加评论{% endif %} +
+
+
+ +
+ +
+ {% if question.closed %} +
+

问题以“{{ question.get_close_reason_display }}”的原因已被 {{ question.closed_by.username }} 于{% diff_date question.closed_at %}关闭

+
+ {% endif %} + + {% ifnotequal question.answer_count 0 %} +
+ +
{{ question.answer_count }}个回答:
+ +
+ {% cnprog_paginator context %} + + {% for answer in answers %} + +
+ + + + + +
+
+ +
+ {{ answer.score }} +
+ + +

+ {% ifequal request.user question.author %} + + {% else %} + {% if answer.accepted %} + + {% endif %} + {% endifequal %} +
+
+
+
+ {{ answer.html|safe }} +
+
+ + + + + + + +
+ {% if request.user|can_edit_post:answer %} + 编辑 + | + {% endif %} + {% if request.user|can_delete_post:answer %} + 删除 + | + {% endif %} + + + 永久链接 + + + | + 垃圾帖?{% if request.user|can_view_offensive_flags %}{% if answer.offensive_flag_count %}({{ answer.offensive_flag_count }}){% endif %}{% endif %} + + {% if answer.last_edited_by %} +
+ + + + + + {% if answer.wiki %} + + + + + {% else %} + {% ifequal answer.last_edited_by answer.author %} + + + + + {% else %} + + + + + {% endifequal %} + {% endif %} +
+ 更新于{% diff_date answer.last_edited_at %} +
+ {% gravatar answer.last_edited_by 32 %} + + + +
+ {% gravatar answer.last_edited_by 32 %} + + +
+ {% get_score_badge answer.last_edited_by %} +
+
+
+ {% endif %} + +
+ {% if answer.wiki %} + 社区Wiki +
+ {% else %} +
+ + + + + + + + + +
+ 回答于{% diff_date answer.added_at %} +
+ {% gravatar answer.author 32 %} + + +
+ {% get_score_badge answer.author %} +
+
+
+ {% endif %} + +
+ +
+
+ + {% if answer.comment_count %}评论 ({{answer.comment_count}}){% else %}添加评论{% endif %} +
+
+
+ +
+ +
+
+ {% endfor %} +
+ {% cnprog_paginator context %} +
+ {% else %} +
+ {% endifnotequal %} +
+
+ + {% if not question.closed %} + {% if request.user.is_authenticated %} +
+
您的回答:
+
+ +
+
+ {{ answer.text }} +
+ + + + + + +
+ 预览开关 + + {{ answer.wiki }} {{ answer.wiki.label_tag }} +
+
+
+ {{ answer.text.errors }} + +
+
+ + {% else %} + + {% endif %} + {% endif %} +

+
+
+
+{% endblock %} + +{% block sidebar %} +
+

+ 您正在浏览的问题含有以下标签: +

+

+ {% for tag in tags %} + × {{ tag.used_count|intcomma }}
+ {% endfor %} +

+

+ 提问时间:
{{ question.added_at|timesince }}前 +

+

+ 目前浏览数量:
{{ question.view_count|intcomma }} 次 +

+

+ 最后更新时间:
{{ question.last_activity_at|timesince }}前 +

+
+ +
+

相似的问题

+ +
+
+ +{% endblock %} + +{% block endjs %} +{% endblock %} + -- cgit v1.2.3-1-g7c22