diff --git a/gradebookng/tool/src/java/org/sakaiproject/gradebookng/GradebookNgApplication.properties b/gradebookng/tool/src/java/org/sakaiproject/gradebookng/GradebookNgApplication.properties index ed36a3b6b6e8..02f89b8c46c0 100644 --- a/gradebookng/tool/src/java/org/sakaiproject/gradebookng/GradebookNgApplication.properties +++ b/gradebookng/tool/src/java/org/sakaiproject/gradebookng/GradebookNgApplication.properties @@ -21,7 +21,7 @@ label.coursegrade.released=Course grade has been released to students. label.coursegrade.notreleased=Course grade has not been released to students. label.coursegrade.nopermission=- -label.gradeitem.externalAppPrefix=Gradebook Item coming from +label.gradeitem.externalapplabel=Gradebook Item coming from {0} label.gradeitem.released=Gradebook Item has been released and is visible to students. label.gradeitem.notreleased=Gradebook Item not released to students. label.gradeitem.counted=Gradebook Item is included in the course grade calculation. diff --git a/gradebookng/tool/src/java/org/sakaiproject/gradebookng/GradebookNgApplication_es.properties b/gradebookng/tool/src/java/org/sakaiproject/gradebookng/GradebookNgApplication_es.properties index 03f9d07ad07b..880cd301a173 100644 --- a/gradebookng/tool/src/java/org/sakaiproject/gradebookng/GradebookNgApplication_es.properties +++ b/gradebookng/tool/src/java/org/sakaiproject/gradebookng/GradebookNgApplication_es.properties @@ -21,7 +21,7 @@ label.coursegrade.released=La nota del curso ha sido publicada para los estudian label.coursegrade.notreleased=La nota del curso no ha sido publicada para los estudiantes. label.coursegrade.nopermission=- -label.gradeitem.externalAppPrefix=Elemento de Calificaciones que viene de +label.gradeitem.externalapplabel=Elemento de Calificaciones que viene de {0} label.gradeitem.released=El elemento ha sido publicado y es visible para los estudiantes. label.gradeitem.notreleased=El elemento de calificaciones no ha sido publicado para los estudiantes. label.gradeitem.counted=El elemento est\u00e1 incluido en el c\u00e1lculo de la nota del curso. diff --git a/gradebookng/tool/src/java/org/sakaiproject/gradebookng/tool/pages/BasePage.java b/gradebookng/tool/src/java/org/sakaiproject/gradebookng/tool/pages/BasePage.java index c96b506d4912..9a11d4b2eb32 100644 --- a/gradebookng/tool/src/java/org/sakaiproject/gradebookng/tool/pages/BasePage.java +++ b/gradebookng/tool/src/java/org/sakaiproject/gradebookng/tool/pages/BasePage.java @@ -215,16 +215,24 @@ protected void disableLink(final Link l) { public WebMarkupContainer buildFlagWithPopover(final String componentId, final String message) { final WebMarkupContainer flagWithPopover = new WebMarkupContainer(componentId); - final String popoverHTML = ""; - final String wrappedPopoverContent = String.format(popoverHTML, message); - flagWithPopover.add(new AttributeModifier("data-toggle", "popover")); flagWithPopover.add(new AttributeModifier("data-trigger", "focus")); flagWithPopover.add(new AttributeModifier("data-placement", "bottom")); flagWithPopover.add(new AttributeModifier("data-html", "true")); - flagWithPopover.add(new AttributeModifier("data-content", wrappedPopoverContent)); + flagWithPopover.add(new AttributeModifier("data-content", generatePopoverContent(message))); flagWithPopover.add(new AttributeModifier("tabindex", "0")); return flagWithPopover; } + + + /** + * Helper to generate content for a Bootstrap popover with close button + */ + public String generatePopoverContent(final String message) { + final String popoverHTML = ""; + final String wrappedPopoverContent = String.format(popoverHTML, message); + + return wrappedPopoverContent; + } } diff --git a/gradebookng/tool/src/java/org/sakaiproject/gradebookng/tool/panels/AssignmentColumnHeaderPanel.java b/gradebookng/tool/src/java/org/sakaiproject/gradebookng/tool/panels/AssignmentColumnHeaderPanel.java index c724d07606bd..e6bcda5c5ac0 100644 --- a/gradebookng/tool/src/java/org/sakaiproject/gradebookng/tool/panels/AssignmentColumnHeaderPanel.java +++ b/gradebookng/tool/src/java/org/sakaiproject/gradebookng/tool/panels/AssignmentColumnHeaderPanel.java @@ -10,6 +10,7 @@ import org.apache.wicket.markup.html.panel.Panel; import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; +import org.apache.wicket.model.StringResourceModel; import org.apache.wicket.spring.injection.annot.SpringBean; import org.sakaiproject.gradebookng.business.GbCategoryType; import org.sakaiproject.gradebookng.business.GbRole; @@ -104,7 +105,8 @@ public void onClick() { } else { externalAppFlag.setVisible(true); externalAppFlag.add(new AttributeModifier("data-content", - getString("label.gradeitem.externalAppPrefix") + " " + assignment.getExternalAppName())); + gradebookPage.generatePopoverContent(new StringResourceModel("label.gradeitem.externalapplabel", + null, new Object[] { assignment.getExternalAppName() }).getString()))); String iconClass = "icon-sakai"; if ("Assignments".equals(assignment.getExternalAppName())) { iconClass = "icon-sakai-assignment-grades";