Changeset 861 for trunk/Modules/Translation
- Timestamp:
- Jan 21, 2016, 3:20:48 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Translation/Translation.php
r860 r861 66 66 } 67 67 } 68 $this->System->RegisterPageBarItem('Right', 'TranslatedMenu', array($this, 'ShowTranslatedMenu')); 68 69 } 69 70 … … 160 161 } 161 162 } 163 164 function ShowTranslatedMenu() 165 { 166 $TranslationTree = $this->GetTranslationTree(); 167 168 $Output = '<strong>'.T('Translate groups').':</strong><br /><div id="TranslationMenu">'; 169 $DbResult = $this->System->Database->select('Group', '`Id`, `Name`', '1 ORDER BY `Name`'); 170 while($Group = $DbResult->fetch_assoc()) 171 { 172 $Groups[T($Group['Name'])] = $Group; 173 } 174 ksort($Groups); 175 foreach($Groups as $Group) 176 { 177 $Output .= '<div id="menuitem-group'.$Group['Id'].'" onmouseover="show(\'group'.$Group['Id'].'\')" onmouseout="hide(\'group'.$Group['Id'].'\')">'. 178 '<a href="'.$this->System->Link('/TranslationList.php?group='.$Group['Id']. 179 '&action=filter').'">'.str_replace(' ',' ', T($Group['Name'])).'</a></div>'. 180 '<div id="group'.$Group['Id'].'" class="hidden-menu-item" onmouseover="show(\'group'.$Group['Id'].'\')" onmouseout="hide(\'group'.$Group['Id'].'\')">'; 181 $Output .= ' <a title="Zde můžete začít překládat" href="'. 182 $this->System->Link('/TranslationList.php?group='.$Group['Id'].'&state=1&user=0&entry=&text=').'">'.T('Untranslated').'</a><br />'. 183 ' <a title="Přeložené texty, můžete zde hlasovat, nebo opravovat překlady" href="'. 184 $this->System->Link('/TranslationList.php?group='.$Group['Id'].'&state=2&user=0&entry=&text=').'">'.T('Translated').'</a><br />'; 185 if(isset($this->System->User) and $this->System->User->Licence(LICENCE_USER)) 186 { 187 $Output .= ' <a title="'.T('Unfinished translations').'" href="'.$this->System->Link('/TranslationList.php?group='.$Group['Id'].'&state=3').'">'.T('Unfinished').'</a><br />'. 188 ' <a title="Všechny překlady, které jste přeložil" href="'. 189 $this->System->Link('/TranslationList.php?group='.$Group['Id'].'&state=1&user='. 190 $this->System->User->Id).'&entry=&text=">'.T('Own').'</a><br />'; 191 } 192 $Output .= ' <a title="'.T('Compose special filter').'" href="'. 193 $this->System->Link('/TranslationList.php?group='.$Group['Id'].'&action=filter'). 194 '">'.T('Filter').'</a><br />'; 195 $Output .= '</div>'; 196 } 197 $Output .= '</div>'; 198 return($Output); 199 } 162 200 }
Note:
See TracChangeset
for help on using the changeset viewer.