Changeset 2874


Ignore:
Timestamp:
2001-12-02T10:25:14+13:00 (22 years ago)
Author:
sjboddie
Message:

* empty log message *

Location:
trunk/niupepa
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/niupepa/macros/npepa.dm

    r2690 r2874  
    125125_imageviewtext_ [c=niupepa] {_gsimage_(_httpcurrentdocument_&gg=text,_document:httpiconetextof_,_document:httpiconetexton_,etext,_document:texticonviewtext_)}
    126126
     127_imagepdf_ [c=niupepa] {_gsimage_(_httpcurrentpdf_,_document:httpiconepdfof_,_document:iconepdfon_,epdf,_document:texticonpdf_)}
     128
     129_httpcurrentpdf_ [c=niupepa] {_httpprefix_/collect/niupepa/index/assoc/_thisOID_/paper.pdf}
     130
    127131_imageviewabstract_ [c=niupepa] {_gsimage_(_httpdocument_&gg=text&cl=_cgiargcl_&d=_1_,_document:httpiconeabstrof_,_document:httpiconeabstron_,eabstr,_document:texticonviewabstract_)}
    128132
     
    163167_heightetextx_ [c=niupepa] {30}
    164168
     169_httpiconepdfof_ [c=niupepa] {_httpprefix_/collect/niupepa/images/epdfof.gif}
     170_httpiconepdfon_ [c=niupepa] {_httpprefix_/collect/niupepa/images/epdfon.gif}
     171
    165172_httpiconeabstrof_ [c=niupepa] {_httpprefix_/collect/niupepa/images/eabstrof.gif}
    166173_httpiconeabstrof_ [c=niupepa,l=mi] {_httpprefix_/collect/niupepa/images/mi/eabstrof.gif}
     
    194201_texticonprevimage_ [c=niupepa] {View preview image of this page}
    195202_texticonviewtext_ [c=niupepa] {View the text of this page}
     203_texticonpdf_ [c=niupepa] {View the PDF version of this paper}
    196204_texticoncommentary_ [c=niupepa] {View the commentary of this paper}
    197205_texticonviewabstract_ [c=niupepa] {View the English abstract of this issue}
  • trunk/niupepa/perllib/plugins/NPPlug.pm

    r2614 r2874  
    202202    $doc_obj->set_utf8_metadata_element ($topsection, 'abstract', $abstract) if defined $abstract;
    203203    $self->set_main_metadata ($doc_obj, $dir);
     204
     205    # process issue's pdf if one exists
     206    my ($pdffile) = $file =~ /^([^\.]*)\.issue/i;
     207    $pdffile .= ".pdf";
     208    $pdffile = &util::filename_cat($dir, "pdf", $pdffile);
     209    if (-e $pdffile) {
     210    $doc_obj->set_utf8_metadata_element ($topsection, "haspdf", "1");
     211    $doc_obj->associate_file($pdffile, "paper.pdf");
     212    } else {
     213    $doc_obj->set_utf8_metadata_element ($topsection, "haspdf", "0");
     214    }
    204215
    205216    open (ISSUEFILE, $filename) || die "couldn't open $filename\n";
  • trunk/niupepa/src/recpt/niupepabrowsetools.cpp

    r1023 r2874  
    3636                     ostream &logout) {
    3737
    38   bool hastxt = false, hasimg = false, hasprevimg = false;
     38  bool hastxt = false, hasimg = false, hasprevimg = false, haspdf = false;
    3939  text_tarray buttons;
    4040  text_t &arg_gg = args["gg"];
     
    4646  metadata.insert ("hasimg");
    4747  metadata.insert ("hasprevimg");
     48  metadata.insert ("haspdf");
    4849  metadata.insert ("doctype");
    4950  if (!get_info (arg_d, args["c"], metadata, false, collectproto, response, logout))
     
    5354  if (response.docInfo[0].metadata["hasimg"].values[0] == "1") hasimg = true;
    5455  if (response.docInfo[0].metadata["hasprevimg"].values[0] == "1") hasprevimg = true;
     56  if (response.docInfo[0].metadata["haspdf"].values[0] == "1") haspdf = true;
    5557
    5658  MetadataInfo_tmap::iterator it = response.docInfo[0].metadata.find ("doctype");
     
    9092    if (get_info (abstract, args["c"], metadata, false, collectproto, response, logout))
    9193      buttons.push_back ("_document:imageviewabstract_(" + abstract + "&gg=text)");
     94
     95    if (haspdf) buttons.push_back ("_document:imagepdf_");
     96
    9297  }
    9398
  • trunk/niupepa/src/recpt/niupepadocaction.cpp

    r1945 r2874  
    5151
    5252niupepadocaction::~niupepadocaction () {
    53 }
    54 
    55 void niupepadocaction::set_java_macros (cgiargsclass &args, displayclass &disp) {
    56 
    57   text_t javaimagescontent = "_javaextras__javacommentary__javaviewabstract__javaviewpaper__javaabstractintro_";
    58 
    59   text_t &arg_gg = args["gg"];
    60 
    61   if (arg_gg == "full")
    62     javaimagescontent += "_javaprevimage__javaviewtext_";
    63   else if (arg_gg == "prev")
    64     javaimagescontent += "_javafullimage__javaviewtext_";
    65   else
    66     javaimagescontent += "_javafullimage__javaprevimage_";
    67 
    68    
    69   int arg_gt = args.getintarg("gt");
    70   int arg_hl = args.getintarg("hl");
    71 
    72   text_tarray::const_iterator button_here = formatinfo.DocumentButtons.begin();
    73   text_tarray::const_iterator button_end = formatinfo.DocumentButtons.end();
    74 
    75   while (button_here != button_end) {
    76     if (*button_here == "Detach")
    77       javaimagescontent += "_javadetach_";
    78     else if (*button_here == "Expand Text" && arg_gg == "text") {
    79       if (arg_gt == 1)
    80     javaimagescontent += "_javacontracttext__javacontinue_";
    81       else if (arg_gt == 2)
    82     javaimagescontent += "_javacontracttext_";
    83       else
    84     javaimagescontent += "_javaexpandtext_";
    85     } else if (*button_here == "Highlight" && arg_gg == "text") {
    86       if (arg_hl == 1)
    87     javaimagescontent += "_javanohighlighting_";
    88       else
    89     javaimagescontent += "_javahighlighting_";
    90     }
    91     button_here ++;
    92   }
    93   disp.setmacro ("javaimagescontent", "document", javaimagescontent);
    9453}
    9554
  • trunk/niupepa/src/recpt/niupepadocaction.h

    r1023 r2874  
    3636protected:
    3737
    38   void set_java_macros (cgiargsclass &args, displayclass &disp);
    39 
    4038  void output_document (const text_t &OID, cgiargsclass &args,
    4139            recptproto *collectproto, displayclass &disp,
Note: See TracChangeset for help on using the changeset viewer.