Dear Devin,

Devin Bougie wrote:
Does this seem to be a reasonable way to proceed? Are there any suggestions for improving or simplifying this plan?

This looks like a good setup to me.

I just never used a checkbox in a submission, so I cannot comment on
this point (you might want to use a "select" list instead, or radio
buttons?).

The path we have chosen to follow at CERN for some of our multimedia
collections is just a bit different: we do not have a dedicated MARC tag
for the status of the record ("Public" / "Restricted"), but we simply
change the collection field of the record, by appending "PRIVATE" at the
end of the collection identifier. Eg:
980__a:PHOTO  -->  980__a:PHOTOPRIVATE

This can be achieved quite simply with such a selection list:
<select name="PICTURE_RESTRICTION">
 <option value="">Public</option>
 <option value="PRIVATE">Private</option>
</select>

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>

You then define your collection with the following queries:
Public Photo Collection: "collection:PICTURE"
Private Photo Collection: "collection:PICTUREPRIVATE"
       ("collection:PICTUREPRIVATE or collection:PICTURE" to contain
        both types of records).

Choosing between your plan and this option is mostly a matter of taste.
The advantage of this solution is that the collection definition query
is simpler (for the public collection), and can therefore lead to
"better" navigation "breadcrumbs" at the top of the page (the breadcrumb
links displayed for a given record can be identified with certainty only
if the collection query is in the form "collection:MYCOLLECTION").

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.

(Note that the above code snippets are just examples. They have not been
tested)

Best regards
--
Jerome Caffaro ** CERN Document Server ** <http://cds.cern.ch/>

Reply via email to