added: progress bar (image) to tickets table
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@620 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
parent
262ba10443
commit
62a0e52092
|
@ -10,21 +10,23 @@
|
|||
|
||||
|
||||
[if-one ticket_tab]
|
||||
<table class="forum">
|
||||
<table class="tickettab">
|
||||
<tr>
|
||||
<th>{ticket_table_name}</th>
|
||||
[if-any ticket_type_tab]<th>{ticket_table_type}</th>[end]
|
||||
[if-any ticket_status_tab]<th>{ticket_table_status}</th>[end]
|
||||
<th>{ticket_info_progress}</th>
|
||||
[if-any ticket_priority_tab]<th>{ticket_table_priority}</th>[end]
|
||||
[if-any ticket_expected_tab]<th>{ticket_table_expected}</th>[end]
|
||||
</tr>
|
||||
[for ticket_tab]
|
||||
<tr>
|
||||
<td><a href="[doc_base_url][dir][ticket_tab_url]">[if-no ticket_tab_subject_empty][ticket_tab_subject][else]<[ticket_tab_url]>[else]</a></td>
|
||||
[if-any ticket_type_tab]<td class="smallfont">[ticket_tab_type]</td>[end]
|
||||
[if-any ticket_status_tab]<td class="smallfont">[ticket_tab_status]</td>[end]
|
||||
[if-any ticket_priority_tab]<td class="smallfont">[ticket_tab_priority]</td>[end]
|
||||
[if-any ticket_expected_tab]<td class="smallfont">[ticket_tab_expected]</td>[end]
|
||||
<td class="tickettabtitle"><a href="[doc_base_url][dir][ticket_tab_url]">[if-no ticket_tab_subject_empty][ticket_tab_subject][else]<[ticket_tab_url]>[else]</a></td>
|
||||
[if-any ticket_type_tab]<td>[ticket_tab_type]</td>[end]
|
||||
[if-any ticket_status_tab]<td>[ticket_tab_status]</td>[end]
|
||||
<td><img src="[doc_base_url_common]/{ticket_progress_image_path}/progress_[ticket_tab_progress_image_number].gif" alt="progress [ticket_tab_progress]%"></td>
|
||||
[if-any ticket_priority_tab]<td>[ticket_tab_priority]</td>[end]
|
||||
[if-any ticket_expected_tab]<td>[ticket_tab_expected]</td>[end]
|
||||
</tr>
|
||||
[end]
|
||||
</table>
|
||||
|
|
|
@ -133,6 +133,7 @@ thread_table_replies = Rep.
|
|||
thread_table_last_post = Last post
|
||||
thread_reply_in_this_thread = Reply in this thread
|
||||
|
||||
ticket_progress_image_path = ticket_progress
|
||||
ticket_create_new = Create a new ticket
|
||||
ticket_table_name = Ticket
|
||||
ticket_table_type = Type
|
||||
|
|
|
@ -135,6 +135,7 @@ thread_table_replies = Odp.
|
|||
thread_table_last_post = Ostatni post
|
||||
thread_reply_in_this_thread = Odpowiedz w tym w±tku
|
||||
|
||||
ticket_progress_image_path = ticket_progress
|
||||
ticket_create_new = Za³ó¿ nowe zg³oszenie
|
||||
ticket_table_name = Zg³oszenie
|
||||
ticket_table_type = Rodzaj
|
||||
|
@ -142,6 +143,7 @@ ticket_table_status = Status
|
|||
ticket_table_priority = Priorytet
|
||||
ticket_table_expected = Oczeki-<br>wany w
|
||||
|
||||
|
||||
ticket_info_type = Rodzaj zg³oszenia
|
||||
ticket_info_status = Status
|
||||
ticket_info_priority = Piorytet
|
||||
|
|
|
@ -617,6 +617,31 @@ font-size: 0.7em;
|
|||
}
|
||||
|
||||
|
||||
table.tickettab {
|
||||
border: 1px solid #D1D1E1;
|
||||
}
|
||||
|
||||
|
||||
table.tickettab th {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
table.tickettab th, table.tickettab td {
|
||||
text-align: center;
|
||||
border: 0;
|
||||
font-size: 0.7em;
|
||||
border: 1px solid #D1D1E1;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table.tickettab td.tickettabtitle {
|
||||
font-size: 1em;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
|
||||
|
||||
table.ticket {
|
||||
margin: 1em 0 1em 0;
|
||||
}
|
||||
|
|
|
@ -379,6 +379,7 @@ void Templates::CreateFunctions()
|
|||
functions.Insert("ticket_category", ticket_category);
|
||||
functions.Insert("ticket_expected", ticket_expected);
|
||||
functions.Insert("ticket_progress", ticket_progress);
|
||||
functions.Insert("ticket_progress_image_number", ticket_progress_image_number);
|
||||
|
||||
functions.Insert("ticket_tab", ticket_tab);
|
||||
functions.Insert("ticket_tab_url", ticket_tab_url);
|
||||
|
@ -391,6 +392,7 @@ void Templates::CreateFunctions()
|
|||
functions.Insert("ticket_tab_category", ticket_tab_category);
|
||||
functions.Insert("ticket_tab_expected", ticket_tab_expected);
|
||||
functions.Insert("ticket_tab_progress", ticket_tab_progress);
|
||||
functions.Insert("ticket_tab_progress_image_number",ticket_tab_progress_image_number);
|
||||
|
||||
functions.Insert("ticket_type_tab", ticket_type_tab);
|
||||
functions.Insert("ticket_type_tab_defined", ticket_type_tab_defined);
|
||||
|
|
|
@ -284,6 +284,7 @@ namespace TemplatesFunctions
|
|||
void ticket_category(Info & i);
|
||||
void ticket_expected(Info & i);
|
||||
void ticket_progress(Info & i);
|
||||
void ticket_progress_image_number(Info & i);
|
||||
|
||||
void ticket_tab(Info & i);
|
||||
void ticket_tab_url(Info & i);
|
||||
|
@ -296,6 +297,7 @@ namespace TemplatesFunctions
|
|||
void ticket_tab_category(Info & i);
|
||||
void ticket_tab_expected(Info & i);
|
||||
void ticket_tab_progress(Info & i);
|
||||
void ticket_tab_progress_image_number(Info & i);
|
||||
|
||||
void ticket_type_tab(Info & i);
|
||||
void ticket_type_tab_defined(Info & i);
|
||||
|
|
|
@ -18,6 +18,21 @@ namespace TemplatesFunctions
|
|||
{
|
||||
|
||||
|
||||
int ticket_calc_progress_image_number(int percent)
|
||||
{
|
||||
percent = int( double(percent) / 10.0 + 0.5 ) * 10;
|
||||
|
||||
if( percent < 0 )
|
||||
percent = 0;
|
||||
|
||||
if( percent > 100 )
|
||||
percent = 100;
|
||||
|
||||
return percent;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ticket_is(Info & i)
|
||||
{
|
||||
i.res = request.is_ticket;
|
||||
|
@ -80,6 +95,13 @@ void ticket_progress(Info & i)
|
|||
}
|
||||
|
||||
|
||||
void ticket_progress_image_number(Info & i)
|
||||
{
|
||||
int percent = request.ticket.progress;
|
||||
i.out << ticket_calc_progress_image_number(percent);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
|
||||
|
@ -256,7 +278,14 @@ void ticket_tab_progress(Info & i)
|
|||
}
|
||||
|
||||
|
||||
void ticket_tab_progress_image_number(Info & i)
|
||||
{
|
||||
if( ticket_tab_index >= request.ticket_tab.size() )
|
||||
return;
|
||||
|
||||
int percent = request.ticket_tab[ticket_tab_index].progress;
|
||||
i.out << ticket_calc_progress_image_number(percent);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -518,6 +547,7 @@ void ticket_expected_tab_name(Info & i)
|
|||
|
||||
|
||||
|
||||
|
||||
} // namespace TemplatesFunctions
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue