Hi Jerome,
Many thanks for your reply. We have chosen to follow a path similar
to what you use at CERN. Please see below for a couple of initial
questions.
On Apr 8, 2009, at 2:39 AM, Jerome Caffaro wrote:
... and a such a rule in your submission template:
980a::REPL(EOL,)---<datafield tag="980" ind1=" " ind2=" "><subfield
code
=
"a">PICTURE<:PICTURE_RESTRICTION::PICTURE_RESTRICTION::CONFL(PRIVATE,
1):></subfield></datafield>
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>
... You might also want to simplify the life of the people who will
go through all the photos to move them from private to public (and
vice
versa) by providing them a direct link to the submission from the
detailed view of the photo records.
You can link the following
format element (BFE_*) from the template
"default_HTML_actions.bft" (or
whatever format templates is used for the HDACTION output format for
pictures):
from invenio.access_control_engine import acc_authorize_action
from urlutils import create_html_link
from invenio.config import CFG_SITE_URL
def format(bfo):
(auth_code, auth_message) = acc_authorize_action(bfo.user_info,
'photoadmin')
if auth_code == 0:
return create_html_link(CFG_SITE_URL + '/submit/direct',
urlargd={'RN': bfo.field("037__a"),
'sub': MPRPICTURE},
link_label="Modify restrictions")
so that they can directly go to the PICTURE submission, at action
step "MPR", with field named "RN" pre-filled with the report number.
So far I haven't gotten this part to work properly and am seeing the
following error. Is there someplace I need to define 'MPRPICTURE'?
• <b><span style="color: rgb(255, 0, 0);">Error when evaluating
format element PUBLIC_RECORD with parameters {'bfo':
<invenio.bibformat_engine.BibFormatObject instance at
0x90a594c>}Traceback (most recent call last): File "/usr/lib/python2.4/
site-packages/invenio/bibformat_engine.py", line 579, in
eval_format_element output_text = apply(function, (), params) File "/
usr/lib/python2.4/site-packages/invenio/bibformat_elements/
bfe_public_record.py", line 17, in format urlargd={'RN':
bfo.field("037__a"), \ Exception: global name 'MPRPICTURE' is not
defined </span></b>
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)?
Thank you again for all of your time and help.
Sincerely,
Devin