- [ticket_tab_param_name]: |
+ [filter fil_firstup][ticket_tab_param_name]:[end] |
[if ticket_tab_is_images]
[for ticket_tab_files_tab]
-
+
[end]
[end]
diff --git a/html/index_head_functions_add.html b/html/index_head_functions_add.html
index 57c0047..705f4c6 100755
--- a/html/index_head_functions_add.html
+++ b/html/index_head_functions_add.html
@@ -31,3 +31,10 @@
[end]
+[if winix_function_is "ticket"]
+
+
+
+
+[end]
+
diff --git a/plugins/ticket/templates.cpp b/plugins/ticket/templates.cpp
index 010ad35..53615e8 100755
--- a/plugins/ticket/templates.cpp
+++ b/plugins/ticket/templates.cpp
@@ -249,6 +249,19 @@ void tickets_tab_subject(Info & i)
}
+void tickets_tab_has_value(Info & i)
+{
+ if( has_ticket && ticket_index < ticket_info.ticket_tab.size() )
+ {
+ size_t par_index;
+ long id = Tol(i.par);
+ Ticket & ticket = ticket_info.ticket_tab[ticket_index];
+
+ if( find_ticket_value(id, ticket, par_index) )
+ i.res = true;
+ }
+}
+
void tickets_tab_value_int(Info & i)
{
@@ -631,6 +644,7 @@ using namespace ns_ticket_tab;
fun->Insert("tickets_tab_subject", tickets_tab_subject);
// you should provide an id (param) as a first parameter
+ fun->Insert("tickets_tab_has_value", tickets_tab_has_value);
fun->Insert("tickets_tab_value_int", tickets_tab_value_int);
fun->Insert("tickets_tab_value_str", tickets_tab_value_str);
diff --git a/templates/filters.cpp b/templates/filters.cpp
index 64b4aa4..f744272 100755
--- a/templates/filters.cpp
+++ b/templates/filters.cpp
@@ -59,6 +59,35 @@ void fil_tosmall(Info & i)
}
+// a first letter in a sentence will be capitalized
+void fil_firstup(Info & i)
+{
+ bool was_dot = true;
+ const std::wstring & str = i.in.Str();
+
+ for(size_t a=0 ; a='a' && str[a]<='z' )
+ i.out << R(wchar_t(str[a] - 'a' + 'A'));
+ else
+ i.out << R(str[a]);
+ }
+ else
+ {
+ i.out << R(str[a]);
+ }
+
+ if( str[a] == '.' )
+ was_dot = true;
+ }
+}
+
+
} // namespace
diff --git a/templates/templates.cpp b/templates/templates.cpp
index 9fe6972..47b3d37 100755
--- a/templates/templates.cpp
+++ b/templates/templates.cpp
@@ -189,7 +189,7 @@ void Templates::CreateFunctions()
ezc_functions.Insert("fil_qencode", fil_qencode);
ezc_functions.Insert("fil_capitalize", fil_capitalize);
ezc_functions.Insert("fil_tosmall", fil_tosmall);
-
+ ezc_functions.Insert("fil_firstup", fil_firstup);
/*
doc
diff --git a/templates/templates.h b/templates/templates.h
index aa62b2c..1c70138 100755
--- a/templates/templates.h
+++ b/templates/templates.h
@@ -129,7 +129,7 @@ namespace TemplatesFunctions
void fil_qencode(Info & i);
void fil_capitalize(Info & i);
void fil_tosmall(Info & i);
-
+ void fil_firstup(Info & i);
/*
item
|