Recent Changes in the OrganicEprintsIssues group   -   WikiHelp   -   Search ecowiki.org:

« 00009 · Edit Form · 00011 »

Summary: Make document upload optional
Type: Feature

Priority (1<5) = 4
Status: Closed

Raised by: hal
Project: CORE Organic
Related to Issues?
Date opened: 2005–07–05
Assigned to hal
Hours used (estimates in brackets) = 4
Date closed: 2005–07–08

Description:
Can we make ‘upload of document’ requirement depend on eprint type? In general we require a document, but for some of our new eprint types (project description, research institution/programme description) we would like this to not be a requirement but just an option. Is there any fairly easy way to tweak the Eprint system to do this?

Answer Eprint tech list 23nov2005:
You can make the required_formats be a function rather than a simple list:

 $c→{required_formats} = sub {
       my( $session, $eprint ) = @_;

       if( $eprint→get_value( ‘type’ ) eq “book” )
       {
               return [];
       }
       return [‘html’,’pdf’,’ps’,’ascii’];
 };

Implemented

 $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”
	];
 };

New Issue

Open Issues

(Edit SideBar)


Organic Eprints Wiki



Based on PmWiki

(Edit SideBar)

Page last modified on July 08, 2005, at 06:20 PM - Edit Page