lepsi hlasky v add relations (wolfuv pozadavek)
authorThomas Mudrunka <tomas@mudrunka.cz>
Fri, 19 Oct 2012 18:32:39 +0000 (20:32 +0200)
committerThomas Mudrunka <tomas@mudrunka.cz>
Fri, 19 Oct 2012 18:32:39 +0000 (20:32 +0200)
index.php
locale/cs/messages.inc.php

index ab5d70a34dd45148e778da211d1da191dc45737b..4f84219627f70dbce79a6c8f61ef19ca5212eb8c 100755 (executable)
--- 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) ).',';
                                        }
                                }
                        }
index ab15f3ddfa9829ec2b3b2f9bfc493bdccbbfe332..fb0f7f49ee69e45345d65394b83aab6e56b5db1a 100644 (file)
@@ -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',
This page took 0.143318 seconds and 4 git commands to generate.