eprints / eprints3.4

EPrints 3.4 core and releases
http://www.eprints.org/uk/index.php/eprints-3-4/
GNU Lesser General Public License v3.0
31 stars 28 forks source link

Organise fields under stage in EPrint::View screen by workflow rather than data object #367

Closed drn05r closed 9 months ago

drn05r commented 9 months ago

At present, if the EPrints::View screen will organise the stages of the workflow in sections in the same order as the workflow but the fields inside each stage will be ordered depending on when they were added to the $c->{fields}->{eprint}. This is unintuitive and can make it difficult to follow a field between one screen and the another, particularly when there are a lot of fields in a stage. Since 3.4 where generic fields have been added in eprint_fields.pl and publication fields added in eprint_fields_pub.pl you have needed to choose between the more logical sub-division of configuration or the preferred ordering in EPrints::View screen.

To solve this the loaded workflow from EPrints::Workflow should include an additional hashref called stages_field_orders which includes all the fields in the stage with a number assigned for their order e.g.

'core' => {
    'creators' => 3,
    'contributors' => 5,
    'divisions' => 6,
    'abstract' => 2,
    'title' => 1,
    'corp_creators' => 4
},

This can then be used by EPrints::View screen plugin to order the fields based on when they appear in that stage of the workflow.