2015-08-21 01:43:12 +08:00
|
|
|
<div class='embeddable-hosts'>
|
|
|
|
{{#if embedding.embeddable_hosts}}
|
|
|
|
<table class='embedding'>
|
|
|
|
<tr>
|
|
|
|
<th style='width: 50%'>{{i18n "admin.embedding.host"}}</th>
|
|
|
|
<th style='width: 30%'>{{i18n "admin.embedding.category"}}</th>
|
|
|
|
<th style='width: 20%'> </th>
|
|
|
|
</tr>
|
|
|
|
{{#each embedding.embeddable_hosts as |host|}}
|
|
|
|
{{embeddable-host host=host deleteHost="deleteHost"}}
|
|
|
|
{{/each}}
|
|
|
|
</table>
|
|
|
|
{{else}}
|
|
|
|
<p>{{i18n "admin.embedding.get_started"}}</p>
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
{{d-button label="admin.embedding.add_host" action="addHost" icon="plus" class="btn-primary add-host"}}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{#if showSecondary}}
|
|
|
|
<div class='embedding-secondary'>
|
|
|
|
<p>{{{i18n "admin.embedding.sample"}}}</p>
|
|
|
|
{{highlighted-code code=embeddingCode lang="html"}}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
|
|
|
|
<div class='embedding-secondary'>
|
|
|
|
<h3>{{i18n "admin.embedding.settings"}}</h3>
|
|
|
|
|
|
|
|
{{embedding-setting field="embed_by_username" value=embedding.embed_by_username}}
|
|
|
|
{{embedding-setting field="embed_post_limit" value=embedding.embed_post_limit}}
|
|
|
|
{{embedding-setting field="embed_truncate" value=embedding.embed_truncate type="checkbox"}}
|
|
|
|
</div>
|
2015-08-19 05:15:46 +08:00
|
|
|
|
2015-08-21 01:43:12 +08:00
|
|
|
<div class='embedding-secondary'>
|
|
|
|
<h3>{{i18n "admin.embedding.feed_settings"}}</h3>
|
|
|
|
<p class="description">{{i18n "admin.embedding.feed_description"}}</p>
|
2015-08-19 05:15:46 +08:00
|
|
|
|
2015-08-21 01:43:12 +08:00
|
|
|
{{embedding-setting field="feed_polling_enabled" value=embedding.feed_polling_enabled type="checkbox"}}
|
|
|
|
{{embedding-setting field="feed_polling_url" value=embedding.feed_polling_url}}
|
|
|
|
{{embedding-setting field="embed_username_key_from_feed" value=embedding.embed_username_key_from_feed}}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class='embedding-secondary'>
|
|
|
|
<h3>{{i18n "admin.embedding.crawling_settings"}}</h3>
|
|
|
|
<p class="description">{{i18n "admin.embedding.crawling_description"}}</p>
|
|
|
|
|
2016-04-01 05:33:25 +08:00
|
|
|
{{embedding-setting field="embed_whitelist_selector"
|
|
|
|
value=embedding.embed_whitelist_selector
|
|
|
|
placeholder="article, #story, .post"}}
|
|
|
|
|
|
|
|
{{embedding-setting field="embed_blacklist_selector"
|
|
|
|
value=embedding.embed_blacklist_selector
|
|
|
|
placeholder=".ad-unit, header"}}
|
|
|
|
|
|
|
|
{{embedding-setting field="embed_classname_whitelist"
|
|
|
|
value=embedding.embed_classname_whitelist
|
|
|
|
placeholder="emoji, classname"}}
|
2015-08-21 01:43:12 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class='embedding-secondary'>
|
|
|
|
{{d-button label="admin.embedding.save"
|
|
|
|
action="saveChanges"
|
|
|
|
class="btn-primary embed-save"
|
|
|
|
disabled=embedding.isSaving}}
|
|
|
|
|
|
|
|
{{#if saved}}{{i18n "saved"}}{{/if}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|