Changeset 861 for trunk/Modules


Ignore:
Timestamp:
Jan 21, 2016, 3:20:48 PM (9 years ago)
Author:
chronos
Message:
  • Removed: Execute flag from PHP files in repo.
  • Modified: BaseView class separated to file View.php.
  • Added: Left and Right bar items are now registered from their modules using callbacks.
Location:
trunk/Modules
Files:
9 edited

Legend:

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

    • Property svn:executable deleted
  • trunk/Modules/Log/Log.php

    • Property svn:executable deleted
  • trunk/Modules/Redirection/Redirection.php

    • Property svn:executable deleted
  • trunk/Modules/Search/Search.php

    r846 r861  
    2020  {
    2121    $this->System->RegisterPage('search', 'PageSearch');
     22    $this->System->RegisterPageBarItem('Left', 'Search', array($this, 'ShowSearchBox'));
    2223  }
    2324
     
    3233  {
    3334    unset($this->SearchItems[$Name]);
     35  }
     36
     37  function ShowSearchBox()
     38  {
     39    $Output = '<strong>'.T('Search').':</strong>'.
     40      '<form action="'.$this->System->Link('/search/').'" method="get"><div>'.
     41      '<table>'.
     42      '<tr>'.
     43      '<td><input type="text" name="text" size="13" /></td>'.
     44      '</tr>'.
     45      '<tr>'.
     46      '<th><input type="submit" value="'.T('Do search').'" /></th>'.
     47      '</tr>'.
     48      '</table></div>'.
     49      '</form>';
     50    return($Output);
    3451  }
    3552}
  • trunk/Modules/Translation/Translation.php

    r860 r861  
    6666      }
    6767    }
     68    $this->System->RegisterPageBarItem('Right', 'TranslatedMenu', array($this, 'ShowTranslatedMenu'));
    6869  }
    6970
     
    160161    }
    161162  }
     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          '&amp;action=filter').'">'.str_replace(' ','&nbsp;', 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 .= '&nbsp;<a title="Zde můžete začít překládat" href="'.
     182        $this->System->Link('/TranslationList.php?group='.$Group['Id'].'&amp;state=1&amp;user=0&amp;entry=&amp;text=').'">'.T('Untranslated').'</a><br />'.
     183        '&nbsp;<a title="Přeložené texty, můžete zde hlasovat, nebo opravovat překlady" href="'.
     184        $this->System->Link('/TranslationList.php?group='.$Group['Id'].'&amp;state=2&amp;user=0&amp;entry=&amp;text=').'">'.T('Translated').'</a><br />';
     185      if(isset($this->System->User) and $this->System->User->Licence(LICENCE_USER))
     186      {
     187        $Output .= '&nbsp;<a title="'.T('Unfinished translations').'" href="'.$this->System->Link('/TranslationList.php?group='.$Group['Id'].'&amp;state=3').'">'.T('Unfinished').'</a><br />'.
     188          '&nbsp;<a title="Všechny překlady, které jste přeložil" href="'.
     189          $this->System->Link('/TranslationList.php?group='.$Group['Id'].'&amp;state=1&amp;user='.
     190          $this->System->User->Id).'&amp;entry=&amp;text=">'.T('Own').'</a><br />';
     191      }
     192      $Output .= '&nbsp;<a title="'.T('Compose special filter').'" href="'.
     193        $this->System->Link('/TranslationList.php?group='.$Group['Id'].'&amp;action=filter').
     194        '">'.T('Filter').'</a><br />';
     195        $Output .= '</div>';
     196    }
     197    $Output .= '</div>';
     198    return($Output);
     199  }
    162200}
  • trunk/Modules/User/Options.php

    • Property svn:executable deleted
  • trunk/Modules/User/Profile.php

    r860 r861  
    122122    $parser = new HTML_BBCodeParser2(array('filters' => array('Basic','Extended','Images','Links','Lists','Email')));
    123123    $Count = 20;
    124     $Output = '<strong>'.T('Latest forum posts:').'</strong>';
     124    $Output = '<strong>'.T('Latest forum posts').':</strong>';
    125125
    126126    $Output .= '<div class="shoutbox">';
     
    180180      }
    181181
    182     $Output .= '<br /><fieldset><legend>'.T('Profile text:').'</legend>'.htmlspecialchars(str_replace("\n", '<br/>', $UserLine['Info'])).'</fieldset><br/>';
     182    $Output .= '<br /><fieldset><legend>'.T('Profile text').'</legend>'.htmlspecialchars(str_replace("\n", '<br/>', $UserLine['Info'])).'</fieldset><br/>';
    183183
    184184    $Output .= '<table class="Home"><tr>'.
  • trunk/Modules/User/Registration.php

    • Property svn:executable deleted
  • trunk/Modules/User/User.php

    r860 r861  
    3838      T('Translators'), array('Name'), '`User`', $this->System->Link('/users/?search='));
    3939    $this->System->RegisterPageBarItem('Top', 'User', array($this, 'TopBarCallback'));
     40    $this->System->RegisterPageBarItem('Left', 'User', array($this, 'ShowOnlineList'));
    4041  }
    4142
Note: See TracChangeset for help on using the changeset viewer.