Commit | Line | Data |
---|---|---|
3e93caf9 MW |
1 | {capture assign='contentHeader'} |
2 | <header class="contentHeader"> | |
3 | <div class="contentHeaderTitle"> | |
ff9e3598 | 4 | <h1 class="contentTitle">{$__wcf->getActivePage()->getTitle()} <span class="badge jsNotificationsBadge">{#$__wcf->getUserNotificationHandler()->countAllNotifications()}</span></h1> |
3e93caf9 MW |
5 | </div> |
6 | ||
7 | {hascontent} | |
8 | <nav class="contentHeaderNavigation"> | |
9 | <ul> | |
10 | {content} | |
11 | {if $__wcf->getUserNotificationHandler()->getNotificationCount()}<li class="jsOnly"><a class="button jsMarkAllAsConfirmed"><span class="icon icon16 fa-check"></span> <span>{lang}wcf.user.notification.markAllAsConfirmed{/lang}</span></a></li>{/if} | |
12 | {event name='contentHeaderNavigation'} | |
13 | {/content} | |
14 | </ul> | |
15 | </nav> | |
16 | {/hascontent} | |
17 | </header> | |
18 | {/capture} | |
320f4a6d | 19 | |
40aa9168 | 20 | {capture assign='headContent'} |
b37952e9 | 21 | <link rel="alternate" type="application/rss+xml" title="{lang}wcf.global.button.rss{/lang}" href="{link controller='NotificationFeed'}at={@$__wcf->getUser()->userID}-{@$__wcf->getUser()->accessToken}{/link}"> |
40aa9168 | 22 | {/capture} |
23 | ||
24 | {capture assign='headerNavigation'} | |
b37952e9 | 25 | <li><a rel="alternate" href="{link controller='NotificationFeed'}at={@$__wcf->getUser()->userID}-{@$__wcf->getUser()->accessToken}{/link}" title="{lang}wcf.global.button.rss{/lang}" class="jsTooltip"><span class="icon icon16 fa-rss"></span> <span class="invisible">{lang}wcf.global.button.rss{/lang}</span></a></li> |
40aa9168 | 26 | {/capture} |
27 | ||
320f4a6d MW |
28 | {include file='userMenuSidebar'} |
29 | ||
95961bdf | 30 | {include file='header'} |
320f4a6d | 31 | |
e7b063d6 AE |
32 | {hascontent} |
33 | <div class="paginationTop"> | |
34 | {content}{pages print=true assign=pagesLinks controller='NotificationList' link="pageNo=%d"}{/content} | |
35 | </div> | |
36 | {/hascontent} | |
320f4a6d MW |
37 | |
38 | {if $notifications[notifications]} | |
aa6fcadf AE |
39 | {assign var=lastPeriod value=''} |
40 | ||
41 | {foreach from=$notifications[notifications] item=$notification} | |
42 | {if $notification[event]->getPeriod() != $lastPeriod} | |
43 | {if $lastPeriod} | |
44 | </ul> | |
95961bdf | 45 | </section> |
aa6fcadf AE |
46 | {/if} |
47 | {assign var=lastPeriod value=$notification[event]->getPeriod()} | |
48 | ||
95961bdf MW |
49 | <section class="section sectionContainerList"> |
50 | <h2 class="sectionTitle">{$lastPeriod}</h2> | |
aa6fcadf | 51 | |
078256b5 | 52 | <ul class="containerList userNotificationItemList"> |
aa6fcadf | 53 | {/if} |
1a6e8c52 | 54 | <li class="jsNotificationItem notificationItem{if $notification[authors] > 1} groupedNotificationItem{/if}{if !$notification[event]->isConfirmed()} notificationUnconfirmed{/if}" data-link="{if $notification[event]->isConfirmed()}{$notification[event]->getLink()}{else}{link controller='NotificationConfirm' id=$notification[notificationID]}{/link}{/if}" data-link-replace-all="{if $notification[event]->isConfirmed()}false{else}true{/if}" data-object-id="{@$notification[notificationID]}" data-is-read="{if $notification[event]->isConfirmed()}true{else}false{/if}" data-is-grouped="{if $notification[authors] > 1}true{else}false{/if}"> |
0d42c1c1 | 55 | <div class="box32"> |
8a4289f5 | 56 | {if $notification[authors] < 2} |
95961bdf | 57 | <div class="jsTooltip" title="{$notification[event]->getAuthor()->username}"> |
0d42c1c1 | 58 | {@$notification[event]->getAuthor()->getAvatar()->getImageTag(32)} |
078256b5 | 59 | </div> |
320f4a6d | 60 | |
8a4289f5 | 61 | <div class="details"> |
aac6a148 MW |
62 | <p> |
63 | {if !$notification[confirmed]}<span class="badge label newContentBadge">{lang}wcf.message.new{/lang}</span>{/if} | |
64 | {@$notification[event]->getMessage()} | |
65 | </p> | |
66 | <p><small>{@$notification[time]|time}</small></p> | |
8a4289f5 AE |
67 | </div> |
68 | {else} | |
95961bdf | 69 | <div> |
0d42c1c1 | 70 | <span class="icon icon32 fa-users"></span> |
078256b5 | 71 | </div> |
320f4a6d | 72 | |
8a4289f5 | 73 | <div class="details"> |
aac6a148 MW |
74 | <p> |
75 | {if !$notification[confirmed]}<span class="badge label newContentBadge">{lang}wcf.message.new{/lang}</span>{/if} | |
76 | {@$notification[event]->getMessage()} | |
77 | </p> | |
78 | <p><small>{@$notification[time]|time}</small></p> | |
8a4289f5 | 79 | |
98618a3e | 80 | <ul class="userAvatarList small"> |
8a4289f5 | 81 | {foreach from=$notification[event]->getAuthors() item=author} |
afb18fa2 | 82 | {if $author->userID} |
98618a3e | 83 | <li class="jsTooltip" title="{$author->username}"><a href="{link controller='User' object=$author}{/link}">{@$author->getAvatar()->getImageTag(24)}</a></li> |
afb18fa2 | 84 | {/if} |
8a4289f5 AE |
85 | {/foreach} |
86 | </ul> | |
8a4289f5 AE |
87 | </div> |
88 | {/if} | |
320f4a6d MW |
89 | </div> |
90 | </li> | |
aa6fcadf | 91 | {/foreach} |
320f4a6d | 92 | </ul> |
95961bdf | 93 | </section> |
320f4a6d | 94 | |
e7b063d6 AE |
95 | <footer class="contentFooter"> |
96 | {hascontent} | |
97 | <div class="paginationBottom"> | |
98 | {content}{@$pagesLinks}{/content} | |
99 | </div> | |
100 | {/hascontent} | |
320f4a6d MW |
101 | |
102 | {hascontent} | |
e7b063d6 | 103 | <nav class="contentFooterNavigation"> |
320f4a6d | 104 | <ul> |
e7b063d6 | 105 | {content}{event name='contentFooterNavigation'}{/content} |
320f4a6d MW |
106 | </ul> |
107 | </nav> | |
108 | {/hascontent} | |
e7b063d6 | 109 | </footer> |
320f4a6d MW |
110 | {else} |
111 | <p class="info">{lang}wcf.user.notification.noNotifications{/lang}</p> | |
112 | {/if} | |
113 | ||
3e93caf9 | 114 | <script data-relocate="true"> |
3e93caf9 MW |
115 | $(function() { |
116 | WCF.Language.addObject({ | |
117 | 'wcf.user.notification.markAsConfirmed': '{lang}wcf.user.notification.markAsConfirmed{/lang}', | |
118 | 'wcf.user.notification.markAllAsConfirmed.confirmMessage': '{lang}wcf.user.notification.markAllAsConfirmed.confirmMessage{/lang}' | |
119 | }); | |
120 | ||
121 | new WCF.Notification.List(); | |
122 | }); | |
3e93caf9 | 123 | </script> |
320f4a6d | 124 | |
3e93caf9 | 125 | {include file='footer'} |