Skip to content

Commit

Permalink
Show language for entries and relations in the admin search UI.
Browse files Browse the repository at this point in the history
  • Loading branch information
knadh committed Dec 18, 2021
1 parent 668a687 commit 232be45
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion admin/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@ <h3><span x-text="total"></span> results for &ldquo;<span x-text="query"></span>

<h3 class="heading">
<a x-bind:href="makeURL({id: e.id})" @click.prevent="onEditEntry(e)" x-text="e.content"></a>
<sup class="lang" x-text="config.languages[e.lang].name"></sup>
</h3>
<div class="phones"><span class="pronun" x-text="e.phones.join(', ')"></span></div>

<ol class="relations">
<template x-for="(r, n) in e.relations" :key="r.id">
<li class="rel" :class="{ highlight: order[e.id] && order[e.id].changedRels[r.id] }">
<p><span class="types" x-text="r.relation.types"></span> <span x-text="r.content" class="content"></span></p>
<p>
<span class="types" x-text="r.relation.types"></span> <span x-text="r.content" class="content"></span>
<sup class="lang" x-text="config.languages[r.lang].name"></sup>
</p>
<p class="actions">
<a href="#" @click.prevent="onDetatchRelation(e.id, r.id)">Detatch</a>
<a x-bind:href="`${_urls.admin}/entries/${r.id}?parent=${e.id}`" @click.prevent="onEditRelation(r, e)">Edit relation</a>
Expand Down
6 changes: 6 additions & 0 deletions admin/static/style.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
:root {
--primary: #00aa44;
--secondary: #333;
--light: #999;
}

* {
Expand Down Expand Up @@ -224,6 +225,11 @@ form .help {
.entries .heading {
margin: 0;
}
.entries .lang {
font-weight: normal;
color: var(--light);
font-size: 0.875rem;
}
.entries .edit:hover {
background: var(--secondary);
}
Expand Down

0 comments on commit 232be45

Please sign in to comment.