summaryrefslogtreecommitdiffstats
path: root/templates/book.html
blob: e5d4396b3fd614360453cb3fad87eb8638ecd9d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
{% extends "base_content.html" %}
{% load extra_tags %}
{% load extra_filters %}
{% load humanize %}
{% block title %}{% spaceless %}{{ book.title }}-读书频道{% endspaceless %}{% endblock %}
{% block forejs %}
       <script type="text/javascript">        
         $().ready(function(){
            $("#nav_books").attr('className',"on");
            //$("#nav_ask").hide();
        });
         
        </script>
{% endblock %}
{% block content %}
    <div class="headNormal"><a href="{{ book.get_absolute_url }}">{{ book.title }}</a></div>
    <div class="bookInfo">
        <div class="bookCover">
            <img src="{{ book.cover_img }}" >
        </div>
        <div class="bookSummary">
            <table>
    	        <tr>
    	        	<td>【作者】</td>
    	        	<td><b><a href="{% url user book.user.id %}" rel="nofollow" >{{ book.author }}</a></b></td>
    	        </tr>
    	        <tr>
    	        	<td>【出版社】</td>
    	        	<td>{{ book.publication }}</td>
    	        </tr>
                <tr>
    	        	<td>【出版日期】</td>
    	        	<td>{{ book.published_at|date:"Y-m" }}</td>
    	        </tr>
                <tr>
    	        	<td>【价格】</td>
    	        	<td>{{ book.price }}</td>
    	        </tr>
                <tr>
    	        	<td>【页数】</td>
    	        	<td>{{ book.pages }}</td>
    	        </tr>
                <tr>
    	        	<td>【标签】</td>
    	        	<td>{{ book.tagnames }}</td>
    	        </tr>
                <tr>
    	        	<td>&nbsp;</td>
    	        	<td> </td>
    	        </tr>
                {% if author_info.blog_url %}
                <tr>
                    <td></td>
                    <td><a href="{{ author_info.blog_url }}" rel="nofollow" >作者博客 »</a></td>
    	        </tr>
                
                {% endif %}
                <tr>
                    <td> </td>
                    <td><a href="#" rel="nofollow">书籍目录 »</a></td>
    	        </tr>
                <tr>
                    <td> </td>
                    <td><a href="#" rel="nofollow">网上购买 »</a></td>
    	        </tr>
            </table>
        </div>
        <div class="blogRss">
    
        </div>
    </div>
    
    <div class="bookQuestions">
        
        <div class="tabBar">
            <div class="tabsB">
                <a id="qa" class="on" title="图书相关的技术答疑" href="#">答读者问</a>
            </div>
        </div>
        <div class="bookAsk"><a href="{% url ask_book book.short_name %}">向作者提问</div>
        <div class="user-stats-table">
            {% for question in questions.object_list %}
                {% if question.favourite_count %}
                    {% if question.favorited_myself %}
                        <div class="favorites-count">
                            <img title="这个问题被 {{question.favourite_count}} 位用户收藏" src="/content/images/vote-favorite-on.png">
                            <div><b>{{question.favourite_count|intcomma}}</b></div>
                        </div>
                    {% else %}
                        <div class="favorites-count-off">
                            <img title="这个问题被 {{question.favourite_count}} 位用户收藏" src="/content/images/vote-favorite-off.png">
                            <div><b>{{question.favourite_count|intcomma}}</b></div>
                        </div>
                    {% endif %}
                {% else %}
                    <div class="favorites-empty"> </div>
                {% endif %}
            <div id="question-summary-{{question.id}}" class="question-summary narrow">
                <a style="text-decoration: none;" href="/questions/{{question.id}}/{{question.get_question_title}}">
                    <div class="stats">
                        <div class="votes">
                            <div class="vote-count-post">{{question.score|intcomma}}</div></div>
                        <div title="{% if question.answer_accepted %}有答案已被接受为正确答案{% endif %}" class="status {% if question.answer_accepted %}answered-accepted{% endif %} {% ifequal question.answer_count 0 %}unanswered{% endifequal %}{% ifnotequal question.answer_count 0 %}answered{% endifnotequal %}">
                            <div class="answer-count-post">{{question.answer_count|intcomma}}</div>
                            回答
                     
                        </div>
                        <div class="views">
                             <div class="views-count-post">{{question.view_count|cnprog_intword|safe}}</div>
                             浏览
                        </div>
                    </div>
                </a>
                <div class="bookQuestionItem">
                    <h3>
                        <a title="{{question.summary}}" href="/questions/{{question.id}}/{{question.title}}">{{question.title}}</a>
                    </h3>
                    <div class="tags">
                        {% for tag in question.tagname_list %}
                        <a href="{% url forum.views.tag tag|urlencode %}" title="查看有关'{{ tag }}'的问题" rel="tag">{{ tag }}</a>
                        {% endfor %}
                    </div>
                    <div class="started">
                        <span class="author"><a href="{{ question.last_activity_by.get_profile_url }}">{{ question.last_activity_by }}</a></span>
                        <span class="score">{% get_score_badge question.last_activity_by %} </span>
                        <span class="date" title="{{ question.last_activity_at }}">{% diff_date question.last_activity_at %}</span>
                    </div>
                </div>
            </div>
            <br clear="both"/>
            {% endfor %}
        </div>
    </div>
{% endblock %}
{% block tail %}
                            
                        <div class="pager">
                            {% cnprog_paginator context %}
                            
                        </div>
                        <div class="bookFeed">
                            <div id="feeds">
                                <a href="/feeds/rss" title="RSS订阅该图书最新问题">订阅最新问题</a>
                            </div>
                        </div>

{% endblock %}