Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3068f44563 | |||
| c4dd18a2e4 | |||
| d0ac21e7dd | |||
| b4a505c20b |
+17
-20
@@ -3157,6 +3157,7 @@ def library_loans_admin():
|
||||
'damage_text': (damage_reports[0].get('description', '') if damage_reports else ''),
|
||||
'available': bool(item_doc.get('Verfuegbar', False)),
|
||||
'last_updated': fmt_dt(item_doc.get('LastUpdated')),
|
||||
'acquisition_costs': fmt_money(item_doc.get('Anschaffungskosten'))
|
||||
})
|
||||
|
||||
return render_template(
|
||||
@@ -3605,27 +3606,23 @@ def api_item_detail(item_id):
|
||||
borrows_html = ''
|
||||
if borrow_records:
|
||||
rows = []
|
||||
count = 1
|
||||
|
||||
for rec in borrow_records:
|
||||
while count < 3:
|
||||
user_raw = rec.get('User')
|
||||
try:
|
||||
user = decrypt_text(user_raw) if user_raw is not None else ''
|
||||
except Exception:
|
||||
user = user_raw
|
||||
status = rec.get('Status', '')
|
||||
start = fmt_dt(rec.get('Start'))
|
||||
end = fmt_dt(rec.get('End'))
|
||||
notes = html.escape(str(rec.get('Notes') or ''))
|
||||
|
||||
rows.append(
|
||||
f"<li><strong>{html.escape(str(user or '-'))}</strong> — "
|
||||
f"{html.escape(str(status))} — "
|
||||
f"{html.escape(str(start))} → {html.escape(str(end))}"
|
||||
f"{(' — ' + notes) if notes else ''}</li>"
|
||||
)
|
||||
count += 1
|
||||
for rec in borrow_records[:3]:
|
||||
user_raw = rec.get('User')
|
||||
try:
|
||||
user = decrypt_text(user_raw) if user_raw is not None else ''
|
||||
except Exception:
|
||||
user = user_raw
|
||||
status = rec.get('Status', '')
|
||||
start = fmt_dt(rec.get('Start'))
|
||||
end = fmt_dt(rec.get('End'))
|
||||
notes = html.escape(str(rec.get('Notes') or ''))
|
||||
rows.append(
|
||||
f"<li><strong>{html.escape(str(user or '-'))}</strong> — "
|
||||
f"{html.escape(str(status))} — "
|
||||
f"{html.escape(str(start))} → {html.escape(str(end))}"
|
||||
f"{(' — ' + notes) if notes else ''}</li>"
|
||||
)
|
||||
borrows_html = f"<h3>Ausleihhistorie</h3><ul>{''.join(rows)}</ul>"
|
||||
|
||||
detail_html = f"""
|
||||
|
||||
@@ -530,6 +530,8 @@
|
||||
const itemCode = row.dataset.itemCode || '';
|
||||
const itemCost = row.dataset.itemCost || '';
|
||||
|
||||
document.getElementById("damage-invoice-amount").value = "{{ item.acquisition_costs }}";
|
||||
|
||||
damageInvoiceForm.action = "{{ url_for('admin_create_invoice', borrow_id='__BORROW_ID__') }}".replace('__BORROW_ID__', borrowId);
|
||||
damageInvoiceItem.value = itemName;
|
||||
damageInvoiceBorrower.value = borrower;
|
||||
|
||||
@@ -1416,8 +1416,8 @@
|
||||
<div>
|
||||
<label for="editLibraryType">Medientyp</label>
|
||||
<select id="editLibraryType" style="width: 100%;">
|
||||
<option value="book">Buch</option>
|
||||
<option value="schoolbook">Schulbuch</option>
|
||||
<option value="Buch">Buch</option>
|
||||
<option value="Schulbuch">Schulbuch</option>
|
||||
<option value="cd">CD</option>
|
||||
<option value="dvd">DVD</option>
|
||||
<option value="other">Sonstige Medien</option>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
sudo find /tmp -maxdepth 1 -name "tmp.*" -exec rm -rf {} +
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
|
||||
cd "$SCRIPT_DIR"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user