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:
2010-01-28 15:39:01 +00:00
parent 5dac8af300
commit 09d427b4ba
65 changed files with 1949 additions and 848 deletions

View File

@@ -2,7 +2,7 @@
* This file is a part of CMSLU -- Content Management System like Unix
* and is not publicly distributed
*
* Copyright (c) 2008-2009, Tomasz Sowa
* Copyright (c) 2008-2010, Tomasz Sowa
* All rights reserved.
*
*/
@@ -12,9 +12,9 @@
#include <iomanip>
#include <set>
#include "ezc.h"
#include "patterncacher.h"
#include "misc.h"
@@ -22,11 +22,45 @@ namespace TemplatesFunctions
{
using Ezc::Info;
enum Pat {
pat_index = 0, // first should be zero
pat_fun_cat,
pat_fun_ls,
pat_fun_emacs,
pat_fun_mkdir,
pat_fun_default,
pat_fun_priv,
pat_fun_rm,
pat_fun_who,
pat_fun_run,
pat_fun_last,
pat_fun_thread,
pat_fun_reload,
pat_fun_createthread,
pat_fun_upload,
pat_fun_ticket,
pat_fun_createticket,
pat_err_404,
pat_err_per_denied,
pat_err_others,
pat_item_info,
pat_item_tab_info,
pat_dir_last_info,
pat_last // should be last
};
struct PatName
{
int fun_code;
Pat pat;
};
extern TemplatesMisc::Patterns patterns;
extern PatternCacher pattern_cacher;
extern Ezc::Functions functions;
extern Ezc::Pattern pat_item_info;
extern Ezc::Pattern pat_item_tab_info;
extern Ezc::Pattern pat_dir_last_info;
@@ -41,9 +75,7 @@ namespace TemplatesFunctions
/*
doc
*/
void doc_language(Info & i);
void doc_title(Info & i);
void doc_charset(Info & i);
void doc_base_url(Info & i);
void doc_base_url_static(Info & i);
void doc_base_url_static_auth(Info & i);
@@ -301,11 +333,18 @@ class Templates
{
public:
Templates();
void ClearPatterns();
void ReadTemplates();
void CreateFunctions();
void Generate();
void GenerateRunRaw();
private:
std::string temp;
};