Add PageListRenderer: Allow rendering pagelist by creationdate and A-Z as before

このコミットが含まれているのは:
2022-04-03 11:06:19 +02:00
コミット b5b2a42839
7個のファイルの変更99行の追加0行の削除

27
pagelistrenderer.h ノーマルファイル
ファイルの表示

@@ -0,0 +1,27 @@
#ifndef PAGELISTRENDERER_H
#define PAGELISTRENDERER_H
#include "utils.h"
#include "page.h"
#include "template.h"
#include "htmllink.h"
#include "urlprovider.h"
#include "database/database.h"
class PageListRenderer
{
private:
Template *templ;
UrlProvider *urlProvider;
Database *database;
public:
PageListRenderer(Template &templ, UrlProvider &provider, Database &database);
std::string render(const std::vector<Page> &pages, std::string type) const;
inline static const std::string RENDER_GROUP_BY_LETTER { "letter" };
inline static const std::string RENDER_GROUP_BY_CREATIONDATE { "creationdate" };
};
#endif