Merge pull request #251 from sharelatex/fix-download-urls

fix filename of downloaded pdf files
This commit is contained in:
Brian Gough 2016-06-08 14:33:12 +01:00
commit 6c244eb2f4
3 changed files with 3 additions and 2 deletions

View file

@ -15,7 +15,7 @@ aside#left-menu.full-size(
| #{translate("source")}
li
a(
ng-href="{{pdf.url}}"
ng-href="{{pdf.downloadUrl || pdf.url}}"
target="_blank"
ng-if="pdf.url"
)

View file

@ -46,7 +46,7 @@ div.full-size.pdf(ng-controller="PdfController")
) {{ pdf.logEntries.errors.length + pdf.logEntries.warnings.length }}
a(
ng-href="{{pdf.url}}"
ng-href="{{pdf.downloadUrl || pdf.url}}"
target="_blank"
ng-if="pdf.url"
tooltip="#{translate('download_pdf')}"

View file

@ -104,6 +104,7 @@ define [
qs_args = ("#{k}=#{v}" for k, v of qs)
$scope.pdf.qs = if qs_args.length then "?" + qs_args.join("&") else ""
$scope.pdf.url += $scope.pdf.qs
$scope.pdf.downloadUrl = "/Project/#{$scope.project_id}/output/output.pdf" + $scope.pdf.qs
fetchLogs(fileByPath['output.log'], fileByPath['output.blg'])