diff --git a/app/com/gitpitch/controllers/PitchController.java b/app/com/gitpitch/controllers/PitchController.java index 116c32d..1225e76 100644 --- a/app/com/gitpitch/controllers/PitchController.java +++ b/app/com/gitpitch/controllers/PitchController.java @@ -193,7 +193,8 @@ public class PitchController extends Controller { String pitchme, String notes, String fragments, - String offline) { + String offline, + String webprint) { PitchParams pp = PitchParams.build(grsOnCall(grs), @@ -202,6 +203,8 @@ public class PitchController extends Controller { (fragments == null) ? false : !Boolean.parseBoolean(fragments); boolean isOffline = (offline == null) ? false : Boolean.parseBoolean(offline); + boolean webPrinting = + (webprint == null) ? false : Boolean.parseBoolean(webprint); Optional ssmo = pitchService.cachedYAML(pp); @@ -222,7 +225,7 @@ public class PitchController extends Controller { ssm = ssm.clone(pp); return CompletableFuture.completedFuture( ok(com.gitpitch.views.html.Slideshow.render(ssm, - deps, printing, isOffline))); + deps, printing, isOffline, webPrinting))); } else { @@ -241,7 +244,7 @@ public class PitchController extends Controller { log.info("slideshow: [ fetchd, online ] {}", pp); return ok(com.gitpitch.views.html.Slideshow.render(fetched, - deps, printing, isOffline)); + deps, printing, isOffline, webPrinting)); }); } diff --git a/app/com/gitpitch/services/OfflineService.java b/app/com/gitpitch/services/OfflineService.java index 99cc509..156a4cd 100644 --- a/app/com/gitpitch/services/OfflineService.java +++ b/app/com/gitpitch/services/OfflineService.java @@ -289,7 +289,8 @@ public class OfflineService { pp.pitchme, pp.notes, ENABLED, - ENABLED) + ENABLED, + null) .absoluteURL(isEncrypted(), hostname()); return diskService.download(pp, zipRoot, diff --git a/app/com/gitpitch/services/PrintService.java b/app/com/gitpitch/services/PrintService.java index d6187cb..d8b36a9 100644 --- a/app/com/gitpitch/services/PrintService.java +++ b/app/com/gitpitch/services/PrintService.java @@ -161,6 +161,7 @@ public class PrintService { pp.pitchme, pp.notes, PRINT_NO_FRAGS, + null, null) .absoluteURL(isEncrypted(), hostname()); diff --git a/app/com/gitpitch/utils/GitRepoRenderer.java b/app/com/gitpitch/utils/GitRepoRenderer.java index 7c79919..b56b2d8 100644 --- a/app/com/gitpitch/utils/GitRepoRenderer.java +++ b/app/com/gitpitch/utils/GitRepoRenderer.java @@ -98,7 +98,7 @@ public class GitRepoRenderer { _pp.branch, _pp.theme, _pp.pitchme, - _pp.notes, null, null).toString(); + _pp.notes, null, null, null).toString(); this._markdownURL = com.gitpitch.controllers.routes.PitchController .markdown(_pp.grs, @@ -441,6 +441,20 @@ public class GitRepoRenderer { _pp.notes).toString(); } + public String printBrowserLink() { + + return com.gitpitch.controllers.routes.PitchController.slideshow(_pp.grs, + _pp.user, + _pp.repo, + _pp.branch, + _pp.theme, + _pp.pitchme, + _pp.notes, + "false", + null, + "true").toString(); + } + public String offlineLink() { return com.gitpitch.controllers.routes.PitchController.offline(_pp.grs, diff --git a/app/com/gitpitch/views/Landing.scala.html b/app/com/gitpitch/views/Landing.scala.html index cdabfd5..5152f35 100755 --- a/app/com/gitpitch/views/Landing.scala.html +++ b/app/com/gitpitch/views/Landing.scala.html @@ -81,11 +81,6 @@