standardized topics_list, using that for category.tpl as well now

main
psychobunny 10 years ago
parent 0b246ef192
commit 7f3bdb9003

@ -29,68 +29,7 @@
<!-- ENDIF !topics.length --> <!-- ENDIF !topics.length -->
<ul component="category" itemscope itemtype="http://www.schema.org/ItemList" data-nextstart="{nextStart}"> <!-- IMPORT partials/topics_list.tpl -->
<meta itemprop="itemListOrder" content="descending">
<!-- BEGIN topics -->
<li component="category/topic" class="row clearfix {function.generateTopicClass}" <!-- IMPORT partials/data/category.tpl -->>
<meta itemprop="name" content="{topics.title}">
<div class="col-md-7 col-sm-12 col-xs-12 content">
<div class="pull-left">
<!-- IF privileges.editable -->
<i class="fa fa-fw fa-square-o pull-left select pointer hide"></i>
<!-- ENDIF privileges.editable -->
<a href="{relative_path}/user/{topics.user.userslug}" class="pull-left">
<img src="{topics.user.picture}" class="img-circle user-img" title="{topics.user.username}"/>
</a>
</div>
<h1 class="title pull-left">
<i component="topic/pinned" class="fa fa-thumb-tack <!-- IF !topics.pinned -->hide<!-- ENDIF !topics.pinned -->"></i>
<i component="topic/locked" class="fa fa-lock <!-- IF !topics.locked -->hide<!-- ENDIF !topics.locked -->"></i>
<a href="{relative_path}/topic/{topics.slug}" itemprop="url">{topics.title}</a><br />
<small>[[global:posted_ago, <span class="timeago" title="{topics.relativeTime}"></span>]]</small>
</h1>
</div>
<div class="hidden-sm hidden-xs">
<!-- IF !categories.link -->
<div class="col-md-1 stats">
<span class="human-readable-number" title="{topics.viewcount}">{topics.viewcount}</span><br />
<small>[[global:views]]</small>
</div>
<div class="col-md-1 stats">
<span class="human-readable-number" title="{topics.postcount}">{topics.postcount}</span><br />
<small>[[global:posts]]</small>
</div>
<div class="col-md-3">
<div class="card" style="border-color: {bgColor}">
<!-- IF topics.unreplied -->
<p>
[[category:no_replies]]
</p>
<!-- ELSE -->
<p>
<a href="<!-- IF topics.teaser.user.userslug -->{relative_path}/user/{topics.teaser.user.userslug}<!-- ELSE -->#<!-- ENDIF topics.teaser.user.userslug -->">
<strong>{topics.teaser.user.username}</strong>
</a>
<small class="timeago" title="{topics.teaser.timestamp}"></small>
</p>
<p>
Would be nice to have content here.
</p>
<!-- ENDIF topics.unreplied -->
</div>
</div>
<!-- ELSE -->
<div class="col-md-4">
</div>
<!-- ENDIF !categories.link -->
</div>
</li>
<!-- END topics -->
</ul>
<!-- IF config.usePagination --> <!-- IF config.usePagination -->
<!-- IMPORT partials/paginator.tpl --> <!-- IMPORT partials/paginator.tpl -->

@ -1,58 +1,68 @@
<ul id="topics-container" data-nextstart="{nextStart}"> <ul component="category" itemscope itemtype="http://www.schema.org/ItemList" data-nextstart="{nextStart}">
<!-- BEGIN topics --> <meta itemprop="itemListOrder" content="descending">
<li class="category-item<!-- IF topics.deleted --> deleted<!-- ENDIF topics.deleted --><!-- IF topics.unread --> unread<!-- ENDIF topics.unread -->" data-tid="{topics.tid}" data-cid="{topics.cid}"> <!-- BEGIN topics -->
<div class="col-md-12 col-xs-12 panel panel-default topic-row"> <li component="category/topic" class="row clearfix {function.generateTopicClass}" <!-- IMPORT partials/data/category.tpl -->>
<meta itemprop="name" content="{topics.title}">
<!-- IF showSelect --> <div class="col-md-7 col-sm-12 col-xs-12 content">
<div class="pull-left">
<!-- IF showSelect -->
<i class="fa fa-fw fa-square-o pull-left select pointer"></i> <i class="fa fa-fw fa-square-o pull-left select pointer"></i>
<!-- ENDIF showSelect --> <!-- ENDIF showSelect -->
<a href="{relative_path}/user/{topics.user.userslug}" class="pull-left"> <a href="{relative_path}/user/{topics.user.userslug}" class="pull-left">
<img class="img-rounded user-img" src="{topics.user.picture}" title="{topics.user.username}" /> <img src="{topics.user.picture}" class="img-circle user-img" title="{topics.user.username}"/>
</a> </a>
</div>
<h3> <h1 class="title pull-left">
<a href="{relative_path}/topic/{topics.slug}"> <i component="topic/pinned" class="fa fa-thumb-tack <!-- IF !topics.pinned -->hide<!-- ENDIF !topics.pinned -->"></i>
<strong><!-- IF topics.pinned --><i class="fa fa-thumb-tack"></i><!-- ENDIF topics.pinned --> <!-- IF topics.locked --><i class="fa fa-lock"></i><!-- ENDIF topics.locked --></strong> <i component="topic/locked" class="fa fa-lock <!-- IF !topics.locked -->hide<!-- ENDIF !topics.locked -->"></i>
<span class="topic-title">{topics.title}</span> <a href="{relative_path}/topic/{topics.slug}" itemprop="url">{topics.title}</a><br />
</a>
</h3>
<small>
<span class="topic-stats">
[[global:posts]]
<strong class="human-readable-number" title="{topics.postcount}">{topics.postcount}</strong>
</span>
|
<span class="topic-stats">
[[global:views]]
<strong class="human-readable-number" title="{topics.viewcount}">{topics.viewcount}</strong>
</span>
|
<span>
<!-- IF topics.user.userslug -->
[[global:posted_in_ago_by, <a href="{relative_path}/category/{topics.category.slug}"><i class="fa {topics.category.icon}"></i> {topics.category.name}</a>, <span class="timeago" title="{topics.relativeTime}"></span>, {topics.user.username}]]
<!-- ELSE -->
[[global:posted_in_ago_by_guest, <a href="{relative_path}/category/{topics.category.slug}"><i class="fa {topics.category.icon}"></i> {topics.category.name}</a>, <span class="timeago" title="{topics.relativeTime}"></span>]]
<!-- ENDIF topics.user.userslug -->
</span>
<!-- IF template.category -->
<small>[[global:posted_ago, <span class="timeago" title="{topics.relativeTime}"></span>]]</small>
<!-- ELSE -->
<small>[[global:posted_in_ago, <a href="{relative_path}/category/{topics.category.slug}"><i class="fa {topics.category.icon}"></i> {topics.category.name}</a>, <span class="timeago" title="{topics.relativeTime}"></span>]]</small>
<!-- ENDIF template.category -->
</h1>
</div>
<span class="pull-right"> <div class="hidden-sm hidden-xs">
<!-- IF topics.unreplied --> <!-- IF !categories.link -->
<a href="{relative_path}/topic/{topics.slug}" itemprop="url">[[category:no_replies]]</a> <div class="col-md-1 stats">
<!-- ELSE --> <span class="human-readable-number" title="{topics.viewcount}">{topics.viewcount}</span><br />
<a href="<!-- IF topics.teaser.user.userslug -->{relative_path}/user/{topics.teaser.user.userslug}<!-- ELSE -->#<!-- ENDIF topics.teaser.user.userslug -->"> <small>[[global:views]]</small>
<img class="teaser-pic" src="{topics.teaser.user.picture}" title="{topics.teaser.user.username}"/> </div>
</a> <div class="col-md-1 stats">
<a href="{relative_path}/topic/{topics.slug}/{topics.teaser.index}"> <span class="human-readable-number" title="{topics.postcount}">{topics.postcount}</span><br />
[[global:replied_ago, <span class="timeago" title="{topics.teaser.timestamp}"></span>]] <small>[[global:posts]]</small>
</a> </div>
<!-- ENDIF topics.unreplied --> <div class="col-md-3">
</span> <div class="card" style="border-color: {bgColor}">
<!-- IMPORT partials/category/tags.tpl --> <!-- IF topics.unreplied -->
</small> <p>
[[category:no_replies]]
</p>
<!-- ELSE -->
<p>
<a href="<!-- IF topics.teaser.user.userslug -->{relative_path}/user/{topics.teaser.user.userslug}<!-- ELSE -->#<!-- ENDIF topics.teaser.user.userslug -->">
<strong>{topics.teaser.user.username}</strong>
</a>
<small class="timeago" title="{topics.teaser.timestamp}"></small>
</p>
<p>
{topics.teaser.content}
</p>
<!-- ENDIF topics.unreplied -->
</div> </div>
</li> </div>
<!-- END topics --> <!-- ELSE -->
</ul> <div class="col-md-4">
</div>
<!-- ENDIF !categories.link -->
</div>
</li>
<!-- END topics -->
</ul>

@ -1,5 +1,4 @@
<div class="popular"> <div class="popular">
<!-- IMPORT partials/breadcrumbs.tpl --> <!-- IMPORT partials/breadcrumbs.tpl -->
<ul class="nav nav-pills"> <ul class="nav nav-pills">
@ -17,9 +16,7 @@
</div> </div>
<!-- ENDIF !topics.length --> <!-- ENDIF !topics.length -->
<div class="category row"> <div class="category">
<div class="col-md-12"> <!-- IMPORT partials/topics_list.tpl -->
<!-- IMPORT partials/topics_list.tpl -->
</div>
</div> </div>
</div> </div>

@ -1,5 +1,4 @@
<div class="recent"> <div class="recent">
<!-- IMPORT partials/breadcrumbs.tpl --> <!-- IMPORT partials/breadcrumbs.tpl -->
<!-- IF loggedIn --> <!-- IF loggedIn -->
@ -20,9 +19,7 @@
</div> </div>
<!-- ENDIF !topics.length --> <!-- ENDIF !topics.length -->
<div class="category row"> <div class="category">
<div class="col-md-12"> <!-- IMPORT partials/topics_list.tpl -->
<!-- IMPORT partials/topics_list.tpl -->
</div>
</div> </div>
</div> </div>

@ -1,5 +1,4 @@
<div class="unread"> <div class="unread">
<!-- IMPORT partials/breadcrumbs.tpl --> <!-- IMPORT partials/breadcrumbs.tpl -->
<div id="category-no-topics" class="alert alert-warning <!-- IF topics.length -->hidden<!-- ENDIF topics.length -->"> <div id="category-no-topics" class="alert alert-warning <!-- IF topics.length -->hidden<!-- ENDIF topics.length -->">
@ -27,10 +26,8 @@
<div class="alert alert-warning hide" id="new-topics-alert"></div> <div class="alert alert-warning hide" id="new-topics-alert"></div>
</a> </a>
<div class="category row"> <div class="category">
<div class="col-md-12"> <!-- IMPORT partials/topics_list.tpl -->
<!-- IMPORT partials/topics_list.tpl --> <button id="load-more-btn" class="btn btn-primary hide">[[unread:load_more]]</button>
<button id="load-more-btn" class="btn btn-primary hide">[[unread:load_more]]</button>
</div>
</div> </div>
</div> </div>

Loading…
Cancel
Save