Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 May 2014 16:44:36 +0000 (UTC)
From:      Dag-Erling Smørgrav <des@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r266502 - in user/des/fbce: lib/FBCE/Schema/Result lib/FBCE/View lib/Template root/run root/see
Message-ID:  <201405211644.s4LGia14097850@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: des
Date: Wed May 21 16:44:35 2014
New Revision: 266502
URL: http://svnweb.freebsd.org/changeset/base/266502

Log:
  Backport the WikiFormat TT filter from FBP.

Added:
  user/des/fbce/lib/Template/
     - copied from r266473, user/des/fbp/lib/Template/
Modified:
  user/des/fbce/lib/FBCE/Schema/Result/Statement.pm
  user/des/fbce/lib/FBCE/View/HTML.pm
  user/des/fbce/root/run/index.tt
  user/des/fbce/root/run/register.tt
  user/des/fbce/root/see/candidate.tt

Modified: user/des/fbce/lib/FBCE/Schema/Result/Statement.pm
==============================================================================
--- user/des/fbce/lib/FBCE/Schema/Result/Statement.pm	Wed May 21 16:43:26 2014	(r266501)
+++ user/des/fbce/lib/FBCE/Schema/Result/Statement.pm	Wed May 21 16:44:35 2014	(r266502)
@@ -124,15 +124,6 @@ __PACKAGE__->belongs_to(
 # Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-03-10 19:05:50
 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8wDb6dHYSG6Eoe9bdNnm8Q
 
-use Text::WikiFormat;
-
-sub long_html($) {
-    my ($self) = @_;
-
-    return Text::WikiFormat::format($self->long, {}, {
-	implicit_links => 0, extended => 1, absolute_links => 1 });
-}
-
 1;
 
 # $FreeBSD$

Modified: user/des/fbce/lib/FBCE/View/HTML.pm
==============================================================================
--- user/des/fbce/lib/FBCE/View/HTML.pm	Wed May 21 16:43:26 2014	(r266501)
+++ user/des/fbce/lib/FBCE/View/HTML.pm	Wed May 21 16:44:35 2014	(r266502)
@@ -1,9 +1,9 @@
+use utf8;
 package FBCE::View::HTML;
+use Moose;
+use namespace::autoclean;
 
-use strict;
-use warnings;
-
-use base 'Catalyst::View::TT';
+extends 'Catalyst::View::TT';
 
 __PACKAGE__->config(
     TEMPLATE_EXTENSION => '.tt',
@@ -25,7 +25,7 @@ L<FBCE>
 
 =head1 AUTHOR
 
-Dag-Erling Smørgrav
+Dag-Erling Smørgrav <des@freebsd.org>
 
 =head1 LICENSE
 

Modified: user/des/fbce/root/run/index.tt
==============================================================================
--- user/des/fbce/root/run/index.tt	Wed May 21 16:43:26 2014	(r266501)
+++ user/des/fbce/root/run/index.tt	Wed May 21 16:44:35 2014	(r266502)
@@ -1,3 +1,4 @@
+[% USE WikiFormat %]
 [% PROCESS lib/html_top %]
 [% PROCESS lib/header %]
 [% WRAPPER lib/main %]
@@ -10,9 +11,9 @@
 <p>You have registered as a candidate in the [% title %].  You have provided the following statement:</p>
 
 <div class="statement"> 
-  <h3 class="statement-title">[% user.statement.short | html %]</h3>
+  <h3 class="statement-title">[% user.statement.short | wiki %]</h3>
   <div class="statement-body">
-    [% user.statement.long_html %]
+    [% user.statement.long | wiki %]
   </div>
 </div>
   [% IF nominating == 0 %]

Modified: user/des/fbce/root/run/register.tt
==============================================================================
--- user/des/fbce/root/run/register.tt	Wed May 21 16:43:26 2014	(r266501)
+++ user/des/fbce/root/run/register.tt	Wed May 21 16:44:35 2014	(r266502)
@@ -16,7 +16,7 @@
 <form method="post" action="">
   <p>Slogan</p>
   <input name="short" size="80" maxlength="64" value="[% short | html %]"/>
-  <p>Statement (<a href="http://search.cpan.org/~chromatic/Text-WikiFormat-0.79/lib/Text/WikiFormat.pm#Wiki_Format">WikiFormat</a>)</p>;
+  <p>Statement (<a href="http://search.cpan.org/~cycles/Text-WikiFormat-0.81/lib/Text/WikiFormat.pm#Wiki_Format">WikiFormat</a>)</p>;
   <textarea name="long" cols="80" rows="24">[% long | html %]</textarea>
   <div>
     <input type="submit" name="submit" value="I choose to run!"/>

Modified: user/des/fbce/root/see/candidate.tt
==============================================================================
--- user/des/fbce/root/see/candidate.tt	Wed May 21 16:43:26 2014	(r266501)
+++ user/des/fbce/root/see/candidate.tt	Wed May 21 16:44:35 2014	(r266502)
@@ -1,3 +1,4 @@
+[% USE WikiFormat %]
 [% PROCESS lib/html_top %]
 [% PROCESS lib/header %]
 [% WRAPPER lib/main %]
@@ -8,9 +9,9 @@
 [% IF candidate.incumbent %]<p class="candidate-incumbent">(incumbent)</p>[% END %]
 </div>
 <div class="statement">
-  <h3 class="statement-title">[% candidate.statement.short | html %]</h3>
+  <h3 class="statement-title">[% candidate.statement.short | wiki %]</h3>
   <div class="statement-body">
-    [% candidate.statement.long_html %]
+    [% candidate.statement.long | wiki %]
   </div>
 </div>
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405211644.s4LGia14097850>