Disabled pdf download if not available

This commit is contained in:
James Allen 2014-07-02 11:06:20 +01:00
parent f86c9cf853
commit 83666be910
2 changed files with 23 additions and 5 deletions

View file

@ -6,12 +6,27 @@ aside#left-menu.full-size(
ul.unformatted-list.nav.nav-downloads
li
a(ng-href="/project/{{project_id}}/download/zip")
a(
ng-href="/project/{{project_id}}/download/zip"
target="_blank"
)
i.fa.fa-file-archive-o.fa-2x
br
| Source
li
a(ng-href="/project/{{project_id}}/output/output.pdf")
a(
ng-href="/project/{{project_id}}/{{pdf.url}}"
target="_blank"
ng-if="pdf.url"
)
i.fa.fa-file-pdf-o.fa-2x
br
| PDF
div.pdf-disabled(
ng-if="!pdf.url"
tooltip="Please compile your project before downloading the PDF"
tooltip-placement="bottom"
)
i.fa.fa-file-pdf-o.fa-2x
br
| PDF

View file

@ -42,9 +42,12 @@
background-color: @link-color;
color: white;
}
i {
margin-bottom: (@line-height-computed / 4);
}
}
.pdf-disabled {
color: @gray-light;
}
i {
margin-bottom: (@line-height-computed / 4);
}
}
}