Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d0ac21e7dd | |||
| b4a505c20b |
+16
-20
@@ -3605,27 +3605,23 @@ def api_item_detail(item_id):
|
|||||||
borrows_html = ''
|
borrows_html = ''
|
||||||
if borrow_records:
|
if borrow_records:
|
||||||
rows = []
|
rows = []
|
||||||
count = 1
|
|
||||||
|
|
||||||
for rec in borrow_records:
|
for rec in borrow_records[:3]:
|
||||||
while count < 3:
|
user_raw = rec.get('User')
|
||||||
user_raw = rec.get('User')
|
try:
|
||||||
try:
|
user = decrypt_text(user_raw) if user_raw is not None else ''
|
||||||
user = decrypt_text(user_raw) if user_raw is not None else ''
|
except Exception:
|
||||||
except Exception:
|
user = user_raw
|
||||||
user = user_raw
|
status = rec.get('Status', '')
|
||||||
status = rec.get('Status', '')
|
start = fmt_dt(rec.get('Start'))
|
||||||
start = fmt_dt(rec.get('Start'))
|
end = fmt_dt(rec.get('End'))
|
||||||
end = fmt_dt(rec.get('End'))
|
notes = html.escape(str(rec.get('Notes') or ''))
|
||||||
notes = html.escape(str(rec.get('Notes') or ''))
|
rows.append(
|
||||||
|
f"<li><strong>{html.escape(str(user or '-'))}</strong> — "
|
||||||
rows.append(
|
f"{html.escape(str(status))} — "
|
||||||
f"<li><strong>{html.escape(str(user or '-'))}</strong> — "
|
f"{html.escape(str(start))} → {html.escape(str(end))}"
|
||||||
f"{html.escape(str(status))} — "
|
f"{(' — ' + notes) if notes else ''}</li>"
|
||||||
f"{html.escape(str(start))} → {html.escape(str(end))}"
|
)
|
||||||
f"{(' — ' + notes) if notes else ''}</li>"
|
|
||||||
)
|
|
||||||
count += 1
|
|
||||||
borrows_html = f"<h3>Ausleihhistorie</h3><ul>{''.join(rows)}</ul>"
|
borrows_html = f"<h3>Ausleihhistorie</h3><ul>{''.join(rows)}</ul>"
|
||||||
|
|
||||||
detail_html = f"""
|
detail_html = f"""
|
||||||
|
|||||||
@@ -1416,8 +1416,8 @@
|
|||||||
<div>
|
<div>
|
||||||
<label for="editLibraryType">Medientyp</label>
|
<label for="editLibraryType">Medientyp</label>
|
||||||
<select id="editLibraryType" style="width: 100%;">
|
<select id="editLibraryType" style="width: 100%;">
|
||||||
<option value="book">Buch</option>
|
<option value="Buch">Buch</option>
|
||||||
<option value="schoolbook">Schulbuch</option>
|
<option value="Schulbuch">Schulbuch</option>
|
||||||
<option value="cd">CD</option>
|
<option value="cd">CD</option>
|
||||||
<option value="dvd">DVD</option>
|
<option value="dvd">DVD</option>
|
||||||
<option value="other">Sonstige Medien</option>
|
<option value="other">Sonstige Medien</option>
|
||||||
|
|||||||
Reference in New Issue
Block a user