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>
|
2022-06-30 18:30:50 +08:00
|
|
|
<PermalinkForm @action={{action "recordAdded"}} />
|
2015-07-15 20:54:28 +08:00
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
<ConditionalLoadingSpinner @condition={{this.loading}}>
|
2022-11-10 03:23:08 +08:00
|
|
|
<div class="permalink-search">
|
|
|
|
<TextField
|
|
|
|
@value={{this.filter}}
|
|
|
|
@placeholderKey="admin.permalink.form.filter"
|
|
|
|
@autocorrect="off"
|
|
|
|
@autocapitalize="off"
|
2023-12-12 20:09:05 +08:00
|
|
|
class="url-input"
|
2022-11-10 03:23:08 +08:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="permalink-results">
|
|
|
|
{{#if this.model.length}}
|
|
|
|
<table class="admin-logs-table permalinks grid">
|
|
|
|
<thead class="heading-container">
|
|
|
|
<th class="col heading first url">{{i18n "admin.permalink.url"}}</th>
|
|
|
|
<th class="col heading destination">{{i18n
|
|
|
|
"admin.permalink.destination"
|
|
|
|
}}</th>
|
|
|
|
<th class="col heading actions"></th>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{#each this.model as |pl|}}
|
|
|
|
<tr class="admin-list-item">
|
|
|
|
<td class="col first url">
|
|
|
|
<FlatButton
|
|
|
|
@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>
|
|
|
|
<td class="col destination">
|
|
|
|
{{#if pl.topic_id}}
|
|
|
|
<a href={{pl.topic_url}}>{{pl.topic_title}}</a>
|
|
|
|
{{/if}}
|
|
|
|
{{#if pl.post_id}}
|
|
|
|
<a href={{pl.post_url}}>{{pl.post_topic_title}}
|
|
|
|
#{{pl.post_number}}</a>
|
|
|
|
{{/if}}
|
|
|
|
{{#if pl.category_id}}
|
|
|
|
{{category-link pl.category}}
|
|
|
|
{{/if}}
|
|
|
|
{{#if pl.tag_id}}
|
|
|
|
<a href={{pl.tag_url}}>{{pl.tag_name}}</a>
|
|
|
|
{{/if}}
|
|
|
|
{{#if pl.external_url}}
|
|
|
|
{{#if pl.linkIsExternal}}
|
2024-09-13 23:50:52 +08:00
|
|
|
{{d-icon "up-right-from-square"}}
|
2022-11-10 03:23:08 +08:00
|
|
|
{{/if}}
|
|
|
|
<a href={{pl.external_url}}>{{pl.external_url}}</a>
|
2020-03-26 02:30:39 +08:00
|
|
|
{{/if}}
|
2024-02-06 00:31:31 +08:00
|
|
|
{{#if pl.user_id}}
|
|
|
|
<a href={{pl.user_url}}>{{pl.username}}</a>
|
|
|
|
{{/if}}
|
2022-11-10 03:23:08 +08:00
|
|
|
</td>
|
|
|
|
<td class="col action" style="text-align: right;">
|
|
|
|
<DButton
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{fn this.destroyRecord pl}}
|
2024-09-13 23:50:52 +08:00
|
|
|
@icon="trash-can"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-danger"
|
2022-11-10 03:23:08 +08:00
|
|
|
/>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{/each}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{{else}}
|
|
|
|
{{#if this.filter}}
|
|
|
|
<p class="permalink-results__no-result">{{i18n "search.no_results"}}</p>
|
|
|
|
{{else}}
|
|
|
|
<p class="permalink-results__no-permalinks">{{i18n
|
|
|
|
"admin.permalink.no_permalinks"
|
|
|
|
}}</p>
|
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
2022-06-30 18:30:50 +08:00
|
|
|
</ConditionalLoadingSpinner>
|