1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/11103] Make sure notifications are marked read when clicking them

How do we do this? If an item is unread, the URL to view that item will
be the URL to mark it as read (index.php?mark_notification=$id). When the
URL is visited it marks the item as read and redirects them to the correct
URL for the item.

If the item is read, the URL is directly to the item.

Prettify the html output

PHPBB-11103
This commit is contained in:
Nathan Guse
2012-10-14 12:35:35 -05:00
parent 716635c834
commit a48f090338
7 changed files with 63 additions and 35 deletions

View File

@@ -137,14 +137,15 @@
<ul class="topiclist forums">
<!-- BEGIN notifications -->
<li class="row<!-- IF notifications.UNREAD --> bg2<!-- ENDIF -->">
<!-- IF notifications.URL --><a href="{notifications.URL}"><!-- ENDIF -->
{notifications.AVATAR}
<div>
{notifications.FORMATTED_TITLE}<br />
{notifications.TIME}
</div>
<!-- IF notifications.URL or notifications.U_MARK_READ --><a href="<!-- IF notifications.UNREAD -->{notifications.U_MARK_READ}<!-- ELSE -->{notifications.URL}<!-- ENDIF -->"><!-- ENDIF -->
<span>
{notifications.AVATAR}
<span class="notification_title">
{notifications.FORMATTED_TITLE}
<div class="notification_time">{notifications.TIME}</div>
</span>
</span>
<!-- IF notifications.URL --></a><!-- ENDIF -->
<!-- IF notifications.UNREAD --><a href="{notifications.U_MARK_READ}" title="{L_MARK_READ}">{L_MARK_READ}</a><!-- ENDIF -->
</li>
<!-- END notifications -->
</ul>

View File

@@ -77,14 +77,17 @@
<li class="row<!-- IF notification_list.UNREAD --> bg3<!-- ELSE --><!-- IF notification_list.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- ENDIF -->">
<dl>
<dt>
<!-- IF notification_list.URL --><a href="{notification_list.URL}"><!-- ENDIF -->
{notification_list.AVATAR}
<div>
{notification_list.FORMATTED_TITLE}<br />
{notification_list.TIME}
</div>
<!-- IF notification_list.URL or notification_list.U_MARK_READ --><a href="<!-- IF notification_list.UNREAD -->{notification_list.U_MARK_READ}<!-- ELSE -->{notification_list.URL}<!-- ENDIF -->"><!-- ENDIF -->
<span>
{notification_list.AVATAR}
<span class="notification_title">
{notification_list.FORMATTED_TITLE}
<div class="notification_time">{notification_list.TIME}</div>
</span>
</span>
<!-- IF notification_list.URL --></a><!-- ENDIF -->
</dt>
<dd class="mark"><!-- IF notification_list.UNREAD --><input type="checkbox" name="mark[]" value="{notification_list.NOTIFICATION_ID}" /> <dfn>{L_MARK_READ}</dfn><!-- ENDIF --></dd>
</dl>
</li>

View File

@@ -680,15 +680,29 @@ p.rules a {
#notification_list ul li {
padding: 10px;
width: 310px;
line-height: 1.5em;
}
.notification_list ul li a {
text-decoration: none;
}
.notification_list ul li img {
.notification_list ul li a span img {
float: left;
padding: 0 10px 10px 0;
max-width: 50px;
max-height: 50px;
}
.notification_list ul li span .notification_title {
float: left;
width: 240px;
margin: 0 0 0 5px;
word-wrap: break-word;
position: relative;
top: -0.2em;
}
.notification_list ul li dl dt span .notification_title {
width: auto;
padding: 10px 0 0 0;
}
.notification_time {
margin-top: 0.5em;
}