[Patches] [PATCH] Bug 7164 - add Koha history timeline tab to 'About' page
koha-patchbot at kohaaloha.com
koha-patchbot at kohaaloha.com
Sat Nov 5 23:35:02 NZDT 2011
From: Mason James <mtj at kohaaloha.com>
Date: Sat, 5 Nov 2011 23:28:48 +1300
Subject: [PATCH] Bug 7164 - add Koha history timeline tab to 'About' page
Content-Type: text/plain; charset="utf-8"
http://koha-community.org
---
about.pl | 41 ++++++++++++++
koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 64 +++++++++++-----------
2 files changed, 74 insertions(+), 31 deletions(-)
diff --git a/about.pl b/about.pl
index ae2d0dc..a76f05d 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/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt
index 784f463..6728ca7 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,28 +308,7 @@
<li>Nicolas Morin (French Translation in 2.0)</li>
</ul>
</div>
- <div id="licenses">
- <h2>Koha</h2>
- <p>
- <a href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html">Koha is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.</a>
- </p>
- <h2>YUI</h2>
- <p>
- <a href="http://developer.yahoo.com/auth/license.txt">BSD License</a>
- </p>
- <h2>Famfamfam iconset</h2>
- <ul>
- <li><a href="http://www.famfamfam.com/lab/icons/silk/">FamFamFam Site</a></li>
- <li><a href="http://creativecommons.org/licenses/by/2.5/">Creative Commons Attribution 2.5 License</a></li>
- </ul>
- <h2>The Bridge Material Type Icon Set</h2>
- <ul>
- <li><a href="http://apps.carleton.edu/campus/library/bridge_icons/">Bridge Material Type Icons Project</a></li>
- <li>The Bridge Material Type Icon Set is licensed under a
- <a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Attribution-ShareAlike 2.5 License</a>
- by the Bridge Consortium of Carleton College and St. Olaf College.</li>
- </ul>
- </div>
+
<div id="translations">
<h2>Translation</h2>
<ul>
@@ -380,8 +360,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 %]</td>
+ [% END %]
+ </tr>
+ [% END %]
+ </table>
</div>
+
</div>
+
</div></div></div>
[% INCLUDE 'intranet-bottom.inc' %]
--
1.7.2.5
More information about the Patches
mailing list