mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2025-05-06 17:51:36 +02:00
PagedArticles now uses the new summary page.
This commit is contained in:
parent
ead57f1d6a
commit
eb4b1c073e
@ -12,7 +12,7 @@ void PagedArticles::_handle_request_main(Request *request) {
|
|||||||
render_menu(request);
|
render_menu(request);
|
||||||
|
|
||||||
// summary page
|
// summary page
|
||||||
request->body += summary_page;
|
request->body += index_page;
|
||||||
|
|
||||||
request->compile_and_send_body();
|
request->compile_and_send_body();
|
||||||
}
|
}
|
||||||
@ -56,10 +56,10 @@ void PagedArticles::load() {
|
|||||||
dir->next();
|
dir->next();
|
||||||
}
|
}
|
||||||
|
|
||||||
generate_summary();
|
generate_index_page();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PagedArticles::generate_summary() {
|
void PagedArticles::generate_index_page() {
|
||||||
HTMLBuilder b;
|
HTMLBuilder b;
|
||||||
|
|
||||||
b.div("article_list");
|
b.div("article_list");
|
||||||
@ -69,14 +69,14 @@ void PagedArticles::generate_summary() {
|
|||||||
|
|
||||||
if (a) {
|
if (a) {
|
||||||
b.a(a->get_full_uri());
|
b.a(a->get_full_uri());
|
||||||
b.div("article_list_entry")->w(a->get_index_page())->cdiv();
|
b.div("article_list_entry")->w(a->get_summary())->cdiv();
|
||||||
b.ca();
|
b.ca();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
b.cdiv();
|
b.cdiv();
|
||||||
|
|
||||||
summary_page = b.result;
|
index_page = b.result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PagedArticles::_notification(const int what) {
|
void PagedArticles::_notification(const int what) {
|
||||||
|
@ -18,7 +18,7 @@ public:
|
|||||||
void _handle_request_main(Request *request);
|
void _handle_request_main(Request *request);
|
||||||
|
|
||||||
void load();
|
void load();
|
||||||
void generate_summary();
|
void generate_index_page();
|
||||||
|
|
||||||
void _notification(const int what);
|
void _notification(const int what);
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ public:
|
|||||||
String folder;
|
String folder;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
String summary_page;
|
String index_page;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
Loading…
Reference in New Issue
Block a user