// Just the required fields to build the item
std::string title;
std::string url;
+ std::string desc;
std::time_t ctime;
std::time_t mtime;
public:
DocListItem (std::string title, std::string url,
- std::time_t ctime, std::time_t mtime ) {
+ std::time_t ctime, std::time_t mtime, std::string desc ) {
this->title = escape_html (title);
this->url = url;
this->ctime = ctime;
this->mtime = mtime;
+ this->desc = desc;
+ }
+
+ std::string get_desc () {
+ return this->desc;
+ }
+
+ void set_desc (std::string desc) {
+ this->desc = escape_html (desc);
}
std::time_t get_mtime() {
m = *std::localtime (&this->mtime);
std::string outputhtml = fmt::format (templstr, fmt::arg("url", this->url),
- fmt::arg("doctitle", this->title),
+ fmt::arg("doctitle", this->title),
+ fmt::arg("desc", this->desc),
fmt::arg("cdate", c),
fmt::arg("mdate", m));