1 {% extends "base_content.html" %}
 
   2 <!-- template book.html -->
 
   5 {% load extra_filters %}
 
   7 {% block title %}{% spaceless %}{{ book.title }}-{% trans "reading channel" %}{% endspaceless %}{% endblock %}
 
   9        <script type="text/javascript">        
 
  11             $("#nav_books").attr('className',"on");
 
  12             //$("#nav_ask").hide();
 
  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 }}" >
 
  23         <div class="bookSummary">
 
  26                         <td>{% trans "[author]" %}</td>
 
  27                         <td><b><a href="{% url user book.user.id %}" rel="nofollow" >{{ book.author }}</a></b></td>
 
  30                         <td>{% trans "[publisher]" %}</td>
 
  31                         <td>{{ book.publication }}</td>
 
  34                         <td>{% trans "[publication date]" %}</td>
 
  35                         <td>{{ book.published_at|date:"Y-m" }}</td>
 
  38                         <td>{% trans "[price]" %}</td>
 
  39                         <td>{{ book.price }} {% trans "currency unit" %}</td>
 
  42                         <td>{% trans "[pages]" %}</td>
 
  43                         <td>{{ book.pages }} {% trans "pages abbreviation" %}</td>
 
  46                         <td>{% trans "[tags]" %}</td>
 
  47                         <td>{{ book.tagnames }}</td>
 
  53                 {% if author_info.blog_url %}
 
  56                     <td><a href="{{ author_info.blog_url }}" rel="nofollow" >{% trans "author blog" %} »</a></td>
 
  62                     <td><a href="#" rel="nofollow">{% trans "book directory" %} »</a></td>
 
  66                     <td><a href="#" rel="nofollow">{% trans "buy online" %} »</a></td>
 
  75     <div class="bookQuestions">
 
  79                 <a id="qa" class="on" title="{% trans "book technical Q&A %}" href="#">{% trans "reader questions" %}</a>
 
  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>
 
  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>
 
  98                     <div class="favorites-empty"> </div>
 
 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}}">
 
 104                             <div class="vote-count-post">{{question.score|intcomma}}</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>
 
 114                              <div class="views-count-post">{{question.view_count|cnprog_intword|safe}}</div>
 
 119                 <div class="bookQuestionItem">
 
 121                         <a title="{{question.summary|collapse}}" href="{% url questions %}{{question.id}}/{{question.title}}">{{question.title}}</a>
 
 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>
 
 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>
 
 142                             {% cnprog_paginator context %}
 
 145                         <div class="bookFeed">
 
 147                                 <a href="{% media  "/feeds/rss" %} " title="{% trans "subscribe to book RSS feed" %}">{% trans "subscribe to the questions feed" %}</a>
 
 152 <!-- end template book.html -->