Ignore:
Timestamp:
Apr 6, 2015, 11:08:10 PM (10 years ago)
Author:
chronos
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/IS/IS.php

    r732 r736  
    353353    if(defined('NEW_PERMISSION') and !$this->System->User->CheckPermission($this->TableToModule($Table), 'Read'))
    354354      return('Nemáte oprávnění');
    355 
     355   
     356    $FormClass = $this->System->FormManager->Classes[$Table];
     357    if(array_key_exists('BaseTable', $FormClass)) $TableModify = $FormClass['BaseTable'];
     358      else $TableModify = $Table;
     359   
    356360    $Form = new Form($this->System->FormManager);
    357361    $Form->SetClass($Table);
     
    363367    {
    364368    $Actions = array(
    365       $this->ShowAction('Upravit', '?a=edit&t='.$Table.'&i='.$Id,
     369      $this->ShowAction('Upravit', '?a=edit&t='.$TableModify.'&i='.$Id,
    366370        $this->System->Link('/images/edit.png')),
    367371      $this->ShowAction('Seznam', '?a=list&t='.$Table,
     
    369373      $this->ShowAction('Odstranit', '?a=delete&t='.$Table.'&i='.$Id,
    370374        $this->System->Link('/images/delete.png'), 'Opravdu smazat položku?'),
    371       $this->ShowAction('Přidat', '?a=add&t='.$Table,
     375      $this->ShowAction('Přidat', '?a=add&t='.$TableModify,
    372376        $this->System->Link('/images/add.png'))
    373377    );
     
    625629    if(defined('NEW_PERMISSION') and !$this->System->User->CheckPermission($this->TableToModule($Table), 'Read'))
    626630      return('Nemáte oprávnění');
     631    $FormClass = $this->System->FormManager->Classes[$Table];
     632    if(array_key_exists('BaseTable', $FormClass)) $TableModify = $FormClass['BaseTable'];
     633      else $TableModify = $Table;
     634   
    627635    $RowActions = '<a href="?a=view&amp;t='.$Table.'&amp;i=#RowId"><img alt="Ukázat" title="Ukázat" src="'.
    628636      $this->System->Link('/images/view.png').'"/></a>'.
    629       '<a href="?a=edit&amp;t='.$Table.'&amp;i=#RowId"><img alt="Upravit" title="Upravit" src="'.
     637      '<a href="?a=edit&amp;t='.$TableModify.'&amp;i=#RowId"><img alt="Upravit" title="Upravit" src="'.
    630638      $this->System->Link('/images/edit.png').'"/></a>'.
    631639      '<a href="?a=delete&amp;t='.$Table.'&amp;i=#RowId"><img alt="Smazat" title="Smazat" src="'.
     
    634642      $FormClass = $this->System->FormManager->Classes[$Table];
    635643      else return($this->SystemMessage('Chyba', 'Tabulka '.$Table.' nenalezena'));
    636     $this->ShortTitle .= ' - '.$FormClass['Title'];
     644    if($ExcludeColumn == '') $this->ShortTitle .= ' - '.$FormClass['Title'];
    637645    if(array_key_exists('ItemActions', $FormClass))
    638646    {
     
    646654    $Output .= '<div style="text-align: center;">'.$FormClass['Title'].'</div>';
    647655    $Output .= '<ul class="ActionMenu">';
    648     $Output .= '<li>'.$this->ShowAction('Přidat', '?a=add&amp;t='.$Table.'&amp;preset'.$ExcludeColumn.'='.$ExcludeValue, $this->System->Link('/images/add.png')).'</li>';
     656    $Output .= '<li>'.$this->ShowAction('Přidat', '?a=add&amp;t='.$TableModify.'&amp;preset'.$ExcludeColumn.'='.$ExcludeValue, $this->System->Link('/images/add.png')).'</li>';
    649657    $Output .= '<li>'.$this->ShowAction('Seznam', '?a=list&amp;t='.$Table, $this->System->Link('/images/list.png')).'</li>';
    650658    $MI = 0;
Note: See TracChangeset for help on using the changeset viewer.