]> git.openstreetmap.org Git - osqa.git/blob - forum/skins/default/templates/book.html
Improvements on full text search.
[osqa.git] / forum / skins / default / templates / book.html
1 {% extends "base_content.html" %}
2 <!-- template book.html -->
3 {% load i18n %}
4 {% load extra_tags %}
5 {% load extra_filters %}
6 {% load humanize %}
7 {% block title %}{% spaceless %}{{ book.title }}-{% trans "reading channel" %}{% endspaceless %}{% endblock %}
8 {% block forejs %}
9        <script type="text/javascript">        
10          $().ready(function(){
11             $("#nav_books").attr('className',"on");
12             //$("#nav_ask").hide();
13         });
14          
15         </script>
16 {% endblock %}
17 {% block content %}
18     <div class="headNormal"><a href="{{ book.get_absolute_url }}">《{{ book.title }}》</a></div>
19     <div class="bookInfo">
20         <div class="bookCover">
21             <img src="{{ book.cover_img }}" >
22         </div>
23         <div class="bookSummary">
24             <table>
25                 <tr>
26                         <td>{% trans "[author]" %}</td>
27                         <td><b><a href="{% url user book.user.id %}" rel="nofollow" >{{ book.author }}</a></b></td>
28                 </tr>
29                 <tr>
30                         <td>{% trans "[publisher]" %}</td>
31                         <td>{{ book.publication }}</td>
32                 </tr>
33                 <tr>
34                         <td>{% trans "[publication date]" %}</td>
35                         <td>{{ book.published_at|date:"Y-m" }}</td>
36                 </tr>
37                 <tr>
38                         <td>{% trans "[price]" %}</td>
39                         <td>{{ book.price }} {% trans "currency unit" %}</td>
40                 </tr>
41                 <tr>
42                         <td>{% trans "[pages]" %}</td>
43                         <td>{{ book.pages }} {% trans "pages abbreviation" %}</td>
44                 </tr>
45                 <tr>
46                         <td>{% trans "[tags]" %}</td>
47                         <td>{{ book.tagnames }}</td>
48                 </tr>
49                 <tr>
50                         <td>&nbsp;</td>
51                         <td> </td>
52                 </tr>
53                 {% if author_info.blog_url %}
54                 <tr>
55                     <td></td>
56                     <td><a href="{{ author_info.blog_url }}" rel="nofollow" >{% trans "author blog" %} »</a></td>
57                 </tr>
58                 
59                 {% endif %}
60                 <tr>
61                     <td> </td>
62                     <td><a href="#" rel="nofollow">{% trans "book directory" %} »</a></td>
63                 </tr>
64                 <tr>
65                     <td> </td>
66                     <td><a href="#" rel="nofollow">{% trans "buy online" %} »</a></td>
67                 </tr>
68             </table>
69         </div>
70         <div class="blogRss">
71     
72         </div>
73     </div>
74     
75     <div class="bookQuestions">
76         
77         <div class="tabBar">
78             <div class="tabsB">
79                 <a id="qa" class="on" title="{% trans "book technical Q&A %}" href="#">{% trans "reader questions" %}</a>
80             </div>
81         </div>
82         <div class="bookAsk"><a href="{% url ask_book book.short_name %}">{% trans "ask the author" %}</div>
83         <div class="user-stats-table">
84             {% for question in questions.object_list %}
85                 {% if question.favourite_count %}
86                     {% if question.favorited_myself %}
87                         <div class="favorites-count">
88                             <img title="{% trans "this question was selected as favorite" %} {{question.favourite_count}} {% trans "number of times" %}" src="{% media  "/media/images/vote-favorite-on.png" %}">
89                             <div><b>{{question.favourite_count|intcomma}}</b></div>
90                         </div>
91                     {% else %}
92                         <div class="favorites-count-off">
93                             <img title="{% trans "this question was selected as favorite" %} {{question.favourite_count}} {% trans "number of times" %}" src="{% media  "/media/images/vote-favorite-off.png" %}">
94                             <div><b>{{question.favourite_count|intcomma}}</b></div>
95                         </div>
96                     {% endif %}
97                 {% else %}
98                     <div class="favorites-empty"> </div>
99                 {% endif %}
100             <div id="question-summary-{{question.id}}" class="question-summary narrow">
101                 <a style="text-decoration: none;" href="{% url questions %}{{question.id}}/{{question.get_question_title}}">
102                     <div class="stats">
103                         <div class="votes">
104                             <div class="vote-count-post">{{question.score|intcomma}}</div> 
105                             {% trans "votes" %}
106                           
107                         </div>
108                         <div title="{% if question.answer_accepted %}{% trans "the answer has been accepted to be correct" %}{% endif %}" class="status {% if question.answer_accepted %}answered-accepted{% endif %} {% ifequal question.answer_count 0 %}unanswered{% endifequal %}{% ifnotequal question.answer_count 0 %}answered{% endifnotequal %}">
109                             <div class="answer-count-post">{{question.answer_count|intcomma}}</div>
110                                                         {% trans "answer" %}
111
112                         </div>
113                         <div class="views">
114                              <div class="views-count-post">{{question.view_count|cnprog_intword|safe}}</div>
115                              {% trans "views" %}
116                         </div>
117                     </div>
118                 </a>
119                 <div class="bookQuestionItem">
120                     <h3>
121                         <a title="{{question.summary|collapse}}" href="{% url questions %}{{question.id}}/{{question.title}}">{{question.title}}</a>
122                     </h3>
123                     <div class="tags">
124                         {% for tag in question.tagname_list %}
125                         <a href="{% url tag_questions tag|urlencode %}" title="{% "see questions tagged with" %}'{{ tag }}'{% trans "using tags" %}" rel="tag">{{ tag }}</a>
126                         {% endfor %}
127                     </div>
128                     <div class="started">
129                         <span class="author"><a href="{{ question.last_activity_by.get_profile_url }}">{{ question.last_activity_by }}</a></span>
130                         <span class="score">{% get_score_badge question.last_activity_by %} </span>
131                         <span class="date" title="{{ question.last_activity_at }}">{% diff_date question.last_activity_at %}</span>
132                     </div>
133                 </div>
134             </div>
135             <br clear="both"/>
136             {% endfor %}
137         </div>
138     </div>
139 {% endblock %}
140 {% block tail %}
141                         <div class="pager">
142                             {% cnprog_paginator context %}
143                             
144                         </div>
145                         <div class="bookFeed">
146                             <div id="feeds">
147                                 <a href="{% media  "/feeds/rss" %} " title="{% trans "subscribe to book RSS feed" %}">{% trans "subscribe to the questions feed" %}</a>
148                             </div>
149                         </div>
150
151 {% endblock %}
152 <!-- end template book.html -->