Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
#150 changed model to have three options for author_validated
Browse files Browse the repository at this point in the history
  • Loading branch information
mrwunderbar666 committed Jul 5, 2022
1 parent dc68a65 commit 7de8bf2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 4 additions & 2 deletions flaskinventory/main/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -886,8 +886,10 @@ class Tool(Entry):
autoload_choices=True,
relationship_constraint="FileFormat")

author_validated = Boolean(description="Do the authors of the tool report any validation?",
label="Yes, validation is reported")
author_validated = SingleChoice(description="Do the authors of the tool report any validation?",
choices={'na': 'NA / Unknown',
'yes': 'Yes',
'no': 'No, not reported'})

validation_corpus = ListRelationship(description="Which corpus was used to validate the tool?",
autoload_choices=True,
Expand Down
8 changes: 3 additions & 5 deletions flaskinventory/templates/view/elements/tool/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,12 @@
{{ render_tags(entry.output_file_format) }}
</dd>
{% endif %}
{% if entry.author_validated %}
<dt class="col-sm-3">Author(s) reported validation</dt>
<dd class="col-sm-9">
{% if entry.author_validated %}
<span>Yes</span>
{% else %}
<span>No</span>
{% endif %}
<span>{{ entry.author_validated }}</span>
</dd>
{% endif %}
{% if entry.validation_corpus %}
<dt class="col-sm-3">Corpus used for validation</dt>
<dd class="col-sm-9">
Expand Down

0 comments on commit 7de8bf2

Please sign in to comment.