-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Code duplications removed and memory usage improved
Signed-off-by: Matt Friedman <[email protected]>
- Loading branch information
Showing
4 changed files
with
46 additions
and
55 deletions.
There are no files selected for viewing
8 changes: 4 additions & 4 deletions
8
styles/all/template/event/rmcgirr83_top_five_topiclist_row_append.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{% if top_five_topic.TOPIC_PREVIEW_FIRST_POST %} | ||
{% set preview = top_five_topic %} | ||
{% include '@vse_topicpreview/topicpreview.html' %} | ||
{% endif %} | ||
{% import '@vse_topicpreview/topicpreview_macro.html' as macro %} | ||
|
||
{# Display topic preview in Top Five extension #} | ||
{{ macro.renderTopicPreview(top_five_topic) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,16 @@ | ||
{% import '@vse_topicpreview/topicpreview_macro.html' as macro %} | ||
|
||
{# display topic preview in view forum #} | ||
{% if topicrow.TOPIC_PREVIEW_FIRST_POST %} | ||
{% set preview = topicrow %} | ||
{% include '@vse_topicpreview/topicpreview.html' %} | ||
{% endif %} | ||
{{ macro.renderTopicPreview(topicrow) }} | ||
|
||
{# display topic preview in search results #} | ||
{% if searchresults.TOPIC_PREVIEW_FIRST_POST %} | ||
{% set preview = searchresults %} | ||
{% include '@vse_topicpreview/topicpreview.html' %} | ||
{% endif %} | ||
{{ macro.renderTopicPreview(searchresults) }} | ||
|
||
{# display topic preview in Similar Topics extension #} | ||
{% if similar.TOPIC_PREVIEW_FIRST_POST %} | ||
{% set preview = similar %} | ||
{% include '@vse_topicpreview/topicpreview.html' %} | ||
{% endif %} | ||
{{ macro.renderTopicPreview(similar) }} | ||
|
||
{# display topic preview in Recent Topics extension #} | ||
{% if recent_topics.TOPIC_PREVIEW_FIRST_POST %} | ||
{% set preview = recent_topics %} | ||
{% include '@vse_topicpreview/topicpreview.html' %} | ||
{% endif %} | ||
{{ macro.renderTopicPreview(recent_topics) }} | ||
|
||
{# DEPRECTATED: @v2.2.1 display topic preview in Top Five extension #} | ||
{% if top_five_topic.TOPIC_PREVIEW_FIRST_POST %} | ||
{% set preview = top_five_topic %} | ||
{% include '@vse_topicpreview/topicpreview.html' %} | ||
{% endif %} | ||
{{ macro.renderTopicPreview(top_five_topic) }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{% macro renderTopicPreview(context) %} | ||
{% if context.TOPIC_PREVIEW_FIRST_POST %} | ||
<div class="topic_preview_content" style="display: none;"> | ||
{% if context.TOPIC_PREVIEW_LAST_POST %} | ||
<strong>{{ lang('FIRST_POST') }}</strong> | ||
<hr> | ||
{% endif %} | ||
{% if context.TOPIC_PREVIEW_FIRST_AVATAR %} | ||
<div class="topic_preview_avatar"> | ||
{%- if context.TOPIC_PREVIEW_FIRST_AVATAR != constant('\\vse\\topicpreview\\core\\display::NO_AVATAR') -%} | ||
{{ context.TOPIC_PREVIEW_FIRST_AVATAR }} | ||
{%- else -%} | ||
<div class="topic_preview_no_avatar"></div> | ||
{%- endif -%} | ||
</div> | ||
{% endif %} | ||
<div class="topic_preview_first">{{ context.TOPIC_PREVIEW_FIRST_POST }}</div> | ||
{% if context.TOPIC_PREVIEW_LAST_POST %} | ||
<div class="topic_preview_break"></div> | ||
<strong>{{ lang('LAST_POST') }}</strong> | ||
<hr> | ||
{% if context.TOPIC_PREVIEW_LAST_AVATAR %} | ||
<div class="topic_preview_avatar"> | ||
{%- if context.TOPIC_PREVIEW_LAST_AVATAR != constant('\\vse\\topicpreview\\core\\display::NO_AVATAR') -%} | ||
{{ context.TOPIC_PREVIEW_LAST_AVATAR }} | ||
{%- else -%} | ||
<div class="topic_preview_no_avatar"></div> | ||
{%- endif -%} | ||
</div> | ||
{% endif %} | ||
<div class="topic_preview_last">{{ context.TOPIC_PREVIEW_LAST_POST }}</div> | ||
{% endif %} | ||
</div> | ||
{% endif %} | ||
{% endmacro %} |