« 00079 · Edit Form · 00081 »
Summary: require upload of document for text eprint types
Type: System
Priority (1<5) = 4
Status: Open
Raised by: HugoAlroe
Project:
Related to
Date opened:
Assigned to Dennis?
Hours used (estimates in brackets) =
Date closed:
Description:
In document_upload.pl a function is missing for making uploads of documents require certain formats. This means you can enter eprints for e.g. journal papers without uploading a document. We want the document since this is an archive.
The function below is from eprints 2 and not very elegant, but it worked.
It should be
- adapted to the new namedset for eprint types (see below, only the top 11 should have required formats)
- and document types (choose those relevant for written texts)
- tested
- and implemented
Eprints 2 function for required formats:
$c->{required_formats} = sub {
my( $session, $eprint ) = @_;
if( $eprint->get_value( 'type' ) eq "researchprogramme" )
{
return [];
}
elsif( $eprint->get_value( 'type' ) eq "organization" )
{
return [];
}
elsif( $eprint->get_value( 'type' ) eq "project" )
{
return [];
}
elsif( $eprint->get_value( 'type' ) eq "facility" )
{
return [];
}
return
[
"html",
"pdf",
"ps",
"ascii",
"rtf",
"source",
"multimedia",
"other"
];
};
Eprints 3:
journalp
newsarticle
workpaper
conference_item
submission
proceedings
report
reportchapter
book
bookchapter
thesis
researchprogramme
organization
project
facility
dataset
teaching_resource
web
video
audio
image
other
text/html
application/pdf
application/postscript
text/plain
application/rtf
application/vnd.ms-powerpoint
application/vnd.ms-excel
application/msword
image/jpeg
image/png
image/gif
image/bmp
image/tiff
video/mpeg
video/quicktime
video/x-msvideo
text/xml
application/bzip2
application/x-compressed # tgz
application/zip
audio/x-wav
audio/mpeg
audio/ogg
audio/flac
audio/x-ms-wma
other