Ignore:
Timestamp:
Jul 18, 2013, 7:38:14 PM (11 years ago)
Author:
chronos
Message:
  • Upraveno: Při zobrazení položky v IS nezobrazuj sloupec s odkazem na viditelný objekt pro podseznamy.
File:
1 edited

Legend:

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

    r551 r557  
    210210    {
    211211      $Output .= $this->ShowList($this->System->FormManager->FormTypes[$Item['Type']]['Table'], '`'.
    212         $this->System->FormManager->FormTypes[$Item['Type']]['Ref'].'`='.$Id, $Item['Caption']).'<br/>';
     212        $this->System->FormManager->FormTypes[$Item['Type']]['Ref'].'`='.$Id, $Item['Caption'],
     213        $this->System->FormManager->FormTypes[$Item['Type']]['Ref']).'<br/>';
    213214    }   
    214215    return($Output);
    215216  }
    216217 
    217   function ShowTable($Table, $Filter = '', $Title = '', $RowActions = array())
     218  function ShowTable($Table, $Filter = '', $Title = '', $RowActions = array(), $ExcludeColumn = '')
    218219  {   
    219     if($Table != '') $FormClass = $this->System->FormManager->Classes[$Table];
     220        if($Table != '') $FormClass = $this->System->FormManager->Classes[$Table];
    220221      else return($this->SystemMessage('Chyba', 'Tabulka nenalezena'));
    221222
     
    227228      foreach($FormClass['Items'] as $ItemIndex => $FormItem)
    228229      if(!array_key_exists($FormItem['Type'], $this->System->FormManager->FormTypes) or
    229           (array_key_exists($FormItem['Type'], $this->System->FormManager->FormTypes) and
    230               ($this->System->FormManager->FormTypes[$FormItem['Type']]['Type'] != 'ManyToOne')))
     230      (array_key_exists($FormItem['Type'], $this->System->FormManager->FormTypes) and
     231      ($this->System->FormManager->FormTypes[$FormItem['Type']]['Type'] != 'ManyToOne')))     
    231232      {
    232233        $UseType = $UseType = $FormItem['Type'];
     
    253254    foreach($FormClass['Items'] as $ItemIndex => $FormItem)
    254255      if(!array_key_exists($FormItem['Type'], $this->System->FormManager->FormTypes) or
    255           (array_key_exists($FormItem['Type'], $this->System->FormManager->FormTypes) and
    256               ($this->System->FormManager->FormTypes[$FormItem['Type']]['Type'] != 'ManyToOne')))
    257       {
    258         $TableColumns[] = array('Name' => $ItemIndex, 'Title' => $FormItem['Caption']);
     256      (array_key_exists($FormItem['Type'], $this->System->FormManager->FormTypes) and
     257      ($this->System->FormManager->FormTypes[$FormItem['Type']]['Type'] != 'ManyToOne')))
     258      {
     259        if($ExcludeColumn != $ItemIndex)
     260          $TableColumns[] = array('Name' => $ItemIndex, 'Title' => $FormItem['Caption']);
    259261        $UseType = $UseType = $FormItem['Type'];
    260262        if(array_key_exists($FormItem['Type'], $this->System->FormManager->FormTypes))
     
    310312    $Output .= '<tr><form action="?a='.$_GET['a'].'&amp;t='.$Table.'&amp;filter=1'.$Addition.'" method="post">';
    311313    foreach($FormClass['Items'] as $ItemIndex => $FormItem)
    312       if(!array_key_exists($FormItem['Type'], $this->System->FormManager->FormTypes) or
    313           (array_key_exists($FormItem['Type'], $this->System->FormManager->FormTypes) and
    314               ($this->System->FormManager->FormTypes[$FormItem['Type']]['Type'] != 'ManyToOne')))
     314    if((!array_key_exists($FormItem['Type'], $this->System->FormManager->FormTypes) or
     315    (array_key_exists($FormItem['Type'], $this->System->FormManager->FormTypes) and
     316    ($this->System->FormManager->FormTypes[$FormItem['Type']]['Type'] != 'ManyToOne'))) and
     317    ($ExcludeColumn != $ItemIndex))
    315318    {
    316319      if(array_key_exists('Filter'.$ItemIndex, $_POST) and ($_POST['Filter'.$ItemIndex] != ''))
     
    329332      $Output .= '<tr>';
    330333      foreach($FormClass['Items'] as $ItemIndex => $FormItem)
    331       if(!array_key_exists($FormItem['Type'], $this->System->FormManager->FormTypes) or
     334      if((!array_key_exists($FormItem['Type'], $this->System->FormManager->FormTypes) or
    332335      (array_key_exists($FormItem['Type'], $this->System->FormManager->FormTypes) and
    333       ($this->System->FormManager->FormTypes[$FormItem['Type']]['Type'] != 'ManyToOne')))
    334       {
    335         //$Output .= '<td>'.$Row[$ItemIndex].'</td>';
     336      ($this->System->FormManager->FormTypes[$FormItem['Type']]['Type'] != 'ManyToOne'))) and
     337      ($ExcludeColumn != $ItemIndex))
     338      {
     339        //$Output .= '<td>'.$Row[$ItemIndex].'</td>';
    336340        $UseType = $UseType = $FormItem['Type'];
    337341        if(array_key_exists($FormItem['Type'], $this->System->FormManager->FormTypes))
     
    376380  }   
    377381 
    378   function ShowList($Table, $Filter = '', $Title = ''
     382  function ShowList($Table, $Filter = '', $Title = '', $ExcludeColumn = ''
    379383  {
    380384    $RowActions = '<a href="?a=view&amp;t='.$Table.'&amp;i=#RowId"><img alt="Ukázat" title="Ukázat" src="'.
     
    392396          $this->System->Link('/images/action.png').'"/></a>';
    393397    }   
    394     $Output = $this->ShowTable($Table, $Filter, $Title, $RowActions);
     398    $Output = $this->ShowTable($Table, $Filter, $Title, $RowActions, $ExcludeColumn);
    395399    $Output .= '<ul class="ActionMenu">';
    396400    $Output .= '<li><a href="?a=add&amp;t='.$Table.'"><img alt="Přidat" title="Přidat" src="'.
Note: See TracChangeset for help on using the changeset viewer.