Dear Devin,
Devin Bougie wrote :
I could only make this work using "980::DEFP()", but never
"980::REPL(EOL,)". For example, the commented rule below does
nothing, but everything seems to work properly using the uncommented
rule. Is this to be expected, or am I doing something wrong?
#980::REPL(EOL,)---<datafield tag="980" ind1=" " ind2=" "><subfield
code
="a">PICTURE<:PICTURE_RESTRICTION::PICTURE_RESTRICTION::CONFL(PUBLIC,
1):></subfield></datafield>
980::DEFP()---<datafield tag="980" ind1=" " ind2=" "><subfield
code
="a">PICTURE<:PICTURE_RESTRICTION::PICTURE_RESTRICTION::CONFL(PUBLIC,
1):></subfield></datafield>
In theory REPL(EOL,) should remove linefeed characters (\n) from
the input value, while DEFP() should print the value at it is,
which is ok here. But I see that the BibConvert documentation
only mentions the REP() function, so you might also want to try
REP(EOL,) instead.
<http://invenio-demo.cern.ch/help/admin/bibconvert-admin-guide#C.3.4.1>
(My colleagues who are more familiar with the submission system
could elaborate more on that point, as I see that we are using
REPL() in some of our demo BibConvert templates)
What I should also have added is that if you don't save the
PICTURE_RESTRICTION value in its own MARC tag, it won't be easy
in the MBI step to retrieve the value Private/Public of the
currently modified record to reflect its current status on the
page. So you can combine both solutions (save "Private" value in
a custom MARC datafield, and modify the collection value).
[..] am seeing the following error. Is there someplace I need to
define 'MPRPICTURE'?
[..] Exception: global name 'MPRPICTURE' is not defined </span></b>
MPRPICTURE should have been a string, so written in quotes:
return create_html_link(CFG_SITE_URL + '/submit/direct',
urlargd={'RN': bfo.field("037__a"),
'sub': "MPRPICTURE"},
I guess that's what happens when sending code without testing
it :-)
On a related note, would it be possible to place a generic "Modify
Record" link in the detailed view of all records (linking to the MBI
action for that record)?
Yes, but you must have a way to identify the submission to use to
modify a given record. You can have for example a long list of
if-then-else statements in your "bfe_public_record.py" element
that you would use in all formats to link to a different
submission based on the record collection, or a different bfe_*
for each format (each corresponding to a different submission).
Your could also at SBI step fill in some MARC tag of all your
records with the submission "identifier", such as "MPRPICTURE"
(which is made of the concatenation of the submission "step", and
the submission type). Then a generic bfe_* would be able to
recreate the link to the submission.
Best regards
--
Jerome Caffaro ** CERN Document Server ** <http://cds.cern.ch/>