27 lines
591 B
C
27 lines
591 B
C
|
#ifndef __COMMENTVIEW_H__
|
||
|
#define __COMMENTVIEW_H__
|
||
|
|
||
|
#include <Wt/Dbo/ptr.h>
|
||
|
#include <Wt/WTemplate.h>
|
||
|
|
||
|
class BlogSession;
|
||
|
class Comment;
|
||
|
|
||
|
class CommentView : public Wt::WTemplate {
|
||
|
public:
|
||
|
CommentView(BlogSession &session, long long parentId);
|
||
|
CommentView(BlogSession& session, Wt::Dbo::ptr<Comment> comment);
|
||
|
protected:
|
||
|
void edit();
|
||
|
void save();
|
||
|
void cancel();
|
||
|
void renderView();
|
||
|
bool isNew() const;
|
||
|
void reply();
|
||
|
void rm();
|
||
|
private:
|
||
|
BlogSession &session_;
|
||
|
Wt::Dbo::ptr<Comment> comment_;
|
||
|
Wt::WTextArea *editArea_;
|
||
|
};
|
||
|
#endif // __COMMENTVIEW_H__
|