discourse/app/assets/javascripts/admin/templates/permalinks.hbs

Failed to ignore revisions in .git-blame-ignore-revs.

53 lines
1.9 KiB
Handlebars
Raw Normal View History

<div class="permalink-title">
<h2>{{i18n "admin.permalink.title"}}</h2>
</div>
<div class="permalink-description">
<span>{{i18n "admin.permalink.description"}}</span>
</div>
<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>
{{permalink-form action=(action "recordAdded")}}
<br>
2015-07-15 20:54:28 +08:00
{{#conditional-loading-spinner condition=loading}}
{{#if model.length}}
<table class="admin-logs-table permalinks grid">
2018-07-03 11:14:53 +08:00
<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>
2018-07-03 11:14:53 +08:00
<th class="col heading actions"></th>
</thead>
<tbody>
{{#each model as |pl|}}
<tr class="admin-list-item">
<td class="col first url">{{pl.url}}</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.external_url}}
{{#if pl.linkIsExternal}}
{{d-icon "external-link-alt"}}
{{/if}}
<a href={{pl.external_url}}>{{pl.external_url}}</a>
{{/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}}
{{i18n "search.no_results"}}
2015-07-15 20:54:28 +08:00
{{/if}}
{{/conditional-loading-spinner}}