Changeset 11460


Ignore:
Timestamp:
2006-03-22T11:34:19+12:00 (18 years ago)
Author:
mdewsnip
Message:

Added the (unfinished) Excel spreadsheet generation action into the GTI.

Location:
trunk/gsdl/src/recpt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/gtiaction.cpp

    r11445 r11460  
    171171  }
    172172
     173  // Define the page content for the GTI excel page
     174  if (args["p"] == "excel") {
     175    define_gti_excel_page(disp, args, logout);
     176    return;
     177  }
     178
    173179  // Process user translations
    174180  if (args["p"] == "submit") {
     
    326332
    327333  disp.setmacro("gtifindformcontent", "gti", gti_find_form_content);
     334}
     335
     336
     337
     338void gtiaction::define_gti_excel_page(displayclass& disp, cgiargsclass& args, ostream& logout)
     339{
     340  // Get the target language code and file to translate from the CGI arguments
     341  text_t target_language_code = args["tlc"];
     342  text_t translation_file_key = args["tfk"];
     343
     344  disp.setmacro("gtiformcontent", "gti", "_gti:gtiexcel_");
     345
     346  languageinfo_tmap loaded_languages = recpt->get_configinfo().languages;
     347  disp.setmacro("gtitargetlanguagename", "gti", loaded_languages[target_language_code].longname);
     348  disp.setmacro("gtitranslationfiledesc", "gti", "_gti:textgti" + translation_file_key + "_");
     349
     350  // Send a request to gti.pl to get the valid translation files
     351  text_t gti_arguments = "get-first-n-chunks-requiring-work " + target_language_code + " " + translation_file_key + " " + "10000" + " | java -classpath $GSDLHOME/bin/java ApplyXSLT $GSDLHOME/etc/gti-generate-excel-xml.xsl -";
     352  text_t gti_response_xml_text = do_gti_request(gti_arguments, logout);
     353
     354  // !! UNFINISHED !!
    328355}
    329356
  • trunk/gsdl/src/recpt/gtiaction.h

    r11320 r11460  
    101101  void define_gti_find_page(displayclass& disp, cgiargsclass& args, ostream& logout);
    102102
     103  void define_gti_excel_page(displayclass& disp, cgiargsclass& args, ostream& logout);
     104
    103105  void define_gti_core_page(displayclass& disp, cgiargsclass& args, ostream& logout);
    104106
Note: See TracChangeset for help on using the changeset viewer.