|
1 | 1 | {% extends "admin/base.html" %} |
2 | 2 |
|
3 | 3 | {% block content %} |
4 | | -<section x-data="searchResultsComponent('pending')" x-init="onLoad" @search.window="onSearch"> |
| 4 | +<section x-data="searchResultsComponent('pending')" x-init="onLoad" @search.window="onSearch" class="entries"> |
5 | 5 | <template x-if="!id && loading['entries.search'] !== true"> |
6 | | - <header class="pending-header"> |
7 | | - <hgroup> |
8 | | - <h2><span x-text="total"></span> pending entries</h2> |
9 | | - <p>Entries awaiting review</p> |
10 | | - </hgroup> |
| 6 | + <hgroup> |
| 7 | + <h2><span x-text="total"></span> pending entries</h2> |
11 | 8 | <template x-if="total > 0"> |
12 | 9 | <a href="#" role="button" class="outline contrast" @click.prevent="onClearPending()">Clear all</a> |
13 | 10 | </template> |
14 | | - </header> |
| 11 | + </hgroup> |
15 | 12 | </template> |
16 | 13 | <template x-if="loading['entries.search'] === true"> |
17 | 14 | <article aria-busy="true"></article> |
|
28 | 25 | <span><span x-text="item"></span><span x-show="idx < e.content.length - 1">, </span></span> |
29 | 26 | </template> |
30 | 27 | </a> |
| 28 | + <template x-if="e.phones.length > 0"> |
| 29 | + <div class="phones">♪ <em x-text="e.phones.join(', ')"></em></div> |
| 30 | + </template> |
31 | 31 | </h3> |
32 | | - <p x-text="config.languages[e.lang].name"></p> |
| 32 | + <span x-text="config.languages[e.lang].name" class="tag"></span> |
33 | 33 | </hgroup> |
34 | 34 | <nav> |
35 | 35 | <ul> |
36 | | - <li><a href="#" @click.prevent="onEditEntry(e)" class="secondary">Edit</a></li> |
37 | | - <li><a href="#" @click.prevent="onDeleteEntry(e.id)" class="contrast">Delete</a></li> |
| 36 | + <li><a href="#" @click.prevent="onEditEntry(e)" class="icon-link"><img class="icon icon-primary" src="/admin/static/edit.svg?v={{ asset_ver }}" alt="" /> Edit</a></li> |
| 37 | + <li><a href="#" @click.prevent="onDeleteEntry(e.id)" class="icon-link"><img class="icon icon-primary" src="/admin/static/delete.svg?v={{ asset_ver }}" alt="" /> Delete</a></li> |
38 | 38 | </ul> |
39 | 39 | </nav> |
40 | 40 | </header> |
41 | 41 |
|
42 | 42 | <template x-if="e.id in comments && 'null' in comments[e.id]"> |
43 | 43 | <template x-for="(c, n) in comments[e.id]['null']" :key="c.id"> |
44 | | - <blockquote> |
45 | | - <p x-text="c.comments"></p> |
| 44 | + <blockquote class="comment"> |
| 45 | + <strong>User comment:</strong> |
| 46 | + <div x-text="c.comments"></div> |
46 | 47 | <footer> |
47 | 48 | <button class="outline secondary small" @click.prevent="onClearComments(c.id)">Clear</button> |
48 | 49 | </footer> |
49 | 50 | </blockquote> |
50 | 51 | </template> |
51 | 52 | </template> |
52 | 53 |
|
53 | | - <template x-if="e.phones.length > 0"> |
54 | | - <p><em x-text="e.phones.join(', ')"></em></p> |
55 | | - </template> |
56 | | - |
57 | | - <div class="definitions-list"> |
| 54 | + <ol class="definitions-list"> |
58 | 55 | <template x-for="(r, n) in e.relations" :key="r.id"> |
59 | | - <div class="definition-row" :class="{ 'is-reordered': order[e.id] && order[e.id].changedRels[r.id] }"> |
| 56 | + <li class="definition-row" :class="{ 'is-reordered': order[e.id] && order[e.id].changedRels[r.id] }"> |
60 | 57 | <div> |
61 | | - <small class="secondary"> |
| 58 | + <div class="meta secondary"> |
62 | 59 | <template x-if="r.status === 'pending'"><mark>New</mark></template> |
63 | 60 | <template x-if="r.relation.status === 'pending'"><ins>Pending</ins></template> |
64 | | - <span x-text="config.languages[r.lang].name + (r.relation.types ? ' · ' + r.relation.types : '')"></span> |
65 | | - </small> |
| 61 | + <span x-text="config.languages[r.lang].name" class="tag"></span> |
| 62 | + <span x-text="(r.relation.types ? ' · ' + r.relation.types : '')"></span> |
| 63 | + </div> |
66 | 64 | <p> |
67 | 65 | <template x-for="(item, idx) in r.content" :key="idx"> |
68 | 66 | <span><span x-text="item"></span><span x-show="idx < r.content.length - 1">, </span></span> |
|
71 | 69 | </div> |
72 | 70 | <template x-if="e.id in comments && r.id in comments[e.id]"> |
73 | 71 | <template x-for="(c, n) in comments[e.id][r.id]" :key="c.id"> |
74 | | - <blockquote> |
75 | | - <p x-text="c.comments"></p> |
| 72 | + <blockquote class="comment"> |
| 73 | + <strong>User comment:</strong> |
| 74 | + <div x-text="c.comments"></div> |
76 | 75 | <footer> |
77 | 76 | <button class="outline secondary small" @click.prevent="onClearComments(c.id)">Clear</button> |
78 | 77 | </footer> |
79 | 78 | </blockquote> |
80 | 79 | </template> |
81 | 80 | </template> |
82 | 81 | <nav class="def-actions"> |
83 | | - <a href="#" @click.prevent="onEditRelation(r, e)">Relation</a> |
84 | | - <a href="#" @click.prevent="onEditEntry(r, e)">Edit</a> |
85 | | - <a href="#" @click.prevent="onDetatchRelation(e.id, r.relation.id)">Detach</a> |
86 | | - <a href="#" @click.prevent="onDeleteRelationEntry(r.id)" class="contrast">Delete</a> |
87 | | - <span role="group"> |
| 82 | + <a href="#" @click.prevent="onEditEntry(r, e)" class="icon-link"><img class="icon icon-primary" src="/admin/static/edit.svg?v={{ asset_ver }}" alt="" /> Edit definition</a> |
| 83 | + <a href="#" @click.prevent="onEditRelation(r, e)" class="icon-link"><img class="icon icon-primary" src="/admin/static/edit.svg?v={{ asset_ver }}" alt="" /> Edit relation</a> |
| 84 | + <a href="#" @click.prevent="onDetatchRelation(e.id, r.relation.id)" class="icon-link"><img class="icon icon-primary" src="/admin/static/link.svg?v={{ asset_ver }}" alt="" /> Detach relation</a> |
| 85 | + <a href="#" @click.prevent="onDeleteRelationEntry(r.id)" class="icon-link"><img class="icon icon-primary" src="/admin/static/delete.svg?v={{ asset_ver }}" alt="" /> Delete</a> |
| 86 | + <span role="group" class="buttons"> |
88 | 87 | <button class="outline secondary" @click.prevent="onReorderRelation(e, r, n, -1)">↑</button> |
89 | 88 | <button class="outline secondary" @click.prevent="onReorderRelation(e, r, n, 1)">↓</button> |
90 | 89 | </span> |
91 | 90 | </nav> |
92 | | - </div> |
| 91 | + </li> |
93 | 92 | </template> |
94 | | - </div> |
| 93 | + </ol> |
95 | 94 |
|
96 | 95 | <footer> |
97 | 96 | <a href="#" role="button" class="outline" @click.prevent="onAddDefinition(e)">+ Add definition</a> |
|
0 commit comments