diff --git a/lessonbuilder/api/src/java/org/sakaiproject/lessonbuildertool/SimplePageItem.java b/lessonbuilder/api/src/java/org/sakaiproject/lessonbuildertool/SimplePageItem.java index e48e044f214c..ddbbaedf0b66 100644 --- a/lessonbuilder/api/src/java/org/sakaiproject/lessonbuildertool/SimplePageItem.java +++ b/lessonbuilder/api/src/java/org/sakaiproject/lessonbuildertool/SimplePageItem.java @@ -50,6 +50,8 @@ public interface SimplePageItem { public static final int CHECKLIST = 15; public static final int FORUM_SUMMARY = 16; public static final int ANNOUNCEMENTS = 17; + public static final int TWITTER = 18; + public static final int CALENDAR = 19; // sakaiId used for an item copied from another site with no real content public static final String DUMMY = "/dummy"; diff --git a/lessonbuilder/tool/src/java/org/sakaiproject/lessonbuildertool/tool/producers/ReorderProducer.java b/lessonbuilder/tool/src/java/org/sakaiproject/lessonbuildertool/tool/producers/ReorderProducer.java index 350aaacf92db..187d6f7319ad 100644 --- a/lessonbuilder/tool/src/java/org/sakaiproject/lessonbuildertool/tool/producers/ReorderProducer.java +++ b/lessonbuilder/tool/src/java/org/sakaiproject/lessonbuildertool/tool/producers/ReorderProducer.java @@ -183,14 +183,23 @@ public void fillComponents(UIContainer tofill, ViewParameters params, ComponentC String.valueOf(i.getSequence())); if (i.getType() == 5) { - String text = FormattedText.convertFormattedTextToPlaintext(i.getHtml()); - if (text.length() > 100) - text = text.substring(0,100); - UIOutput.make(row, "text-snippet", text); + if (i.getAttribute("isFolder")!=null && i.getAttribute("isFolder").equals("true")){ + UIOutput.make(row, "text-snippet", messageLocator.getMessage("simplepage.resources-snippet")); + } + else { + String text = FormattedText.convertFormattedTextToPlaintext(i.getHtml()); + if (text.length() > 100) + text = text.substring(0, 100); + UIOutput.make(row, "text-snippet", text); + } } else if (SimplePageItem.ANNOUNCEMENTS == i.getType()) { UIOutput.make(row, "text-snippet", messageLocator.getMessage("simplepage.announcements-snippet")); } else if (SimplePageItem.FORUM_SUMMARY == i.getType()) { UIOutput.make(row, "text-snippet", messageLocator.getMessage("simplepage.forums-snippet")); + } else if (SimplePageItem.TWITTER == i.getType()) { + UIOutput.make(row, "text-snippet", messageLocator.getMessage("simplepage.twitter-snippet")); + } else if (SimplePageItem.CALENDAR == i.getType()) { + UIOutput.make(row, "text-snippet", messageLocator.getMessage("simplepage.calendar-snippet")); } else if ("1".equals(subtype)) { // embed code, nothing useful to show UIOutput.make(row, "text-snippet", messageLocator.getMessage("simplepage.embedded-video")); diff --git a/lessonbuilder/tool/src/resources/messages.properties b/lessonbuilder/tool/src/resources/messages.properties index 68b2193f763e..491e7ae1c01f 100644 --- a/lessonbuilder/tool/src/resources/messages.properties +++ b/lessonbuilder/tool/src/resources/messages.properties @@ -740,3 +740,6 @@ simplepage.announcements-error-message=Error in adding announcements: simplepage.announcements-header-title=Announcements simplepage.announcements-snippet=latest announcements simplepage.forums-snippet=latest forum conversations +simplepage.twitter-snippet=twitter timeline +simplepage.resources-snippet=resources folder +simplepage.calendar-snippet=calendar