-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement the Citation Documentation field in Scheme and Organization #11
base: live
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2051,6 +2051,7 @@ class Scheme(Record): | |
schema = { | ||
"title": {"type": "text", "useful": True}, | ||
"description": {"type": "html", "useful": True}, | ||
"citation_docs": {"type": "html", "useful": True}, | ||
"keywords": {"type": "thesaurus", "useful": True}, | ||
"dataTypes": {"type": "datatypes"}, | ||
"locations": {"type": "locations", "useful": True}, | ||
|
@@ -2527,6 +2528,7 @@ class Group(Record): | |
schema = { | ||
"name": {"type": "text", "useful": True}, | ||
"description": {"type": "html"}, | ||
"citation_docs": {"type": "html", "useful": True }, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think "optional" is probably the right flag to use, rather than "useful". |
||
"types": {"type": "types"}, | ||
"locations": {"type": "locations"}, | ||
"identifiers": {"type": "identifiers", "useful": True}, | ||
|
@@ -3321,6 +3323,7 @@ class SampleForm(Form): | |
class SchemeForm(FlaskForm): | ||
title = StringField("Name of metadata scheme") | ||
description = TextHTMLField("Description") | ||
citation_docs = TextHTMLField("Citation Documentation") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be sentence case, i.e. "Citation documentation". |
||
keywords = FieldList( | ||
StringField("Subject area", validators=[Optional()]), | ||
"Subject areas", | ||
|
@@ -3477,6 +3480,7 @@ class CrosswalkVersionForm(FlaskForm): | |
class GroupForm(FlaskForm): | ||
name = StringField("Name of organization") | ||
description = TextHTMLField("Description") | ||
citation_docs = TextHTMLField("Citation Documentation") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be sentence case, i.e. "Citation documentation". |
||
types = SelectMultipleField("Type of organization") | ||
locations = FieldList(FormField(LocationForm), "Relevant links", min_entries=1) | ||
identifiers = FieldList( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,15 @@ | |
standards.</li> | ||
</ul> | ||
</div> | ||
<div class="form-group{{ state(form.citation_docs) }}"> | ||
{{ form.citation_docs.label(class="form-label") }} | ||
{{ form.citation_docs(class="form-control") }} | ||
{{ errors(form.citation_docs) }} | ||
<ul class="form-text text-muted"> | ||
<li>Insert references about citations | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The guidance here should be the same as the guidance given in openapi.yaml (or nearly so). |
||
</li> | ||
</ul> | ||
</div> | ||
<div class="form-group{{ state(form.types) }}"> | ||
{{ form.types.label(class="form-label") }} | ||
{{ form.types(class="form-control w-auto mw-100") }} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,15 @@ | |
(e.g. XML) or could be expressed in various ways (e.g. RDF).</li> | ||
</ul> | ||
</div> | ||
<div class="form-group{{ state(form.citation_docs) }}"> | ||
{{ form.citation_docs.label(class="form-label") }} | ||
{{ form.citation_docs(class="form-control") }} | ||
{{ errors(form.citation_docs) }} | ||
<ul class="form-text text-muted"> | ||
<li>Insert references about citations | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The guidance here should be the same as the guidance given in openapi.yaml (or nearly so). |
||
</li> | ||
</ul> | ||
</div> | ||
<div class="form-group"> | ||
{{ form.keywords.label(class="form-label") }} | ||
<datalist id="keyword-list"> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"useful" might be the wrong word here; perhaps I should have used "requisite". I didn't want to use "required" since none of the fields are technically required.
"useful" is short for the statement "The record cannot be considered useful without a value for this field."
"optional" is short for the statement "The record can be considered complete even without a value for this field."
I think "optional" is probably the right flag to use.