- protected void processTemplate(Request request, Template template) throws RedirectException {
- super.processTemplate(request, template);
- template.set("currentSone", getCurrentSone(request.getToadletContext()));
+ protected void processTemplate(FreenetRequest request, TemplateContext templateContext) throws RedirectException {
+ super.processTemplate(request, templateContext);
+ Sone currentSone = getCurrentSone(request.getToadletContext(), false);
+ templateContext.set("core", webInterface.getCore());
+ templateContext.set("currentSone", currentSone);
+ templateContext.set("localSones", webInterface.getCore().getLocalSones());
+ templateContext.set("request", request);
+ templateContext.set("currentVersion", SonePlugin.VERSION);
+ templateContext.set("hasLatestVersion", webInterface.getCore().getUpdateChecker().hasLatestVersion());
+ templateContext.set("latestEdition", webInterface.getCore().getUpdateChecker().getLatestEdition());
+ templateContext.set("latestVersion", webInterface.getCore().getUpdateChecker().getLatestVersion());
+ templateContext.set("latestVersionTime", webInterface.getCore().getUpdateChecker().getLatestVersionDate());
+ List<Notification> notifications = ListNotificationFilters.filterNotifications(webInterface.getNotifications().getNotifications(), currentSone);
+ Collections.sort(notifications, Notification.CREATED_TIME_SORTER);
+ templateContext.set("notifications", notifications);
+ templateContext.set("notificationHash", HashCode.hashCode(notifications));