Changeset 21758
- Timestamp:
- 2010-03-03T11:06:37+13:00 (14 years ago)
- Location:
- main/trunk/greenstone2/runtime-src/src/recpt
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/runtime-src/src/recpt/browsetoolsclass.cpp
r21743 r21758 107 107 } 108 108 109 text_t browsetoolsclass::get_assocfile_path() 110 { 111 return "_httpprefix_/collect/[collection]/index/assoc/{Or}{[parent(Top):assocfilepath],[assocfilepath]}/"; 112 113 } 109 114 // at the moment this just writes out the html to display 110 115 // the cover image (assuming it's called cover.jpg) -
main/trunk/greenstone2/runtime-src/src/recpt/browsetoolsclass.h
r12183 r21758 49 49 50 50 virtual text_t get_cover_image(); 51 51 virtual text_t get_assocfile_path(); 52 52 virtual void load_extended_options(text_tmap &options, cgiargsclass &args, browsermapclass *browsers, 53 53 formatinfo_t &formatinfo, recptproto *collectproto, -
main/trunk/greenstone2/runtime-src/src/recpt/formattools.cpp
r21752 r21758 631 631 formatlistptr->command = comEndLink; 632 632 633 else if (meta == "srclink") { 634 formatlistptr->command = comAssocLink; 635 formatlistptr->meta.metaname = "srclink_file"; 636 metadata.insert("srclink_file"); 637 } 638 else if (meta == "srchref") { 639 formatlistptr->command = comAssocLink; 640 formatlistptr->text = "href"; 641 formatlistptr->meta.metaname = "srclink_file"; 642 metadata.insert("srclink_file"); 643 } 644 else if (meta == "/srclink") { 645 formatlistptr->command = comEndAssocLink; 646 formatlistptr->meta.metaname = "srclink_file"; 647 } 648 // and weblink etc 633 649 else if (meta == "href") 634 650 formatlistptr->command = comHref; … … 1777 1793 return options["link"]; 1778 1794 case comEndLink: 1779 if (options["link"].empty()) return ""; 1795 { 1796 if (options["link"].empty()) return ""; 1780 1797 else return "</a>"; 1798 } 1781 1799 case comHref: 1782 1800 return get_href(options["link"]); … … 1790 1808 case comSummary: 1791 1809 return format_summary(collection, collectproto, docinfo, disp, options, logout); 1792 1810 case comAssocLink: 1811 { 1812 text_t link_filename = get_meta(collection, collectproto, docinfo, disp, formatlistptr->meta, options, logout); 1813 if (!link_filename.empty()) { 1814 text_t href= expand_metadata(options["assocfilepath"]+link_filename, collection, collectproto, docinfo, disp, options, logout); 1815 if (formatlistptr->text == "href") { 1816 return href; 1817 } 1818 return "<a href=\""+ href + "\">"; 1819 } 1820 return ""; 1821 } 1822 case comEndAssocLink: 1823 { 1824 text_t link_filename = get_meta(collection, collectproto, docinfo, disp, formatlistptr->meta, options, logout); 1825 if (!link_filename.empty()) { 1826 return "</a>"; 1827 } 1828 return ""; 1829 } 1793 1830 case comMeta: 1794 1831 { -
main/trunk/greenstone2/runtime-src/src/recpt/formattools.h
r21752 r21758 38 38 comTOC, comImage, comDocumentButtonDetach, comDocumentButtonHighlight, 39 39 comDocumentButtonExpandContents, comDocumentButtonExpandText, comOID, comTopOID, comRank, 40 comCollection, comDocTermsFreqTotal}; 40 comCollection, comDocTermsFreqTotal, 41 comAssocLink, comEndAssocLink}; 41 42 42 43 enum mcommand_t {mNone=0, mCgiSafe=1, mParent=2, mSibling=4, mChild=8, mSpecial=16, mTruncate=32, mXMLSafe=64, mHTMLSafe=128}; -
main/trunk/greenstone2/runtime-src/src/recpt/vlistbrowserclass.cpp
r18570 r21758 140 140 else options["highlight"] = "0"; 141 141 options["DocImage"] = btools.get_cover_image(); 142 options["assocfilepath"] = btools.get_assocfile_path(); 142 143 textout << outconvert << disp 143 144 << get_formatted_string (collection, collectproto, … … 205 206 options["highlight"] = "0"; 206 207 options["DocImage"] = btools.get_cover_image(); 207 208 options["assocfilepath"] = btools.get_assocfile_path(); 209 208 210 if ( thissection != endsection ) { // only if there are results (else corrupts display) 209 211 fstring = get_formatted_string (collection, collectproto, *thissection, … … 238 240 else options["highlight"] = "0"; 239 241 options["DocImage"] = btools.get_cover_image(); 240 242 options["assocfilepath"] = btools.get_assocfile_path(); 243 241 244 textout << outconvert << disp 242 245 << " " << get_formatted_string (collection, collectproto, *thissection, disp,
Note:
See TracChangeset
for help on using the changeset viewer.