Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Community Batch Imports: add links between "Pending Imports" and "New Imports" pages for easier navigation. #10285

Merged
merged 6 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions openlibrary/i18n/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ msgstr ""
msgid "Batch Imports"
msgstr ""

#: BatchImportNavigation.html batch_import.html
msgid "New Batch Import"
msgstr ""

#: batch_import.html
msgid ""
"Attach a JSONL formatted document with import records or copy/paste the "
Expand Down Expand Up @@ -7171,6 +7175,10 @@ msgid ""
"class=\"nostyle\" href=\"/help/faq/about#selling\">small commission</a>."
msgstr ""

#: BatchImportNavigation.html
msgid "Pending Imports"
msgstr ""

#: BookByline.html
#, python-format
msgid "%(n)s other"
Expand Down
10 changes: 10 additions & 0 deletions openlibrary/macros/BatchImportNavigation.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
$def with ()

<ul class="nav-bar">
<li class="$('selected' if ctx.path == '/import/batch/new' else '')">
<a data-ol-link-track="BatchImportNav|NewBatch" href="/import/batch/new">$_("New Batch Import")</a>
</li>
<li class="$('selected' if ctx.path == '/import/batch/pending' else '')">
<a data-ol-link-track="BatchImportNav|Pending" href="/import/batch/pending">$_("Pending Imports")</a>
</li>
</ul>
3 changes: 2 additions & 1 deletion openlibrary/templates/batch_import.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
$var title: $_("Batch Imports")

<div id="contentHead">
<h1>$_("Batch Imports")</h1>
<h1>$_("New Batch Import")</h1>
</div>
<div id="contentBody" class="batchImport">
$:macros.BatchImportNavigation()
<p>$_('Attach a JSONL formatted document with import records or copy/paste the JSONL text into the textarea.')</p>
<p>$:_('See the <a href=\"https://github.com/internetarchive/openlibrary-client/tree/master/olclient/schemata\">olclient import schemata</a> for more.')</p>
<form method="POST" enctype="multipart/form-data" action="">
Expand Down
1 change: 1 addition & 0 deletions openlibrary/templates/batch_import_pending_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<h1>$_("Pending Batch Imports")</h1>
</div>
<div id="contentBody" class="batchImportPendingStatus">
$:macros.BatchImportNavigation()
<table class="changeHistory">
<thead>
<tr>
Expand Down
Loading