EPrints Technical Mailing List Archive

Message: #06738


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

Re: [EP-tech] doctype views with monograph-type and pres_type


Hi Tomasz

This seemed complicated, and I did some fiddling around with browse menu render functions, but as I was doing it, I realised that I was replicating a subject tree browse view.

1) Create a subject tree representing all types and subtypes.  For your subject IDs, use <type>_<subtype>. (https://wiki.eprints.org/w/Training_Video:Subject_Trees).  Configuration would look something like:

types:Types:ROOT:0
article:Article:types:1
monograph:Monograph:types:1
mongraph_technical_report:Technical Report:monograph:1

It’s essential that the IDs in the subject tree exactly match the type/subtypes of the items.


2) Create an automatic field that stores the type as the subject ID node on that tree (https://wiki.eprints.org/w/Training_Video:Automatic_Fields)

my $type = $eprint->value(‘type’);
$type_with_subtype = $type;

if ($type eq ‘monograph)
{
$type_with_subtype .= ‘_’ . $eprint->value(‘monograph_type’);
}


$eprint->set_value(’type_with_subtype’ , $type_with_subtype);


3) Create a browse view based on the automatic field (this part is in the automatic fields video).


4) you can then rearrange the subject tree if you like so that book appears under monograph.



I suppose type should be a subject tree, but it’s probably a bad idea to deviate that far from eprints norms for such an important field.  The down-side of this approach is that you now have type configuration in two places.  If you update any types or subtypes, you need to remember to update your subject tree.  That’s scriptable, but that’s probably overkill.  Alternatively, you can use the browse view render menu override capability (see https://github.com/eprints/eprints/blob/3.3/lib/defaultcfg/cfg.d/views_render_menu_example.pl) but that will involve generating a DOM tree.

Adam


On 2 Aug 2017, at 08:34, Alan.Stiles <alan.stiles@open.ac.uk> wrote:

Hi Tomasz,
We have a view something like that, but for academic units and schools : http://oro.open.ac.uk/view/faculty_dept/ but it is built against a subject tree rather than separate fields.  I presume you are controlling the available set options in the workflow depending on the item type selected?
 
We don’t have separate Monograph and Book types, but a lot of the monograph types you’ve shown (we have a number of those same types defined but under ‘other’) aren’t necessarily going to be books – are all books going to be monographs?
 
Not really all that much help I suspect, sorry!
Alan
 
From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Tomasz Neugebauer
Sent: 01 August 2017 22:14
To: eprints-tech@ecs.soton.ac.uk
Subject: [EP-tech] doctype views with monograph-type and pres_type
 
We would like to include the display/count of the sub-types for doctypes on the “View by Document Types” page:
I think that our settings are close to the EPrints defaults; we have the following “Conference or Workshop Item” types (defined as “pres_type” in eprint_fields.pl): paper, lecture, speech, poster, keynote, other.  
We also have the following Monograph types (defined as “pres_type” in eprint_fields.pl): technical report, project report, documentation, manual, working paper, discussion paper, other.  
Thus, on the view by doctype, we would like to see something like this:
 
•             Article (1319)
•             Book Section (100)
•             Monograph (87)

·         technical_report ([count of technical_report])

·         project_report ([count of project_report])

·         documentation (count of documentation)

·         manual (count of manual)

·         working_paper (…etc…)

·         discussion_paper ()

·         other ()

•             Conference or Workshop Item (121)

·         paper ()

·         lecture ()

·         speech ()

·         poster ()

·         keynote ()

·         other ()

•             Book (6)
•             Thesis (13040)
Has this type of view been done already?  Any advice on the best way to do that?  Is that something that can be done just by tweaking the views.pl?
A related question to that is, by default, the “Book” doctype is separated out from “Monograph”, which seems counter-intuitive.  Has anyone combined these two doctypes?  Is there a reason to keep them separate?
Best wishes,
Tomasz
 
 
 
________________________________________________

Tomasz Neugebauer
Digital Projects & Systems Development Librarian / Bibliothécaire des Projets Numériques & Développement de Systèmes
Library / Bibliothèque
Concordia University / Université Concordia

Tel. / Tél. 514-848-2424 ext. / poste 7738
Email / courriel: 
tomasz.neugebauer@concordia.ca

Mailing address / adresse postale: 1455 De Maisonneuve Blvd. W., LB-540-03, Montreal, Quebec H3G 1M8
Street address / adresse municipale: 1400 De Maisonneuve Blvd. W., LB-540-03, Montreal, Quebec H3G 1M8

http://library.concordia.ca
http://www.concordia.ca/faculty/tomasz-neugebauer.html

 
-- The Open University is incorporated by Royal Charter (RC 000391), an exempt charity in England & Wales and a charity registered in Scotland (SC 038302). The Open University is authorised and regulated by the Financial Conduct Authority. *** 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/