some improvement in templates
(now we have O(1) time for selecting the right html template) added: winix function: template for selecting a template for an item (file or dir) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@636 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -60,9 +60,9 @@ namespace TemplatesFunctions
|
||||
pat_fun_adduser,
|
||||
pat_err_404,
|
||||
pat_err_per_denied,
|
||||
pat_item_info,
|
||||
pat_item_tab_info,
|
||||
pat_dir_last_info,
|
||||
//pat_item_info,
|
||||
//pat_item_tab_info,
|
||||
//pat_dir_last_info,
|
||||
pat_fun_subject,
|
||||
pat_fun_cp,
|
||||
pat_fun_tinymce,
|
||||
@@ -79,6 +79,7 @@ namespace TemplatesFunctions
|
||||
|
||||
extern IndexPatterns index_patterns;
|
||||
extern Patterns patterns;
|
||||
extern Patterns patterns_fun;
|
||||
extern PatternCacher pattern_cacher;
|
||||
extern Locale locale;
|
||||
extern Ezc::Functions ezc_functions;
|
||||
@@ -144,7 +145,7 @@ namespace TemplatesFunctions
|
||||
void item_can_read(Info & i);
|
||||
void item_can_write(Info & i);
|
||||
void item_can_remove(Info & i);
|
||||
void item_info(Info & i);
|
||||
//void item_info(Info & i);
|
||||
void item_user(Info & i);
|
||||
void item_modification_user(Info & i);
|
||||
void item_users_different(Info & i);
|
||||
@@ -155,6 +156,9 @@ namespace TemplatesFunctions
|
||||
void item_dates_equal(Info & i);
|
||||
void item_run(Info & i);
|
||||
void item_guest_name(Info & i);
|
||||
void item_html_template(Info & i);
|
||||
void item_has_html_template(Info & i);
|
||||
|
||||
|
||||
void item_tab(Info & i);
|
||||
void item_tab_id(Info & i);
|
||||
@@ -170,7 +174,7 @@ namespace TemplatesFunctions
|
||||
void item_tab_link_auth(Info & i);
|
||||
void item_tab_can_read(Info & i);
|
||||
void item_tab_can_write(Info & i);
|
||||
void item_tab_info(Info & i);
|
||||
//void item_tab_info(Info & i);
|
||||
void item_tab_user(Info & i);
|
||||
void item_tab_modification_user(Info & i);
|
||||
void item_tab_users_different(Info & i);
|
||||
@@ -211,14 +215,16 @@ namespace TemplatesFunctions
|
||||
void dir_last_default_item_dir(Info &);
|
||||
void dir_last_default_item_url(Info & i);
|
||||
void dir_last_subject(Info & i);
|
||||
void dir_last_info(Info & i);
|
||||
//void dir_last_info(Info & i);
|
||||
void dir_last_user(Info & i);
|
||||
void dir_last_url(Info & i);
|
||||
void dir_last_url_is(Info & i);
|
||||
void dir_last_date_creation(Info & i);
|
||||
void dir_last_date_modification(Info & i);
|
||||
void dir_last_dates_equal(Info & i);
|
||||
|
||||
void dir_last_html_template(Info & i);
|
||||
void dir_last_has_html_template(Info & i);
|
||||
|
||||
|
||||
/*
|
||||
user
|
||||
@@ -360,6 +366,8 @@ namespace TemplatesFunctions
|
||||
void mount_type_is_thread(Info & i);
|
||||
void mount_type_is_ticket(Info & i);
|
||||
void mount_type_is_cms(Info & i);
|
||||
void mount_has_html_template(Info & i);
|
||||
void mount_first_html_template(Info & i);
|
||||
|
||||
|
||||
/*
|
||||
@@ -404,6 +412,15 @@ namespace TemplatesFunctions
|
||||
void winix_err_msg_from_locales(Info & i);
|
||||
void winix_show_content_in_full_window(Info & i);
|
||||
|
||||
|
||||
/*
|
||||
template (html templates)
|
||||
*/
|
||||
void template_index(Info & i);
|
||||
void template_tab(Info & i);
|
||||
void template_tab_isdefault(Info & i);
|
||||
void template_tab_file_name(Info & i);
|
||||
|
||||
} // namespace TemplatesFunctions
|
||||
|
||||
|
||||
@@ -425,7 +442,7 @@ public:
|
||||
void ClearPatterns();
|
||||
void ReadTemplates();
|
||||
void ReadNewIndexTemplates();
|
||||
void ReadIndexFileNames();
|
||||
void ReadIndexFileNames(bool add_pattern = false);
|
||||
void CreateFunctions();
|
||||
void Generate();
|
||||
void GenerateRunRaw();
|
||||
@@ -433,9 +450,12 @@ public:
|
||||
private:
|
||||
|
||||
void ReadFile(TemplatesFunctions::Pat pat, const char * file);
|
||||
void ReadFileFun(size_t index, const char * file);
|
||||
void ReadFunctionsTemplates();
|
||||
void SetLocale();
|
||||
|
||||
std::string temp;
|
||||
|
||||
std::string fun_file;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user