mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2025-05-06 17:51:36 +02:00
Moved and renamed PagedList.
This commit is contained in:
parent
25e4e929a6
commit
8981e8e688
@ -1,16 +1,10 @@
|
|||||||
#include "paged_list.h"
|
#include "paged_articles_md_index.h"
|
||||||
|
|
||||||
#include "core/http/request.h"
|
#include "core/http/request.h"
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
#include "core/file_cache.h"
|
|
||||||
|
|
||||||
#include "core/database/database_manager.h"
|
|
||||||
|
|
||||||
#include "core/html/html_builder.h"
|
#include "core/html/html_builder.h"
|
||||||
|
|
||||||
void PagedList::handle_request_main(Request *request) {
|
void PagedArticlesMDIndex::handle_request_main(Request *request) {
|
||||||
const String path = request->get_current_path_segment();
|
const String path = request->get_current_path_segment();
|
||||||
|
|
||||||
if (request->get_remaining_segment_count() == 0) {
|
if (request->get_remaining_segment_count() == 0) {
|
||||||
@ -21,7 +15,7 @@ void PagedList::handle_request_main(Request *request) {
|
|||||||
articles->handle_request_main(request);
|
articles->handle_request_main(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PagedList::load() {
|
void PagedArticlesMDIndex::load() {
|
||||||
main_page->folder = folder;
|
main_page->folder = folder;
|
||||||
main_page->load();
|
main_page->load();
|
||||||
|
|
||||||
@ -30,14 +24,14 @@ void PagedList::load() {
|
|||||||
articles->load();
|
articles->load();
|
||||||
}
|
}
|
||||||
|
|
||||||
PagedList::PagedList() :
|
PagedArticlesMDIndex::PagedArticlesMDIndex() :
|
||||||
WebNode() {
|
WebNode() {
|
||||||
|
|
||||||
main_page = new ListPage();
|
main_page = new ListPage();
|
||||||
articles = new PagedArticle();
|
articles = new PagedArticle();
|
||||||
}
|
}
|
||||||
|
|
||||||
PagedList::~PagedList() {
|
PagedArticlesMDIndex::~PagedArticlesMDIndex() {
|
||||||
delete main_page;
|
delete main_page;
|
||||||
delete articles;
|
delete articles;
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef PAGED_LIST_H
|
#ifndef PAGED_ARTICLES_MD_INDEX_H
|
||||||
#define PAGED_LIST_H
|
#define PAGED_ARTICLES_MD_INDEX_H
|
||||||
|
|
||||||
#include "core/string.h"
|
#include "core/string.h"
|
||||||
|
|
||||||
@ -11,16 +11,16 @@
|
|||||||
// Inherit from PagedArticles and override generate_index_page -> load and process md files in the set folder
|
// Inherit from PagedArticles and override generate_index_page -> load and process md files in the set folder
|
||||||
// SHould probably be called something else. PagedArticlesMDIndex ?
|
// SHould probably be called something else. PagedArticlesMDIndex ?
|
||||||
|
|
||||||
class PagedList : public WebNode {
|
class PagedArticlesMDIndex : public WebNode {
|
||||||
RCPP_OBJECT(PagedList, WebNode);
|
RCPP_OBJECT(PagedArticlesMDIndex, WebNode);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void handle_request_main(Request *request);
|
void handle_request_main(Request *request);
|
||||||
|
|
||||||
void load();
|
void load();
|
||||||
|
|
||||||
PagedList();
|
PagedArticlesMDIndex();
|
||||||
~PagedList();
|
~PagedArticlesMDIndex();
|
||||||
|
|
||||||
String folder;
|
String folder;
|
||||||
String base_path;
|
String base_path;
|
@ -1,12 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
|
|
||||||
Import("env_mod")
|
|
||||||
Import("env")
|
|
||||||
|
|
||||||
env_mod.core_sources = []
|
|
||||||
|
|
||||||
env_mod.add_source_files(env_mod.core_sources, "*.cpp")
|
|
||||||
|
|
||||||
# Build it all as a library
|
|
||||||
lib = env_mod.add_library("paged_list", env_mod.core_sources)
|
|
||||||
env.Prepend(LIBS=[lib])
|
|
@ -1,27 +0,0 @@
|
|||||||
import os
|
|
||||||
import platform
|
|
||||||
import sys
|
|
||||||
|
|
||||||
|
|
||||||
def is_active():
|
|
||||||
return True
|
|
||||||
|
|
||||||
|
|
||||||
def get_name():
|
|
||||||
return "paged_list"
|
|
||||||
|
|
||||||
|
|
||||||
def can_build():
|
|
||||||
return True
|
|
||||||
|
|
||||||
|
|
||||||
def get_opts():
|
|
||||||
return []
|
|
||||||
|
|
||||||
def get_flags():
|
|
||||||
|
|
||||||
return []
|
|
||||||
|
|
||||||
|
|
||||||
def configure(env):
|
|
||||||
pass
|
|
Loading…
Reference in New Issue
Block a user