diff --git a/presentation/Html.inc b/presentation/Html.inc
index 3c9c345..37e7fb5 100644
--- a/presentation/Html.inc
+++ b/presentation/Html.inc
@@ -50,84 +50,10 @@ function statusPage($sTitle, $sHeading, $sText = "", $sCancelAction, $sQueryStri
return $sToRender;
}
-function startTable($border, $width) {
- return "
\n";
-}
-
-function tableCaption($sCaption) {
- return "$sCaption\n";
-}
-
-function stopTable() {
- return "
\n";
-}
-
-function tableRow($align, $bgcolor, $html) {
- return "$html
\n";
-}
-
-
-function tableHeading($cssClassName, $colspan, $text) {
- return "\n
- $text\n
- | \n";
-}
-
-function tableData($html, $iColspan = 1) {
- return "$html | \n";
-}
-
-function tableCssData($html, $cssClass) {
- return "$html | \n";
-}
-
-function startTableRowCell() {
- return "| \n";
-}
-
-function textInput($sId, $sValue) {
- return "\n";
-}
-
-function endTableRowCell() {
- return " |
\n";
-}
-
function generateImage($sImageSource) {
return "
";
}
-function getNumberStringValidationJavaScript() {
- return "\n";
-}
/**
* Candy striping helper method
@@ -135,4 +61,23 @@ function getNumberStringValidationJavaScript() {
function getColour($iColourCount) {
return ($iColourCount%2 == 0) ? "F5F6EE" : "FFFFFF";
}
+
+/**
+ * Localises images by checking in the relevant locale.
+ *
+ * @param string the image to be localised.
+ */
+function imgSrc($sImage) {
+ global $default;
+
+ $sLocalisedImage = "/i18n/" . $default->defaultLanguage . "/graphics/$sImage";
+
+ // check for the image in the selected locale
+ if (file_exists($default->fileSystemRoot . $sLocalisedImage)) {
+ return $default->rootUrl . $sLocalisedImage;
+ } else {
+ // else return the default image
+ return $default->graphicsUrl . "/$sImage";
+ }
+}
?>