diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2014-02-20 21:14:34 -0800 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net> | 2014-02-20 21:14:34 -0800 |
commit | 379c3fd79c4846b3453c1ad5195ca9b627176f06 (patch) | |
tree | 2cda81edbdd023ec3503a959d79b9861b1c13472 /src/com/p4square/grow/frontend/TrainingPageResource.java | |
parent | 91f5eb337fb7223cc680582d42f2d31a906cfbca (diff) |
Added support for displaying message on Feed.
Changed MessageThread so that a thread always contains one original
message.
Added support in JsonEncodedProvider for JavaTypes in addition to
classes.
Updated communityfeed.ftl to actually display questions and answers.
Diffstat (limited to 'src/com/p4square/grow/frontend/TrainingPageResource.java')
-rw-r--r-- | src/com/p4square/grow/frontend/TrainingPageResource.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com/p4square/grow/frontend/TrainingPageResource.java b/src/com/p4square/grow/frontend/TrainingPageResource.java index 0f2b284..a7ebd61 100644 --- a/src/com/p4square/grow/frontend/TrainingPageResource.java +++ b/src/com/p4square/grow/frontend/TrainingPageResource.java @@ -70,6 +70,7 @@ public class TrainingPageResource extends FreeMarkerPageResource { private JsonRequestClient mJsonClient; private Provider<String, TrainingRecord> mTrainingRecordProvider; + private FeedData mFeedData; // Fields pertaining to this request. protected String mChapter; @@ -95,6 +96,8 @@ public class TrainingPageResource extends FreeMarkerPageResource { } }; + mFeedData = new FeedData(getContext(), mConfig); + mChapter = getAttribute("chapter"); mUserId = getRequest().getClientInfo().getUser().getIdentifier(); } @@ -209,7 +212,12 @@ public class TrainingPageResource extends FreeMarkerPageResource { root.put("overallProgress", overallProgress); root.put("videos", videos); root.put("allowUserToSkip", allowUserToSkip); - root.put("showfeed", getQueryValue("showfeed") != null); + + boolean showfeed = getQueryValue("showfeed") != null; + root.put("showfeed", showfeed); + if (showfeed) { + root.put("feeddata", mFeedData); + } return new TemplateRepresentation(mTrainingTemplate, root, MediaType.TEXT_HTML); |