Ignore:
Timestamp:
Feb 20, 2013, 11:30:49 PM (12 years ago)
Author:
chronos
Message:
  • Opraveno: Zobrazení porovnání překladů.
  • Opraveno: Zobrazení stavu dokončení pro všechny překlady.
  • Přidáno: V seznamu překladů přidán sloupec Jazyk.
  • Opraveno: Místa, kde s pevným indexem anglického originálu upravena na nastavitelný.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/TranslationList.php

    r524 r525  
    55function ShowFilter($GroupId = 0)
    66{
    7   global $System, $TranslationTree;
     7  global $System, $TranslationTree, $Config;
    88 
    99  $Filter = array('SQL' => '');
     
    153153  {
    154154    if($Filter['State'] == 0) $Filter['SQL'] .= $UserFilter.$VersionFilter.'';
    155     else if($Filter['State'] == 1) $Filter['SQL'] .= $VersionFilter.' AND (`Language` = 0) AND NOT EXISTS(SELECT 1 FROM `'.$Table.'` AS `Sub` WHERE (`Sub`.`Language` <> 0)'.$LanguageFilter.$UserFilter.' AND (`Sub`.`Entry` = `T`.`Entry`) AND (`Sub`.`Complete` = 1) AND (`Sub`.`VersionStart` = `T`.`VersionStart`) AND (`Sub`.`VersionEnd` = `T`.`VersionEnd`))';
     155    else if($Filter['State'] == 1) $Filter['SQL'] .= $VersionFilter.' AND (`Language` = '.$Config['OriginalLanguage'].') '.
     156      'AND NOT EXISTS(SELECT 1 FROM `'.$Table.'` AS `Sub` WHERE '.
     157      '(`Sub`.`Language` <> '.$Config['OriginalLanguage'].')'.$LanguageFilter.$UserFilter.
     158      ' AND (`Sub`.`Entry` = `T`.`Entry`) AND (`Sub`.`Complete` = 1) AND '.
     159      '(`Sub`.`VersionStart` = `T`.`VersionStart`) AND (`Sub`.`VersionEnd` = `T`.`VersionEnd`))';
    156160    else if($Filter['State'] == 2) $Filter['SQL'] .= $UserFilter.$LanguageFilter.$VersionFilter.' AND (`Complete` = 1)';
    157     else if($Filter['State'] == 3) $Filter['SQL'] .= $UserFilter.$LanguageFilter.$VersionFilter.' AND (`Language` != 0) AND (`Complete` = 0)';
    158     else if($Filter['State'] == 4) $Filter['SQL'] .= $VersionFilter.' AND (`Language` = 0)';
     161    else if($Filter['State'] == 3) $Filter['SQL'] .= $UserFilter.$LanguageFilter.$VersionFilter.' AND (`Language` != '.$Config['OriginalLanguage'].') AND (`Complete` = 0)';
     162    else if($Filter['State'] == 4) $Filter['SQL'] .= $VersionFilter.' AND (`Language` = '.$Config['OriginalLanguage'].')';
    159163  }
    160164
     
    193197  $Query = 'SELECT `T`.`ID`, `T`.`Entry`, `T`.`VersionStart`, `T`.`VersionEnd`, '.
    194198    '`T`.`'.$TranslationTree[$Filter['Group']]['Items'][0]['Column'].'`, '.
    195     '(SELECT `User`.`Name` FROM `User` WHERE `User`.`ID` = `T`.`User`) '.
    196     'AS `UserName` FROM `'.$Table.'` AS `T` WHERE 1 '.$Filter['SQL'];
     199    '(SELECT `User`.`Name` FROM `User` WHERE `User`.`ID` = `T`.`User`) AS `UserName`, '.
     200    '(SELECT `Language`.`Name` FROM `Language` WHERE `Language`.`ID` = `T`.`Language`) AS `LanguageName` '.
     201    'FROM `'.$Table.'` AS `T` WHERE 1 '.$Filter['SQL'];
    197202 
    198203  // Get total item count
     
    207212    array('Name' => $TranslationTree[$Filter['Group']]['Items'][0]['Column'], 'Title' => 'Název'),
    208213    array('Name' => 'VersionStart', 'Title' => 'Verze'),
    209     array('Name' => 'UserName', 'Title' => 'Překladatel'),
     214    array('Name' => 'LanguageName', 'Title' => 'Jazyk'),
     215        array('Name' => 'UserName', 'Title' => 'Překladatel'),
    210216  );
    211217   
     
    220226      '<td>'.htmlspecialchars($Line[$TranslationTree[$Filter['Group']]['Items'][0]['Column']]).'</td>'.
    221227      '<td>'.GetVersionWOW($Line['VersionStart']).'-'.GetVersionWOW($Line['VersionEnd']).'</td>'.
     228      '<td>'.$Line['LanguageName'].'</td>'.
    222229      '<td>'.$Line['UserName'].'</td>';
    223230      '</tr>';
Note: See TracChangeset for help on using the changeset viewer.