Difference between revisions of "Files/ShowAll"

From EPrints Documentation
Jump to: navigation, search
Line 36: Line 36:
                 print "Generated ".$eprint->get_value( "eprintid" )."\n";
                 print "Generated ".$eprint->get_value( "eprintid" )."\n";
         $info->{count} ;
[last lines of the script]
[last lines of the script]

Revision as of 13:04, 10 April 2007

Show all Metadata in one page

I have built this feature in Jan 2005 when I didn't very well how to manipolate the rendering of abstract pages. So in fact I lanch every night the modified version of the script /bin/generate_abstracts With this script I generate two file, index.html and fullmetadata.html So

1)In the file .../<archive name>/cfg/ArchiveRenderConfig.pm you need to add those lines:

       #To display full metadata
       my $tjl_url = $session->make_element( "a", href=>$eprint->get_url."fullmetadata.html");
       $tjl_url->appendChild($session->make_text("Show all fields"));
       $table->appendChild( _render_row(
               $session->html_phrase( "eprint_fullmetadata" ),
               $tjl_url ) );

[line 243 - 250 in my file ArchiveRenderConfig.pm] In my file ArchiveRenderConfig.pm those lines are after the lines about Alternative locations

2)In the file .../<archive name>/cfg/ArchiveRenderConfig.pm you need to add the sub 'eprint_render_full_tjl' You can read it in the 'ArchiveRenderConfig.pm.'

3)In the file .../<archive name>/cfg/phrases-en.xml add the line

  <ep:phrase ref="eprint_fullmetadata">All fields</ep:phrase>

4) in the script .../bin/generate_abstracts you must to have this subroutine: sub make_static {

       my( $session, $dataset, $eprint, $info ) = @_;
       if( $noise > 1 )
               print "Generated ".$eprint->get_value( "eprintid" )."\n";
       $info->{count}  ;

} [last lines of the script]

5)In the file .../perl_lib/EPrints/Eprints.pm must to be the functions 'generate_static_full_tjl' and the function 'render_full_tjl' You could find the two function in the file EPrint.pm.

You can download the files from http://eprints.rclis.org/fixsoft/showall.tar.gz

The link "Show All Fields" was done for editors, not for users. We use it to control and check metadata without login Chris suggests: "This would be easier if you put the rendering function in the EPrintsRenderConfig file in render_eprint. Just make calling render_eprint have the side effect of generating the other page"