Changeset 839


Ignore:
Timestamp:
Jan 9, 2016, 11:53:58 PM (8 years ago)
Author:
chronos
Message:
  • Modified: New news item can be added directly from news list. No need to have link from admin section.
Location:
trunk
Files:
4 edited

Legend:

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

    r838 r839  
    8585    $PageList = GetPageList($DbRow[0]);
    8686
    87     $Output = '<h3>'.T('News').'</h3>'.$PageList['Output'];
     87    $Output = '<h3>'.T('News').'</h3>';
    8888    if($this->System->User->Licence(LICENCE_ADMIN))
    8989      $Output .= ' <a href="?a=add">'.T('Add').'</a>';
     90    $Output .= $PageList['Output'];
    9091    $Output .= '<div class="shoutbox">';
    9192    $DbResult = $this->System->Database->query('SELECT `News`.`Time`, `News`.`Text`, `News`.`Title`, `News`.`Id`, '.
     
    121122    {
    122123      $Output = '<form action="?" method="POST">'.
     124        '<fieldset><legend>'.T('New news').'</legend>'.
    123125        T('User').': '.$this->System->User->Name.'('.$this->System->User->Id.')<br/> '.
    124126        T('Title').': <input type="text" name="title" size="40"/><br/>'.
    125127        T('Content').': <textarea rows="8" cols="40" onkeydown="ResizeTextArea(this)" class="textedit" id="Text" name="text"></textarea><br/>'.
    126128        '<input type="hidden" name="a" value="add2"/>'.
    127         '<input type="submit" value="'.T('Save').'"/><br/>'.
     129        '<input type="submit" value="'.T('Save').'"/><br/></fieldset>'.
    128130        '</form>';
    129131    } else $Output = ShowMessage(T('Access denied'), MESSAGE_CRITICAL);
     132    $Output .= $this->ShowList();
    130133    return($Output);
    131134  }
  • trunk/Modules/ShoutBox/ShoutBox.php

    r838 r839  
    7070    $PageList = GetPageList($DbRow[0]);
    7171
    72     $Output .= '<h3>'.T('Shoutbox').'</h3>'.$PageList['Output'];
     72    $Output .= '<h3>'.T('Shoutbox').'</h3>';
    7373    if($this->System->User->Licence(LICENCE_USER))
    7474      $Output .= ' <a href="'.$this->System->Link('/shoutbox/?a=add').'">'.T('Add').'</a>';
     75    $Output .= $PageList['Output'];
    7576    $Output .= '<div class="shoutbox">';
    7677    $DbResult = $this->System->Database->query('SELECT * FROM `ShoutBox`  WHERE 1'.$SearchQuery.' ORDER BY `ID` DESC '.$PageList['SQLLimit']);
  • trunk/admin/index.php

    r827 r839  
    1919  '<a href="'.$System->Link('/log.php').'">Záznamy událostí</a><br/>'.
    2020  '<small>Procházení všech systémových záznamů akcí a událostí</small><br/><br/>'.
    21   '<a href="'.$System->Link('/news/?a=add').'">Přidání aktuality</a><br/>'.
    22   '<small>Přidá aktualitu na hlavní stranu projektu</small><br/><br/>'.
    2321  '<a href="'.$System->Link('/admin/?action=testing').'">Testování</a><br/>'.
    2422  '<small>Testovací funkce</small><br/><br/>'.
     
    126124}
    127125
    128 function StripText($Text) {
     126function StripText($Text)
     127{
    129128  $Text = strtolower($Text);
    130129  $Text = str_replace(' ', '', $Text);
     
    134133function MergeSameText()
    135134{
    136   global $System,$TranslationTree;
     135  global $System, $TranslationTree;
     136
    137137  $Output = '';
    138138  foreach($TranslationTree as $Group)
  • trunk/includes/Version.php

    r838 r839  
    66// and system will need database update.
    77
    8 $Revision = 838; // Subversion revision
     8$Revision = 839; // Subversion revision
    99$DatabaseRevision = 811; // Database structure revision
    1010$ReleaseTime = '2016-01-11';
Note: See TracChangeset for help on using the changeset viewer.