forked from mirrors/bookwyrm
Moves meta tags out of p tags
I guess that's not kosher
This commit is contained in:
parent
428d87a351
commit
74d2cf646a
3 changed files with 16 additions and 16 deletions
|
@ -7,15 +7,16 @@
|
|||
{% firstof book.physical_format book.physical_format_detail as format_property %}
|
||||
{% with pages=book.pages %}
|
||||
{% if format or pages %}
|
||||
|
||||
{% if format_property %}
|
||||
<meta itemprop="bookFormat" content="{{ format_property }}">
|
||||
{% endif %}
|
||||
|
||||
{% if pages %}
|
||||
<meta itemprop="numberOfPages" content="{{ pages }}">
|
||||
{% endif %}
|
||||
|
||||
<p>
|
||||
{% if format_property %}
|
||||
<meta itemprop="bookFormat" content="{{ format_property }}">
|
||||
{% endif %}
|
||||
|
||||
{% if pages %}
|
||||
<meta itemprop="numberOfPages" content="{{ pages }}">
|
||||
{% endif %}
|
||||
|
||||
{% if format and not pages %}
|
||||
{% blocktrans %}{{ format }}{% endblocktrans %}
|
||||
{% elif format and pages %}
|
||||
|
@ -41,13 +42,13 @@
|
|||
|
||||
{% with date=book.published_date|naturalday publisher=book.publishers|join:', ' %}
|
||||
{% if date or book.first_published_date or book.publishers %}
|
||||
<p>
|
||||
{% if date or book.first_published_date %}
|
||||
{% if date or book.first_published_date %}
|
||||
<meta
|
||||
itemprop="datePublished"
|
||||
content="{{ book.first_published_date|default:book.published_date|date:'Y-m-d' }}"
|
||||
>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<p>
|
||||
|
||||
{% comment %}
|
||||
@todo The publisher property needs to be an Organization or a Person. We’ll be using Thing which is the more generic ancestor.
|
||||
|
|
|
@ -47,7 +47,6 @@ class EditBookViews(TestCase):
|
|||
|
||||
models.SiteSettings.objects.create()
|
||||
|
||||
|
||||
def test_edit_book_page(self):
|
||||
"""there are so many views, this just makes sure it LOADS"""
|
||||
view = views.EditBook.as_view()
|
||||
|
|
|
@ -45,7 +45,7 @@ class BookViews(TestCase):
|
|||
is_api.return_value = False
|
||||
result = view(request, self.work.id)
|
||||
self.assertIsInstance(result, TemplateResponse)
|
||||
#validate_html(result.render())
|
||||
validate_html(result.render())
|
||||
self.assertEqual(result.status_code, 200)
|
||||
self.assertTrue("paperback" in result.context_data["formats"])
|
||||
|
||||
|
|
Loading…
Reference in a new issue