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 MW |
19 | |
20 | {include file='userMenuSidebar'} | |
21 | ||
95961bdf | 22 | {include file='header'} |
320f4a6d | 23 | |
e7b063d6 AE |
24 | {hascontent} |
25 | <div class="paginationTop"> | |
26 | {content}{pages print=true assign=pagesLinks controller='NotificationList' link="pageNo=%d"}{/content} | |
27 | </div> | |
28 | {/hascontent} | |
320f4a6d MW |
29 | |
30 | {if $notifications[notifications]} | |
aa6fcadf AE |
31 | {assign var=lastPeriod value=''} |
32 | ||
33 | {foreach from=$notifications[notifications] item=$notification} | |
34 | {if $notification[event]->getPeriod() != $lastPeriod} | |
35 | {if $lastPeriod} | |
36 | </ul> | |
95961bdf | 37 | </section> |
aa6fcadf AE |
38 | {/if} |
39 | {assign var=lastPeriod value=$notification[event]->getPeriod()} | |
40 | ||
95961bdf MW |
41 | <section class="section sectionContainerList"> |
42 | <h2 class="sectionTitle">{$lastPeriod}</h2> | |
aa6fcadf | 43 | |
078256b5 | 44 | <ul class="containerList userNotificationItemList"> |
aa6fcadf | 45 | {/if} |
1a6e8c52 | 46 | <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 | 47 | <div class="box32"> |
8a4289f5 | 48 | {if $notification[authors] < 2} |
95961bdf | 49 | <div class="jsTooltip" title="{$notification[event]->getAuthor()->username}"> |
0d42c1c1 | 50 | {@$notification[event]->getAuthor()->getAvatar()->getImageTag(32)} |
078256b5 | 51 | </div> |
320f4a6d | 52 | |
8a4289f5 | 53 | <div class="details"> |
aac6a148 MW |
54 | <p> |
55 | {if !$notification[confirmed]}<span class="badge label newContentBadge">{lang}wcf.message.new{/lang}</span>{/if} | |
56 | {@$notification[event]->getMessage()} | |
57 | </p> | |
58 | <p><small>{@$notification[time]|time}</small></p> | |
8a4289f5 AE |
59 | </div> |
60 | {else} | |
95961bdf | 61 | <div> |
0d42c1c1 | 62 | <span class="icon icon32 fa-users"></span> |
078256b5 | 63 | </div> |
320f4a6d | 64 | |
8a4289f5 | 65 | <div class="details"> |
aac6a148 MW |
66 | <p> |
67 | {if !$notification[confirmed]}<span class="badge label newContentBadge">{lang}wcf.message.new{/lang}</span>{/if} | |
68 | {@$notification[event]->getMessage()} | |
69 | </p> | |
70 | <p><small>{@$notification[time]|time}</small></p> | |
8a4289f5 | 71 | |
95961bdf | 72 | <ul> |
8a4289f5 | 73 | {foreach from=$notification[event]->getAuthors() item=author} |
afb18fa2 | 74 | {if $author->userID} |
95961bdf | 75 | <li style="display: inline-block" class="jsTooltip" title="{$author->username}"><a href="{link controller='User' object=$author}{/link}">{@$author->getAvatar()->getImageTag(24)}</a></li> |
afb18fa2 | 76 | {/if} |
8a4289f5 AE |
77 | {/foreach} |
78 | </ul> | |
8a4289f5 AE |
79 | </div> |
80 | {/if} | |
320f4a6d MW |
81 | </div> |
82 | </li> | |
aa6fcadf | 83 | {/foreach} |
320f4a6d | 84 | </ul> |
95961bdf | 85 | </section> |
320f4a6d | 86 | |
e7b063d6 AE |
87 | <footer class="contentFooter"> |
88 | {hascontent} | |
89 | <div class="paginationBottom"> | |
90 | {content}{@$pagesLinks}{/content} | |
91 | </div> | |
92 | {/hascontent} | |
320f4a6d MW |
93 | |
94 | {hascontent} | |
e7b063d6 | 95 | <nav class="contentFooterNavigation"> |
320f4a6d | 96 | <ul> |
e7b063d6 | 97 | {content}{event name='contentFooterNavigation'}{/content} |
320f4a6d MW |
98 | </ul> |
99 | </nav> | |
100 | {/hascontent} | |
e7b063d6 | 101 | </footer> |
320f4a6d MW |
102 | {else} |
103 | <p class="info">{lang}wcf.user.notification.noNotifications{/lang}</p> | |
104 | {/if} | |
105 | ||
3e93caf9 MW |
106 | <script data-relocate="true"> |
107 | //<![CDATA[ | |
108 | $(function() { | |
109 | WCF.Language.addObject({ | |
110 | 'wcf.user.notification.markAsConfirmed': '{lang}wcf.user.notification.markAsConfirmed{/lang}', | |
111 | 'wcf.user.notification.markAllAsConfirmed.confirmMessage': '{lang}wcf.user.notification.markAllAsConfirmed.confirmMessage{/lang}' | |
112 | }); | |
113 | ||
114 | new WCF.Notification.List(); | |
115 | }); | |
116 | //]]> | |
117 | </script> | |
320f4a6d | 118 | |
3e93caf9 | 119 | {include file='footer'} |