# عناصر قائمة الموضوع أزرار التذييل - محتوى المخطط الزمني

**URL:** https://meta.discourse.org/t/topic-list-item-footer-buttons-timeline-content/164751
**Category:** Development
**Created:** [21 سبتمبر 2020، 6:08م UTC](https://meta.discourse.org/t/topic-list-item-footer-buttons-timeline-content/164751 "2020-09-21T18:08:30Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [24 سبتمبر 2020، 11:13م UTC](https://meta.discourse.org/t/topic-list-item-footer-buttons-timeline-content/164751/2 "2020-09-24T23:13:41Z")

</div>

الطريقة التي تعاملتُ بها مع هذا في الماضي هي حزم الأزرار في دالة مساعدة HTML، والتي ستُظهر كود HTML الخام في القوالب الخام، ويمكنك بعد ذلك إدراجها عبر منفذ إضافة خام. إليك مثال على ذلك:

[https://github.com/paviliondev/discourse-topic-previews/blob/master/assets/javascripts/discourse/helpers/preview-helpers.js.es6#L8](https://github.com/paviliondev/discourse-topic-previews/blob/master/assets/javascripts/discourse/helpers/preview-helpers.js.es6#L8)

يتم التعامل مع نقر الزر في مكون عنصر قائمة الموضوع، على سبيل المثال:

[https://github.com/paviliondev/discourse-topic-previews/blob/master/assets/javascripts/discourse/initializers/preview-edits.js.es6#L332](https://github.com/paviliondev/discourse-topic-previews/blob/master/assets/javascripts/discourse/initializers/preview-edits.js.es6#L332)

قد يكون لدى @merefield بعض الأفكار أيضًا 🙂

* * *

أيضًا، من المرجح أنك ستحتاج إلى استخدام هيكل مجلدات جافا سكريبت الخاص بالموضوع بدلاً من إضافة سكريبتات إلى header.html. انظر:

> [@Split up theme Javascript into multiple files](https://meta.discourse.org/t/splitting-up-theme-javascript-into-multiple-files/119369):
>
> Complex theme javascript can be split into multiple files, to keep things nicely organised. To use this functionality, simply add files to the /javascripts folder in your theme directory. These files can not be edited from the Discourse UI, so you must use the [Theme CLI](https://meta.discourse.org/t/discourse-theme-cli-console-app-to-help-you-build-themes/82950) or [source the theme from git](https://meta.discourse.org/t/how-to-source-a-theme-from-a-private-git-repository/82584). Javascript files are treated exactly the same as they are in core/plugins, so you should follow the same file/folder structure. Theme files are loaded after core/plugins, so if the filenames match,…

---

_[View the full topic](https://meta.discourse.org/t/topic-list-item-footer-buttons-timeline-content/164751)._
