Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IVYPORTAL-17918 Notification bug: some lines have no message and cause error when clicking Start #1247

Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -205,4 +205,8 @@ private void handleTask(Consumer<ITask> taskHandler) {
}
}

public boolean isActionAvailible(NotificationDto dto) {
return dto.getRunAction() != null;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,26 @@
<p:tooltip for="notification-mark-as-read"
value="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/notifications/markAsRead')}" />
</div>
<div class="flex notification-message-block flex-column">
<p:commandLink id="notification-message" styleClass="notification-message"
actionListener="#{notificationBean.goToTaskDetail(notification)}" rendered="#{notification.infoAction != null}">
<h:outputText value="#{htmlSanitizerBean.sanitize(notification.message)}" />
</p:commandLink>
<p:tooltip for="notification-message" value="#{notification.infoAction.title}" />
<h:outputText value="#{notification.timeSince}" styleClass="font-normal notifications-item-time-since" />
</div>
<div class="flex notification-action-block">
<div class="flex notification-message-block flex-column">
<h:panelGroup rendered="#{notification.infoAction != null}">
<p:commandLink id="notification-message" styleClass="notification-message"
actionListener="#{notificationBean.goToNotificationDetail(notification, isWorkingOnATask, task)}">
<h:outputText value="#{htmlSanitizerBean.sanitize(notification.message)}" />
</p:commandLink>
<p:tooltip for="notification-message" value="#{notification.infoAction.title}" />
</h:panelGroup>
<h:panelGroup rendered="#{notification.infoAction == null}">
<h:outputText value="#{htmlSanitizerBean.sanitize(notification.message)}" />
</h:panelGroup>
<h:outputText value="#{notification.timeSince}" styleClass="font-normal notifications-item-time-since" />
</div>
<p:outputPanel rendered="#{notificationBean.isActionAvailible(notification)}" styleClass="flex notification-action-block">
<p:commandLink id="notification-start-task" styleClass="notification-start-task"
actionListener="#{notificationBean.startTask(notification)}" rendered="#{notification.runAction != null}">
<i class="fa fa-play notification-start-task-icon" />
</p:commandLink>
<p:tooltip for="notification-start-task" value="#{notification.runAction.title}" />
</div>
</p:outputPanel>
</div>
</div>
</p:dataScroller>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,26 @@
value="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/notifications/markAsRead')}" />
</div>
<div class="flex notification-message-block flex-column">
<p:commandLink id="notification-message" styleClass="notification-message" actionListener="#{widget.goToTaskDetail(notification)}"
rendered="#{notification.infoAction != null}" disabled="#{!isReadOnlyMode}" >
<h:panelGroup rendered="#{notification.infoAction != null}">
<p:commandLink id="notification-message"
styleClass="notification-message"
actionListener="#{notificationBean.goToNotificationDetail(notification, isWorkingOnATask, task)}">
<h:outputText value="#{htmlSanitizerBean.sanitize(notification.message)}" />
</p:commandLink>
<p:tooltip for="notification-message" value="#{notification.infoAction.title}" />
<p:tooltip for="notification-message" value="#{notification.infoAction.title}" />
<p:tooltip for="notification-message" value="#{notification.infoAction.title}" />
</h:panelGroup>
<h:panelGroup rendered="#{notification.infoAction == null}">
<h:outputText value="#{htmlSanitizerBean.sanitize(notification.message)}" />
</h:panelGroup>
<h:outputText value="#{notification.timeSince}" styleClass="font-normal notifications-item-time-since" />
</div>
<div class="flex notification-action-block">
<p:outputPanel rendered="#{notificationBean.isActionAvailible(notification)}" styleClass="flex notification-action-block">
<p:commandLink disabled="#{!isReadOnlyMode}" id="notification-start-task" styleClass="notification-start-task"
actionListener="#{widget.startTaskFromNoti(notification)}" rendered="#{notification.runAction != null}" >
<i class="fa fa-play notification-start-task-icon" />
</p:commandLink>
<p:tooltip for="notification-start-task" value="#{notification.runAction.title}" />
</div>
</p:outputPanel>
</div>
</div>
</p:dataScroller>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,26 @@
value="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/notifications/markAsRead')}" />
</div>
<div class="flex notification-message-block flex-column">
<p:commandLink id="notification-message" styleClass="notification-message"
actionListener="#{notificationBean.goToNotificationDetail(notification, isWorkingOnATask, task)}"
rendered="#{notification.infoAction != null}">
<h:outputText value="#{htmlSanitizerBean.sanitize(notification.message)}" />
</p:commandLink>
<h:panelGroup rendered="#{notification.infoAction != null}">
<p:commandLink id="notification-message" styleClass="notification-message"
actionListener="#{notificationBean.goToNotificationDetail(notification, isWorkingOnATask, task)}">
<h:outputText value="#{htmlSanitizerBean.sanitize(notification.message)}" />
</p:commandLink>
<p:tooltip for="notification-message" value="#{notification.infoAction.title}" />
<h:outputText value="#{notification.timeSince}" styleClass="font-normal notifications-item-time-since" />
</h:panelGroup>
<h:panelGroup rendered="#{notification.infoAction == null}">
<h:outputText value="#{htmlSanitizerBean.sanitize(notification.message)}" />
</h:panelGroup>
<h:outputText value="#{notification.timeSince}" styleClass="font-normal notifications-item-time-since" />
</div>
<div class="flex notification-action-block">
<p:outputPanel rendered="#{notificationBean.isActionAvailible(notification)}" styleClass="flex notification-action-block">
<p:commandLink id="notification-start-task"
styleClass="notification-start-task"
actionListener="#{notificationBean.startTaskFromNotification(notification, isWorkingOnATask, task)}">
<i class="fa fa-play notification-start-task-icon" />
</p:commandLink>
<p:tooltip for="notification-start-task" value="#{notification.runAction.title}" />
</div>
</p:outputPanel>
</div>
</div>
</p:dataScroller>
Expand Down
Loading