From 5480af7548847a42ba99820f1030da4740fa2bcf Mon Sep 17 00:00:00 2001 From: Thomas Mudrunka Date: Fri, 19 Oct 2012 20:32:39 +0200 Subject: [PATCH] lepsi hlasky v add relations (wolfuv pozadavek) --- index.php | 5 +++-- locale/cs/messages.inc.php | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) 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', -- 2.30.2