changed: rename cmslu to winix
changed: html templates are a part of winix now and the user can provide special html templates for its site added: locales added: html templates are using HtmlFilter now (locales) changed: now we have html templates for each language git-svn-id: svn://ttmath.org/publicrep/winix/trunk@560 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -13,8 +13,9 @@
|
||||
#include <iomanip>
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
#include "../core/mount.h"
|
||||
#include "../core/locale.h"
|
||||
#include "../templates/misc.h"
|
||||
#include "ezc.h"
|
||||
|
||||
|
||||
@@ -23,6 +24,7 @@ struct NotifyMsg
|
||||
std::string email;
|
||||
int notify_code;
|
||||
Mount::Type current_mount_type;
|
||||
Locale::Lang lang;
|
||||
std::string doc_base_url;
|
||||
std::string item_dir;
|
||||
std::string item_link;
|
||||
@@ -33,6 +35,15 @@ namespace TemplatesNotifyFunctions
|
||||
{
|
||||
using Ezc::Info;
|
||||
|
||||
enum Pat {
|
||||
pat_email_notify = 0, // first should be zero
|
||||
|
||||
pat_last // should be last
|
||||
};
|
||||
|
||||
typedef std::vector<std::vector<Ezc::Pattern> > Patterns;
|
||||
|
||||
extern TemplatesMisc::Patterns patterns;
|
||||
extern NotifyMsg * notify_msg;
|
||||
|
||||
void notify_item_added(Info & i);
|
||||
@@ -55,15 +66,21 @@ class TemplatesNotify
|
||||
{
|
||||
public:
|
||||
|
||||
void Read(const std::string & templates_dir);
|
||||
void Generate();
|
||||
TemplatesNotify();
|
||||
|
||||
void Read();
|
||||
void CreateFunctions();
|
||||
void Generate(Locale::Lang lang);
|
||||
|
||||
std::ostringstream notify_str;
|
||||
|
||||
private:
|
||||
|
||||
void CreateFunctions();
|
||||
void Read(TemplatesNotifyFunctions::Pat pat, const std::string & dir, const char * file);
|
||||
void Read(TemplatesNotifyFunctions::Pat pat, const char * file);
|
||||
void ClearPatterns();
|
||||
|
||||
std::string temp;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user