Skip to content

Commit

Permalink
LSNBLDR-711: Adding config for lessonbuilder.show.twitter.link (sakai…
Browse files Browse the repository at this point in the history
…project#4130)

* LSNBLDR-711: Adding config

* Update ShowPageProducer.java

* Update default.sakai.properties
  • Loading branch information
nicholaswilson100 authored and ern committed Apr 11, 2017
1 parent 8949ac9 commit ee21577
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4713,6 +4713,13 @@
# edit your widget (or create one if you don't have one), and the id (a long number) is the value of "data-widget-id"
# in the embed code bottom right.
#lessonbuilder.twitter.widget.id=123456789012345678
#
# Set this to false to hide the 'Embed Twitter Timeline' link which
# appears in the list when you click 'Add Content' in Lessons tool
#
# true/false Defaults to false (off)
# ###############################################################
#lessonbuilder.show.twitter.link=true

#SAK-25438 - Zip Download in Resources
#Option is not available unless the next properties are configured with a value (in bytes) greater than 0.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4146,10 +4146,13 @@ private void createToolBar(UIContainer tofill, SimplePage currentPage, boolean i
makeCsrf(form, "csrf26");
UICommand.make(form, "add-student", "#{simplePageBean.addStudentContentSection}");

//Adding 'Embed twitter timeline' component
UIOutput.make(tofill, "twitter-li");
UILink twitterLink = UIInternalLink.makeURL(tofill, "add-twitter", "#");
twitterLink.decorate(new UITooltipDecorator(messageLocator.getMessage("simplepage.twitter-descrip")));
boolean showEmbedTwitterLink = ServerConfigurationService.getBoolean("lessonbuilder.show.twitter.link", false);
if (showEmbedTwitterLink){
//Adding 'Embed twitter timeline' component
UIOutput.make(tofill, "twitter-li");
UILink twitterLink = UIInternalLink.makeURL(tofill, "add-twitter", "#");
twitterLink.decorate(new UITooltipDecorator(messageLocator.getMessage("simplepage.twitter-descrip")));
}
// in case we're on an old system without current BLTI
if (bltiEntity != null && ((BltiInterface)bltiEntity).servicePresent()) {
Collection<BltiTool> bltiTools = simplePageBean.getBltiTools();
Expand Down

0 comments on commit ee21577

Please sign in to comment.