Gui: add parameter to adjust the date format used in the result list

This commit is contained in:
Jean-Francois Dockes
2012-02-01 14:25:54 +01:00
parent 3fa907a2eb
commit 71383023a5
7 changed files with 240 additions and 166 deletions
+7 -1
View File
@@ -161,7 +161,7 @@ void ResListPager::displayDoc(RclConfig *config,
time_t mtime = doc.dmtime.empty() ?
atol(doc.fmtime.c_str()) : atol(doc.dmtime.c_str());
struct tm *tm = localtime(&mtime);
strftime(datebuf, 99, " %Y-%m-%d %H:%M:%S %z", tm);
strftime(datebuf, 99, dateFormat().c_str(), tm);
}
// Size information. We print both doc and file if they differ a lot
@@ -414,3 +414,9 @@ const string &ResListPager::parFormat()
return cstr_format;
}
const string &ResListPager::dateFormat()
{
static const string cstr_format(" %Y-%m-%d %H:%M:%S %z");
return cstr_format;
}
+1
View File
@@ -106,6 +106,7 @@ public:
virtual string trans(const string& in);
virtual string detailsLink();
virtual const string &parFormat();
virtual const string &dateFormat();
virtual string nextUrl();
virtual string prevUrl();
virtual string pageTop() {return string();}