Changeset 808 for trunk


Ignore:
Timestamp:
May 25, 2014, 12:18:55 PM (11 years ago)
Author:
chronos
Message:
  • Modified: Do not show Type column in Log table in administration if some type is selected. Currently selected type is highlighted as strong link text in filter line.
Location:
trunk
Files:
2 edited

Legend:

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

    r805 r808  
    130130    if(array_key_exists('group', $_GET)) $_SESSION['group'] = $_GET['group'];
    131131
    132     if($_SESSION['type'] != '') $WhereType = ' `Type`='.$_SESSION['type'];
     132    if($_SESSION['type'] != '') $WhereType = ' (`Type`='.$_SESSION['type'].')';
    133133      else $WhereType = '1=1';
    134134   
     
    137137    );
    138138 
     139    // Show category filter
    139140    if($this->System->User->Licence(LICENCE_MODERATOR))
    140141    {
    141       $Output = '<strong>Filtr: </strong>'.
    142         '<span style="color:black"><a href="log.php?type=" title="Bez filtrování">Všechny</a></span> ';
     142      $Output = '<strong>Filtr:</strong>';
     143        $Item = '<a href="log.php?type=" title="Bez filtrování">Všechny</a>';
     144      if($_SESSION['type'] == '') $Item = '<strong>'.$Item.'</strong>';
     145      $Output .= ' '.$Item;
    143146      $DbResult = $this->System->Database->query('SELECT * FROM `LogType`');
    144147      while($LogType = $DbResult->fetch_assoc())
    145148      {
    146         $Output .= '<a href="log.php?type='.$LogType['Id'].'" style="color:'.$LogType['Color'].'" title="'.$LogType['Name'].'">'.$LogType['Name'].'</a> ';
     149        $Item = '<a href="log.php?type='.$LogType['Id'].'" style="color:'.$LogType['Color'].'" title="'.$LogType['Name'].'">'.$LogType['Name'].'</a>';
     150        if($_SESSION['type'] == $LogType['Id']) $Item = '<strong>'.$Item.'</strong>';
     151        $Output .= ' '.$Item;
    147152      }
    148153      // echo ' Formát: datum: text zprávy (uživatel, IP)<br /><br />';
     
    164169 
    165170    $TableColumns = array(
    166       array('Name' => 'Date', 'Title' => 'Čas'),
    167       array('Name' => 'LogName', 'Title' => 'Typ'),
     171      array('Name' => 'Date', 'Title' => 'Čas'),
     172    );
     173    if($_SESSION['type'] == '') $TableColumns[] =
     174      array('Name' => 'LogName', 'Title' => 'Typ');
     175    $TableColumns = array_merge($TableColumns, array(
    168176          array('Name' => 'Text', 'Title' => 'Text'),
    169177      array('Name' => 'UserName', 'Title' => 'Uživatel'),
    170178      array('Name' => 'IP', 'Title' => 'Adresa'),
    171179      array('Name' => 'URL', 'Title' => 'URL'),
    172     );
     180    ));
    173181    $Order = GetOrderTableHeader($TableColumns, 'date', 1);
    174182    $Output .= '<table width="98%" class="BaseTable">'.
     
    182190          if($Line['Type'] == LOG_TYPE_ERROR) $Line['Text'] = htmlspecialchars($Line['Text']);
    183191      $Line['Text'] = str_replace("\n", '<br>', $Line['Text']);
    184           $Output .= '<tr><td>'.$Line['Date'].'</td>'.
    185       '<td>'.$Line['LogName'].'</td>'.
    186       '<td><span style="color: '.$Line['LogColor'].'">'.$Line['Text'].'</span></td>'.
     192          $Output .= '<tr><td>'.$Line['Date'].'</td>';
     193          if($_SESSION['type'] == '') $Output .= '<td>'.$Line['LogName'].'</td>';
     194      $Output .= '<td><span style="color: '.$Line['LogColor'].'">'.$Line['Text'].'</span></td>'.
    187195      '<td><a href="'.$this->System->Link('/user.php?user='.$Line['User']).'">'.$Line['UserName'].'</a></td>'.
    188196      '<td>'.$Line['IP'].'</td>'.
  • trunk/includes/Version.php

    r807 r808  
    66// and system will need database update.
    77
    8 $Revision = 807; // Subversion revision
     8$Revision = 808; // Subversion revision
    99$DatabaseRevision = 803; // Database structure revision
    10 $ReleaseTime = '2014-05-24';
     10$ReleaseTime = '2014-05-25';
Note: See TracChangeset for help on using the changeset viewer.