Merge branch 'main' into admin-roles
This commit is contained in:
commit
58e8c0b5ec
40 changed files with 644 additions and 61 deletions
|
@ -28,7 +28,7 @@
|
|||
<meta itemprop="name" content="{{ author.name }}">
|
||||
|
||||
{% firstof author.aliases author.born author.died as details %}
|
||||
{% firstof author.wikipedia_link author.openlibrary_key author.inventaire_id author.isni as links %}
|
||||
{% firstof author.wikipedia_link author.openlibrary_key author.inventaire_id author.isni author.isfdb as links %}
|
||||
{% if details or links %}
|
||||
<div class="column is-3">
|
||||
{% if details %}
|
||||
|
@ -81,6 +81,14 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if author.isfdb %}
|
||||
<div class="mt-1">
|
||||
<a itemprop="sameAs" href="{{ author.isfdb_link }}" rel="nofollow noopener noreferrer" target="_blank">
|
||||
{% trans "View on ISFDB" %}
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% trans "Load data" as button_text %}
|
||||
{% if author.openlibrary_key %}
|
||||
<div class="mt-1 is-flex">
|
||||
|
@ -128,6 +136,14 @@
|
|||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if author.isfdb %}
|
||||
<div>
|
||||
<a itemprop="sameAs" href="https://www.isfdb.org/cgi-bin/ea.cgi?{{ author.isfdb }}" target="_blank" rel="nofollow noopener noreferrer">
|
||||
{% trans "View ISFDB entry" %}
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
|
|
@ -101,6 +101,13 @@
|
|||
{% include 'snippets/form_errors.html' with errors_list=form.goodreads_key.errors id="desc_goodreads_key" %}
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label class="label" for="id_isfdb">{% trans "ISFDB:" %}</label>
|
||||
{{ form.isfdb }}
|
||||
|
||||
{% include 'snippets/form_errors.html' with errors_list=form.isfdb.errors id="desc_isfdb" %}
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label class="label" for="id_isni">{% trans "ISNI:" %}</label>
|
||||
{{ form.isni }}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<div class="block" itemscope itemtype="https://schema.org/Book">
|
||||
<div class="columns is-mobile">
|
||||
<div class="column">
|
||||
<h1 class="title" itemprop="name">
|
||||
<h1 class="title" itemprop="name" dir="auto">
|
||||
{{ book.title }}
|
||||
</h1>
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
|||
content="{{ book.subtitle | escape }}"
|
||||
>
|
||||
|
||||
<span class="has-text-weight-bold">
|
||||
<span class="has-text-weight-bold" dir="auto">
|
||||
{{ book.subtitle }}
|
||||
</span>
|
||||
{% endif %}
|
||||
|
@ -52,7 +52,7 @@
|
|||
{% endif %}
|
||||
|
||||
{% if book.authors.exists %}
|
||||
<div class="subtitle">
|
||||
<div class="subtitle" dir="auto">
|
||||
{% trans "by" %} {% include 'snippets/authors.html' with book=book %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
@ -158,6 +158,13 @@
|
|||
{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if book.isfdb %}
|
||||
<p>
|
||||
<a href="{{ book.isfdb_link }}" target="_blank" rel="nofollow noopener noreferrer">
|
||||
{% trans "View on ISFDB" %}
|
||||
</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
</section>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% spaceless %}
|
||||
{% load i18n %}
|
||||
|
||||
{% if book.isbn_13 or book.oclc_number or book.asin %}
|
||||
{% if book.isbn_13 or book.oclc_number or book.asin or book.aasin or book.isfdb %}
|
||||
<dl>
|
||||
{% if book.isbn_13 %}
|
||||
<div class="is-flex">
|
||||
|
@ -23,6 +23,27 @@
|
|||
<dd>{{ book.asin }}</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if book.aasin %}
|
||||
<div class="is-flex">
|
||||
<dt class="mr-1">{% trans "Audible ASIN:" %}</dt>
|
||||
<dd>{{ book.aasin }}</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if book.isfdb %}
|
||||
<div class="is-flex">
|
||||
<dt class="mr-1">{% trans "ISFDB ID:" %}</dt>
|
||||
<dd>{{ book.isfdb }}</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if book.goodreads_key %}
|
||||
<div class="is-flex">
|
||||
<dt class="mr-1">{% trans "Goodreads:" %}</dt>
|
||||
<dd>{{ book.goodreads_key }}</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
</dl>
|
||||
{% endif %}
|
||||
{% endspaceless %}
|
||||
|
|
|
@ -65,17 +65,17 @@
|
|||
<input type="hidden" name="author-match-count" value="{{ author_matches|length }}">
|
||||
<div class="column is-half">
|
||||
{% for author in author_matches %}
|
||||
<fieldset>
|
||||
<fieldset class="block">
|
||||
<legend class="title is-5 mb-1">
|
||||
{% blocktrans with name=author.name %}Is "{{ name }}" one of these authors?{% endblocktrans %}
|
||||
</legend>
|
||||
{% with forloop.counter0 as counter %}
|
||||
{% for match in author.matches %}
|
||||
<label class="label">
|
||||
<label class="label mb-0">
|
||||
<input type="radio" name="author_match-{{ counter }}" value="{{ match.id }}" required>
|
||||
{{ match.name }}
|
||||
</label>
|
||||
<p class="help ml-5 mb-2">
|
||||
<p class="help ml-5 mb-0 mt-0">
|
||||
{% with book_title=match.book_set.first.title alt_title=match.bio %}
|
||||
{% if book_title %}
|
||||
<a href="{{ match.local_path }}" target="_blank" rel="nofollow noopener noreferrer">{% blocktrans trimmed %}
|
||||
|
@ -98,6 +98,9 @@
|
|||
</label>
|
||||
{% endwith %}
|
||||
</fieldset>
|
||||
{% if not forloop.last %}
|
||||
<hr aria-hidden="true">
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
|
|
|
@ -327,6 +327,15 @@
|
|||
{% include 'snippets/form_errors.html' with errors_list=form.inventaire_id.errors id="desc_inventaire_id" %}
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label class="label" for="id_goodreads_key">
|
||||
{% trans "Goodreads key:" %}
|
||||
</label>
|
||||
{{ form.goodreads_key }}
|
||||
|
||||
{% include 'snippets/form_errors.html' with errors_list=form.goodreads_key.errors id="desc_goodreads_key" %}
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label class="label" for="id_oclc_number">
|
||||
{% trans "OCLC Number:" %}
|
||||
|
@ -344,6 +353,24 @@
|
|||
|
||||
{% include 'snippets/form_errors.html' with errors_list=form.ASIN.errors id="desc_ASIN" %}
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label class="label" for="id_aasin">
|
||||
{% trans "Audible ASIN:" %}
|
||||
</label>
|
||||
{{ form.aasin }}
|
||||
|
||||
{% include 'snippets/form_errors.html' with errors_list=form.AASIN.errors id="desc_AASIN" %}
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label class="label" for="id_isfdb">
|
||||
{% trans "ISFDB ID:" %}
|
||||
</label>
|
||||
{{ form.isfdb }}
|
||||
|
||||
{% include 'snippets/form_errors.html' with errors_list=form.isfdb.errors id="desc_isfdb" %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
|
12
bookwyrm/templates/email/test/html_content.html
Normal file
12
bookwyrm/templates/email/test/html_content.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
{% extends 'email/html_layout.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<p>
|
||||
{% blocktrans trimmed %}
|
||||
This is a test email.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
|
||||
|
||||
{% endblock %}
|
4
bookwyrm/templates/email/test/subject.html
Normal file
4
bookwyrm/templates/email/test/subject.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
{% load i18n %}
|
||||
{% blocktrans trimmed %}
|
||||
Test email
|
||||
{% endblocktrans %}
|
9
bookwyrm/templates/email/test/text_content.html
Normal file
9
bookwyrm/templates/email/test/text_content.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
{% extends 'email/text_layout.html' %}
|
||||
{% load i18n %}
|
||||
{% block content %}
|
||||
{% blocktrans trimmed %}
|
||||
This is a test email.
|
||||
{% endblocktrans %}
|
||||
|
||||
|
||||
{% endblock %}
|
|
@ -13,6 +13,7 @@
|
|||
<link rel="search" type="application/opensearchdescription+xml" href="{% url 'opensearch' %}" title="{% blocktrans with site_name=site.name %}{{ site_name }} search{% endblocktrans %}" />
|
||||
|
||||
<link rel="shortcut icon" type="image/x-icon" href="{% if site.favicon %}{% get_media_prefix %}{{ site.favicon }}{% else %}{% static "images/favicon.ico" %}{% endif %}">
|
||||
<link rel="apple-touch-icon" href="{% if site.logo %}{{ media_full_url }}{{ site.logo }}{% else %}{% static "images/logo.png" %}{% endif %}">
|
||||
|
||||
{% if preview_images_enabled is True %}
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
|
|
96
bookwyrm/templates/settings/email_config.html
Normal file
96
bookwyrm/templates/settings/email_config.html
Normal file
|
@ -0,0 +1,96 @@
|
|||
{% extends 'settings/layout.html' %}
|
||||
{% load humanize %}
|
||||
{% load i18n %}
|
||||
{% load celery_tags %}
|
||||
|
||||
{% block title %}{% trans "Email Configuration" %}{% endblock %}
|
||||
|
||||
{% block header %}{% trans "Email Configuration" %}{% endblock %}
|
||||
|
||||
{% block panel %}
|
||||
|
||||
{% if error %}
|
||||
<div class="notification is-danger is-light">
|
||||
<span class="icon icon-x" aria-hidden="true"></span>
|
||||
<span>
|
||||
{% trans "Error sending test email:" %}
|
||||
{{ error }}
|
||||
</span>
|
||||
</div>
|
||||
{% elif success %}
|
||||
<div class="notification is-success is-light">
|
||||
<span class="icon icon-check" aria-hidden="true"></span>
|
||||
<span>
|
||||
{% trans "Successfully sent test email." %}
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<section class="block content">
|
||||
<dl>
|
||||
<dt class="is-pulled-left mr-5 has-text-weight-bold">
|
||||
{% trans "Email sender:" %}
|
||||
</dt>
|
||||
<dd>
|
||||
{{ email_sender }}
|
||||
</dd>
|
||||
|
||||
<dt class="is-pulled-left mr-5 has-text-weight-bold">
|
||||
{% trans "Email backend:" %}
|
||||
</dt>
|
||||
<dd>
|
||||
<code>{{ email_backend }}</code>
|
||||
</dd>
|
||||
|
||||
<dt class="is-pulled-left mr-5 has-text-weight-bold">
|
||||
{% trans "Host:" %}
|
||||
</dt>
|
||||
<dd>
|
||||
<code>{{ email_host }}</code>
|
||||
</dd>
|
||||
|
||||
<dt class="is-pulled-left mr-5 has-text-weight-bold">
|
||||
{% trans "Host user:" %}
|
||||
</dt>
|
||||
<dd>
|
||||
<code>{% firstof email_host_user "-" %}</code>
|
||||
</dd>
|
||||
|
||||
<dt class="is-pulled-left mr-5 has-text-weight-bold">
|
||||
{% trans "Port:" %}
|
||||
</dt>
|
||||
<dd>
|
||||
<code>{{ email_port }}</code>
|
||||
</dd>
|
||||
|
||||
<dt class="is-pulled-left mr-5 has-text-weight-bold">
|
||||
{% trans "Use TLS:" %}
|
||||
</dt>
|
||||
<dd>
|
||||
{{ email_use_tls|yesno }}
|
||||
</dd>
|
||||
|
||||
<dt class="is-pulled-left mr-5 has-text-weight-bold">
|
||||
{% trans "Use SSL:" %}
|
||||
</dt>
|
||||
<dd>
|
||||
{{ email_use_ssl|yesno }}
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section class="block content box">
|
||||
<p>
|
||||
{% blocktrans trimmed with email=request.user.email %}
|
||||
Send test email to {{ email }}
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
<form action="{% url 'settings-email-config' %}" method="post">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="button is-success">
|
||||
{% trans "Send test email" %}
|
||||
</button>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
{% endblock %}
|
||||
|
|
@ -81,12 +81,14 @@
|
|||
{% url 'settings-imports' as url %}
|
||||
<a href="{{ url }}"{% if url in request.path %} class="is-active" aria-selected="true"{% endif %}>{% trans "Imports" %}</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="menu-list">
|
||||
<li>
|
||||
{% url 'settings-celery' as url %}
|
||||
<a href="{{ url }}"{% if url in request.path %} class="is-active" aria-selected="true"{% endif %}>{% trans "Celery status" %}</a>
|
||||
</li>
|
||||
<li>
|
||||
{% url 'settings-email-config' as url %}
|
||||
<a href="{{ url }}"{% if url in request.path %} class="is-active" aria-selected="true"{% endif %}>{% trans "Email Configuration" %}</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if perms.bookwyrm.edit_instance_settings %}
|
||||
|
|
|
@ -66,6 +66,10 @@
|
|||
<li{% if url == request.path or url == request.path|add:'/' %} class="is-active"{% endif %}>
|
||||
<a href="{{ url }}">{% trans "Activity" %}</a>
|
||||
</li>
|
||||
{% url 'user-reviews-comments' user|username as url %}
|
||||
<li{% if url == request.path or url == request.path|add:'/' %} class="is-active"{% endif %}>
|
||||
<a href="{{ url }}">{% trans "Reviews and Comments" %}</a>
|
||||
</li>
|
||||
{% if is_self or user.goal.exists %}
|
||||
{% now 'Y' as year %}
|
||||
{% url 'user-goal' user|username year as url %}
|
||||
|
|
30
bookwyrm/templates/user/reviews_comments.html
Normal file
30
bookwyrm/templates/user/reviews_comments.html
Normal file
|
@ -0,0 +1,30 @@
|
|||
{% extends 'user/layout.html' %}
|
||||
{% load i18n %}
|
||||
{% load utilities %}
|
||||
|
||||
{% block title %}{{ user.display_name }}{% endblock %}
|
||||
|
||||
{% block header %}
|
||||
<div class="columns is-mobile">
|
||||
<div class="column">
|
||||
<h1 class="title">{% trans "Reviews and Comments" %}</h1>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block panel %}
|
||||
<div>
|
||||
{% for activity in activities %}
|
||||
<div class="block" id="feed_{{ activity.id }}">
|
||||
{% include 'snippets/status/status.html' with status=activity %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% if not activities %}
|
||||
<div class="block">
|
||||
<p>{% trans "No reviews or comments yet!" %}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% include 'snippets/pagination.html' with page=activities path=path %}
|
||||
</div>
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue