Skip to content

Commit

Permalink
Fixes issue #161
Browse files Browse the repository at this point in the history
  • Loading branch information
peskk3am committed Mar 31, 2014
1 parent 7738f84 commit b477b57
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion simplestore/lib/simplestore_marc_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ def add_basic_fields(rec, form, email):
record_add_field(rec, '245', subfields=[('a', remove_html_markup(form['title']))])

if form['creator']:
record_add_field(rec, '100', subfields=[('a', remove_html_markup(form['creator']))])
for kw in form['creator'].split(';'):
record_add_field(rec, '100', subfields=[('a', remove_html_markup(kw.strip()))])

if form['domain']:
record_add_field(rec, '980', subfields=[('a', remove_html_markup(form['domain']))])
Expand Down
13 changes: 7 additions & 6 deletions simplestore/lib/simplestore_model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class SubmissionMetadata(db.Model):

id = db.Column(db.Integer, primary_key=True)
description = db.Column(db.Text(), nullable=False)
creator = db.Column(db.String(128))
creator = db.Column(db.String(256)) # split on ;
title = db.Column(db.String(256), nullable=False)
open_access = db.Column(db.Boolean(), default=True)

Expand Down Expand Up @@ -137,10 +137,10 @@ def __init__(self):
'will not be public, however the metadata will be.'
}
self.field_args['contributors'] = {
'placeholder': 'co-author 1; co-author 2; ...',
'placeholder': 'contributor 1; contributor 2; ...',
'description':
'A semicolon separated list of ' +\
'contributors, e.g. further authors. Mention all ' +\
'A semicolon separated list of all other ' +\
'contributors. Mention all ' +\
'other persons that were relevant in the creation of the resource.'
}
self.field_args['language'] = {
Expand All @@ -161,8 +161,9 @@ def __init__(self):
'Any kind of other reference such as a URN, URI or an ISBN number.'
}
self.field_args['creator'] = {
'placeholder': 'The main author of the resource.',
'description': 'The person who created the resource.'
'placeholder': 'author 1; author 2; ... ',
'description':
'A semicolon separated list of authors of the resource.'
}

def _create_metadata_class(cfg):
Expand Down

0 comments on commit b477b57

Please sign in to comment.