mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-10 00:52:11 +01:00
Rename summary in PagedArticle to index_page.
This commit is contained in:
parent
382696609c
commit
bb4aa4ebdd
@ -23,7 +23,7 @@ void PagedArticle::handle_request_main(Request *request) {
|
||||
render_menu(request);
|
||||
|
||||
// summary page
|
||||
request->body += summary_page;
|
||||
request->body += index_page;
|
||||
|
||||
request->compile_and_send_body();
|
||||
return;
|
||||
@ -101,7 +101,7 @@ void PagedArticle::load() {
|
||||
pages[files[i]] = finals;
|
||||
|
||||
if (i == 0) {
|
||||
summary_page = (*finals);
|
||||
index_page = (*finals);
|
||||
}
|
||||
}
|
||||
|
||||
@ -116,26 +116,10 @@ void PagedArticle::load() {
|
||||
|
||||
file_cache->wwwroot_refresh_cache();
|
||||
}
|
||||
|
||||
generate_summary();
|
||||
}
|
||||
|
||||
void PagedArticle::generate_summary() {
|
||||
if (summary_page != "") {
|
||||
return;
|
||||
}
|
||||
|
||||
for (std::map<String, String *>::iterator it = pages.begin(); it != pages.end(); ++it) {
|
||||
String *s = (*it).second;
|
||||
|
||||
if (s != nullptr) {
|
||||
summary_page = (*s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String PagedArticle::get_summary() {
|
||||
return summary_page;
|
||||
String PagedArticle::get_index_page() {
|
||||
return index_page;
|
||||
}
|
||||
|
||||
void PagedArticle::_notification(const int what) {
|
||||
|
@ -18,8 +18,7 @@ public:
|
||||
|
||||
void load();
|
||||
void load_folder(const String &folder, const String &path);
|
||||
void generate_summary();
|
||||
String get_summary();
|
||||
String get_index_page();
|
||||
|
||||
void _notification(const int what);
|
||||
|
||||
@ -31,7 +30,7 @@ public:
|
||||
String serve_folder;
|
||||
|
||||
protected:
|
||||
String summary_page;
|
||||
String index_page;
|
||||
std::map<String, String *> pages;
|
||||
FileCache *file_cache;
|
||||
};
|
||||
|
@ -69,7 +69,7 @@ void PagedArticles::generate_summary() {
|
||||
|
||||
if (a) {
|
||||
b.a(a->get_full_uri());
|
||||
b.div("article_list_entry")->w(a->get_summary())->cdiv();
|
||||
b.div("article_list_entry")->w(a->get_index_page())->cdiv();
|
||||
b.ca();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user