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

57 lines
2.1 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 08:54:28 -04:00
{{text-field value=filter class="url-input" placeholderKey="admin.permalink.form.filter" autocorrect="off" autocapitalize="off"}}
</div>
{{permalink-form action=(action "recordAdded")}}
2015-07-15 08:54:28 -04:00
<br/>
{{#conditional-loading-spinner condition=loading}}
{{#if model.length}}
2018-07-02 23:14:53 -04:00
<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 topic">{{i18n 'admin.permalink.topic_title'}}</th>
<th class="col heading post">{{i18n 'admin.permalink.post_title'}}</th>
<th class="col heading category">{{i18n 'admin.permalink.category_title'}}</th>
<th class="col heading external_url">{{i18n 'admin.permalink.external_url'}}</th>
<th class="col heading actions"></th>
</thead>
{{#each model as |pl|}}
2018-07-02 23:14:53 -04:00
<tr class="admin-list-item">
<td class="col first url">{{pl.url}}</td>
<td class="col topic">
{{#if pl.topic_id}}
<a href='{{unbound pl.topic_url}}'>{{pl.topic_title}}</a>
{{/if}}
2018-07-02 23:14:53 -04:00
</td>
<td class="col post">
{{#if pl.post_id}}
<a href='{{unbound pl.post_url}}'>#{{pl.post_number}} {{pl.post_topic_title}}</a>
{{/if}}
2018-07-02 23:14:53 -04:00
</td>
<td class="col category">
{{#if pl.category_id}}
<a href='{{unbound pl.category_url}}'>{{pl.category_name}}</a>
{{/if}}
2018-07-02 23:14:53 -04:00
</td>
<td class="col external_url">
{{#if pl.external_url}}
<a href='{{unbound pl.external_url}}'>{{pl.external_url}}</a>
{{/if}}
2018-07-02 23:14:53 -04:00
</td>
<td class="col action">
2019-01-22 06:02:02 -05:00
{{d-button action=(action "destroy") actionParam=pl icon="far-trash-alt" class="btn-danger"}}
2018-07-02 23:14:53 -04:00
</td>
</tr>
{{/each}}
2018-07-02 23:14:53 -04:00
</table>
2015-07-15 08:54:28 -04:00
{{else}}
{{i18n 'search.no_results'}}
{{/if}}
{{/conditional-loading-spinner}}