Changeset 839 for trunk/Modules/News


Ignore:
Timestamp:
Jan 9, 2016, 11:53:58 PM (9 years ago)
Author:
chronos
Message:
  • Modified: New news item can be added directly from news list. No need to have link from admin section.
File:
1 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  }
Note: See TracChangeset for help on using the changeset viewer.