EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #04942
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Re: Use as Template
- To: eprints-tech@ecs.soton.ac.uk
- Subject: [EP-tech] Re: Use as Template
- From: Adam Field <af05v@ecs.soton.ac.uk>
- Date: Thu, 15 Oct 2015 16:13:04 +0100
Ooohhh, once again, John has spotted the issue. I wonder if you can set the can_clone property on the fly by subclassing the UseAsTemplate class: package EPrints::Plugin::Screen::EPrint::TemplateWithContactEmail; use strict; use warnings; use EPrints::Plugin::Screen::EPrint::UseAsTemplate; sub action_use_as_template { my ($self) = @_; my $field = $self->repository->dataset('eprint')->metafield('contact_email); my $p = field->get_property('can_clone'); $metafield->set_property('can_clone', 1); $self::SUPER->action_use_as_template; $metafield->set_property('can_clone', $p); } ...then use the settings in plugins.pl to disable the default plugin and mask the new one as that. I've no idea if this will work, or even if it's a good idea. -- Adam Field Business Relationship Manager and Community Lead EPrints Services On 15 Oct 2015, at 14:58, John Salter <J.Salter@leeds.ac.uk> wrote: Hi, |
- Follow-Ups:
- [EP-tech] Re: Use as Template
- From: Adam Field <af05v@ecs.soton.ac.uk>
- [EP-tech] Re: Use as Template
- References:
- [EP-tech] Use as Template
- From: Andrew Beeken <anbeeken@lincoln.ac.uk>
- [EP-tech] Re: Use as Template
- From: "Field A.N." <af05v@ecs.soton.ac.uk>
- [EP-tech] Re: Use as Template
- From: John Salter <J.Salter@leeds.ac.uk>
- [EP-tech] Use as Template
- Prev by Date: [EP-tech] Re: Use as Template
- Next by Date: [EP-tech] Re: Use as Template
- Previous by thread: [EP-tech] Re: Use as Template
- Next by thread: [EP-tech] Re: Use as Template
- Index(es):