# 更改视图以创建日期？

**URL:** https://meta.discourse.org/t/changing-views-to-creating-date/253460
**Category:** UX
**Created:** [2023年一月31日 07:44 UTC](https://meta.discourse.org/t/changing-views-to-creating-date/253460 "2023-01-31T07:44:59Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [2023年三月25日 12:38 UTC](https://meta.discourse.org/t/changing-views-to-creating-date/253460/4 "2023-03-25T12:38:16Z")

</div>

感谢测试！

如果您使用 [https://meta.discourse.org/t/topic-list-previews-theme-component/209973（插件版本已弃用），您可以从仓库中复制粘贴以下内容，使用](https://meta.discourse.org/t/topic-list-previews-theme-component/209973%EF%BC%88%E6%8F%92%E4%BB%B6%E7%89%88%E6%9C%AC%E5%B7%B2%E5%BC%83%E7%94%A8%EF%BC%89%EF%BC%8C%E6%82%A8%E5%8F%AF%E4%BB%A5%E4%BB%8E%E4%BB%93%E5%BA%93%E4%B8%AD%E5%A4%8D%E5%88%B6%E7%B2%98%E8%B4%B4%E4%BB%A5%E4%B8%8B%E5%86%85%E5%AE%B9%EF%BC%8C%E4%BD%BF%E7%94%A8) [topic-list-item code](https://github.com/paviliondev/discourse-tc-topic-list-previews/blob/master/javascripts/discourse/templates/list/topic-list-item.hbr)。

> **头部**
>
> ```js
> <script type='text/x-handlebars' data-template-name='topic-list-header.raw'>
> {{raw-plugin-outlet name="topic-list-header-before"}}
> {{#if bulkSelectEnabled}}
> <th class="bulk-select topic-list-data">
> {{#if canBulkSelect}}
> {{raw "flat-button" class="bulk-select" icon="list" title="topics.bulk.toggle"}}
> {{/if}}
> </th>
> {{/if}}
> {{raw "topic-list-header-column" order='default' name=listTitle bulkSelectEnabled=bulkSelectEnabled showBulkToggle=toggleInTitle canBulkSelect=canBulkSelect canDoBulkActions=canDoBulkActions}}
> {{raw-plugin-outlet name="topic-list-header-after-main-link"}}
> {{#if showPosters}}
> {{raw "topic-list-header-column" order='posters' ariaLabel=(i18n "category.sort_options.posters")}}
> {{/if}}
> {{raw "topic-list-header-column" sortable=sortable number='true' order='posts' name='replies' ariaLabel=(i18n "sr_replies")}}
> {{#if showLikes}}
> {{raw "topic-list-header-column" sortable=sortable number='true' order='likes' name='likes' ariaLabel=(i18n "sr_likes")}}
> {{/if}}
> {{#if showOpLikes}}
> {{raw "topic-list-header-column" sortable=sortable number='true' order='op_likes' name='likes' ariaLabel=(i18n "sr_op_likes")}}
> {{/if}}
> {{raw "topic-list-header-column" sortable=sortable number='true' order='created' name='created' ariaLabel=(i18n "sr_created")}}
> {{raw "topic-list-header-column" sortable=sortable number='true' order='activity' name='activity' ariaLabel=(i18n "sr_activity")}}
> {{raw-plugin-outlet name="topic-list-header-after"}}
> </script>
> 
> <script type='text/x-handlebars' data-template-name='list/topic-list-item.raw'>
> {{#if bulkSelectEnabled}}
> <td class='star'>
> <input type="checkbox" class="bulk-select">
> </td>
> {{/if}}
>     
> {{#if tilesStyle}}
> <div class="tiles-grid-item-content main-link">
> <div class="image">
> {{#if hasThumbnail}}
> {{raw "list/topic-thumbnail" topic=topic thumbnails=thumbnails currentUser=currentUser site=site category=category opts=thumbnailOpts}}
> {{/if}}
> <a href='{{topic.url}}'>
> <div class="image-mask" style="{{backgroundGradient}}"></div>
> </a>
> </div>
> <div class="topic-details">
> <div class="topic-header-grid">
> {{raw "list/topic-list-title" topic=topic tilesStyle=tilesStyle showTopicPostBadges=showTopicPostBadges}}
> <div class="topic-category">
> {{#if showCategoryBadge}}
> {{category-link topic.category}}
> {{/if}}
> {{#if topic.tags}}
> {{discourse-tags topic mode="list"}}
> {{/if}}
> </div>
> </div>
> {{#if showExcerpt}}
> <a href='{{topic.url}}'>
> {{raw "list/topic-excerpt" topic=topic}}
> </a>
> {{/if}}
> <div class="topic-footer">
> {{raw 'list/topic-meta' likesHeat=likesHeat title=view.title topic=topic}}
> {{raw "list/topic-users" tilesStyle=tilesStyle abbreviatePosters=abbreviatePosters posters=abbreviatedPosters posterNames=posterNames}}
> {{#if showActions}}
> {{raw "list/topic-actions" likeCount=likeCount topicActions=topicActions topic=topic}}
> {{/if}}
> </div>
> </div>
> </div>
> {{else}}
> {{~raw-plugin-outlet name="topic-list-before-columns"}}
> {{!--
> The `~` syntax strip spaces between the elements, making it produce
> `<a>Some text</a><span>`，
> with no space between them.
> This causes the topic-post-badge to be considered the same word as "text"
> at the end of the link, preventing it from line wrapping onto its own line.
> --}}
> <td class='main-link clearfix topic-list-data' colspan="1">
> {{#if hasThumbnail}}
> {{raw "list/topic-thumbnail" topic=topic thumbnails=thumbnails category=category opts=thumbnailOpts}}
> {{/if}}
> {{~raw-plugin-outlet name="topic-list-before-link"}}
> <span class='link-top-line'>
> {{~raw-plugin-outlet name="topic-list-before-status"}}
> {{~raw "topic-status" topic=topic}}
> {{~topic-link topic class="raw-link raw-topic-link"}}
> {{~#if topic.featured_link}}
> {{~topic-featured-link topic}}
> {{~/if}}
> {{~raw-plugin-outlet name="topic-list-after-title"}}
> {{~raw "list/unread-indicator" includeUnreadIndicator=includeUnreadIndicator
> topicId=topic.id
> unreadClass=unreadClass~}}
> {{~#if showTopicPostBadges}}
> {{~raw "topic-post-badges" unreadPosts=topic.unread_posts unseen=topic.unseen url=topic.lastUnreadUrl newDotText=newDotText}}
> {{~/if}}
> </span>
> <div class="link-bottom-line">
> {{#unless hideCategory}}
> {{#unless topic.isPinnedUncategorized}}
> {{~raw-plugin-outlet name="topic-list-before-category"}}
> {{category-link topic.category}}
> {{/unless}}
> {{/unless}}
> {{discourse-tags topic mode="list" tagsForUser=tagsForUser}}
> {{#if expandPinned}}
> {{raw "list/topic-excerpt" topic=topic}}
> {{/if}}
> {{#if showActions}}
> {{raw "list/topic-actions" likeCount=likeCount topicActions=topicActions}}
> {{/if}}
> {{raw "list/action-list" topic=topic postNumbers=topic.liked_post_numbers className="likes" icon="heart"}}
> </div>
> </td>
>     
> {{#if showPosters}}
> {{raw "list/posters-column" posters=topic.featuredUsers}}
> {{/if}}
>     
> {{raw "list/posts-count-column" topic=topic}}
>     
> {{#if showLikes}}
> <td class="num likes topic-list-data">
> {{#if hasLikes}}
> <a href='{{topic.summaryUrl}}'>
> {{number topic.like_count}} {{d-icon "heart"}}
> </a>
> {{/if}}
> </td>
> {{/if}}
>     
> {{#if showOpLikes}}
> <td class="num likes">
> {{#if hasOpLikes}}
> <a href='{{topic.summaryUrl}}'>
> {{number topic.op_like_count}} {{d-icon "heart"}}
> </a>
> {{/if}}
> </td>
> {{/if}}
>     
> <td class="num topic-list-data {{cold-age-class topic.createdAt startDate=topic.bumpedAt class=""}} activity" title="{{html-safe topic.bumpedAtTitle}}">
> <a class="post-activity" href="{{topic.url}}">
> {{~raw-plugin-outlet name="topic-list-before-relative-date"~}}
> {{~format-date topic.createdAt format="tiny" noTitle="true"~}}
> </a>
> </td>
>     
> {{raw "list/activity-column" topic=topic class="num topic-list-data" tagName="td"}}
> {{/if}}
> </script>
> 
> ```

 ![image](https://global.discourse-cdn.com/meta/original/4X/5/b/6/5b650c39149517f4b8f12306b18b1e4c45b5394f.png)

请告诉我这是否对您有帮助。 🙂

---

_[View the full topic](https://meta.discourse.org/t/changing-views-to-creating-date/253460)._
