changed templates
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@715 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
parent
d4d9f89d1d
commit
18492e5d61
|
@ -55,7 +55,7 @@
|
||||||
[end]
|
[end]
|
||||||
|
|
||||||
<input size="30" class="edit" type="file" name="ticketparam[ticket_tab_param_id]">
|
<input size="30" class="edit" type="file" name="ticketparam[ticket_tab_param_id]">
|
||||||
<input class="filesubmit" type="submit" name="fileuploadsubmit" value="Add">
|
<input class="filesubmit" type="submit" name="fileuploadsubmit" value="{add}">
|
||||||
[end]
|
[end]
|
||||||
|
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
[end]
|
[end]
|
||||||
|
|
||||||
<input size="30" class="edit" type="file" name="ticketparam[ticket_tab_param_id]">
|
<input size="30" class="edit" type="file" name="ticketparam[ticket_tab_param_id]">
|
||||||
<input class="filesubmit" type="submit" name="fileuploadsubmit" value="Add">
|
<input class="filesubmit" type="submit" name="fileuploadsubmit" value="{add}">
|
||||||
[end]
|
[end]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,12 +8,12 @@
|
||||||
<table>
|
<table>
|
||||||
[for ticket_tab]
|
[for ticket_tab]
|
||||||
<tr>
|
<tr>
|
||||||
<th>[ticket_tab_param_name]:</th>
|
<th>[filter fil_firstup][ticket_tab_param_name]:[end]</th>
|
||||||
<td>
|
<td>
|
||||||
|
|
||||||
[if ticket_tab_is_images]
|
[if ticket_tab_is_images]
|
||||||
[for ticket_tab_files_tab]
|
[for ticket_tab_files_tab]
|
||||||
<img src="[doc_base_url][ticket_tab_value]/-/thumb" alt="[ticket_tab_value]" height="150">
|
<a href="[doc_base_url][ticket_tab_value]" rel="lightbox\[a\]" class="picture"><img src="[doc_base_url][ticket_tab_value]/-/thumb" alt="[ticket_tab_value]" height="150"></a>
|
||||||
[end]
|
[end]
|
||||||
[end]
|
[end]
|
||||||
|
|
||||||
|
|
|
@ -31,3 +31,10 @@
|
||||||
[end]
|
[end]
|
||||||
|
|
||||||
|
|
||||||
|
[if winix_function_is "ticket"]
|
||||||
|
<link rel="stylesheet" href="[doc_base_url_common]/lightbox/lightbox.css" type="text/css" media="screen">
|
||||||
|
<script src="[doc_base_url_common]/lightbox/js/prototype.js" type="text/javascript"></script>
|
||||||
|
<script src="[doc_base_url_common]/lightbox/js/scriptaculous.js?load=effects,builder" type="text/javascript"></script>
|
||||||
|
<script src="[doc_base_url_common]/lightbox/js/lightbox.js" type="text/javascript"></script>
|
||||||
|
[end]
|
||||||
|
|
||||||
|
|
|
@ -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)
|
void tickets_tab_value_int(Info & i)
|
||||||
{
|
{
|
||||||
|
@ -631,6 +644,7 @@ using namespace ns_ticket_tab;
|
||||||
fun->Insert("tickets_tab_subject", tickets_tab_subject);
|
fun->Insert("tickets_tab_subject", tickets_tab_subject);
|
||||||
|
|
||||||
// you should provide an id (param) as a first parameter
|
// 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_int", tickets_tab_value_int);
|
||||||
fun->Insert("tickets_tab_value_str", tickets_tab_value_str);
|
fun->Insert("tickets_tab_value_str", tickets_tab_value_str);
|
||||||
|
|
||||||
|
|
|
@ -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<str.size() ; ++a)
|
||||||
|
{
|
||||||
|
if( was_dot )
|
||||||
|
{
|
||||||
|
if( str[a]!=' ' && str[a]!='\t' && str[a]!=13 && str[a]!=10 && str[a]!=160 )
|
||||||
|
was_dot = false;
|
||||||
|
|
||||||
|
if( str[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
|
} // namespace
|
||||||
|
|
|
@ -189,7 +189,7 @@ void Templates::CreateFunctions()
|
||||||
ezc_functions.Insert("fil_qencode", fil_qencode);
|
ezc_functions.Insert("fil_qencode", fil_qencode);
|
||||||
ezc_functions.Insert("fil_capitalize", fil_capitalize);
|
ezc_functions.Insert("fil_capitalize", fil_capitalize);
|
||||||
ezc_functions.Insert("fil_tosmall", fil_tosmall);
|
ezc_functions.Insert("fil_tosmall", fil_tosmall);
|
||||||
|
ezc_functions.Insert("fil_firstup", fil_firstup);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
doc
|
doc
|
||||||
|
|
|
@ -129,7 +129,7 @@ namespace TemplatesFunctions
|
||||||
void fil_qencode(Info & i);
|
void fil_qencode(Info & i);
|
||||||
void fil_capitalize(Info & i);
|
void fil_capitalize(Info & i);
|
||||||
void fil_tosmall(Info & i);
|
void fil_tosmall(Info & i);
|
||||||
|
void fil_firstup(Info & i);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
item
|
item
|
||||||
|
|
Loading…
Reference in New Issue