Fix CSS color and unknown policy wrongly reported as being forbidden

This commit is contained in:
Lucas Verney 2016-02-11 16:20:58 +01:00
parent d22f57a610
commit 9423a61283
2 changed files with 6 additions and 6 deletions

View File

@ -19,9 +19,7 @@ def format_citation(doi_url):
canonical_doi = doi.to_canonical(doi_url)
sharable = doi.get_oa_policy(canonical_doi)
if sharable is None:
sharable = False
else:
if sharable is not None:
sharable = "can" in sharable.values()
return {

View File

@ -29,11 +29,11 @@
}
.red {
text-color: red;
color: red;
}
.green {
text-color: green;
color: green;
}
</style>
</head>
@ -63,7 +63,9 @@
% else:
<em>
No OpenAccess version found.
% if v["sharable"]:
% if v["sharable"] is not None:
<strong>OpenAccess policy is unknown.</strong>
% elif v["sharable"]:
<strong class="green">It could be shared.</strong>
% else:
<strong class="red">It could not be shared.</strong>