mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-10 00:52:11 +01:00
Added a new admin_panel module.
This commit is contained in:
parent
4c5c439faf
commit
6d77f78494
12
modules/admin_panel/SCsub
Normal file
12
modules/admin_panel/SCsub
Normal file
@ -0,0 +1,12 @@
|
||||
#!/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("admin_panel", env_mod.core_sources)
|
||||
env.Prepend(LIBS=[lib])
|
16
modules/admin_panel/admin_controller.cpp
Normal file
16
modules/admin_panel/admin_controller.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
#include "admin_controller.h"
|
||||
|
||||
#include "core/html/form_validator.h"
|
||||
#include "core/html/html_builder.h"
|
||||
#include "core/http/cookie.h"
|
||||
#include "core/http/http_session.h"
|
||||
#include "core/http/request.h"
|
||||
#include "core/http/session_manager.h"
|
||||
|
||||
AdminController::AdminController() :
|
||||
Controller() {
|
||||
|
||||
}
|
||||
|
||||
AdminController::~AdminController() {
|
||||
}
|
21
modules/admin_panel/admin_controller.h
Normal file
21
modules/admin_panel/admin_controller.h
Normal file
@ -0,0 +1,21 @@
|
||||
#ifndef ADMIN_CONTROLLER_H
|
||||
#define ADMIN_CONTROLLER_H
|
||||
|
||||
#include "core/http/controller.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
class Request;
|
||||
class FormValidator;
|
||||
|
||||
class AdminController : public Controller {
|
||||
RCPP_OBJECT(AdminController, Controller);
|
||||
|
||||
public:
|
||||
AdminController();
|
||||
~AdminController();
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif
|
36
modules/admin_panel/admin_panel.cpp
Normal file
36
modules/admin_panel/admin_panel.cpp
Normal file
@ -0,0 +1,36 @@
|
||||
#include "admin_panel.h"
|
||||
|
||||
#include "core/html/form_validator.h"
|
||||
#include "core/html/html_builder.h"
|
||||
#include "core/http/cookie.h"
|
||||
#include "core/http/http_session.h"
|
||||
#include "core/http/request.h"
|
||||
#include "core/http/session_manager.h"
|
||||
|
||||
void AdminPanel::handle_request_main(Request *request) {
|
||||
}
|
||||
|
||||
void AdminPanel::create_validators() {
|
||||
}
|
||||
|
||||
AdminPanel *AdminPanel::get_singleton() {
|
||||
return _self;
|
||||
}
|
||||
|
||||
AdminPanel::AdminPanel() :
|
||||
Controller() {
|
||||
|
||||
if (_self) {
|
||||
printf("AdminPanel::AdminPanel(): Error! self is not null!/n");
|
||||
}
|
||||
|
||||
_self = this;
|
||||
}
|
||||
|
||||
AdminPanel::~AdminPanel() {
|
||||
if (_self == this) {
|
||||
_self = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
AdminPanel *AdminPanel::_self = nullptr;
|
27
modules/admin_panel/admin_panel.h
Normal file
27
modules/admin_panel/admin_panel.h
Normal file
@ -0,0 +1,27 @@
|
||||
#ifndef ADMIN_PANEL_H
|
||||
#define ADMIN_PANEL_H
|
||||
|
||||
#include "core/http/controller.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
class Request;
|
||||
class FormValidator;
|
||||
|
||||
class AdminPanel : public Controller {
|
||||
RCPP_OBJECT(AdminPanel, Controller);
|
||||
|
||||
public:
|
||||
void handle_request_main(Request *request);
|
||||
void create_validators();
|
||||
|
||||
static AdminPanel *get_singleton();
|
||||
|
||||
AdminPanel();
|
||||
~AdminPanel();
|
||||
|
||||
protected:
|
||||
static AdminPanel *_self;
|
||||
};
|
||||
|
||||
#endif
|
26
modules/admin_panel/detect.py
Normal file
26
modules/admin_panel/detect.py
Normal file
@ -0,0 +1,26 @@
|
||||
import os
|
||||
import platform
|
||||
import sys
|
||||
|
||||
|
||||
def is_active():
|
||||
return True
|
||||
|
||||
|
||||
def get_name():
|
||||
return "users"
|
||||
|
||||
|
||||
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