From 325a0575a9065e6eab38ff42e8b2c1888a91cf6d Mon Sep 17 00:00:00 2001 From: funderburkjim Date: Mon, 7 Oct 2024 13:26:39 -0400 Subject: [PATCH] PWG: missing VN Ref: https://github.com/sanskrit-lexicon/PWG/issues/76 --- v02/makotemplates/web/webtc/basicadjust.php | 2 +- v02/makotemplates/web/webtc/basicdisplay.php | 22 ++++++++++++++----- v02/makotemplates/web/webtc1/listhierview.php | 3 ++- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/v02/makotemplates/web/webtc/basicadjust.php b/v02/makotemplates/web/webtc/basicadjust.php index 12ffdb9..9435906 100644 --- a/v02/makotemplates/web/webtc/basicadjust.php +++ b/v02/makotemplates/web/webtc/basicadjust.php @@ -199,7 +199,7 @@ public function line_adjust($line) { // 06-21-2024 For all dictionaries with some metaline with $dicts_with_h = array("ap90", "bhs", "bop", "cae", "ccs", "gra", "gst", "inm", "mci", "md", - "mw", "mw72", "pe", "pui", "pwg", + "mw", "mw72", "pe", "pui", "pwg","pw","pwkvn", "stc", "vei", "lan"); if (in_array($this->getParms->dict, $dicts_with_h)) { $line = preg_replace("|(.*?).*?(.*?)|","$1$2",$line); diff --git a/v02/makotemplates/web/webtc/basicdisplay.php b/v02/makotemplates/web/webtc/basicdisplay.php index f690366..26290f7 100644 --- a/v02/makotemplates/web/webtc/basicdisplay.php +++ b/v02/makotemplates/web/webtc/basicdisplay.php @@ -454,7 +454,21 @@ public function sthndl($xp,$el,$attribs) { // we just display the IAST text, so do nothing with this element } else if ($el == "etym") { $this->row .= ""; - } else if ($el == "info") { + } else if ($el == "info") { + // 10-05-2024 + if (in_array($this->dict,array('pwg'))) { + $attrval = $attribs["n"]; + $x = ''; // text to add + if (in_array($attrval,array("rev","sup"))) { + if ($attrval == "rev") { + $y = "revision"; + }else if ($attrval == "sup") { + $y = "supplement"; + } + $x = " ($y)"; + } + $this->row .= $x; + } } else if ($el == "pc"){ } else if ($el == "to") { } else if ($el == "ns") { @@ -463,9 +477,7 @@ public function sthndl($xp,$el,$attribs) { } else if ($el == "pcol") { } else if ($el == "nsi") { } else if ($el == "pb"){ - if ($this->dict == "mw") { - # do nothing. - }else if (in_array($this->dict,array("bur","stc"))) { + if (in_array($this->dict,array("bur","stc","mw","pwg"))) { # do nothing }else { $this->row .= "
"; @@ -680,7 +692,7 @@ public function endhndl($xp,$el) { } else if ($el == "i"){ $this->row .= "
"; } else if ($el == "pb"){ - if (in_array($this->dict,array("mw","bur","stc","abch","acph","acsj"))) { + if (in_array($this->dict,array("mw","bur","stc","abch","acph","acsj","pwg"))) { # do nothing }else { $this->row .= "
"; diff --git a/v02/makotemplates/web/webtc1/listhierview.php b/v02/makotemplates/web/webtc1/listhierview.php index 1a8adb1..a5076ea 100644 --- a/v02/makotemplates/web/webtc1/listhierview.php +++ b/v02/makotemplates/web/webtc1/listhierview.php @@ -84,7 +84,8 @@ public function __construct($listmatches,$getParms) { }else { $class = " class='$sdata'"; } - // 07-07-2024 revsup + // 07-07-2024 revsup for mw. + // 10-05-2024 pwg not useful for rev $revsup = ""; if (in_array($getParms->dict,array('mw'))) { if (preg_match('||',$data2,$matches)) {