2018-10-17 23:37:14 +08:00
|
|
|
<div class="permalink-title">
|
2020-04-14 14:18:49 +08:00
|
|
|
<h2>{{i18n "admin.permalink.title"}}</h2>
|
2018-10-17 23:37:14 +08:00
|
|
|
</div>
|
2019-05-07 19:42:41 +08:00
|
|
|
<div class="permalink-description">
|
2020-04-14 14:18:49 +08:00
|
|
|
<span>{{i18n "admin.permalink.description"}}</span>
|
2019-05-07 19:42:41 +08:00
|
|
|
</div>
|
2018-10-17 23:37:14 +08:00
|
|
|
<div class="permalink-search">
|
2015-07-15 20:54:28 +08:00
|
|
|
{{text-field value=filter class="url-input" placeholderKey="admin.permalink.form.filter" autocorrect="off" autocapitalize="off"}}
|
|
|
|
</div>
|
2019-01-10 18:06:01 +08:00
|
|
|
{{permalink-form action=(action "recordAdded")}}
|
2020-02-07 00:26:06 +08:00
|
|
|
<br>
|
2015-07-15 20:54:28 +08:00
|
|
|
|
|
|
|
{{#conditional-loading-spinner condition=loading}}
|
|
|
|
{{#if model.length}}
|
2020-04-14 14:18:49 +08:00
|
|
|
<table class="admin-logs-table permalinks grid">
|
2018-07-03 11:14:53 +08:00
|
|
|
<thead class="heading-container">
|
2020-04-14 14:18:49 +08:00
|
|
|
<th class="col heading first url">{{i18n "admin.permalink.url"}}</th>
|
|
|
|
<th class="col heading destination">{{i18n "admin.permalink.destination"}}</th>
|
2018-07-03 11:14:53 +08:00
|
|
|
<th class="col heading actions"></th>
|
|
|
|
</thead>
|
2020-02-10 15:14:26 +08:00
|
|
|
<tbody>
|
|
|
|
{{#each model as |pl|}}
|
|
|
|
<tr class="admin-list-item">
|
|
|
|
<td class="col first url">{{pl.url}}</td>
|
2020-03-26 02:30:39 +08:00
|
|
|
<td class="col destination">
|
2020-02-10 15:14:26 +08:00
|
|
|
{{#if pl.topic_id}}
|
2020-03-09 22:28:31 +08:00
|
|
|
<a href={{pl.topic_url}}>{{pl.topic_title}}</a>
|
2020-02-10 15:14:26 +08:00
|
|
|
{{/if}}
|
|
|
|
{{#if pl.post_id}}
|
2020-03-26 02:30:39 +08:00
|
|
|
<a href={{pl.post_url}}>{{pl.post_topic_title}} #{{pl.post_number}}</a>
|
2020-02-10 15:14:26 +08:00
|
|
|
{{/if}}
|
|
|
|
{{#if pl.category_id}}
|
2020-03-26 02:30:39 +08:00
|
|
|
{{category-link pl.category}}
|
2020-02-10 15:14:26 +08:00
|
|
|
{{/if}}
|
|
|
|
{{#if pl.external_url}}
|
2020-03-26 02:30:39 +08:00
|
|
|
{{#if pl.linkIsExternal}}
|
|
|
|
{{d-icon "external-link-alt"}}
|
|
|
|
{{/if}}
|
2020-03-09 22:28:31 +08:00
|
|
|
<a href={{pl.external_url}}>{{pl.external_url}}</a>
|
2020-02-10 15:14:26 +08:00
|
|
|
{{/if}}
|
|
|
|
</td>
|
|
|
|
<td class="col action">
|
|
|
|
{{d-button action=(action "destroy") actionParam=pl icon="far-trash-alt" class="btn-danger"}}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{/each}}
|
|
|
|
</tbody>
|
2018-07-03 11:14:53 +08:00
|
|
|
</table>
|
2015-07-15 20:54:28 +08:00
|
|
|
{{else}}
|
2020-04-14 14:18:49 +08:00
|
|
|
{{i18n "search.no_results"}}
|
2015-07-15 20:54:28 +08:00
|
|
|
{{/if}}
|
|
|
|
{{/conditional-loading-spinner}}
|