Older/WebApplication/view/EditUsers.h
luocai 27ffee57be
Some checks failed
Deploy / PullDocker (push) Successful in 4s
Deploy / Build (push) Failing after 1m34s
Deploy Docker Images / Docusaurus build and Server deploy (push) Successful in 14s
add blog code.
2024-11-01 19:05:20 +08:00

35 lines
763 B
C++

#ifndef __EDITUSERS_H__
#define __EDITUSERS_H__
#include "model/User.h"
#include <Wt/Dbo/Types.h>
#include <Wt/WTemplate.h>
class EditUsers : public Wt::WTemplate {
public:
EditUsers(Wt::Dbo::Session &aSession, const std::string &basePath);
private:
void onUserClicked(Wt::Dbo::dbo_traits<User>::IdType id);
void limitList();
Wt::Dbo::Session &m_session;
std::string m_basePath;
Wt::WLineEdit *m_limitEdit;
};
class EditUser : public Wt::WTemplate {
public:
EditUser(Wt::Dbo::Session &aSession);
void switchUser(Wt::Dbo::ptr<User> target);
private:
void bindTemplate();
void switchRole();
Wt::Dbo::Session &session_;
Wt::Dbo::ptr<User> target_;
Wt::WPushButton *roleButton_;
};
#endif // __EDITUSERS_H__