35 lines
763 B
C++
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__
|