Changeset 11770
- Timestamp:
- 2006-05-04T16:03:35+12:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/datelistbrowserclass.cpp
r11638 r11770 110 110 begin++; 111 111 } 112 //text_t &date = (*thissection).metadata[date_meta].values[0]; 113 114 // bail on this document if it has no date 115 if (date.empty()) { ++thissection; continue; } 116 117 text_t::const_iterator datebegin = date.begin(); 118 int datesize = date.size(); 112 text_t thisyear = ""; 113 text_t thismonth = ""; 114 if (!date.empty()) { 115 text_t::const_iterator datebegin = date.begin(); 116 int datesize = date.size(); 119 117 120 if (datesize < 4) { ++thissection; continue; } 121 text_t thisyear = substr (datebegin, datebegin+4); 122 text_t thismonth = "00"; 123 if (datesize >= 6) 124 thismonth = substr (datebegin+4, datebegin+6); 125 118 if (datesize >=4) { 119 thisyear = substr (datebegin, datebegin+4); 120 thismonth = "00"; 121 if (datesize >= 6) 122 thismonth = substr (datebegin+4, datebegin+6); 123 } 124 } 125 126 126 text_t link = "<a href=\"_httpdocument_&cl="; 127 127 text_t icon = "_document:iconclosedbook_"; … … 143 143 textout << outconvert << "<tr valign=top>"; 144 144 145 if (thisyear != lastyear) {145 if (thisyear != "" && thisyear != lastyear) { 146 146 textout << outconvert << "<td><span class=\"date_list_year\">" << thisyear << "</span></td>"; 147 147 lastyear = thisyear; 148 } else 148 } else { 149 149 textout << outconvert << "<td></td>"; 150 151 if (thismonth != lastmonth) {150 } 151 if (thismonth != "" && thismonth != lastmonth) { 152 152 textout << outconvert << disp << ("<td><span class=\"date_list_month\">_textmonth" + thismonth + "_</span></td>"); 153 153 lastmonth = thismonth; 154 } else 154 } else { 155 155 textout << outconvert << "<td></td>"; 156 156 } 157 157 if (!use_table) textout << outconvert << "<td>\n"; 158 158
Note:
See TracChangeset
for help on using the changeset viewer.