From owner-svn-src-user@FreeBSD.ORG Thu Apr 17 12:01:35 2014 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4ED4D261; Thu, 17 Apr 2014 12:01:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C4D1125B; Thu, 17 Apr 2014 12:01:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3HC1ZD4018119; Thu, 17 Apr 2014 12:01:35 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3HC1Zln018117; Thu, 17 Apr 2014 12:01:35 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201404171201.s3HC1Zln018117@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Thu, 17 Apr 2014 12:01:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r264596 - user/des/fbp/root/poll X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2014 12:01:35 -0000 Author: des Date: Thu Apr 17 12:01:34 2014 New Revision: 264596 URL: http://svnweb.freebsd.org/changeset/base/264596 Log: Truncate the percentages. Modified: user/des/fbp/root/poll/result.tt Modified: user/des/fbp/root/poll/result.tt ============================================================================== --- user/des/fbp/root/poll/result.tt Thu Apr 17 11:57:11 2014 (r264595) +++ user/des/fbp/root/poll/result.tt Thu Apr 17 12:01:34 2014 (r264596) @@ -1,4 +1,5 @@ [%-# $FreeBSD$ -%] +[% USE Math %] [% USE WikiFormat %] [% PROCESS lib/html_top %] [% PROCESS lib/header %] @@ -32,7 +33,7 @@ [% FOREACH option IN question.options %] [% option.label | html %] [% IF option.votes_rs.count > 0 %][% option.votes_rs.count %][% ELSE %]-[% END %] -[% IF option.votes_rs.count > 0 && question.votes_rs.count > 0 %][% option.votes_rs.count * 100 / question.votes_rs.count %]%[% ELSE %]-[% END %] +[% IF option.votes_rs.count > 0 && question.votes_rs.count > 0 %][% Math.int(option.votes_rs.count * 100 / question.votes_rs.count) %]%[% ELSE %]-[% END %] [% END %]