Changeset 2329
- Timestamp:
- 2001-04-20T13:19:37+12:00 (23 years ago)
- Location:
- trunk/gsdl
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/macros/base.dm
r2231 r2329 209 209 _httppagehome_ {_gwcgi_?a=p&p=home} 210 210 _httppagehelp_ {_httppagex_(help)} 211 _httppagehomehelp_ {_httppagex_(homehelp)} 211 212 _httppagepref_ {_httppagex_(preferences)} 212 213 _httpclearhistory_ {_gwcgi_?e=_compressedoptions_&a=dh} -
trunk/gsdl/macros/home.dm
r2244 r2329 35 35 _imageadmin_ {_gsimage_(_httppagestatus_,_httpimg_/cadminof.gif,_httpimg_/cadminon.gif,admin,Administration Page)} 36 36 _imagegogreenstone_ {_gsimage_(_home:httppagegsdl_,_httpimg_/cabgsof.gif,_httpimg_/cabgson.gif,gogs,About Greenstone)} 37 _imagegohelp_ {_gsimage_(_home:httppagehomehelp_,_httpimg_/choheof.gif,_httpimg_/choheon.gif,hohe,Help)} 37 38 38 39 ####################################################################### … … 63 64 </center> 64 65 <p><table> 66 _textgohelp_ 65 67 _textgocollector_ 66 68 _textgoadmin_ … … 98 100 </tr> 99 101 } 102 103 _textgohelp_ { 104 <tr valign=top> 105 <td valign=top>_imagegohelp_</td> 106 <td>Help text about this Greenstone installation</td> 107 </tr> 108 } 109 110 111 112 package homehelp 113 114 _collectionlist_ {} 115 116 _javalinks_ {_imagehome_} 117 _javalinks_ [v=1] { 118 _imagehome_<br> 119 } 120 121 _content_ { 122 <center> 123 <p>_iconblankbar_ 124 </center> 125 <p> 126 <table border=0 cellspacing=0 cellpadding=0> 127 <tr> 128 <td valign=top align=center>_imagegreenstone_</td> 129 <td valign=top> 130 Greenstone is a suite of software which has the ability to serve digital 131 library collections and build new collections. It provides a new way of 132 organizing information and publishing it on the Internet or on CD-ROM. 133 Greenstone is produced by the New Zealand Digital Library Project at the 134 University of Waikato, and distributed in cooperation with UNESCO and the 135 Humanities Library Project. It is open-source software, available from 136 <i>http://nzdl.org</i> under the terms of the GNU General Public License. 137 <br><br> 138 </td> 139 </tr> 140 </table> 141 142 <center> 143 <p>_iconblankbar_ 144 </center> 145 _If_(_collectionlist_,_collectionlist_, 146 <p>There are currently no collections available to this Greenstone installation. 147 To add some collections you may either 148 <ul><li>Use <a href="_httppagecollector_">The Collector</a> to build new collections 149 <li>If you have a Greenstone cd-rom you may install collections from cd-rom 150 </ul>) 151 152 <center> 153 <p>_iconblankbar_ 154 </center> 155 <p>There are three further buttons on the home page 156 <p><table> 157 _home:textgocollector_ 158 _home:textgoadmin_ 159 _home:textgogreenstone_ 160 </table> 161 <center> 162 <p>_iconblankbar_ 163 </center> 164 } -
trunk/gsdl/src/recpt/pageaction.cpp
r2113 r2329 197 197 } 198 198 199 void pageaction::set_collectionlist_macro (displayclass &disp, recptprotolistclass *protos, 200 ostream &logout) { 201 202 text_t collectionlist; 203 int count = 0; 204 205 recptprotolistclass::iterator rprotolist_here = protos->begin(); 206 recptprotolistclass::iterator rprotolist_end = protos->end(); 207 while (rprotolist_here != rprotolist_end) { 208 if ((*rprotolist_here).p != NULL) { 209 210 text_tarray collist; 211 comerror_t err; 212 (*rprotolist_here).p->get_collection_list (collist, err, logout); 213 if (err == noError) { 214 text_tarray::iterator collist_here = collist.begin(); 215 text_tarray::iterator collist_end = collist.end(); 216 217 while (collist_here != collist_end) { 218 ColInfoResponse_t *cinfo = recpt->get_collectinfo_ptr ((*rprotolist_here).p, *collist_here, logout); 219 220 if (cinfo != NULL) { 221 if (cinfo->isPublic && (cinfo->buildDate > 0)) { 222 223 count ++; 224 225 text_t coll_type = "&ct="; 226 if (cinfo->buildType == "mgpp") { 227 coll_type += "1"; 228 } 229 else { 230 coll_type += "0"; 231 } 232 FilterResponse_t response; 233 text_tset metadata; 234 metadata.insert ("collectionname"); 235 text_t collectionname = *collist_here; 236 237 if (get_info ("collection", *collist_here, metadata, false, 238 (*rprotolist_here).p, response, logout)) { 239 if (!response.docInfo[0].metadata["collectionname"].values[0].empty()) { 240 collectionname = response.docInfo[0].metadata["collectionname"].values[0]; 241 } 242 } 243 244 comerror_t err; 245 text_t optsite = ""; 246 text_t site_name = (*rprotolist_here).p->get_site_name (err); 247 if (!site_name.empty()) { optsite = "site="+site_name+"&"; } 248 249 text_t link = "<a href=\"_gwcgi_?"+optsite+"a=p&p=about&c=" + *collist_here + coll_type+"\">"; 250 251 if (!cinfo->receptionist.empty()) 252 link = "<a href=\"" + cinfo->receptionist + "\">"; 253 254 collectionlist += "<li>" + link + collectionname + "</a>\n"; 255 } 256 } 257 collist_here ++; 258 } 259 } 260 } 261 rprotolist_here ++; 262 } 263 264 if (count == 1) { 265 collectionlist = "<p>This Greenstone installation contains 1 collection\n<ul>" + 266 collectionlist + "</ul>\n"; 267 } else if (count > 1) { 268 collectionlist = "<p>This Greenstone installation contains " + text_t(count) + 269 " collections\n<ul>" + collectionlist + "</ul>\n"; 270 } 271 272 disp.setmacro ("collectionlist", "homehelp", collectionlist); 273 } 274 199 275 void pageaction::define_internal_macros (displayclass &disp, cgiargsclass &args, 200 276 recptprotolistclass *protos, ostream &logout) { … … 243 319 // _textgoadmin_ set to "" if status is disabled in main.cfg 244 320 321 322 // if page is "homehelp" 323 // _collectionlist_ list of available collections to be displayed on the homehelp page 245 324 246 325 if (recpt == NULL) { … … 475 554 } 476 555 } 556 557 } else if (arg_p == "homehelp") { 558 559 set_collectionlist_macro (disp, protos, logout); 560 477 561 } 478 562 } -
trunk/gsdl/src/recpt/pageaction.h
r1759 r2329 70 70 ostream &logout); 71 71 72 void set_collectionlist_macro (displayclass &disp, recptprotolistclass *protos, 73 ostream &logout); 74 75 72 76 bool status_disabled; 73 77 bool collector_disabled;
Note:
See TracChangeset
for help on using the changeset viewer.