1
0
Fork 0

Merge branch 'main' into import-limit

This commit is contained in:
Mouse Reeve 2022-12-16 12:44:57 -08:00 committed by GitHub
commit d4351cfcb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
121 changed files with 5402 additions and 2951 deletions

View file

@ -0,0 +1,15 @@
{% extends 'about/layout.html' %}
{% load i18n %}
{% block title %}{% trans "Impressum" %}{% endblock %}
{% block about_content %}
<div class="block content">
<h2>{% trans "Impressum" %}</h2>
<div class="content">
{{ site.impressum | safe }}
</div>
</div>
{% endblock %}

View file

@ -47,6 +47,14 @@
{% trans "Privacy Policy" %}
</a>
</li>
{% if site.show_impressum %}
<li>
{% url 'impressum' as path %}
<a href="{{ path }}" {% if request.path in path %}class="is-active"{% endif %}>
{% trans "Impressum" %}
</a>
</li>
{% endif %}
</ul>
</nav>

View file

@ -53,7 +53,7 @@
{% trans "Share this page" %}
</span>
</summary>
<div class="columns mt-3">
<div class="columns">
<div class="column is-three-fifths is-offset-one-fifth">
{% if year_key %}
@ -123,16 +123,18 @@
</h2>
<p class="subtitle is-5">{% trans "Thats great!" %}</p>
<p class="title is-4 is-serif">
{% blocktrans with pages=pages_average|intcomma %}That makes an average of {{ pages }} pages per book.{% endblocktrans %}
</p>
{% if pages > 0 %}
<p class="title is-4 is-serif">
{% blocktrans with pages=pages_average|intcomma %}That makes an average of {{ pages }} pages per book.{% endblocktrans %}
</p>
{% endif %}
{% if no_page_number %}
<p class="subtitle is-6">
{% blocktrans trimmed count counter=no_page_number %}
({{ no_page_number }} book doesnt have pages)
(No page data was available for {{ no_page_number }} book)
{% plural %}
({{ no_page_number }} books dont have pages)
(No page data was available for {{ no_page_number }} books)
{% endblocktrans %}
</p>
{% endif %}

View file

@ -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 %}
@ -144,7 +160,7 @@
{% for book in books %}
{% with book=book|author_edition:author %}
<div class="column is-one-fifth-tablet is-half-mobile is-flex is-flex-direction-column">
<div class="is-flex-grow-1">
<div class="is-flex-grow-1 mb-3">
{% include 'landing/small-book.html' with book=book %}
</div>
{% include 'snippets/shelve_button/shelve_button.html' with book=book %}

View file

@ -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 }}

View file

@ -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 %}
@ -135,7 +135,7 @@
{% trans "View on OpenLibrary" %}
</a>
{% if request.user.is_authenticated and perms.bookwyrm.edit_book %}
<button class="button is-small" type="button" data-modal-open="openlibrary_sync">
<button class="button is-small button-paragraph" type="button" data-modal-open="openlibrary_sync">
<span class="icon icon-download" title="{{ button_text }}"></span>
<span class="is-sr-only-mobile">{{ button_text }}</span>
</button>
@ -150,7 +150,7 @@
</a>
{% if request.user.is_authenticated and perms.bookwyrm.edit_book %}
<button class="button is-small" type="button" data-modal-open="inventaire_sync">
<button class="button is-small button-paragraph" type="button" data-modal-open="inventaire_sync">
<span class="icon icon-download" title="{{ button_text }}"></span>
<span class="is-sr-only-mobile">{{ button_text }}</span>
</button>
@ -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>
@ -189,15 +196,15 @@
{% if user_authenticated and can_edit_book and not book|book_description %}
{% trans 'Add Description' as button_text %}
{% include 'snippets/toggle/open_button.html' with text=button_text controls_text="add_description" controls_uid=book.id focus="id_description" hide_active=True id="hide_description" %}
{% include 'snippets/toggle/open_button.html' with class="mb-2" text=button_text controls_text="add_description" controls_uid=book.id focus="id_description" hide_active=True id="hide_description" %}
<div class="box is-hidden" id="add_description_{{ book.id }}">
<form name="add-description" method="POST" action="{% url "add-description" book.id %}">
{% csrf_token %}
<p class="fields is-grouped">
<div class="field">
<label class="label" for="id_description_{{ book.id }}">{% trans "Description:" %}</label>
<textarea name="description" cols="None" rows="None" class="textarea" id="id_description_{{ book.id }}"></textarea>
</p>
</div>
<div class="field">
<button class="button is-primary" type="submit">{% trans "Save" %}</button>
{% trans "Cancel" as button_text %}
@ -231,7 +238,7 @@
{% for shelf in user_shelfbooks %}
<li class="box">
<a href="{{ shelf.shelf.local_path }}">{{ shelf.shelf.name }}</a>
<div class="mb-3">
<div class="is-pulled-right">
{% include 'snippets/shelf_selector.html' with shelf=shelf.shelf class="is-small" readthrough=readthrough %}
</div>
</li>

View file

@ -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 %}

View file

@ -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 %}

View file

@ -81,7 +81,7 @@
{% include 'snippets/form_errors.html' with errors_list=form.languages.errors id="desc_languages" %}
</div>
<div>
<div class="field">
<label class="label" for="id_add_subjects">
{% trans "Subjects:" %}
</label>
@ -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>

View 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 %}

View file

@ -0,0 +1,4 @@
{% load i18n %}
{% blocktrans trimmed %}
Test email
{% endblocktrans %}

View file

@ -0,0 +1,9 @@
{% extends 'email/text_layout.html' %}
{% load i18n %}
{% block content %}
{% blocktrans trimmed %}
This is a test email.
{% endblocktrans %}
{% endblock %}

View file

@ -2,7 +2,7 @@
{% load i18n %}
{% block filter %}
<label class="label mt-2 mb-1">Status types</label>
<label class="label mb-1">Status types</label>
<div class="is-flex is-flex-direction-row is-flex-direction-column-mobile">
{% for name, value in feed_status_types_options %}

View file

@ -73,7 +73,7 @@
{% if site.invite_request_question %}
<div class="block">
<label for="id_answer_register" class="label">{{ site.invite_question_text }}</label>
<input type="answer" name="answer" maxlength="50" class="input" required="true" id="id_answer_register" aria-describedby="desc_answer_register">
<input type="text" name="answer" maxlength="255" class="input" required="true" id="id_answer_register" aria-describedby="desc_answer_register">
{% include 'snippets/form_errors.html' with errors_list=request_form.answer.errors id="desc_answer_register" %}
</div>
{% endif %}

View file

@ -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">

View file

@ -12,12 +12,16 @@
</p>
</div>
<div class="column is-narrow is-flex">
<div class="column is-narrow is-flex field is-grouped">
{% if request.user == list.user %}
<div class="control">
{% trans "Edit List" as button_text %}
{% include 'snippets/toggle/open_button.html' with text=button_text icon_with_text="pencil" controls_text="edit_list" focus="edit_list_header" %}
</div>
{% endif %}
{% include "lists/bookmark_button.html" with list=list %}
<div class="control">
{% include "lists/bookmark_button.html" with list=list %}
</div>
</div>
</header>

View file

@ -51,7 +51,7 @@
{% endif %}
{% if not items.object_list.exists %}
<p>{% trans "This list is currently empty" %}</p>
<p class="block">{% trans "This list is currently empty." %}</p>
{% else %}
<ol start="{{ items.start_index }}" class="ordered-list">
{% for item in items %}

View file

@ -65,7 +65,7 @@
{# This happens if the list item was deleted #}
{% blocktrans trimmed %}
<a href="{{ related_user_link }}">{{ related_user }}</a>
added added a book to one of your lists
added a book to one of your lists
{% endblocktrans %}
{% elif related_list.curation != "curated" %}

View file

@ -44,7 +44,7 @@
{% csrf_token %}
<p>{% trans "Scan the QR code with your authentication app and then enter the code from your app below to confirm your app is set up." %}</p>
<div class="columns">
<section class="column is-narrow">
<section class="column">
<figure class="m-4" id="qrcode">{{ qrcode | safe }}</figure>
<details class="details-panel box">
<summary>

View file

@ -1,48 +1,46 @@
{% extends 'components/modal.html' %}
{% load i18n %}
{% block modal-title %}
{% blocktrans %}
Scan Barcode
{% endblocktrans %}
{% endblock %}
{% block modal-body %}
<div class="block">
<div id="barcode-scanner"></div>
</div>
<div id="barcode-camera-list" class="select is-small">
<select>
</select>
</div>
<div id="barcode-status" class="block">
<div class="grant-access is-hidden">
<span class="icon icon-lock"></span>
<span class="is-size-5">{% trans "Requesting camera..." %}</span><br/>
<span>{% trans "Grant access to the camera to scan a book's barcode." %}</span>
</div>
<div class="access-denied is-hidden">
<span class="icon icon-warning"></span>
<span class="is-size-5">Access denied</span><br/>
<span>{% trans "Could not access camera" %}</span>
</div>
<div class="scanning is-hidden">
<span class="icon icon-barcode"></span>
<span class="is-size-5">{% trans "Scanning..." context "barcode scanner" %}</span><br/>
<span>{% trans "Align your book's barcode with the camera." %}</span>
</div>
<div class="found is-hidden">
<span class="icon icon-check"></span>
<span class="is-size-5">{% trans "ISBN scanned" context "barcode scanner" %}</span><br/>
{% trans "Searching for book:" context "followed by ISBN" %} <span class="isbn"></span>...
</div>
</div>
{% endblock %}
{% block modal-footer %}
<button class="button" type="button" data-modal-close>{% trans "Cancel" %}</button>
{% endblock %}
{% extends 'components/modal.html' %}
{% load i18n %}
{% block modal-title %}
{% blocktrans %}
Scan Barcode
{% endblocktrans %}
{% endblock %}
{% block modal-body %}
<div class="block">
<div id="barcode-scanner"></div>
</div>
<div id="barcode-camera-list" class="select is-small">
<select>
</select>
</div>
<template id="barcode-grant-access">
<span class="icon icon-lock"></span>
<span class="is-size-5">{% trans "Requesting camera..." %}</span><br/>
<span>{% trans "Grant access to the camera to scan a book's barcode." %}</span>
</template>
<template id="barcode-access-denied">
<span class="icon icon-warning"></span>
<span class="is-size-5">Access denied</span><br/>
<span>{% trans "Could not access camera" %}</span>
</template>
<template id="barcode-scanning">
<span class="icon icon-barcode"></span>
<span class="is-size-5">{% trans "Scanning..." context "barcode scanner" %}</span><br/>
<span>{% trans "Align your book's barcode with the camera." %}</span>
</template>
<template id="barcode-found">
<span class="icon icon-check"></span>
<span class="is-size-5">{% trans "ISBN scanned" context "barcode scanner" %}</span><br/>
{% trans "Searching for book:" context "followed by ISBN" %} <span class="isbn"></span>...
</template>
<div id="barcode-status" class="block"></div>
{% endblock %}
{% block modal-footer %}
<button class="button" type="button" data-modal-close>{% trans "Cancel" %}</button>
{% endblock %}

View file

@ -58,7 +58,7 @@
<span class="details-close icon icon-x" aria-hidden="true"></span>
</summary>
<div class="mt-5">
<div>
<div class="is-flex is-flex-direction-row-reverse">
<ul class="is-flex-grow-1">
{% for result in result_set.results %}

View file

@ -145,7 +145,7 @@
<div class="block content">
<h2 class="title is-4">{% trans "Current Rules" %}</h2>
<details class="details-panel">
<details class="details-panel box">
<summary>
<span class="title is-5" role="heading" aria-level="3">
{% trans "Show rules" %} ({{ rules.count }})

View 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 %}

View file

@ -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 %}
@ -101,10 +103,21 @@
<a href="{{ url }}"{% if url in request.path %} class="is-active" aria-selected="true"{% endif %}>{% trans "Site Settings" %}</a>
{% block site-subtabs %}{% endblock %}
</li>
<li>
{% if perms.bookwyrm.manage_registration %}
{% url 'settings-registration' as url %}
<a href="{{ url }}"{% if url in request.path %} class="is-active" aria-selected="true"{% endif %}>{% trans "Registration" %}</a>
{% else %}
{% url 'settings-registration-limited' as url %}
<a href="{{ url }}"{% if url in request.path %} class="is-active" aria-selected="true"{% endif %}>{% trans "Registration" %}</a>
{% endif %}
</li>
{% if perms.bookwyrm.system_administration %}
<li>
{% url 'settings-themes' as url %}
<a href="{{ url }}"{% if url in request.path %} class="is-active" aria-selected="true"{% endif %}>{% trans "Themes" %}</a>
</li>
{% endif %}
</ul>
{% endif %}
</nav>

View file

@ -40,23 +40,23 @@
</h2>
</header>
<div class="column is-narrow">
<button type="button" class="button" data-modal-open="{{ domain_modal }}">
<button type="button" class="button is-small" data-modal-open="{{ domain_modal }}">
<span class="icon icon-pencil m-0-mobile" aria-hidden="treu"></span>
<span class="is-sr-only-mobile">{% trans "Set display name" %}</span>
</button>
</div>
</div>
<div class="block">
<details class="details-panel">
<details class="details-panel box">
<summary>
<span role="heading" aria-level="3" class="title is-6 mb-0">
<span role="heading" aria-level="3" class="title is-6">
{% trans "View links" %}
({{ domain.links.count }})
</span>
<span class="details-close icon icon-x" aria-hidden="true"></span>
</summary>
<div class="table-container mt-4">
<div class="table-container pt-0">
{% include "settings/link_domains/link_table.html" with links=domain.links.all|slice:10 %}
</div>
</details>

View file

@ -0,0 +1,83 @@
{% extends 'settings/layout.html' %}
{% load i18n %}
{% block title %}{% trans "Registration" %}{% endblock %}
{% block header %}{% trans "Registration" %}{% endblock %}
{% block panel %}
{% if success %}
<div class="notification is-success is-light">
<span class="icon icon-check" aria-hidden="true"></span>
<span>
{% trans "Settings saved" %}
</span>
</div>
{% endif %}
{% if form.errors %}
<div class="notification is-danger is-light">
<span class="icon icon-x" aria-hidden="true"></span>
<span>
{% trans "Unable to save settings" %}
</span>
</div>
{% endif %}
<form
action="{% url 'settings-registration' %}"
method="POST"
class="content"
enctype="multipart/form-data"
>
{% csrf_token %}
<section class="block box" id="registration">
<div class="field">
<label class="label" for="id_allow_registration">
{{ form.allow_registration }}
{% trans "Allow registration" %}
</label>
</div>
<div class="field">
<label class="label mb-0" for="id_require_confirm_email">
{{ form.require_confirm_email }}
{% trans "Require users to confirm email address" %}
</label>
<p class="help" id="desc_require_confirm_email">{% trans "(Recommended if registration is open)" %}</p>
</div>
<div class="field">
<label class="label" for="id_allow_invite_requests">
{{ form.allow_invite_requests }}
{% trans "Allow invite requests" %}
</label>
</div>
<div class="field">
<label class="label" for="id_invite_request_text">{% trans "Invite request text:" %}</label>
{{ form.invite_request_text }}
{% include 'snippets/form_errors.html' with errors_list=form.invite_request_text.errors id="desc_invite_request_text" %}
</div>
<div class="field">
<label class="label" for="id_invite_requests_question">
{{ form.invite_request_question }}
{% trans "Set a question for invite requests" %}
</label>
</div>
<div class="field">
<label class="label" for="id_invite_question_text">
{% trans "Question:" %}
{{ form.invite_question_text }}
</label>
</div>
<div class="field">
<label class="label" for="id_registration_closed_text">{% trans "Registration closed text:" %}</label>
{{ form.registration_closed_text }}
</div>
</section>
<footer class="block">
<button class="button is-primary" type="submit">{% trans "Save" %}</button>
</footer>
</form>
{% endblock %}

View file

@ -0,0 +1,81 @@
{% extends 'settings/layout.html' %}
{% load i18n %}
{% block title %}{% trans "Registration" %}{% endblock %}
{% block header %}{% trans "Registration" %}{% endblock %}
{% block panel %}
{% if success %}
<div class="notification is-success is-light">
<span class="icon icon-check" aria-hidden="true"></span>
<span>
{% trans "Settings saved" %}
</span>
</div>
{% endif %}
{% if form.errors %}
<div class="notification is-danger is-light">
<span class="icon icon-x" aria-hidden="true"></span>
<span>
{% trans "Unable to save settings" %}
</span>
</div>
{% endif %}
{% if site.allow_registration %}
<div class="notification">
{% trans "Registration is enabled on this instance" %}
</div>
{% else %}
<form
action="{% url 'settings-registration-limited' %}"
method="POST"
class="content"
enctype="multipart/form-data"
>
{% csrf_token %}
<section class="block box" id="registration">
{% if site.allow_invite_requests %}
<div class="field">
<label class="label" for="id_invite_request_text">{% trans "Invite request text:" %}</label>
{{ form.invite_request_text }}
{% include 'snippets/form_errors.html' with errors_list=form.invite_request_text.errors id="desc_invite_request_text" %}
</div>
<div class="field">
<label class="label" for="id_invite_requests_question">
{{ form.invite_request_question }}
{% trans "Set a question for invite requests" %}
</label>
</div>
<div class="field">
<label class="label" for="id_invite_question_text">
{% trans "Question:" %}
{{ form.invite_question_text }}
</label>
</div>
{% else %}
<input type="hidden" name="invite_request_text" value="{{ form.invite_request_text.value }}">
<input type="hidden" name="invite_request_question" value="{{ form.invite_request_question.value }}">
<input type="hidden" name="invite_question_text" value="{{ form.invite_question_text.value }}">
{% endif %}
{% if not site.allow_invite_requests and not site.allow_registration %}
<div class="field">
<label class="label" for="id_registration_closed_text">{% trans "Registration closed text:" %}</label>
{{ form.registration_closed_text }}
</div>
{% else %}
<input type="hidden" name="registration_closed_text" value="{{ form.registration_closed_text.value }}">
{% endif %}
</section>
<footer class="block">
<button class="button is-primary" type="submit">{% trans "Save" %}</button>
</footer>
</form>
{% endif %}
{% endblock %}

View file

@ -10,7 +10,6 @@
<li><a href="#instance-info">{% trans "Instance Info" %}</a></li>
<li><a href="#display">{% trans "Display" %}</a></li>
<li><a href="#footer">{% trans "Footer Content" %}</a></li>
<li><a href="#registration">{% trans "Registration" %}</a></li>
</ul>
{% endblock %}
@ -68,6 +67,19 @@
<label class="label" for="id_privacy_policy">{% trans "Privacy Policy:" %}</label>
{{ site_form.privacy_policy }}
</div>
<div class="field">
<label class="label" for="id_impressum">{% trans "Impressum:" %}</label>
{{ site_form.impressum }}
</div>
<div class="field is-horizontal">
<div class="field mr-2">
<label class="label" for="id_show_impressum">{% trans "Include impressum:" %}</label>
</div>
<div class="control">
{{ site_form.show_impressum }}
</div>
</div>
</div>
</section>
@ -128,55 +140,6 @@
</div>
</section>
<hr aria-hidden="true">
<section class="block" id="registration">
<h2 class="title is-4">{% trans "Registration" %}</h2>
<div class="box">
<div class="field">
<label class="label" for="id_allow_registration">
{{ site_form.allow_registration }}
{% trans "Allow registration" %}
</label>
</div>
<div class="field">
<label class="label mb-0" for="id_require_confirm_email">
{{ site_form.require_confirm_email }}
{% trans "Require users to confirm email address" %}
</label>
<p class="help" id="desc_require_confirm_email">{% trans "(Recommended if registration is open)" %}</p>
</div>
<div class="field">
<label class="label" for="id_allow_invite_requests">
{{ site_form.allow_invite_requests }}
{% trans "Allow invite requests" %}
</label>
</div>
<div class="field">
<label class="label" for="id_invite_requests_question">
{{ site_form.invite_request_question }}
{% trans "Set a question for invite requests" %}
</label>
</div>
<div class="field">
<label class="label" for="id_invite_question_text">
{% trans "Question:" %}
{{ site_form.invite_question_text }}
</label>
</div>
<div class="field">
<label class="label" for="id_registration_closed_text">{% trans "Registration closed text:" %}</label>
{{ site_form.registration_closed_text }}
</div>
<div class="field">
<label class="label" for="id_invite_request_text">{% trans "Invite request text:" %}</label>
{{ site_form.invite_request_text }}
{% include 'snippets/form_errors.html' with errors_list=site_form.invite_request_text.errors id="desc_invite_request_text" %}
</div>
</div>
</section>
<footer class="block">
<button class="button is-primary" type="submit">{% trans "Save" %}</button>
</footer>

View file

@ -10,7 +10,7 @@
{% csrf_token %}
<p>
{% blocktrans trimmed with username=user.localname %}
Are you sure you want to delete <strong>{{ username}}</strong>'s account? This action cannot be undone. To proceed, please enter your password to confirm deletion.
Are you sure you want to delete <strong>{{username}}</strong>'s account? This action cannot be undone. To proceed, please enter your password to confirm deletion.
{% endblocktrans %}
</p>
<div class="field">

View file

@ -134,7 +134,7 @@
{% endif %}
</div>
<div class="block">
<div class="block mt-2">
{% include 'shelf/edit_shelf_form.html' with controls_text="edit_shelf_form" %}
</div>

View file

@ -25,7 +25,7 @@
<span class="details-close icon icon-x is-{{ size|default:'normal' }}" aria-hidden="true"></span>
</summary>
<div class="mt-3">
<div>
<form id="filters" method="{{ method|default:'get' }}" action="{{ action|default:request.path }}">
{% if method == 'post' %}
{% csrf_token %}
@ -34,7 +34,7 @@
{% if sort %}
<input type="hidden" name="sort" value="{{ sort }}">
{% endif %}
<div class="mt-3 columns filters-fields is-align-items-stretch">
<div class="columns filters-fields is-align-items-stretch">
{% block filter_fields %}
{% endblock %}
</div>

View file

@ -29,6 +29,11 @@
<p>
<a href ="{% url 'privacy' %}">{% trans "Privacy Policy" %}</a>
</p>
{% if site.show_impressum %}
<p>
<a href ="{% url 'impressum' %}">{% trans "Impressum" %}</a>
</p>
{% endif %}
</div>
<div class="column content">
{% if site.support_link %}

View file

@ -58,6 +58,8 @@
</div>
</div>
<input type="hidden" name="preferred_timezone" />
<div class="field">
<div class="control">
<button class="button is-primary" type="submit">

View file

@ -32,7 +32,7 @@
<div class="card-footer-item">
{% trans "Reply" as button_text %}
{% include 'snippets/toggle/toggle_button.html' with controls_text="show_comment" controls_uid=status.id text=button_text icon_with_text="comment" class="is-small is-light toggle-button" focus="id_content_reply" %}
{% include 'snippets/toggle/toggle_button.html' with controls_text="show_comment" controls_uid=status.id text=button_text icon_with_text="comment" class="is-small is-light is-transparent toggle-button" focus="id_content_reply" %}
</div>
<div class="card-footer-item">
{% include 'snippets/boost_button.html' with status=status %}
@ -42,7 +42,7 @@
</div>
{% if not moderation_mode %}
<div class="card-footer-item">
{% include 'snippets/status/status_options.html' with class="is-small is-light" right=True %}
{% include 'snippets/status/status_options.html' with class="is-small is-light is-transparent" right=True %}
</div>
{% endif %}

View file

@ -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 %}

View 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 %}