make the pdf viewer directive conditional depending on user feature switch

This commit is contained in:
Brian Gough 2014-12-01 11:47:56 +00:00
parent 3c05e032bd
commit 3fd8bfb221

View file

@ -60,7 +60,17 @@ div.full-size.pdf(ng-controller="PdfController")
.pdf-viewer(ng-show="pdf.url && pdf.view == 'pdf' && !pdf.failure && !pdf.timeout && !pdf.error")
div(
pdfjs
ng-if="settings.pdfViewer == 'pdfjs'"
ng-if="settings.pdfViewer == 'pdfjs' && !(user.featureSwitches && user.featureSwitches.pdfng)"
pdf-src="pdf.url"
key="{{ project_id }}"
resize-on="layout:main:resize,layout:pdf:resize"
highlights="pdf.highlights"
position="pdf.position"
dbl-click-callback="syncToCode"
)
div(
pdfng
ng-if="settings.pdfViewer == 'pdfjs' && user.featureSwitches && user.featureSwitches.pdfng"
pdf-src="pdf.url"
key="{{ project_id }}"
resize-on="layout:main:resize,layout:pdf:resize"