1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

Merge pull request #6510 from marc1706/ticket/17155

[ticket/17155] Default to first unread post on topics
This commit is contained in:
Marc Alexander
2023-08-03 19:39:02 +02:00
committed by GitHub
7 changed files with 35 additions and 32 deletions

View File

@@ -99,12 +99,11 @@
{% endif %}
<div class="list-inner">
<!-- EVENT topiclist_row_prepend -->
<!-- IF searchresults.S_UNREAD_TOPIC and not S_IS_BOT -->
<a class="unread" href="{searchresults.U_NEWEST_POST}">
{{ Icon('iconify', 'fa:file', lang('NEW_POST'), true, 'c-topic-unread-icon') }}
</a>
<!-- ENDIF -->
<a href="{searchresults.U_VIEW_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a>
{% if searchresults.S_UNREAD_TOPIC and not S_IS_BOT %}
<a href="{{ searchresults.U_NEWEST_POST }}" class="topictitle unread">{{ searchresults.TOPIC_TITLE }}</a>
{% else %}
<a href="{{ searchresults.U_VIEW_TOPIC }}" class="topictitle">{{ searchresults.TOPIC_TITLE }}</a>
{% endif %}
<!-- IF searchresults.S_TOPIC_UNAPPROVED or searchresults.S_POSTS_UNAPPROVED -->
<a href="{searchresults.U_MCP_QUEUE}" title="{L_TOPIC_UNAPPROVED}">
{{ Icon('iconify', 'fa:question', lang('TOPIC_UNAPPROVED'), true, 'c-uapproved-icon') }}

View File

@@ -54,11 +54,11 @@
<img class="row-item-sub" src="{T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}" alt="">
{% endif %}
<div class="list-inner">
<!-- IF topicrow.S_UNREAD_TOPIC -->
<a class="unread" href="{topicrow.U_NEWEST_POST}">
{{ Icon('iconify', 'fa:file', NEW_POST, true, 'c-topic-unread-icon') }}
</a>
<!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
{% if topicrow.S_UNREAD_TOPIC %}
<a href="{{ topicrow.U_NEWEST_POST }}" class="topictitle unread">{{ topicrow.TOPIC_TITLE }}</a>
{% else %}
<a href="{{ topicrow.U_VIEW_TOPIC }}" class="topictitle">{{ topicrow.TOPIC_TITLE }}</a>
{% endif %}
<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED -->
<a href="{topicrow.U_MCP_QUEUE}" title="{L_TOPIC_UNAPPROVED}">
{{ Icon('iconify', 'fa:question', lang('TOPIC_UNAPPROVED'), true, 'c-unapproved-icon') }}

View File

@@ -33,12 +33,12 @@
<img class="row-item-sub" src="{T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}" alt="">
{% endif %}
<div class="list-inner">
<!-- IF topicrow.S_UNREAD -->
<a class="unread" href="{topicrow.U_NEWEST_POST}">
{{ Icon('iconify', 'fa:file', NEW_POST, true, 'c-topic-unread-icon') }}
</a>
<!-- ENDIF -->
<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a><br />
{% if topicrow.S_UNREAD %}
<a href="{{ topicrow.U_NEWEST_POST }}" class="topictitle unread">{{ topicrow.TOPIC_TITLE }}</a>
{% else %}
<a href="{{ topicrow.U_VIEW_TOPIC }}" class="topictitle">{{ topicrow.TOPIC_TITLE }}</a>
{% endif %}
<br>
<!-- IF .topicrow.pagination -->
<div class="pagination">
<span>{{ Icon('iconify', 'fa:clone', '', true) }}</span>

View File

@@ -104,11 +104,11 @@
<img class="row-item-sub" src="{T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}" alt="">
{% endif %}
<div class="list-inner">
<!-- IF topicrow.S_UNREAD_TOPIC -->
<a class="unread" href="{topicrow.U_NEWEST_POST}">
{{ Icon('iconify', 'fa:file', NEW_POST, true, 'c-topic-unread-icon') }}
</a>
<!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
{% if topicrow.S_UNREAD_TOPIC %}
<a href="{{ topicrow.U_NEWEST_POST }}" class="topictitle unread">{{ topicrow.TOPIC_TITLE }}</a>
{% else %}
<a href="{{ topicrow.U_VIEW_TOPIC }}" class="topictitle">{{ topicrow.TOPIC_TITLE }}</a>
{% endif %}
<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED -->
<a href="{topicrow.U_MCP_QUEUE}" title="{L_TOPIC_UNAPPROVED}">
{{ Icon('iconify', 'fa:question', lang('TOPIC_UNAPPROVED'), true, 'c-unapproved-icon') }}

View File

@@ -177,12 +177,13 @@
{% endif %}
<div class="list-inner">
<!-- EVENT topiclist_row_prepend -->
<!-- IF topicrow.S_UNREAD_TOPIC and not S_IS_BOT -->
<a class="unread" href="{topicrow.U_NEWEST_POST}">
{{ Icon('iconify', 'fa:file', NEW_POST, true, 'c-topic-unread-icon') }}
</a>
<!-- ENDIF -->
<!-- IF topicrow.U_VIEW_TOPIC --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a><!-- ELSE -->{topicrow.TOPIC_TITLE}<!-- ENDIF -->
{% if topicrow.S_UNREAD_TOPIC and not S_IS_BOT %}
<a href="{{ topicrow.U_NEWEST_POST }}" class="topictitle unread">{{ topicrow.TOPIC_TITLE }}</a>
{% elseif topicrow.U_VIEW_TOPIC %}
<a href="{{ topicrow.U_VIEW_TOPIC }}" class="topictitle">{{ topicrow.TOPIC_TITLE }}</a>
{% else %}
<span class="topictitle">{{ topicrow.TOPIC_TITLE }}</span>
{% endif %}
<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED -->
<a href="{topicrow.U_MCP_QUEUE}" title="<!-- IF topicrow.S_TOPIC_UNAPPROVED -->{L_TOPIC_UNAPPROVED}<!-- ELSE -->{L_POSTS_UNAPPROVED}<!-- ENDIF -->">
{{ Icon('iconify', 'fa:question', '', true, 'c-unapproved-icon') }}<span class="sr-only"><!-- IF topicrow.S_TOPIC_UNAPPROVED -->{L_TOPIC_UNAPPROVED}<!-- ELSE -->{L_POSTS_UNAPPROVED}<!-- ENDIF --></span>