From: Thomas Mudrunka Date: Fri, 19 Oct 2012 18:32:39 +0000 (+0200) Subject: lepsi hlasky v add relations (wolfuv pozadavek) X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=5480af7548847a42ba99820f1030da4740fa2bcf;p=mirrors%2FSokoMan.git lepsi hlasky v add relations (wolfuv pozadavek) --- diff --git a/index.php b/index.php index ab5d70a..4f84219 100755 --- a/index.php +++ b/index.php @@ -362,7 +362,7 @@ EOF; $insert_url = '%d/new?insert[%c]=%v'; $relations = array( //TODO: Autodetect??? //TODO: Add [edit] link to all classes 'model' => array( - 'model_id' => array(array('item',$where_url),array('barcode',$where_url),array('edit','model/%v/edit/'),array('barcode',$insert_url)), + 'model_id' => array(array('item',$where_url),array('barcode',$where_url),array('edit','model/%v/edit/'),array('barcode',$insert_url,false,'add barcode')), 'model_barcode' => array(array('store','assistant/%d?barcode=%v')), 'barcode_name' => array(array('store','assistant/%d?barcode=%v')), 'model_name' => array(array('google','http://google.com/search?q=%v')) //TODO: add manufacturer to google query @@ -404,7 +404,8 @@ EOF; //$condition = $relations_conditions[$destination[2]]($table,$id); if(!eval($relations_conditions[$destination[2]])) continue; } - @$table[$id][$class.$suffix_relations] .= $this->link($destination[0], $destination_url, !preg_match('/http/', $destination_url) ).','; + $destination_title = isset($destination[3]) ? $destination[3] : $destination[0]; + @$table[$id][$class.$suffix_relations] .= $this->link($destination_title, $destination_url, !preg_match('/http/', $destination_url) ).','; } } } diff --git a/locale/cs/messages.inc.php b/locale/cs/messages.inc.php index ab15f3d..fb0f7f4 100644 --- a/locale/cs/messages.inc.php +++ b/locale/cs/messages.inc.php @@ -104,6 +104,8 @@ $LOCALE_MESSAGES = array( 'price-list' => 'ceník', 'migrations' => 'migrace', + 'add barcode' => 'přidat čárový kód', + 'update' => 'UPRAVIT', 'insert' => 'VLOŽIT', 'delete' => 'SMAZAT',