Changeset 15847
- Timestamp:
- 2008-06-04T14:02:00+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/src/recpt/dynamicclassifieraction.cpp
r15836 r15847 72 72 73 73 74 // define all the macros which might be used by other actions 75 // to produce pages. 74 // define all the macros which might be used by other actions to produce pages. 76 75 void dynamicclassifieraction::define_external_macros (displayclass &disp, cgiargsclass &args, 77 76 recptprotolistclass *protos, ostream &logout) 78 77 { 79 // define_external_macros sets the following macros: 78 // A valid collection server is vital 79 recptproto *collectproto = protos->getrecptproto (args["c"], logout); 80 if (collectproto == NULL) 81 { 82 logout << "dynamicclassifieraction::define_external_macros called with NULL collectproto\n"; 83 return; 84 } 85 86 // Define _dynamicclassifiernavbarentries_ to add buttons to the navigation bar for the dynamic classifiers 87 text_t navigation_bar_entries = ""; 88 ColInfoResponse_t *cinfo = recpt->get_collectinfo_ptr (collectproto, args["c"], logout); 89 text_tmap::iterator dynamic_classifier_iterator = cinfo->dynamic_classifiers.begin(); 90 while (dynamic_classifier_iterator != cinfo->dynamic_classifiers.end()) 91 { 92 text_t dynamic_classifier_id = (*dynamic_classifier_iterator).first; 93 navigation_bar_entries += "_navbarspacer_"; 94 navigation_bar_entries += "_navtab_(_gwcgi_?c=" + args["c"] + "&a=dc&dcl=" + dynamic_classifier_id + "," + dynamic_classifier_id; 95 if (args["a"] == "dc" && args["dcl"] == dynamic_classifier_id) 96 { 97 navigation_bar_entries += ",selected"; 98 } 99 navigation_bar_entries += ")"; 100 dynamic_classifier_iterator++; 101 } 102 103 disp.setmacro("dynamicclassifiernavbarentries", displayclass::defaultpackage, navigation_bar_entries); 80 104 } 81 105
Note:
See TracChangeset
for help on using the changeset viewer.