diff --git a/lessonbuilder/tool/src/java/org/sakaiproject/lessonbuildertool/tool/beans/SimplePageBean.java b/lessonbuilder/tool/src/java/org/sakaiproject/lessonbuildertool/tool/beans/SimplePageBean.java index 417c16908313..24586ebe2950 100644 --- a/lessonbuilder/tool/src/java/org/sakaiproject/lessonbuildertool/tool/beans/SimplePageBean.java +++ b/lessonbuilder/tool/src/java/org/sakaiproject/lessonbuildertool/tool/beans/SimplePageBean.java @@ -3401,7 +3401,8 @@ public String getReleaseString(SimplePageItem i, Locale locale) { return null; if (page.isHidden()) return messageLocator.getMessage("simplepage.hiddenpage"); - if (page.getReleaseDate() != null && page.getReleaseDate().after(new Date())) { + // for index of pages we need to show even out of date release dates + if (page.getReleaseDate() != null) { // && page.getReleaseDate().after(new Date())) { DateFormat df = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT, locale); TimeZone tz = TimeService.getLocalTimeZone(); df.setTimeZone(tz); diff --git a/lessonbuilder/tool/src/java/org/sakaiproject/lessonbuildertool/tool/producers/PagePickerProducer.java b/lessonbuilder/tool/src/java/org/sakaiproject/lessonbuildertool/tool/producers/PagePickerProducer.java index e9167a645f24..48ad10893696 100644 --- a/lessonbuilder/tool/src/java/org/sakaiproject/lessonbuildertool/tool/producers/PagePickerProducer.java +++ b/lessonbuilder/tool/src/java/org/sakaiproject/lessonbuildertool/tool/producers/PagePickerProducer.java @@ -114,6 +114,8 @@ public class PageEntry { String title; int level; boolean toplevel; + boolean hidden; + Date releaseDate; } public void setSimplePageBean(SimplePageBean simplePageBean) { @@ -159,9 +161,9 @@ public void findAllPages(SimplePageItem pageItem, Listentries, Mapentries, Map 5) level = 5; String imagePath = "/lessonbuilder-tool/images/"; - SimplePageItem item = simplePageBean.findItem(entry.itemId); + SimplePageLogEntry logEntry = simplePageBean.getLogEntry(entry.itemId); String note = null; if (logEntry != null && logEntry.isComplete()) { @@ -560,8 +564,21 @@ else if (summaryPage && entry.itemId != null) { } - if (canEditPage && entry != null && entry.pageId != null && sharedPages.contains(entry.pageId)) { - UIOutput.make(row, "shared"); + + if (canEditPage && entry != null && entry.pageId != null) { + String text = null; + if (sharedPages.contains(entry.pageId)) + text = messageLocator.getMessage("simplepage.sharedpage"); + SimplePageItem item = simplePageBean.findItem(entry.itemId); + String released = simplePageBean.getReleaseString(item, localeGetter.get()); + if (released != null) { + if (text != null) + text = text + released; + else + text = released; + } + if (text != null) + UIOutput.make(row, "shared", text); } // debug code for development. this will be removed at some point diff --git a/lessonbuilder/tool/src/webapp/templates/PagePicker.html b/lessonbuilder/tool/src/webapp/templates/PagePicker.html index 10bf85a91f60..2e08809b2e3d 100644 --- a/lessonbuilder/tool/src/webapp/templates/PagePicker.html +++ b/lessonbuilder/tool/src/webapp/templates/PagePicker.html @@ -44,7 +44,7 @@

- page1page2item1item2 + page1page2item1item2