- Timestamp:
- 2009-05-03T09:42:26+12:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/runtime-src/src/recpt/formattools.cpp
r19302 r19311 910 910 911 911 if (metadata_spanwrap) { 912 fresh_metatext = "<span metaname=\"" + meta.metaname + "\" metapos=\"" + i + "\">" + fresh_metatext + "</span>";912 fresh_metatext = "<span class=\"editable-metadata\" metaname=\"" + meta.metaname + "\" metapos=\"" + i + "\">" + fresh_metatext + "</span>"; 913 913 } 914 914 formatted_metatext += fresh_metatext; … … 935 935 936 936 if (metadata_spanwrap) { 937 fresh_metatext = "<span metaname=\"" + meta.metaname + "\" metapos=\"" + position + "\">" + fresh_metatext + "</span>";937 fresh_metatext = "<span class=\"editable-metadata\" metaname=\"" + meta.metaname + "\" metapos=\"" + position + "\">" + fresh_metatext + "</span>"; 938 938 } 939 939 … … 1256 1256 if (meta_text == "Text") { 1257 1257 outtext = format_text(collection, collectproto, docinfo, disp, options, logout); 1258 } else { 1258 } 1259 else { 1259 1260 1260 1261 text_tset metadata; … … 1588 1589 case comRel: //if [RelatedDocuments] appears in format string, collect relation data 1589 1590 return get_related_docs(collection, collectproto, docinfo, logout); 1591 1590 1592 case comSummary: 1591 return format_summary(collection, collectproto, docinfo, disp, options, logout); 1593 { 1594 text_t summary = format_summary(collection, collectproto, docinfo, disp, options, logout); 1595 if (metadata_spanwrap) { 1596 summary = "<span class=\"editable-metadata\" metaname=\"Summary\">"+summary+"</span>"; 1597 } 1598 return summary; 1599 } 1600 1592 1601 case comMeta: 1593 1602 { … … 1595 1604 return expand_metadata(metavalue, collection, collectproto, docinfo, disp, options, logout); 1596 1605 } 1606 1597 1607 case comDoc: 1598 1599 //return options["text"]; 1608 return format_text(collection, collectproto, docinfo, disp, options, logout); 1609 1600 1610 case comImage: 1601 1611 return expand_metadata(options["DocImage"], collection, collectproto, docinfo, disp, options, logout); … … 1661 1671 text_t format_text (const text_t& collection, recptproto* collectproto, 1662 1672 ResultDocInfo_t &docinfo, displayclass &disp, 1663 text_tmap &options, ostream& logout) { 1673 text_tmap &options, ostream& logout) 1674 { 1675 text_t text; 1676 1664 1677 if(!options["text"].empty()) { 1665 return options["text"]; 1666 } 1667 // else get document text here 1668 DocumentRequest_t docrequest; 1669 DocumentResponse_t docresponse; 1670 comerror_t err; 1671 docrequest.OID = docinfo.OID; 1672 collectproto->get_document (collection, docrequest, docresponse, err, logout); 1673 return docresponse.doc; 1674 1678 text = options["text"]; 1679 } 1680 else { 1681 // get document text here 1682 DocumentRequest_t docrequest; 1683 DocumentResponse_t docresponse; 1684 comerror_t err; 1685 docrequest.OID = docinfo.OID; 1686 collectproto->get_document (collection, docrequest, docresponse, err, logout); 1687 text = docresponse.doc; 1688 } 1689 1690 if (metadata_spanwrap) { 1691 text = "<div class=\"editable-text\" metaname=\"Text\">"+text+"</div>"; 1692 } 1693 1694 return text; 1675 1695 } 1676 1696 … … 1700 1720 collectproto->get_document (collection, docrequest, docresponse, err, logout); 1701 1721 textToSummarise = docresponse.doc; 1702 } else // in practice, this would not happen, because text is only 1703 // loaded with the [Text] command 1704 textToSummarise = options["text"]; 1722 } 1723 else { 1724 // in practice, this would not happen, because text is only 1725 // loaded with the [Text] command 1726 textToSummarise = options["text"]; 1727 } 1728 1705 1729 disp.expandstring("_cgiargq_",query); 1706 1730 return summarise(textToSummarise,query,80);
Note:
See TracChangeset
for help on using the changeset viewer.