From 36ee492d7b82bd8ed17df13d6f51768f41fc2dfe Mon Sep 17 00:00:00 2001 From: Dieter Hametner Date: Mon, 8 Jan 2007 01:26:41 +0000 Subject: use StringWordTruncate in whats_on --- pages/whats_on.ecpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'pages') diff --git a/pages/whats_on.ecpp b/pages/whats_on.ecpp index 16c34f5..2c66a02 100644 --- a/pages/whats_on.ecpp +++ b/pages/whats_on.ecpp @@ -25,7 +25,7 @@ if (type == "now") { } else { head = tr("What's on next?"); } - + }> @@ -43,7 +43,7 @@ if (type == "now") { <& menu > - +
<& pageelems.header_box content=(head) &> @@ -69,8 +69,10 @@ if (type == "now") { std::string start_m(FormatDateTime( "%M", Event->StartTime())); std::string end_m(FormatDateTime( "%M", Event->EndTime())); - if (description.length() > 300) { - description = description.substr(0,250) + "..."; + bool truncated = false; + description = StringWordTruncate(description, 250, truncated); + if (truncated) { + description += std::string(" ") + tr("more") + std::string(" ..."); } }>
-- cgit v1.2.3