[Patches] [PATCH] [SIGNED-OFF] Bug 7164 - add Koha history timeline tab to 'About' page

koha-patchbot at kohaaloha.com koha-patchbot at kohaaloha.com
Tue Dec 6 09:30:03 NZDT 2011


From: Mason James <mtj at kohaaloha.com>
Date: Sat, 5 Nov 2011 23:28:48 +1300
Subject: [PATCH] [SIGNED-OFF] Bug 7164 - add Koha history timeline tab to 'About' page
Content-Type: text/plain; charset="utf-8"

Includes follow up by Chris Cormack fixing formatting in docs/history.txt

[MINOR EDIT] Added html filter to output for validity's sake

Signed-off-by: Owen Leonard <oleonard at myacpl.org>
---
 about.pl                                         |   41 ++++++++++++++++++++
 docs/history.txt                                 |    6 +-
 koha-tmpl/intranet-tmpl/prog/en/modules/about.tt |   45 +++++++++++++++++-----
 3 files changed, 79 insertions(+), 13 deletions(-)

diff --git a/about.pl b/about.pl
index 596637d..249f245 100755
--- a/about.pl
+++ b/about.pl
@@ -33,6 +33,8 @@ use C4::Auth;
 use C4::Context;
 use C4::Installer;
 
+#use Smart::Comments '####';
+
 my $query = new CGI;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
@@ -106,7 +108,46 @@ foreach (@components) {
         $row = [];
     }
 }
+## ## $table
 
 $template->param( table => $table );
 
+
+## ------------------------------------------
+## Koha time line code
+
+#get file location
+my $dir = C4::Context->config('intranetdir');
+open( FILE, "$dir" . "/docs/history.txt" );
+my $i = 0;
+
+my @rows2 = ();
+my $row2  = [];
+
+my @lines = <FILE>;
+close(FILE);
+
+shift @lines; #remove header row
+
+foreach (@lines) {
+    my ( $date, $desc, $tag ) = split(/\t/);
+    push(
+        @rows2,
+        {
+            date => $date,
+            desc => $desc,
+        }
+    );
+}
+
+my $table2 = [];
+#foreach my $row2 (@rows2) {
+foreach  (@rows2) {
+    push (@$row2, $_);
+    push( @$table2, { row2 => $row2 } );
+    $row2 = [];
+}
+
+$template->param( table2 => $table2 );
+
 output_html_with_http_headers $query, $cookie, $template->output;
diff --git a/docs/history.txt b/docs/history.txt
index c6a34cd..32963e9 100644
--- a/docs/history.txt
+++ b/docs/history.txt
@@ -579,7 +579,7 @@ September 27 2011	Koha 3.4.5 released
 September 28 2011	Thatcher Rea becomes the 158th developer to have a patch pushed
 October 5 2011	General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_5_October_2011
 October 15 2011	Greg Barniskis becomes the 159th developer to have a patch pushed
-October 22 2011 Koha 3.6.0 released
-October 31 2011 4th KohaCon in Mumbaï, India
-November 9 2011 Koha 3.4.6 released
+October 22 2011	Koha 3.6.0 released
+October 31 2011	4th KohaCon in Mumbaï, India
+November 9 2011	Koha 3.4.6 released
 
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt
index 784f463..5097116 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt
@@ -16,12 +16,12 @@
 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › About Koha</div>
 
 <div id="doc3" class="yui-t7">
-   
+
    <div id="bd">
     <div id="yui-main">
     <div class="yui-g">
             <h1>About Koha</h1>
-    
+
     <div id="abouttabs" class="toptabs numbered">
         <ul>
         <li><a href="about.pl#about">Server Information</a></li>
@@ -29,10 +29,11 @@
         <li><a href="about.pl#team">Koha Team</a></li>
         <li><a href="about.pl#licenses">Licenses</a></li>
         <li><a href="about.pl#translations">Translations</a></li>
+        <li><a href="about.pl#history">Koha Timeline</a></li>
         </ul>
-        
+
         <div id="about">
-            
+
         <table>
             <caption>Server information</caption>
             <tr><th scope="row">Koha version: </th><td>[% kohaVersion |html %]</td></tr>
@@ -95,8 +96,8 @@
                 <li>The <strong><a href="http://library.neu.edu.tr">Near East University</a></strong>, Cyprus</li>
                 <li><strong>OPUS International Consultants</strong>, Wellington, New Zealand (Corporate Serials sponsorship)</li>
                 <li><strong><a href="http://www.famfamfam.com/">famfamfam.com</a></strong> Birmingham (UK) based developer Mark James for the famfamfam Silk iconset.</li>
-            </ul>   
-                
+            </ul>
+
             <h2>Koha Release Team</h2>
             <ul>
                <li><strong>Colin Campbell</strong>(Koha 3.4 QA Manager)</li>
@@ -286,7 +287,7 @@
                 <li><strong>Katipo Communications</strong>, New Zealand</li>
                 <li><strong>KohaAloha</strong>, New Zealand</li>
                 <li><strong>LibLime</strong>, USA</li>
-                <li><strong>Libriotech</strong>, Norway</li> 
+                <li><strong>Libriotech</strong>, Norway</li>
 		<li><strong>Nelsonville Public Library</strong>, Ohio, USA</li>
 		<li><strong>PTFS</strong>, Maryland, USA</li>
 		<li><strong>PTFS Europe Ltd</strong>, United Kingdom</li>
@@ -296,7 +297,7 @@
 		<li><strong>Tamil</strong>, France</li>
 		<li><strong>Xercode</strong>, Spain</li>
             </ul>
-			
+
             <h2>Additional Thanks To...</h2>
             <ul>
 	    <li>Jo Ransom</li>
@@ -307,6 +308,7 @@
                 <li>Nicolas Morin (French Translation in 2.0)</li>
             </ul>
         </div>
+
         <div id="licenses">
             <h2>Koha</h2>
             <p>
@@ -315,7 +317,7 @@
             <h2>YUI</h2>
             <p>
             <a href="http://developer.yahoo.com/auth/license.txt">BSD License</a>
-            </p> 
+            </p>
             <h2>Famfamfam iconset</h2>
               <ul>
                 <li><a href="http://www.famfamfam.com/lab/icons/silk/">FamFamFam Site</a></li>
@@ -329,6 +331,7 @@
                   by the Bridge Consortium of Carleton College and St. Olaf College.</li>
               </ul>
         </div>
+
         <div id="translations">
             <h2>Translation</h2>
             <ul>
@@ -380,8 +383,30 @@
 <li><strong>اردو(Urdu)</strong> Ata ur Rehman</li>
 <li><strong>Українська (Ukrainian)</strong> Victor Titarchuk and Serhij Dubyk</li>
             </ul>
-    
+
+        </div>
+
+        <div id="history">
+        <h2>Koha history timeline</h2>
+        <table style="cursor:pointer">
+        <thead>
+        <tr>
+            <td  style="font-weight:bold;" >Date</td>
+            <td  style="font-weight:bold;" >Description</td>
+        </tr>
+        </thead>
+        [% FOREACH tabl IN table2 %]
+            <tr class="[% loop.parity %]">
+                [% FOREACH ro IN tabl.row2 %]
+                     <td>[% ro.date %]</td>
+                     <td>[% ro.desc|html %]</td>
+                [% END %]
+            </tr>
+        [% END %]
+        </table>
         </div>
+
     </div>
+
 </div></div></div>
 [% INCLUDE 'intranet-bottom.inc' %]
-- 
1.7.3




More information about the Patches mailing list