Added feature #7427: add docheader to file -> filelist module, credits Christoph...
authorIngo Renner <ingo.renner@typo3.org>
Mon, 3 Mar 2008 14:37:46 +0000 (14:37 +0000)
committerIngo Renner <ingo.renner@typo3.org>
Mon, 3 Mar 2008 14:37:46 +0000 (14:37 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3354 709f56b5-9817-0410-a4d7-c38de5d9e867

13 files changed:
ChangeLog
typo3/class.file_list.inc
typo3/file_edit.php
typo3/file_list.php
typo3/file_newfolder.php
typo3/file_rename.php
typo3/file_upload.php
typo3/stylesheet.css
typo3/templates/file_edit.html [new file with mode: 0644]
typo3/templates/file_list.html [new file with mode: 0644]
typo3/templates/file_newfolder.html [new file with mode: 0644]
typo3/templates/file_rename.html [new file with mode: 0644]
typo3/templates/file_upload.html [new file with mode: 0644]

index 9d80032..cafc910 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,7 +5,8 @@
        * Added feature #7140: EM should send TYPO3 version when connecting to TER, credits Niels Pardon
        * Fixed bug #7704: Image Position in Text/Image doesn't work, redits Steffen Kamper
        * Fixed bug #7713: EM - Translation Manager loose CSS while updating, credits Steffen Kamper
        * Added feature #7140: EM should send TYPO3 version when connecting to TER, credits Niels Pardon
        * Fixed bug #7704: Image Position in Text/Image doesn't work, redits Steffen Kamper
        * Fixed bug #7713: EM - Translation Manager loose CSS while updating, credits Steffen Kamper
-       * reintroduced the save button in user settings, removed navigation mode option when not in backend_old
+       * Reintroduced the save button in user settings, removed navigation mode option when not in backend_old
+       * Added feature #7427: add docheader to file -> filelist module, credits Christoph Koehler
 
 2008-03-03  Dmitry Dulepov  <dmitry@typo3.org>
 
 
 2008-03-03  Dmitry Dulepov  <dmitry@typo3.org>
 
index 1a75206..3c2b48c 100755 (executable)
@@ -140,58 +140,57 @@ class fileList extends t3lib_recordList {
        }
 
        /**
        }
 
        /**
-        * Make the top of the list
+        * Return the buttons used by the file list to include in the top header
         *
         *
-        * @param       string          The path to list.
-        * @return      void
+        * @return      array
         */
         */
-       function writeTop($path)        {
+       function getButtonsAndOtherMarkers($path) {
+               
                        // Makes the code for the foldericon in the top
                $path = $GLOBALS['SOBE']->basicFF->is_directory($path); // Cleaning name...
 
                if ($path)      {
                        // Makes the code for the foldericon in the top
                $path = $GLOBALS['SOBE']->basicFF->is_directory($path); // Cleaning name...
 
                if ($path)      {
-                       $out='';
+                       $otherMarkers = array(
+                               'PAGE_ICON' => '',
+                               'TITLE' => '',
+                       );
+                       
+                       $buttons = array(
+                               'level_up' => '',
+                               'refresh' => '',
+                               'title' => '',
+                               'page_icon' => '',
+                       );
+                       
                        $theFile = $GLOBALS['SOBE']->basicFF->getTotalFileInfo($path);
                        $theFile = $GLOBALS['SOBE']->basicFF->getTotalFileInfo($path);
-                       $root = $GLOBALS['SOBE']->basicFF->checkPathAgainstMounts($theFile['path']);
-                       $titleCol='path';
-                       $this->fieldArray = Array($titleCol,'up');
 
                        list($title,$icon,$path) =  $this->dirData($theFile);
 
                                // Start compiling the HTML
 
                        list($title,$icon,$path) =  $this->dirData($theFile);
 
                                // Start compiling the HTML
-                       $theData = Array();
-                       $theData[$titleCol] = $this->widthGif;
-
                        $title = $GLOBALS['SOBE']->basicFF->blindPath($path);
                        $title = $GLOBALS['SOBE']->basicFF->blindPath($path);
-                       $theData['up']='<a href="'.htmlspecialchars($this->listURL()).'">'.
-                                       '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/refresh_n.gif','width="14" height="14"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.reload',1).'" alt="" />'.
-                                       '</a>';
 
 
-                       if ($root)      {
+                               // if this is some subpage under the mount root....
+                       if ($GLOBALS['SOBE']->basicFF->checkPathAgainstMounts($theFile['path'])) {
                                        // The icon with link
                                        // The icon with link
-                               $theIcon = '<img'.t3lib_iconWorks::skinImg($this->backPath,$icon,'width="18" height="16"').' title="'.htmlspecialchars($theFile['file']).'" alt="" />';
-                               if ($this->clickMenus) $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($theIcon,$path);
+                               $otherMarkers['PAGE_ICON'] = '<img'.t3lib_iconWorks::skinImg($this->backPath,$icon,'width="18" height="16"').' title="'.htmlspecialchars($theFile['file']).'" alt="" />';
+                               if ($this->clickMenus) $otherMarkers['PAGE_ICON'] = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($otherMarkers['PAGE_ICON'],$path);
+
+                               $buttons['level_up'] .= $this->linkWrapDir('<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/i/folder_up.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.upOneLevel',1).'" alt="" />',$theFile['path']);
+                               $otherMarkers['TITLE'] .= t3lib_div::fixed_lgd_cs($title,-($this->fixedL+20));  // No HTML specialchars here - HTML like <b> </b> is allowed
 
 
-                               $theData[$titleCol].='<br />'.t3lib_div::fixed_lgd_cs($title,-($this->fixedL+20));      // No HTML specialchars here - HTML like <b> </b> is allowed
-                               $theData['up'].=$this->linkWrapDir('<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/i/folder_up.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.upOneLevel',1).'" alt="" />',$theFile['path']);
+                               // this is the root page
                        } else {
                        } else {
-                                       // root:0
-                               $theIcon='<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/i/_icon_ftp.gif','width="18" height="16"').' alt="" />';
-                               $theData[$titleCol].='<br />'.htmlspecialchars(t3lib_div::fixed_lgd_cs($title,-($this->fixedL+20)));
+                               $otherMarkers['PAGE_ICON'] = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/i/_icon_ftp.gif','width="18" height="16"').' alt="" />';
+                               if ($this->clickMenus) $otherMarkers['PAGE_ICON'] = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($otherMarkers['PAGE_ICON'],$path);
+                               $otherMarkers['TITLE'] .= htmlspecialchars(t3lib_div::fixed_lgd_cs($title,-($this->fixedL+20)));
                        }
                        }
-
-                               // Adding top element
-                       $out.=$this->addelement(1,'',$theData,'','',$theIcon);
-
-                       $this->HTMLcode.='
-
-               <!--
-                       Page header for file list
-               -->
-                               <table border="0" cellpadding="0" cellspacing="0" id="typo3-filelist-top">
-                                       '.$out.'
-                               </table>';
                }
                }
+               
+               $buttons['refresh'] = '<a href="'.htmlspecialchars($this->listURL()).'">'.
+                               '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/refresh_n.gif','width="14" height="14"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.reload',1).'" alt="" />'.
+                               '</a>';
+                               
+               return array($buttons, $otherMarkers);
        }
 
        /**
        }
 
        /**
@@ -276,9 +275,6 @@ class fileList extends t3lib_recordList {
                $out.=$iOut;
 
                        // half line is drawn
                $out.=$iOut;
 
                        // half line is drawn
-               $theData = Array();
-               $theData[$titleCol] = $this->counter.' File(s), '.t3lib_div::formatSize($this->totalbytes).'bytes';
-               $out.=$this->addelement(1,'',$theData);
 
                        // finish
                return '
 
                        // finish
                return '
@@ -293,6 +289,20 @@ class fileList extends t3lib_recordList {
        }
 
        /**
        }
 
        /**
+        * Gets the number of files and total size of a folder
+        *
+        * @return string
+        **/
+       function getFolderInfo() {
+               if($this->counter == 1) {
+                       $fileLabel = 'File';    
+               } else {
+                       $fileLabel = 'Files';   
+               }
+               return $this->counter.' '.$fileLabel.', '.t3lib_div::formatSize($this->totalbytes).'bytes';
+       }
+
+       /**
         * This returns tablerows for the directories in the array $items['sorting'].
         *
         * @param       array           Directory items
         * This returns tablerows for the directories in the array $items['sorting'].
         *
         * @param       array           Directory items
index 3f7478d..e2563a7 100755 (executable)
@@ -52,7 +52,7 @@ $BACK_PATH = '';
 require('init.php');
 require('template.php');
 require_once(PATH_t3lib.'class.t3lib_basicfilefunc.php');
 require('init.php');
 require('template.php');
 require_once(PATH_t3lib.'class.t3lib_basicfilefunc.php');
-
+require_once(PATH_t3lib.'class.t3lib_parsehtml.php');
 
 
 
 
 
 
@@ -130,14 +130,21 @@ class SC_file_edit {
                        case 'group':   $this->icon = 'gfx/i/_icon_ftp_group.gif';      break;
                        default:                $this->icon = 'gfx/i/_icon_ftp.gif';    break;
                }
                        case 'group':   $this->icon = 'gfx/i/_icon_ftp_group.gif';      break;
                        default:                $this->icon = 'gfx/i/_icon_ftp.gif';    break;
                }
+               
+               $this->icon = '<img'.t3lib_iconWorks::skinImg($this->backPath,$this->icon,'width="18" height="16"').' title="" alt="" />';
+
+                       // Relative path to filemount, $key:
                $this->shortPath = substr($this->target,strlen($GLOBALS['FILEMOUNTS'][$key]['path']));
                $this->shortPath = substr($this->target,strlen($GLOBALS['FILEMOUNTS'][$key]['path']));
-               $this->title = $GLOBALS['FILEMOUNTS'][$key]['name'].': '.$this->shortPath;
 
 
+                       // Setting title:
+               $this->title = $this->icon.$GLOBALS['FILEMOUNTS'][$key]['name'].': '.$this->shortPath;
+               
                // ***************************
                // Setting template object
                // ***************************
                $this->doc = t3lib_div::makeInstance('template');
                $this->doc->docType = 'xhtml_trans';
                // ***************************
                // Setting template object
                // ***************************
                $this->doc = t3lib_div::makeInstance('template');
                $this->doc->docType = 'xhtml_trans';
+               $this->doc->setModuleTemplate('templates/file_edit.html');              
                $this->doc->backPath = $BACK_PATH;
                $this->doc->JScode=$this->doc->wrapScriptTags('
                        function backToList()   {       //
                $this->doc->backPath = $BACK_PATH;
                $this->doc->JScode=$this->doc->wrapScriptTags('
                        function backToList()   {       //
@@ -154,13 +161,12 @@ class SC_file_edit {
         */
        function main() {
                global $BE_USER, $LANG, $TYPO3_CONF_VARS;
         */
        function main() {
                global $BE_USER, $LANG, $TYPO3_CONF_VARS;
+               $docHeaderButtons = $this->getButtons();
+               
+               $this->content = $this->doc->startPage($LANG->sL('LLL:EXT:lang/locallang_core.php:file_edit.php.pagetitle'));
 
 
-               $this->content='';
-               $this->content.=$this->doc->startPage($LANG->sL('LLL:EXT:lang/locallang_core.php:file_edit.php.pagetitle'));
-               $this->content.=$this->doc->header($LANG->sL('LLL:EXT:lang/locallang_core.php:file_edit.php.pagetitle'));
-               $this->content.=$this->doc->spacer(5);
-               $this->content.=$this->doc->section('',$this->doc->getFileheader($this->title,$this->shortPath,$this->icon));
-               $this->content.=$this->doc->divider(5);
+               $pageContent = $this->doc->header($LANG->sL('LLL:EXT:lang/locallang_core.php:file_edit.php.pagetitle'));
+               $pageContent .= $this->doc->spacer(2);
 
                $fI = pathinfo($this->target);
                $extList=$TYPO3_CONF_VARS['SYS']['textfile_ext'];
 
                $fI = pathinfo($this->target);
                $extList=$TYPO3_CONF_VARS['SYS']['textfile_ext'];
@@ -171,15 +177,6 @@ class SC_file_edit {
 
                                // making the formfields
                        $hValue = 'file_edit.php?target='.rawurlencode($this->origTarget).'&returnUrl='.rawurlencode($this->returnUrl);
 
                                // making the formfields
                        $hValue = 'file_edit.php?target='.rawurlencode($this->origTarget).'&returnUrl='.rawurlencode($this->returnUrl);
-                       $code = '';
-                       $code.='
-                               <div id="c-submit">
-                                       <input type="hidden" name="redirect" value="'.htmlspecialchars($hValue).'" />
-                                       <input type="submit" value="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:file_edit.php.submit',1).'" />
-                                       <input type="submit" value="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:file_edit.php.saveAndClose',1).'" onclick="document.editform.redirect.value=\''.htmlspecialchars($this->returnUrl).'\';" />
-                                       <input type="submit" value="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.cancel',1).'" onclick="backToList(); return false;" />
-                               </div>
-                               ';
 
                                // Edit textarea:
                        $code.='
 
                                // Edit textarea:
                        $code.='
@@ -188,25 +185,37 @@ class SC_file_edit {
                                        t3lib_div::formatForTextarea($fileContent).
                                        '</textarea>
                                        <input type="hidden" name="file[editfile][0][target]" value="'.$this->target.'" />
                                        t3lib_div::formatForTextarea($fileContent).
                                        '</textarea>
                                        <input type="hidden" name="file[editfile][0][target]" value="'.$this->target.'" />
+                                       <input type="hidden" name="redirect" value="'.htmlspecialchars($hValue).'" />
                                </div>
                                <br />';
 
                                </div>
                                <br />';
 
-                               // CSH:
-                       $code.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'file_edit', $GLOBALS['BACK_PATH'],'|<br/>');
-
                                // Make shortcut:
                        if ($BE_USER->mayMakeShortcut())        {
                                $this->MCONF['name']='xMOD_file_edit.php';
                                // Make shortcut:
                        if ($BE_USER->mayMakeShortcut())        {
                                $this->MCONF['name']='xMOD_file_edit.php';
-                               $code.= '<br />'.$this->doc->makeShortcutIcon('target','',$this->MCONF['name'],1);
+                               $docHeaderButtons['shortcut'] = $this->doc->makeShortcutIcon('target','',$this->MCONF['name'],1);
                        }
                } else {
                        $code.=sprintf($LANG->sL('LLL:EXT:lang/locallang_core.php:file_edit.php.coundNot'), $extList);
                }
 
                        // Ending of section and outputting editing form:
                        }
                } else {
                        $code.=sprintf($LANG->sL('LLL:EXT:lang/locallang_core.php:file_edit.php.coundNot'), $extList);
                }
 
                        // Ending of section and outputting editing form:
-               $this->content.= $this->doc->sectionEnd();
-               $this->content.=$code;
-
+               $pageContent.= $this->doc->sectionEnd();
+               $pageContent.=$code;
+
+                       // Add the HTML as a section:
+               $markerArray = array(
+                       'CSH' => $docHeaderButtons['csh'],
+                       'FUNC_MENU' => t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']),
+                       'BUTTONS' => $docHeaderButtons,
+                       'CONTENT' => $pageContent,
+                       'PATH' => $this->title,
+               );
+               
+               $this->content.= $this->doc->moduleBody(array(), $docHeaderButtons, $markerArray);
+               $this->content.= $this->doc->endPage();
+               $this->content = $this->doc->insertStylesAndJS($this->content);
+               
+               
        }
 
        /**
        }
 
        /**
@@ -215,10 +224,35 @@ class SC_file_edit {
         * @return      void
         */
        function printContent() {
         * @return      void
         */
        function printContent() {
-               $this->content.= $this->doc->endPage();
-               $this->content = $this->doc->insertStylesAndJS($this->content);
                echo $this->content;
        }
                echo $this->content;
        }
+       
+       /**
+        * Builds the buttons for the docheader and returns them as an array
+        *
+        * @return array
+        **/
+       function getButtons() {
+               
+               $buttons = array();
+               
+                       // CSH button
+               $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'file_edit', $GLOBALS['BACK_PATH']);
+
+                       // Save button
+               $theIcon = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/savedok.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:file_edit.php.submit',1)).'" alt="" />';
+               $buttons['SAVE'] = '<a href="#" onclick="document.editform.submit();">'.$theIcon.'</a>';
+
+                       // Save and Close button
+               $theIcon = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/saveandclosedok.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:file_edit.php.saveAndClose',1)).'" alt="" />';
+               $buttons['SAVE_CLOSE'] = '<a href="#" onclick="document.editform.redirect.value=\''.htmlspecialchars($this->returnUrl).'\'; document.editform.submit();">'.$theIcon.'</a>';
+               
+                       // Cancel button
+               $theIcon = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/closedok.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.cancel',1)).'" alt="" />';
+               $buttons['CANCEL'] = '<a href="#" onclick="backToList(); return false;">'.$theIcon.'</a>';
+               
+               return $buttons;
+       }
 }
 
 // Include extension?
 }
 
 // Include extension?
index 64222bf..aee8082 100755 (executable)
@@ -58,6 +58,7 @@ require_once (PATH_t3lib.'class.t3lib_basicfilefunc.php');
 require_once (PATH_t3lib.'class.t3lib_extfilefunc.php');
 require_once (PATH_t3lib.'class.t3lib_recordlist.php');
 require_once (PATH_t3lib.'class.t3lib_clipboard.php');
 require_once (PATH_t3lib.'class.t3lib_extfilefunc.php');
 require_once (PATH_t3lib.'class.t3lib_recordlist.php');
 require_once (PATH_t3lib.'class.t3lib_clipboard.php');
+require_once (PATH_t3lib.'class.t3lib_parsehtml.php');
 require_once ('class.file_list.inc');
 $BE_USER->modAccess($MCONF,1);
 
 require_once ('class.file_list.inc');
 $BE_USER->modAccess($MCONF,1);
 
@@ -166,6 +167,7 @@ class SC_file_list {
                        // Initialize the template object
                $this->doc = t3lib_div::makeInstance('template');
                $this->doc->backPath = $BACK_PATH;
                        // Initialize the template object
                $this->doc = t3lib_div::makeInstance('template');
                $this->doc->backPath = $BACK_PATH;
+               $this->doc->setModuleTemplate('templates/file_list.html');
                $this->doc->docType = 'xhtml_trans';
 
                        // Validating the input "id" (the path, directory!) and checking it against the mounts of the user.
                $this->doc->docType = 'xhtml_trans';
 
                        // Validating the input "id" (the path, directory!) and checking it against the mounts of the user.
@@ -176,25 +178,25 @@ class SC_file_list {
                if ($access)    {
 
                                // Create filelisting object
                if ($access)    {
 
                                // Create filelisting object
-                       $filelist = t3lib_div::makeInstance('fileList');
-                       $filelist->backPath = $BACK_PATH;
-                       $filelist->thumbs = $this->MOD_SETTINGS['displayThumbs']?1:$BE_USER->uc['thumbnailsByDefault'];
+                       $this->filelist = t3lib_div::makeInstance('fileList');
+                       $this->filelist->backPath = $BACK_PATH;
+                       $this->filelist->thumbs = $this->MOD_SETTINGS['displayThumbs']?1:$BE_USER->uc['thumbnailsByDefault'];
 
                                // Create clipboard object and initialize that
 
                                // Create clipboard object and initialize that
-                       $filelist->clipObj = t3lib_div::makeInstance('t3lib_clipboard');
-                       $filelist->clipObj->fileMode=1;
-                       $filelist->clipObj->initializeClipboard();
+                       $this->filelist->clipObj = t3lib_div::makeInstance('t3lib_clipboard');
+                       $this->filelist->clipObj->fileMode=1;
+                       $this->filelist->clipObj->initializeClipboard();
 
                        $CB = t3lib_div::_GET('CB');
 
                        $CB = t3lib_div::_GET('CB');
-                       if ($this->cmd=='setCB') $CB['el'] = $filelist->clipObj->cleanUpCBC(array_merge(t3lib_div::_POST('CBH'),t3lib_div::_POST('CBC')),'_FILE');
+                       if ($this->cmd=='setCB') $CB['el'] = $this->filelist->clipObj->cleanUpCBC(array_merge(t3lib_div::_POST('CBH'),t3lib_div::_POST('CBC')),'_FILE');
                        if (!$this->MOD_SETTINGS['clipBoard'])  $CB['setP']='normal';
                        if (!$this->MOD_SETTINGS['clipBoard'])  $CB['setP']='normal';
-                       $filelist->clipObj->setCmd($CB);
-                       $filelist->clipObj->cleanCurrent();
-                       $filelist->clipObj->endClipboard();     // Saves
+                       $this->filelist->clipObj->setCmd($CB);
+                       $this->filelist->clipObj->cleanCurrent();
+                       $this->filelist->clipObj->endClipboard();       // Saves
 
                                // If the "cmd" was to delete files from the list (clipboard thing), do that:
                        if ($this->cmd=='delete')       {
 
                                // If the "cmd" was to delete files from the list (clipboard thing), do that:
                        if ($this->cmd=='delete')       {
-                               $items = $filelist->clipObj->cleanUpCBC(t3lib_div::_POST('CBC'),'_FILE',1);
+                               $items = $this->filelist->clipObj->cleanUpCBC(t3lib_div::_POST('CBC'),'_FILE',1);
                                if (count($items))      {
                                                // Make command array:
                                        $FILE=array();
                                if (count($items))      {
                                                // Make command array:
                                        $FILE=array();
@@ -223,16 +225,13 @@ class SC_file_list {
 
                                // Start up filelisting object, include settings.
                        $this->pointer = t3lib_div::intInRange($this->pointer,0,100000);
 
                                // Start up filelisting object, include settings.
                        $this->pointer = t3lib_div::intInRange($this->pointer,0,100000);
-                       $filelist->start($this->id,$this->pointer,$this->MOD_SETTINGS['sort'],$this->MOD_SETTINGS['reverse'],$this->MOD_SETTINGS['clipBoard']);
-
-                               // Write the header
-                       $filelist->writeTop($this->id);
+                       $this->filelist->start($this->id,$this->pointer,$this->MOD_SETTINGS['sort'],$this->MOD_SETTINGS['reverse'],$this->MOD_SETTINGS['clipBoard']);
 
                                // Generate the list
 
                                // Generate the list
-                       $filelist->generateList();
+                       $this->filelist->generateList();
 
                                // Write the footer
 
                                // Write the footer
-                       $filelist->writeBottom();
+                       $this->filelist->writeBottom();
 
                                // Set top JavaScript:
                        $this->doc->JScode=$this->doc->wrapScriptTags('
 
                                // Set top JavaScript:
                        $this->doc->JScode=$this->doc->wrapScriptTags('
@@ -242,88 +241,78 @@ class SC_file_list {
                                window.location.href = URL;
                        }
 
                                window.location.href = URL;
                        }
 
-                       '.$filelist->CBfunctions()      // ... and add clipboard JavaScript functions
+                       '.$this->filelist->CBfunctions()        // ... and add clipboard JavaScript functions
                        );
 
                                // This will return content necessary for the context sensitive clickmenus to work: bodytag events, JavaScript functions and DIV-layers.
                        $this->doc->getContextMenuCode();
 
                        );
 
                                // This will return content necessary for the context sensitive clickmenus to work: bodytag events, JavaScript functions and DIV-layers.
                        $this->doc->getContextMenuCode();
 
+                               // Setting up the buttons and markers for docheader
+                       list($buttons, $otherMarkers) = $this->filelist->getButtonsAndOtherMarkers($this->id);
+                       
+                               // add the folder info to the marker array
+                       $otherMarkers['FOLDER_INFO'] = $this->filelist->getFolderInfo();
+                       
+                       $docHeaderButtons = array_merge($this->getButtons(), $buttons);
+                       
+                               // Build the <body> for the module
+                       $this->content = $this->doc->startPage('Template Tools');
 
                                // Create output
 
                                // Create output
-                       $this->content='';
-                       $this->content.=$this->doc->startPage($LANG->getLL('files'));
-                       $this->content.= '<form action="'.htmlspecialchars($filelist->listURL()).'" method="post" name="dblistForm">';
-                       $this->content.= $filelist->HTMLcode;
-                       $this->content.= '<input type="hidden" name="cmd" /></form>';
-
-                               // FileList Module CSH:
-                       $this->content.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'filelist_module', $GLOBALS['BACK_PATH'],'<br/>|');
-
-                       $this->content.='
-                               <!--
-                                       "Upload" and "New" buttons
-                               -->
-                               <div id="typo3-filelist-buttons">
-                                       <table border="0" cellpadding="4" cellspacing="0">
-                                               <tr>
-                                                       <td>
-                                                               <form name="upload" action="'.$BACK_PATH.'file_upload.php">
-                                                                       <input type="hidden" name="target" value="'.htmlspecialchars($this->id).'" />
-                                                                       <input type="hidden" name="returnUrl" value="'.htmlspecialchars($filelist->listURL()).'" />
-                                                                       <input type="submit" value="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.upload',1)).'" />
-                                                               </form>
-                                                       </td>
-                                                       <td>
-                                                               <form name="new" action="'.$BACK_PATH.'file_newfolder.php">
-                                                                       <input type="hidden" name="target" value="'.htmlspecialchars($this->id).'" />
-                                                                       <input type="hidden" name="returnUrl" value="'.htmlspecialchars($filelist->listURL()).'" />
-                                                                       <input type="submit" value="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.new',1)).'" />
-                                                               </form>
-                                                       </td>
-                                               </tr>
-                                       </table>
-                               </div>
-                       ';
-
-                       if ($filelist->HTMLcode)        {       // Making listing options:
-
-                               $this->content.='
-
+                       $pageContent='';
+                       $pageContent.=$this->doc->startPage($LANG->getLL('files'));
+                       $pageContent.= '<form action="'.htmlspecialchars($this->filelist->listURL()).'" method="post" name="dblistForm">';
+                       $pageContent.= $this->filelist->HTMLcode;
+                       $pageContent.= '<input type="hidden" name="cmd" /></form>';
+               
+               
+                       if ($this->filelist->HTMLcode)  {       // Making listing options:
+               
+                               $pageContent.='
+               
                                        <!--
                                                Listing options for clipboard and thumbnails
                                        -->
                                        <div id="typo3-listOptions">
                                ';
                                        <!--
                                                Listing options for clipboard and thumbnails
                                        -->
                                        <div id="typo3-listOptions">
                                ';
-
+               
                                        // Add "display thumbnails" checkbox:
                                        // Add "display thumbnails" checkbox:
-                               $this->content.=t3lib_BEfunc::getFuncCheck($this->id,'SET[displayThumbs]',$this->MOD_SETTINGS['displayThumbs'],'file_list.php','','id="checkDisplayThumbs"').' <label for="checkDisplayThumbs">'.$LANG->getLL('displayThumbs',1).'</label><br />';
-
+                               $pageContent.=t3lib_BEfunc::getFuncCheck($this->id,'SET[displayThumbs]',$this->MOD_SETTINGS['displayThumbs'],'file_list.php','','id="checkDisplayThumbs"').' <label for="checkDisplayThumbs">'.$LANG->getLL('displayThumbs',1).'</label><br />';
+               
                                        // Add clipboard button
                                        // Add clipboard button
-                               $this->content.=t3lib_BEfunc::getFuncCheck($this->id,'SET[clipBoard]',$this->MOD_SETTINGS['clipBoard'],'file_list.php','','id="checkClipBoard"').' <label for="checkClipBoard">'.$LANG->getLL('clipBoard',1).'</label>';
-
-                               $this->content.='
+                               $pageContent.=t3lib_BEfunc::getFuncCheck($this->id,'SET[clipBoard]',$this->MOD_SETTINGS['clipBoard'],'file_list.php','','id="checkClipBoard"').' <label for="checkClipBoard">'.$LANG->getLL('clipBoard',1).'</label>';
+               
+                               $pageContent.='
                                        </div>
                                ';
                                        </div>
                                ';
-                               $this->content.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'filelist_options', $GLOBALS['BACK_PATH']);
-
-
+               
+               
                                        // Set clipboard:
                                if ($this->MOD_SETTINGS['clipBoard'])   {
                                        // Set clipboard:
                                if ($this->MOD_SETTINGS['clipBoard'])   {
-                                       $this->content.=$filelist->clipObj->printClipboard();
-                                       $this->content.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'filelist_clipboard', $GLOBALS['BACK_PATH']);
+                                       $pageContent.=$this->filelist->clipObj->printClipboard();
+                                       $pageContent.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'filelist_clipboard', $GLOBALS['BACK_PATH']);
                                }
                        }
                                }
                        }
+                       
+                       $markerArray = array(
+                               'CSH' => $docHeaderButtons['csh'],
+                               'FUNC_MENU' => t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']),
+                               'CONTENT' => $pageContent
+                       );
 
 
-                               // Add shortcut
-                       if ($BE_USER->mayMakeShortcut())        {
-                               $this->content.='<br /><br />'.$this->doc->makeShortcutIcon('pointer,id,target,table',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']);
-                       }
+                       $this->content.= $this->doc->moduleBody(array(), $docHeaderButtons, array_merge($markerArray, $otherMarkers));
+                       $this->content.= $this->doc->endPage();
+                       $this->content = $this->doc->insertStylesAndJS($this->content);
+                       
                } else {
                                // Create output - no access (no warning though)
                } else {
                                // Create output - no access (no warning though)
-                       $this->content='';
-                       $this->content.=$this->doc->startPage($LANG->getLL('files'));
+                       $this->content = '';
+                       $this->content .= $this->doc->startPage($LANG->getLL('files'));
+                       $this->content .= $this->doc->endPage();
+                       $this->content = $this->doc->insertStylesAndJS($this->content);
                }
 
                }
 
+
        }
 
        /**
        }
 
        /**
@@ -332,10 +321,42 @@ class SC_file_list {
         * @return      void
         */
        function printContent() {
         * @return      void
         */
        function printContent() {
-               $this->content.= $this->doc->endPage();
-               $this->content = $this->doc->insertStylesAndJS($this->content);
                echo $this->content;
        }
                echo $this->content;
        }
+       
+       /**
+        * Create the panel of buttons for submitting the form or otherwise perform operations.
+        *
+        * @return      array   all available buttons as an assoc. array
+        */
+       function getButtons()   {
+               global $TCA, $LANG, $BACK_PATH, $BE_USER;
+       
+               $buttons = array(
+                       'csh' => '',
+                       'shortcut' => '',
+                       'upload' => '',
+                       'new' => '',
+               );
+
+                       // Add shortcut
+               if ($BE_USER->mayMakeShortcut())        {
+                       $buttons['shortcut'] = $this->doc->makeShortcutIcon('pointer,id,target,table',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']);
+               }
+       
+                       // FileList Module CSH:
+               $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'filelist_module', $GLOBALS['BACK_PATH']);
+       
+                       // upload button
+               $theIcon = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/upload.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.upload',1)).'" alt="" />';
+               $buttons['upload'] = '<a href="'.$BACK_PATH.'file_upload.php?target='.htmlspecialchars($this->id).'&returnUrl='.htmlspecialchars($this->filelist->listURL()).'">'.$theIcon.'</a>';
+       
+               $theIcon = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/new_file.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.new',1)).'" alt="" />';
+               $buttons['new'] = '<a href="'.$BACK_PATH.'file_newfolder.php?target='.htmlspecialchars($this->id).'&returnUrl='.htmlspecialchars($this->filelist->listURL()).'">'.$theIcon.'</a>';
+               
+               return $buttons;
+       }
+       
 }
 
 // Include extension?
 }
 
 // Include extension?
index eedbc6c..af387fa 100755 (executable)
@@ -53,7 +53,7 @@ $BACK_PATH = '';
 require('init.php');
 require('template.php');
 require_once(PATH_t3lib.'class.t3lib_basicfilefunc.php');
 require('init.php');
 require('template.php');
 require_once(PATH_t3lib.'class.t3lib_basicfilefunc.php');
-
+require_once(PATH_t3lib.'class.t3lib_parsehtml.php');
 
 
 
 
 
 
@@ -136,17 +136,19 @@ class SC_file_newfolder {
                        default:                $this->icon = 'gfx/i/_icon_ftp.gif';    break;
                }
 
                        default:                $this->icon = 'gfx/i/_icon_ftp.gif';    break;
                }
 
+               $this->icon = '<img'.t3lib_iconWorks::skinImg($this->backPath,$this->icon,'width="18" height="16"').' title="" alt="" />';
+               
                        // Relative path to filemount, $key:
                $this->shortPath = substr($this->target,strlen($GLOBALS['FILEMOUNTS'][$key]['path']));
 
                        // Setting title:
                        // Relative path to filemount, $key:
                $this->shortPath = substr($this->target,strlen($GLOBALS['FILEMOUNTS'][$key]['path']));
 
                        // Setting title:
-               $this->title = $GLOBALS['FILEMOUNTS'][$key]['name'].': '.$this->shortPath;
-
+               $this->title = $this->icon.$GLOBALS['FILEMOUNTS'][$key]['name'].': '.$this->shortPath;
+               
                        // Setting template object
                        // Setting template object
-               $this->doc = t3lib_div::makeInstance('smallDoc');
+               $this->doc = t3lib_div::makeInstance('template');
                $this->doc->docType = 'xhtml_trans';
                $this->doc->docType = 'xhtml_trans';
+               $this->doc->setModuleTemplate('templates/file_newfolder.html');
                $this->doc->backPath = $BACK_PATH;
                $this->doc->backPath = $BACK_PATH;
-               $this->doc->form='<form action="tce_file.php" method="post" name="editform">';
                $this->doc->JScode=$this->doc->wrapScriptTags('
                        var path = "'.$this->target.'";
 
                $this->doc->JScode=$this->doc->wrapScriptTags('
                        var path = "'.$this->target.'";
 
@@ -171,19 +173,22 @@ class SC_file_newfolder {
         */
        function main() {
                global $LANG;
         */
        function main() {
                global $LANG;
-
-                       // Make page header:
-               $this->content='';
+               
+                       // start content compilation
                $this->content.=$this->doc->startPage($LANG->sL('LLL:EXT:lang/locallang_core.php:file_newfolder.php.pagetitle'));
                $this->content.=$this->doc->startPage($LANG->sL('LLL:EXT:lang/locallang_core.php:file_newfolder.php.pagetitle'));
-               $this->content.=$this->doc->header($LANG->sL('LLL:EXT:lang/locallang_core.php:file_newfolder.php.pagetitle'));
-               $this->content.=$this->doc->spacer(5);
-               $this->content.=$this->doc->section('',$this->doc->getFileheader($this->title,$this->shortPath,$this->icon));
-               $this->content.=$this->doc->divider(5);
+               
+               
+                       // Make page header:
+               $pageContent='';
+               $pageContent.=$this->doc->header($LANG->sL('LLL:EXT:lang/locallang_core.php:file_newfolder.php.pagetitle'));
+               $pageContent.=$this->doc->spacer(5);
+               $pageContent.=$this->doc->divider(5);
 
 
 
 
+               $code = '<form action="tce_file.php" method="post" name="editform">';
                        // Making the selector box for the number of concurrent folder-creations
                $this->number = t3lib_div::intInRange($this->number,1,10);
                        // Making the selector box for the number of concurrent folder-creations
                $this->number = t3lib_div::intInRange($this->number,1,10);
-               $code='
+               $code .= '
                        <div id="c-select">
                                <select name="number" onchange="reload(this.options[this.selectedIndex].value);">';
                for ($a=1;$a<=$this->folderNumber;$a++) {
                        <div id="c-select">
                                <select name="number" onchange="reload(this.options[this.selectedIndex].value);">';
                for ($a=1;$a<=$this->folderNumber;$a++) {
@@ -221,16 +226,16 @@ class SC_file_newfolder {
                        // CSH:
                $code.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'file_newfolder', $GLOBALS['BACK_PATH'],'<br/>');
 
                        // CSH:
                $code.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'file_newfolder', $GLOBALS['BACK_PATH'],'<br/>');
 
-               $this->content.= $this->doc->section('',$code);
+               $pageContent.= $code;
 
 
 
                        // Add spacer:
 
 
 
                        // Add spacer:
-               $this->content.= $this->doc->spacer(10);
+               $pageContent.= $this->doc->spacer(10);
 
                        // Switching form tags:
 
                        // Switching form tags:
-               $this->content.= $this->doc->sectionEnd();
-               $this->content.= '</form><form action="tce_file.php" method="post" name="editform2">';
+               $pageContent.= $this->doc->sectionEnd();
+               $pageContent.= '</form><form action="tce_file.php" method="post" name="editform2">';
 
                        // Add form fields for creation of a new, blank text file:
                $code='
 
                        // Add form fields for creation of a new, blank text file:
                $code='
@@ -252,10 +257,22 @@ class SC_file_newfolder {
 
                        // CSH:
                $code.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'file_newfile', $GLOBALS['BACK_PATH'],'<br/>');
 
                        // CSH:
                $code.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'file_newfile', $GLOBALS['BACK_PATH'],'<br/>');
+               $pageContent.= $this->doc->section($LANG->sL('LLL:EXT:lang/locallang_core.php:file_newfolder.php.newfile'),$code);
+
+               $docHeaderButtons = array();
 
                        // Add the HTML as a section:
 
                        // Add the HTML as a section:
-               $this->content.= $this->doc->section($LANG->sL('LLL:EXT:lang/locallang_core.php:file_newfolder.php.newfile'),$code);
+               $markerArray = array(
+                       'CSH' => $docHeaderButtons['csh'],
+                       'FUNC_MENU' => t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']),
+                       'CONTENT' => $pageContent,
+                       'PATH' => $this->title,
+               );      
+
+               $this->content.= $this->doc->moduleBody(array(), $docHeaderButtons, $markerArray);      
+               $this->content.= $this->doc->endPage();
 
 
+               $this->content = $this->doc->insertStylesAndJS($this->content);
        }
 
        /**
        }
 
        /**
@@ -264,8 +281,6 @@ class SC_file_newfolder {
         * @return      void
         */
        function printContent() {
         * @return      void
         */
        function printContent() {
-               $this->content.= $this->doc->endPage();
-               $this->content = $this->doc->insertStylesAndJS($this->content);
                echo $this->content;
        }
 }
                echo $this->content;
        }
 }
index af399dc..3b8f014 100755 (executable)
@@ -53,7 +53,7 @@ $BACK_PATH = '';
 require('init.php');
 require('template.php');
 require_once(PATH_t3lib.'class.t3lib_basicfilefunc.php');
 require('init.php');
 require('template.php');
 require_once(PATH_t3lib.'class.t3lib_basicfilefunc.php');
-
+require_once(PATH_t3lib.'class.t3lib_parsehtml.php');
 
 
 
 
 
 
@@ -134,17 +134,19 @@ class SC_file_rename {
                        default:                $this->icon = 'gfx/i/_icon_ftp.gif';    break;
                }
 
                        default:                $this->icon = 'gfx/i/_icon_ftp.gif';    break;
                }
 
+               $this->icon = '<img'.t3lib_iconWorks::skinImg($this->backPath,$this->icon,'width="18" height="16"').' title="" alt="" />';
+
                        // Relative path to filemount, $key:
                $this->shortPath = substr($this->target,strlen($GLOBALS['FILEMOUNTS'][$key]['path']));
 
                        // Setting title:
                        // Relative path to filemount, $key:
                $this->shortPath = substr($this->target,strlen($GLOBALS['FILEMOUNTS'][$key]['path']));
 
                        // Setting title:
-               $this->title = $GLOBALS['FILEMOUNTS'][$key]['name'].': '.$this->shortPath;
+               $this->title = $this->icon.$GLOBALS['FILEMOUNTS'][$key]['name'].': '.$this->shortPath;
 
                        // Setting template object
 
                        // Setting template object
-               $this->doc = t3lib_div::makeInstance('smallDoc');
+               $this->doc = t3lib_div::makeInstance('template');
                $this->doc->docType = 'xhtml_trans';
                $this->doc->docType = 'xhtml_trans';
+               $this->doc->setModuleTemplate('templates/file_rename.html');
                $this->doc->backPath = $BACK_PATH;
                $this->doc->backPath = $BACK_PATH;
-               $this->doc->form='<form action="tce_file.php" method="post" name="editform">';
                $this->doc->JScode=$this->doc->wrapScriptTags('
                        function backToList()   {       //
                                top.goToModule("file_list");
                $this->doc->JScode=$this->doc->wrapScriptTags('
                        function backToList()   {       //
                                top.goToModule("file_list");
@@ -161,16 +163,16 @@ class SC_file_rename {
                global $LANG;
 
                        // Make page header:
                global $LANG;
 
                        // Make page header:
-               $this->content='';
-               $this->content.=$this->doc->startPage($LANG->sL('LLL:EXT:lang/locallang_core.php:file_rename.php.pagetitle'));
-               $this->content.=$this->doc->header($LANG->sL('LLL:EXT:lang/locallang_core.php:file_rename.php.pagetitle'));
-               $this->content.=$this->doc->spacer(5);
-               $this->content.=$this->doc->section('',$this->doc->getFileheader($this->title,$this->shortPath,$this->icon));
-               $this->content.=$this->doc->divider(5);
+               $this->content = $this->doc->startPage($LANG->sL('LLL:EXT:lang/locallang_core.php:file_rename.php.pagetitle'));
+
+               $pageContent = $this->doc->header($LANG->sL('LLL:EXT:lang/locallang_core.php:file_rename.php.pagetitle'));
+               $pageContent .= $this->doc->spacer(5);
+               $pageContent .= $this->doc->divider(5);
 
 
 
 
+               $code = '<form action="tce_file.php" method="post" name="editform">';
                        // Making the formfields for renaming:
                        // Making the formfields for renaming:
-               $code='
+               $code .= '
 
                        <div id="c-rename">
                                <input type="text" name="file[rename][0][data]" value="'.htmlspecialchars(basename($this->shortPath)).'"'.$GLOBALS['TBE_TEMPLATE']->formWidth(20).' />
 
                        <div id="c-rename">
                                <input type="text" name="file[rename][0][data]" value="'.htmlspecialchars(basename($this->shortPath)).'"'.$GLOBALS['TBE_TEMPLATE']->formWidth(20).' />
@@ -187,12 +189,24 @@ class SC_file_rename {
                        </div>
                ';
 
                        </div>
                ';
 
-                       // CSH:
-               $code.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'file_rename', $GLOBALS['BACK_PATH'],'<br/>');
 
                        // Add the HTML as a section:
 
                        // Add the HTML as a section:
-               $this->content.= $this->doc->section('',$code);
+               $pageContent .= $code;
 
 
+               $docHeaderButtons = array();
+               $docHeaderButtons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'file_rename', $GLOBALS['BACK_PATH']);
+
+                       // Add the HTML as a section:
+               $markerArray = array(
+                       'CSH' => $docHeaderButtons['csh'],
+                       'FUNC_MENU' => t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']),
+                       'CONTENT' => $pageContent,
+                       'PATH' => $this->title,
+               );
+               
+               $this->content.= $this->doc->moduleBody(array(), $docHeaderButtons, $markerArray);
+               $this->content.= $this->doc->endPage();
+               $this->content = $this->doc->insertStylesAndJS($this->content);
        }
 
        /**
        }
 
        /**
@@ -201,8 +215,6 @@ class SC_file_rename {
         * @return      void
         */
        function printContent() {
         * @return      void
         */
        function printContent() {
-               $this->content.= $this->doc->endPage();
-               $this->content = $this->doc->insertStylesAndJS($this->content);
                echo $this->content;
        }
 }
                echo $this->content;
        }
 }
index c5c89c2..9130308 100755 (executable)
@@ -54,7 +54,7 @@ require('init.php');
 require('template.php');
 $LANG->includeLLFile('EXT:lang/locallang_misc.xml');
 require_once(PATH_t3lib.'class.t3lib_basicfilefunc.php');
 require('template.php');
 $LANG->includeLLFile('EXT:lang/locallang_misc.xml');
 require_once(PATH_t3lib.'class.t3lib_basicfilefunc.php');
-
+require_once(PATH_t3lib.'class.t3lib_parsehtml.php');
 
 
 
 
 
 
@@ -145,17 +145,19 @@ class SC_file_upload {
                        default:                $this->icon = 'gfx/i/_icon_ftp.gif';    break;
                }
 
                        default:                $this->icon = 'gfx/i/_icon_ftp.gif';    break;
                }
 
+               $this->icon = '<img'.t3lib_iconWorks::skinImg($this->backPath,$this->icon,'width="18" height="16"').' title="" alt="" />';
+               
                        // Relative path to filemount, $key:
                $this->shortPath = substr($this->target,strlen($GLOBALS['FILEMOUNTS'][$key]['path']));
 
                        // Setting title:
                        // Relative path to filemount, $key:
                $this->shortPath = substr($this->target,strlen($GLOBALS['FILEMOUNTS'][$key]['path']));
 
                        // Setting title:
-               $this->title = $GLOBALS['FILEMOUNTS'][$key]['name'].': '.$this->shortPath;
+               $this->title = $this->icon.$GLOBALS['FILEMOUNTS'][$key]['name'].': '.$this->shortPath;
 
                        // Setting template object
 
                        // Setting template object
-               $this->doc = t3lib_div::makeInstance('smallDoc');
+               $this->doc = t3lib_div::makeInstance('template');
                $this->doc->docType = 'xhtml_trans';
                $this->doc->docType = 'xhtml_trans';
+               $this->doc->setModuleTemplate('templates/file_upload.html');
                $this->doc->backPath = $BACK_PATH;
                $this->doc->backPath = $BACK_PATH;
-               $this->doc->form='<form action="tce_file.php" method="post" name="editform" enctype="'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'].'">';
 
                if($GLOBALS['BE_USER']->jsConfirmation(1))      {
                        $confirm = ' && confirm('.$LANG->JScharCode($LANG->sL('LLL:EXT:lang/locallang_core.php:mess.redraw')).')';
 
                if($GLOBALS['BE_USER']->jsConfirmation(1))      {
                        $confirm = ' && confirm('.$LANG->JScharCode($LANG->sL('LLL:EXT:lang/locallang_core.php:mess.redraw')).')';
@@ -187,17 +189,17 @@ class SC_file_upload {
                global $LANG;
 
                        // Make page header:
                global $LANG;
 
                        // Make page header:
-               $this->content='';
-               $this->content.=$this->doc->startPage($LANG->sL('LLL:EXT:lang/locallang_core.php:file_upload.php.pagetitle'));
-               $this->content.=$this->doc->header($LANG->sL('LLL:EXT:lang/locallang_core.php:file_upload.php.pagetitle'));
-               $this->content.=$this->doc->spacer(5);
-               $this->content.=$this->doc->section('',$this->doc->getFileheader($this->title,$this->shortPath,$this->icon));
-               $this->content.=$this->doc->divider(5);
+               $this->content = $this->doc->startPage($LANG->sL('LLL:EXT:lang/locallang_core.php:file_upload.php.pagetitle'));
+
+               $pageContent.=$this->doc->header($LANG->sL('LLL:EXT:lang/locallang_core.php:file_upload.php.pagetitle'));
+               $pageContent.=$this->doc->spacer(5);
+               $pageContent.=$this->doc->divider(5);
 
 
 
 
+               $code = '<form action="tce_file.php" method="post" name="editform" enctype="'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'].'">';
                        // Making the selector box for the number of concurrent uploads
                $this->number = t3lib_div::intInRange($this->number,1,10);
                        // Making the selector box for the number of concurrent uploads
                $this->number = t3lib_div::intInRange($this->number,1,10);
-               $code='
+               $code .= '
                        <div id="c-select">
                                <select name="number" onchange="reload(this.options[this.selectedIndex].value);">';
                for ($a=1;$a<=$this->uploadNumber;$a++) {
                        <div id="c-select">
                                <select name="number" onchange="reload(this.options[this.selectedIndex].value);">';
                for ($a=1;$a<=$this->uploadNumber;$a++) {
@@ -245,7 +247,21 @@ class SC_file_upload {
                $code.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'file_upload', $GLOBALS['BACK_PATH'],'<br/>');
 
                        // Add the HTML as a section:
                $code.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'file_upload', $GLOBALS['BACK_PATH'],'<br/>');
 
                        // Add the HTML as a section:
-               $this->content.= $this->doc->section('',$code);
+               $pageContent.= $this->doc->section('',$code);
+               
+               $docHeaderButtons = array();
+
+                       // Add the HTML as a section:
+               $markerArray = array(
+                       'CSH' => $docHeaderButtons['csh'],
+                       'FUNC_MENU' => t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']),
+                       'CONTENT' => $pageContent,
+                       'PATH' => $this->title,
+               );
+               
+               $this->content.= $this->doc->moduleBody(array(), $docHeaderButtons, $markerArray);
+               $this->content.= $this->doc->endPage();
+               $this->content = $this->doc->insertStylesAndJS($this->content);
        }
 
        /**
        }
 
        /**
@@ -254,8 +270,6 @@ class SC_file_upload {
         * @return      void
         */
        function printContent() {
         * @return      void
         */
        function printContent() {
-               $this->content.= $this->doc->endPage();
-               $this->content = $this->doc->insertStylesAndJS($this->content);
                echo $this->content;
        }
 }
                echo $this->content;
        }
 }
index 9df0efc..b8f48d7 100755 (executable)
@@ -149,6 +149,8 @@ body#typo3-pagetree {
 }
 
 
 }
 
 
+/* Set body styles for Filelist module */
+BODY#typo3-file-newfolder-php, BODY#typo3-file-list-php, BODY#typo3-file-edit-php, BODY#typo3-file-rename-php, BODY#typo3-file-upload-php { margin: 0;}
 
 /****************************************
  * SPECIFIC WRAPPERS
 
 /****************************************
  * SPECIFIC WRAPPERS
diff --git a/typo3/templates/file_edit.html b/typo3/templates/file_edit.html
new file mode 100644 (file)
index 0000000..42faff7
--- /dev/null
@@ -0,0 +1,33 @@
+<!-- ###FULLDOC### begin -->
+<div class="typo3-fullDoc">
+       <!-- Page header with buttons, path details and csh -->
+       <div id="typo3-docheader">
+               <div id="typo3-docheader-row1">
+                       <div class="buttonsleft">###BUTTONLIST_LEFT###</div>
+                       <div class="buttonsright">###BUTTONLIST_RIGHT######FUNC_MENU###</div>
+               </div>
+               <div id="typo3-docheader-row2">
+                       <div class="pagepath">###CSH###&nbsp;###PATH###</div>
+                       <div class="infooptions"></div>
+               </div>
+       </div>
+       <!-- Content of module, for instance listing, info or editing -->
+       <div id="typo3-docbody">
+               ###CONTENT###
+       </div>
+</div>
+<!-- ###FULLDOC### end -->
+
+<!-- Grouping the icons on top -->
+
+<!-- ###BUTTON_GROUP_WRAP### -->
+       <div class="buttongroup">###BUTTONS###</div>
+<!-- ###BUTTON_GROUP_WRAP### -->
+
+<!-- ###BUTTON_GROUPS_LEFT### -->
+<!-- ###BUTTON_GROUP4### -->###SAVE######SAVE_CLOSE######CANCEL###<!-- ###BUTTON_GROUP4### -->
+<!-- ###BUTTON_GROUPS_LEFT### -->
+
+<!-- ###BUTTON_GROUPS_RIGHT### -->
+<!-- ###BUTTON_GROUP1### -->###SHORTCUT###<!-- ###BUTTON_GROUP1### -->
+<!-- ###BUTTON_GROUPS_RIGHT### -->
\ No newline at end of file
diff --git a/typo3/templates/file_list.html b/typo3/templates/file_list.html
new file mode 100644 (file)
index 0000000..c7b6d2d
--- /dev/null
@@ -0,0 +1,33 @@
+<!-- ###FULLDOC### begin -->
+<div class="typo3-fullDoc">
+       <!-- Page header with buttons, path details and csh -->
+       <div id="typo3-docheader">
+               <div id="typo3-docheader-row1">
+                       <div class="buttonsleft">###BUTTONLIST_LEFT###</div>
+                       <div class="buttonsright">###BUTTONLIST_RIGHT######FUNC_MENU###</div>
+               </div>
+               <div id="typo3-docheader-row2">
+                       <div class="pagepath">###CSH######TITLE###</div>
+                       <div class="infooptions">###FOLDER_INFO###&nbsp;###PAGE_ICON###</div>
+               </div>
+       </div>
+       <!-- Content of module, for instance listing, info or editing -->
+       <div id="typo3-docbody">
+               ###CONTENT###
+       </div>
+</div>
+<!-- ###FULLDOC### end -->
+
+<!-- Grouping the icons on top -->
+
+<!-- ###BUTTON_GROUP_WRAP### -->
+       <div class="buttongroup">###BUTTONS###</div>
+<!-- ###BUTTON_GROUP_WRAP### -->
+
+<!-- ###BUTTON_GROUPS_LEFT### -->
+<!-- ###BUTTON_GROUP4### -->###UPLOAD######NEW###<!-- ###BUTTON_GROUP4### -->
+<!-- ###BUTTON_GROUPS_LEFT### -->
+
+<!-- ###BUTTON_GROUPS_RIGHT### -->
+<!-- ###BUTTON_GROUP1### -->###REFRESH######LEVEL_UP######SHORTCUT###<!-- ###BUTTON_GROUP1### -->
+<!-- ###BUTTON_GROUPS_RIGHT### -->
\ No newline at end of file
diff --git a/typo3/templates/file_newfolder.html b/typo3/templates/file_newfolder.html
new file mode 100644 (file)
index 0000000..278ae1f
--- /dev/null
@@ -0,0 +1,33 @@
+<!-- ###FULLDOC### begin -->
+<div class="typo3-fullDoc">
+       <!-- Page header with buttons, path details and csh -->
+       <div id="typo3-docheader">
+               <div id="typo3-docheader-row1">
+                       <div class="buttonsleft">###BUTTONLIST_LEFT###</div>
+                       <div class="buttonsright">###BUTTONLIST_RIGHT######FUNC_MENU###</div>
+               </div>
+               <div id="typo3-docheader-row2">
+                       <div class="pagepath">###PATH###</div>
+                       <div class="infooptions"></div>
+               </div>
+       </div>
+       <!-- Content of module, for instance listing, info or editing -->
+       <div id="typo3-docbody">
+               ###CONTENT###
+       </div>
+</div>
+<!-- ###FULLDOC### end -->
+
+<!-- Grouping the icons on top -->
+
+<!-- ###BUTTON_GROUP_WRAP### -->
+       <div class="buttongroup">###BUTTONS###</div>
+<!-- ###BUTTON_GROUP_WRAP### -->
+
+<!-- ###BUTTON_GROUPS_LEFT### -->
+<!-- ###BUTTON_GROUP4### --><!-- ###BUTTON_GROUP4### -->
+<!-- ###BUTTON_GROUPS_LEFT### -->
+
+<!-- ###BUTTON_GROUPS_RIGHT### -->
+<!-- ###BUTTON_GROUP1### --><!-- ###BUTTON_GROUP1### -->
+<!-- ###BUTTON_GROUPS_RIGHT### -->
\ No newline at end of file
diff --git a/typo3/templates/file_rename.html b/typo3/templates/file_rename.html
new file mode 100644 (file)
index 0000000..56cdc18
--- /dev/null
@@ -0,0 +1,33 @@
+<!-- ###FULLDOC### begin -->
+<div class="typo3-fullDoc">
+       <!-- Page header with buttons, path details and csh -->
+       <div id="typo3-docheader">
+               <div id="typo3-docheader-row1">
+                       <div class="buttonsleft">###BUTTONLIST_LEFT###</div>
+                       <div class="buttonsright">###BUTTONLIST_RIGHT######FUNC_MENU###</div>
+               </div>
+               <div id="typo3-docheader-row2">
+                       <div class="pagepath">###CSH###&nbsp;###PATH###</div>
+                       <div class="infooptions"></div>
+               </div>
+       </div>
+       <!-- Content of module, for instance listing, info or editing -->
+       <div id="typo3-docbody">
+               ###CONTENT###
+       </div>
+</div>
+<!-- ###FULLDOC### end -->
+
+<!-- Grouping the icons on top -->
+
+<!-- ###BUTTON_GROUP_WRAP### -->
+       <div class="buttongroup">###BUTTONS###</div>
+<!-- ###BUTTON_GROUP_WRAP### -->
+
+<!-- ###BUTTON_GROUPS_LEFT### -->
+<!-- ###BUTTON_GROUP4### --><!-- ###BUTTON_GROUP4### -->
+<!-- ###BUTTON_GROUPS_LEFT### -->
+
+<!-- ###BUTTON_GROUPS_RIGHT### -->
+<!-- ###BUTTON_GROUP1### --><!-- ###BUTTON_GROUP1### -->
+<!-- ###BUTTON_GROUPS_RIGHT### -->
\ No newline at end of file
diff --git a/typo3/templates/file_upload.html b/typo3/templates/file_upload.html
new file mode 100644 (file)
index 0000000..278ae1f
--- /dev/null
@@ -0,0 +1,33 @@
+<!-- ###FULLDOC### begin -->
+<div class="typo3-fullDoc">
+       <!-- Page header with buttons, path details and csh -->
+       <div id="typo3-docheader">
+               <div id="typo3-docheader-row1">
+                       <div class="buttonsleft">###BUTTONLIST_LEFT###</div>
+                       <div class="buttonsright">###BUTTONLIST_RIGHT######FUNC_MENU###</div>
+               </div>
+               <div id="typo3-docheader-row2">
+                       <div class="pagepath">###PATH###</div>
+                       <div class="infooptions"></div>
+               </div>
+       </div>
+       <!-- Content of module, for instance listing, info or editing -->
+       <div id="typo3-docbody">
+               ###CONTENT###
+       </div>
+</div>
+<!-- ###FULLDOC### end -->
+
+<!-- Grouping the icons on top -->
+
+<!-- ###BUTTON_GROUP_WRAP### -->
+       <div class="buttongroup">###BUTTONS###</div>
+<!-- ###BUTTON_GROUP_WRAP### -->
+
+<!-- ###BUTTON_GROUPS_LEFT### -->
+<!-- ###BUTTON_GROUP4### --><!-- ###BUTTON_GROUP4### -->
+<!-- ###BUTTON_GROUPS_LEFT### -->
+
+<!-- ###BUTTON_GROUPS_RIGHT### -->
+<!-- ###BUTTON_GROUP1### --><!-- ###BUTTON_GROUP1### -->
+<!-- ###BUTTON_GROUPS_RIGHT### -->
\ No newline at end of file