2021-11-05 02:15:55 +08:00
|
|
|
<h1>{{i18n "admin.permalink.title"}}</h1>
|
|
|
|
|
2019-05-07 19:42:41 +08:00
|
|
|
<div class="permalink-description">
|
|
|
|
<span>{{i18n "admin.permalink.description"}}</span>
|
|
|
|
</div>
|
2019-01-10 18:06:01 +08:00
|
|
|
{{permalink-form action=(action "recordAdded")}}
|
2015-07-15 20:54:28 +08:00
|
|
|
|
|
|
|
{{#conditional-loading-spinner condition=loading}}
|
|
|
|
{{#if model.length}}
|
2021-11-05 02:15:55 +08:00
|
|
|
<div class="permalink-search">
|
|
|
|
{{text-field
|
|
|
|
value=filter
|
|
|
|
class="url-input"
|
|
|
|
placeholderKey="admin.permalink.form.filter"
|
|
|
|
autocorrect="off"
|
|
|
|
autocapitalize="off"
|
|
|
|
}}
|
|
|
|
</div>
|
2018-07-03 11:14:53 +08:00
|
|
|
<table class="admin-logs-table permalinks grid">
|
|
|
|
<thead class="heading-container">
|
|
|
|
<th class="col heading first url">{{i18n "admin.permalink.url"}}</th>
|
2020-03-26 02:30:39 +08:00
|
|
|
<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">
|
2021-11-05 02:15:55 +08:00
|
|
|
<td class="col first url">
|
|
|
|
{{flat-button
|
|
|
|
title="admin.permalink.copy_to_clipboard"
|
|
|
|
icon="far-clipboard"
|
|
|
|
action=(action "copyUrl" pl)
|
|
|
|
}}
|
|
|
|
<span id="admin-permalink-{{pl.id}}" title={{pl.url}}>{{pl.url}}</span>
|
|
|
|
</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}}
|
2020-05-25 17:48:54 +08:00
|
|
|
{{#if pl.tag_id}}
|
|
|
|
<a href={{pl.tag_url}}>{{pl.tag_name}}</a>
|
|
|
|
{{/if}}
|
2020-02-10 15:14:26 +08:00
|
|
|
{{#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>
|
2020-06-22 11:14:16 +08:00
|
|
|
<td class="col action" style="text-align: right;">
|
2020-02-10 15:14:26 +08:00
|
|
|
{{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}}
|
|
|
|
{{i18n "search.no_results"}}
|
|
|
|
{{/if}}
|
|
|
|
{{/conditional-loading-spinner}}
|