Adds quotes

This commit is contained in:
Mouse Reeve
2020-04-08 09:40:47 -07:00
parent 5b7f29c45b
commit a88cf2b6dd
16 changed files with 190 additions and 7 deletions

View File

@ -15,8 +15,8 @@ a <a href="/book/{{ book.fedireads_key }}">{{ book.title }}</a>
<div class="tab" data-id="tab-comment-{{ book.id }}" data-category="tab-option-{{ book.id }}">
<a href="{{ book.absolute_id }}/comment" onclick="tabChange(event)">Comment</a>
</div>
<div class="tab" data-id="tab-quote-{{ book.id }}" data-category="tab-option-{{ book.id }}">
Quote
<div class="tab" data-id="tab-quotation-{{ book.id }}" data-category="tab-option-{{ book.id }}">
<a href="{{ book.absolute_id }}/quotation" onclick="tabChange(event)">Quote</a>
</div>
</div>
@ -38,4 +38,11 @@ a <a href="/book/{{ book.fedireads_key }}">{{ book.title }}</a>
{{ comment_form.as_p }}
<button type="submit">post comment</button>
</form>
<form class="hidden tab-option-{{ book.id }} review-form quote-form" name="quotation" action="/quotate/" method="post" id="tab-quotation-{{ book.id }}">
{% csrf_token %}
<input type="hidden" name="book" value="{{ book.fedireads_key }}"></input>
{{ quotation_form.as_p }}
<button typr="submit">post quote</button>
</form>
</div>

View File

@ -40,6 +40,16 @@
</h3>
{% endif %}
{% if status.quote %}
<div class="quote">
<span class="icon icon-quote-open"></span>
<blockquote>{{ status.quote }}</blockquote>
<span class="icon icon-quote-close"></span>
<p> &mdash; {% include 'snippets/book_titleby.html' with book=status.book %}</p>
</div>
{% endif %}
{% if status.content and status.status_type != 'Update' and status.status_type != 'Boost' %}
<blockquote>{{ status.content | safe }}</blockquote>
{% endif %}

View File

@ -11,6 +11,8 @@
reviewed <a href="{{ status.book.absolute_id }}">{{ status.book.title }}</a>
{% elif status.status_type == 'Comment' %}
commented on <a href="{{ status.book.absolute_id }}">{{ status.book.title }}</a>
{% elif status.status_type == 'Quotation' %}
quoted <a href="{{ status.book.absolute_id }}">{{ status.book.title }}</a>
{% elif status.status_type == 'Boost' %}
boosted
{% elif status.reply_parent %}