こんにちは!Discourse を使って「タイムライン」コンテンツ概念のコミュニティを構築中です。
「Reply to」と「Share」の両方のボタンはテスト用です。topic-footer-buttons.hbs (#ember) のようなコンポーネントをいくつか変更して作成しました。
<div class="topic-list-item-footer-buttons">
{{#each inlineButtons as |button|}}
{{d-button
class=(concat "btn-default topic-list-item-footer-buttons " button.classNames)
action=button.action
icon=button.icon
translatedLabel=button.label
translatedTitle=button.title
translatedAriaLabel=button.ariaLabel
disabled=button.disabled}}
{{/each}}
</div>
このコンポーネントを topic-list.hbs の topic-list-item テンプレートの下に挿入すると動作します!しかし、これは将来の Discourse のバージョンアップやプラグインの実装にとって良くありません。そのため、管理画面の「カスタマイズ」→「共通」→「ヘッダー (HTML)」で topic-list-item.raw を変更して操作しようとしています。
<script type="text/x-handlebars" data-template-name="list/topic-list-item.raw">
しかし、別の問題が発生しました。text/x-handlebars テンプレートからコンポーネントを呼び出せないのです。topic-list-item.raw テンプレート内でコンポーネントを呼び出すようなヘルパーやウィジェットのようなものは存在しますか?
私の疑問を根本から解消できるよう、ご支援いただければ幸いです。
