rcpp_framework/modules/list_page/list_page.h

39 lines
852 B
C
Raw Normal View History

2020-12-26 00:18:11 +01:00
#ifndef LIST_PAGE_H
#define LIST_PAGE_H
#include "core/containers/vector.h"
#include "core/string.h"
2020-12-26 00:18:11 +01:00
2022-01-08 12:52:03 +01:00
#include "core/http/web_node.h"
2020-12-26 00:18:11 +01:00
#include "core/http/request.h"
2020-12-26 00:18:11 +01:00
2022-01-08 12:52:03 +01:00
class ListPage : public WebNode {
RCPP_OBJECT(ListPage, WebNode);
2020-12-26 00:18:11 +01:00
public:
void handle_request_main(Request *request);
void load();
virtual void render_entries(const Vector<String> &list_entries);
virtual String render_page(const int page_index, const int page_count, const Vector<String> &list_entries, const int efrom, const int eto);
virtual String render_entry(const String &list_entry);
virtual void render_no_entries_response();
void _notification(const int what);
ListPage();
~ListPage();
2020-12-26 00:18:11 +01:00
bool paginate;
int max_visible_navigation_links;
int entry_per_page;
String folder;
2020-12-26 00:18:11 +01:00
protected:
Vector<String> _pages;
String _no_entries_response;
2020-12-26 00:18:11 +01:00
};
#endif