[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] Antwort: Re: Howto hide sub-fields in workflow



Hi Jens,
I think the bit you need to look at is:
EPrints::MetaField::render_input_field_actual

Which has a call to $self->get_input_col_titles.
Did you set the render_input on the sub_field?
If so, you might need to set render_input on the 'owning' metafield (of type="compound" too).

A cleaner alternative might be to create a subclass of EPrints::MetaField::Compound (but it depends on how you normally like to do things!).
Take a look at the @ISA statements in all the EPrints::MetaField classes - some of them inherit from the Compund field already and might do something similar to what you need?

Cheers,
John


From: eprints-tech-bounces at ecs.soton.ac.uk [mailto:eprints-tech-bounces at ecs.soton.ac.uk] On Behalf Of Adam Field
Sent: 13 March 2018 11:01
To: eprints-tech at ecs.soton.ac.uk
Subject: Re: [EP-tech] Antwort: Re: Howto hide sub-fields in workflow

Hi Jens

                I?m not sure I understand your question.  Which table?  If you don?t want subfields to show on output, too, you need to write a render_output function.

                I suppose the other thing you could do is hide the input fields with javascript?  Just make sure you don?t save the bits you aren?t interested in, just in case.

--
Adam


From: <eprints-tech-bounces at ecs.soton.ac.uk<mailto:eprints-tech-bounces at ecs.soton.ac.uk>> on behalf of <jens.vieler at id.uzh.ch<mailto:jens.vieler at id.uzh.ch>>
Reply-To: <eprints-tech at ecs.soton.ac.uk<mailto:eprints-tech at ecs.soton.ac.uk>>
Date: Tuesday, 13 March 2018 10:43
To: <eprints-tech at ecs.soton.ac.uk<mailto:eprints-tech at ecs.soton.ac.uk>>
Subject: [EP-tech] Antwort: Re: Howto hide sub-fields in workflow


Hi Adam

well, i can hide or do_whatever on the field while using the render_input property - but,  the table and it's heading is still there :-( Is it CORE? Any ideas?

best regards
Jens
--
Jens Vieler
Zentrale Informatik
Universit?t Z?rich
Stampfenbachstrasse 73
CH-8006 Z?rich

mail:  jens.vieler at id.uzh.ch<mailto:jens.vieler at id.uzh.ch>
phone: +41 44 63 56777
http://www.id.uzh.ch

[nactive hide details for Adam Field ---12.03.2018 14:24:46---What you nee]Adam Field ---12.03.2018 14:24:46---What you need is an input renderer.  Set the render_input property on the field, and then I?m afraid

Von: Adam Field <adam at adamfield.net<mailto:adam at adamfield.net>>
An: <eprints-tech at ecs.soton.ac.uk<mailto:eprints-tech at ecs.soton.ac.uk>>
Datum: 12.03.2018 14:24
Betreff: Re: [EP-tech] Howto hide sub-fields in workflow
Gesendet von: eprints-tech-bounces at ecs.soton.ac.uk<mailto:eprints-tech-bounces at ecs.soton.ac.uk>

________________________________



What you need is an input renderer.  Set the render_input property on the field, and then I?m afraid you?ll need to write some perl.

Alternatively, make two fields.  Once simple, with only the things that need to be inputted, and one complex with all the other fields.  Put the simple one in the workflow, and then copy the values across to the complex one in the automatic fields function of your dataset.  That?s probably the simpler way.

--
Adam

From: <eprints-tech-bounces at ecs.soton.ac.uk<mailto:eprints-tech-bounces at ecs.soton.ac.uk>> on behalf of <jens.vieler at id.uzh.ch<mailto:jens.vieler at id.uzh.ch>>
Reply-To: <eprints-tech at ecs.soton.ac.uk<mailto:eprints-tech at ecs.soton.ac.uk>>
Date: Monday, 12 March 2018 13:11
To: Eprints Tech <eprints-tech at ecs.soton.ac.uk<mailto:eprints-tech at ecs.soton.ac.uk>>
Subject: [EP-tech] Howto hide sub-fields in workflow


Hello List

I have created a dataset with fields in which one field (type=compound; multiple=1) has subfields, but not all of them are intended for input by the submitters in the workflow. How can I hide individual sub-fields?

Merci Jens
--
Jens Vieler
Zentrale Informatik
Universit?t Z?rich
Stampfenbachstrasse 73
CH-8006 Z?rich

mail:  jens.vieler at id.uzh.ch<mailto:jens.vieler at id.uzh.ch>
phone: +41 44 63 56777
http://www.id.uzh.ch<http://www.id.uzh.ch/>*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech *** Archive: http://www.eprints.org/tech.php/ *** EPrints community wiki: http://wiki.eprints.org/ *** EPrints developers Forum: http://forum.eprints.org/ *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
*** EPrints developers Forum: http://forum.eprints.org/
*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech *** Archive: http://www.eprints.org/tech.php/ *** EPrints community wiki: http://wiki.eprints.org/ *** EPrints developers Forum: http://forum.eprints.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20180313/e22fc3db/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 106 bytes
Desc: image001.gif
Url : http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20180313/e22fc3db/attachment-0001.gif