--- /dev/null
+{foreach from=$groupedUsers item=group}
+ {if $group}
+ <section class="section sectionContainerList">
+ <h2 class="sectionTitle">{@$group}</h2>
+ {/if}
+
+ {if $group|count}
+ <ol class="containerList jsGroupedUserList">
+ {foreach from=$group item=user}
+ {include file='userListItem'}
+ {/foreach}
+ </ol>
+ {else}
+ <p>{$group->getNoUsersMessage()}</p>
+ {/if}
+
+ {if $group}
+ </section>
+ {/if}
+{/foreach}
+
+<div class="paginationBottom jsPagination"></div>
+
+<script data-relocate="true">
+ $(function() {
+ WCF.Language.addObject({
+ 'wcf.user.button.follow': '{lang}wcf.user.button.follow{/lang}',
+ 'wcf.user.button.ignore': '{lang}wcf.user.button.ignore{/lang}',
+ 'wcf.user.button.unfollow': '{lang}wcf.user.button.unfollow{/lang}',
+ 'wcf.user.button.unignore': '{lang}wcf.user.button.unignore{/lang}'
+ });
+
+ new WCF.User.Action.Follow($('.jsGroupedUserList > li'));
+ new WCF.User.Action.Ignore($('.jsGroupedUserList > li'));
+ });
+</script>
\ No newline at end of file
use wcf\system\user\activity\point\UserActivityPointHandler;
use wcf\system\user\GroupedUserList;
use wcf\system\WCF;
+use wcf\util\StringUtil;
/**
* Executes reaction-related actions.
// we cast the reactionTypeID to a string, so that we can sort the array
if (!isset($data[(string)$item->getReactionType()->reactionTypeID])) {
- $data[(string)$item->getReactionType()->reactionTypeID] = new GroupedUserList($item->getReactionType()->getTitle());
+ $data[(string)$item->getReactionType()->reactionTypeID] = new GroupedUserList($item->getReactionType()->renderIcon() . ' ' . StringUtil::encodeHTML($item->getReactionType()->getTitle()));
}
$data[(string)$item->getReactionType()->reactionTypeID]->addUserIDs([$item->userID]);
});
return [
- 'template' => WCF::getTPL()->fetch('groupedUserList', 'wcf', ['groupedUsers' => $data]),
+ 'template' => WCF::getTPL()->fetch('groupedUserReactionList', 'wcf', ['groupedUsers' => $data]),
'title' => WCF::getLanguage()->get('wcf.reactions.summary.title')
];
}