Commit 423443f412e9bbb7d1f365ed067e62ffdb4ecd12
1 parent
76543999
No more users of PatternTableLinks
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4328 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
2 changed files
with
0 additions
and
99 deletions
lib/visualpatterns/PatternTableLinks.inc deleted
| 1 | -<?php | ||
| 2 | -define("TEXT", 1); | ||
| 3 | -define("IMAGE", 2); | ||
| 4 | -/** | ||
| 5 | - * $Id$ | ||
| 6 | - * | ||
| 7 | - * Given an array of URLs, this class will render them as an | ||
| 8 | - * HTML table with with specified number of rows and columns | ||
| 9 | - * | ||
| 10 | - * Copyright (c) 2003 Jam Warehouse http://www.jamwarehouse.com | ||
| 11 | - * | ||
| 12 | - * This program is free software; you can redistribute it and/or modify | ||
| 13 | - * it under the terms of the GNU General Public License as published by | ||
| 14 | - * the Free Software Foundation; either version 2 of the License, or | ||
| 15 | - * (at your option) any later version. | ||
| 16 | - * | ||
| 17 | - * This program is distributed in the hope that it will be useful, | ||
| 18 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 19 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 20 | - * GNU General Public License for more details. | ||
| 21 | - * | ||
| 22 | - * You should have received a copy of the GNU General Public License | ||
| 23 | - * along with this program; if not, write to the Free Software | ||
| 24 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 25 | - * | ||
| 26 | - * @version $Revision$ | ||
| 27 | - * @author Rob Cherry, Jam Warehouse (Pty) Ltd, South Africa | ||
| 28 | - * @package lib.visualpatterns | ||
| 29 | - */ | ||
| 30 | - | ||
| 31 | -require_once(KT_LIB_DIR . '/templating/templating.inc.php'); | ||
| 32 | - | ||
| 33 | -class PatternTableLinks { | ||
| 34 | - | ||
| 35 | - /** Array of link URLS to display in tables */ | ||
| 36 | - var $aLinks; | ||
| 37 | - /** Text links display */ | ||
| 38 | - var $aLinksText; | ||
| 39 | - /** Array of images to display as links */ | ||
| 40 | - var $aLinkImages; | ||
| 41 | - /** Rows in table */ | ||
| 42 | - var $iRows; | ||
| 43 | - /** Columns in table */ | ||
| 44 | - var $iColumns; | ||
| 45 | - /** Link Type: o 1 = Text | ||
| 46 | - * o 2 = Image */ | ||
| 47 | - var $iLinkType; | ||
| 48 | - | ||
| 49 | - /** | ||
| 50 | - * Class constructor | ||
| 51 | - * | ||
| 52 | - * @param $aNewLink Array of link URLS to display in tables | ||
| 53 | - * @param $iRows Number of rows in table | ||
| 54 | - * @param $iColumns Number of columns in table | ||
| 55 | - * @param $iLinkType Link type (1 = Text or 2 = Button). Default is 1 | ||
| 56 | - * @param $aLinkImages Array of images URL placed over links | ||
| 57 | - */ | ||
| 58 | - function PatternTableLinks($aNewLinks, $aNewLinksText, $iNewRows, $iNewColumns, $iNewLinkType = TEXT, $aNewLinkImages = null) { | ||
| 59 | - $this->aLinks = $aNewLinks; | ||
| 60 | - $this->aLinksText = $aNewLinksText; | ||
| 61 | - $this->aLinkImages = $aNewLinkImages; | ||
| 62 | - $this->iRows = $iNewRows; | ||
| 63 | - $this->iColumns = $iNewColumns; | ||
| 64 | - $this->iLinkType = $iNewLinkType; | ||
| 65 | - } | ||
| 66 | - | ||
| 67 | - /** | ||
| 68 | - * Build the HTML string used to render the object | ||
| 69 | - * | ||
| 70 | - * @return String of HTML used to render object | ||
| 71 | - */ | ||
| 72 | - function & render() { | ||
| 73 | - global $default; | ||
| 74 | - | ||
| 75 | - $oTemplating = KTTemplating::getSingleton(); | ||
| 76 | - $oTemplate = $oTemplating->loadTemplate("ktcore/standard_links"); | ||
| 77 | - if (count($this->aLinksText)) { | ||
| 78 | - $aMyLinks = array_combine($this->aLinksText, $this->aLinks); | ||
| 79 | - } else { | ||
| 80 | - $aMyLinks = array(); | ||
| 81 | - } | ||
| 82 | - $aTemplateData = array( | ||
| 83 | - "array_size" => count($this->aLinks), | ||
| 84 | - "links" => $aMyLinks, | ||
| 85 | - ); | ||
| 86 | - $sToRender = $oTemplate->render($aTemplateData); | ||
| 87 | - | ||
| 88 | - return $sToRender; | ||
| 89 | - } | ||
| 90 | -} | ||
| 91 | - | ||
| 92 | -?> |
templates/ktcore/standard_links.smarty deleted