~quam-plures-core/quam-plures/bug-614012

« back to all changes in this revision

Viewing changes to qp_inc/files/views/_file_browse.view.php

  • Committer: yabs at org
  • Author(s): EdB
  • Date: 2010-08-03 12:42:45 UTC
  • mfrom: (7509.1.22 files_attachments_popups)
  • Revision ID: yabs@innervisions.org.uk-20100803124245-pqqjqklgz9rd8ede
Meged file attachments popups branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
 * @var Item
64
64
 */
65
65
global $edited_Item;
 
66
 
 
67
$popfor = param( 'popfor', 'string', '' );
 
68
 
66
69
?>
67
70
 
68
71
<!-- FILE BROWSER -->
69
72
 
70
73
<?php
71
 
        $Widget = new Widget( 'file_browser' );
 
74
$Widget = new Widget( 'file_browser' );
 
75
 
 
76
if( $popfor == '' )
 
77
{ // this is not a popup so offer the upload page
72
78
        $Widget->global_icon( T_('Upload...'), 'upload', regenerate_url( 'ctrl', 'ctrl=upload' ), T_('Upload').' &raquo;', 1, 5 );
73
 
 
74
 
        if( !empty($edited_Item) )
75
 
        { // Return to post editing:
76
 
                $Widget->global_icon( T_('Close file manager'), 'close', '?ctrl=items&amp;p='.$edited_Item->ID );
77
 
        }
78
 
 
79
 
        $Widget->title = get_manual_link('file-browser').T_('File browser');
80
 
        $Widget->disp_template_replaced( 'block_start' );
 
79
}
 
80
else
 
81
{ // or offer to close the popup
 
82
        $Widget->global_icon( T_('Close file manager'), 'close', 'javascript:window.close();', T_('Close file manager'), 3, 3, array( 'class'=>'action_icon highlight') );
 
83
}
 
84
 
 
85
$Widget->title = get_manual_link('file-browser').T_('File browser');
 
86
$Widget->disp_template_replaced( 'block_start' );
81
87
?>
82
88
 
83
89
<table id="fm_browser" cellspacing="0" cellpadding="0">
267
273
        <tbody>
268
274
                <tr>
269
275
                        <?php
270
 
                                // ______________________________ Directory tree ______________________________
271
 
                                if( ! $fm_hide_dirtree )
 
276
                        // ______________________________ Directory tree ______________________________
 
277
                        if( ! $fm_hide_dirtree )
 
278
                        {
 
279
                                echo '<td id="fm_dirtree">';
 
280
 
 
281
                                // Version with all roots displayed
 
282
                                //echo get_directory_tree( NULL, NULL, $ads_list_path );
 
283
 
 
284
                                // Version with only the current root displayed:
 
285
                                echo get_directory_tree( $fm_Filelist->_FileRoot, $fm_Filelist->_FileRoot->ads_path, $ads_list_path );
 
286
 
 
287
                                echo '</td>';
 
288
                        }
 
289
 
 
290
                        echo '<td id="fm_files">';
 
291
                        // ______________________________ Files ______________________________
 
292
 
 
293
                        require dirname(__FILE__).'/_file_list.inc.php';
 
294
 
 
295
                        // ______________________________ Toolbars ______________________________
 
296
                        echo '<div id="fileman_toolbars_bottom">';
 
297
 
 
298
                        /*
 
299
                         * CREATE FILE/FOLDER TOOLBAR:
 
300
                         */
 
301
                        if( ($Settings->get( 'fm_enable_create_dir' ) || $Settings->get( 'fm_enable_create_file' ))
 
302
                                                && $current_User->check_perm( 'files', 'add' ) )
 
303
                        { // dir or file creation is enabled and we're allowed to add files:
 
304
                                global $create_type;
 
305
 
 
306
                                if( $popfor == '' )
272
307
                                {
273
 
                                        echo '<td id="fm_dirtree">';
274
 
 
275
 
                                        // Version with all roots displayed
276
 
                                        //echo get_directory_tree( NULL, NULL, $ads_list_path );
277
 
 
278
 
                                        // Version with only the current root displayed:
279
 
                                        echo get_directory_tree( $fm_Filelist->_FileRoot, $fm_Filelist->_FileRoot->ads_path, $ads_list_path );
280
 
 
281
 
                                        echo '</td>';
282
 
                                }
283
 
 
284
 
                                echo '<td id="fm_files">';
285
 
                                // ______________________________ Files ______________________________
286
 
 
287
 
                                require dirname(__FILE__).'/_file_list.inc.php';
288
 
 
289
 
                                // ______________________________ Toolbars ______________________________
290
 
                                echo '<div id="fileman_toolbars_bottom">';
291
 
 
292
 
                                /*
293
 
                                 * CREATE FILE/FOLDER TOOLBAR:
294
 
                                 */
295
 
                                if( ($Settings->get( 'fm_enable_create_dir' ) || $Settings->get( 'fm_enable_create_file' ))
296
 
                                                        && $current_User->check_perm( 'files', 'add' ) )
297
 
                                { // dir or file creation is enabled and we're allowed to add files:
298
 
                                        global $create_type;
299
 
 
300
308
                                        echo '<div class="toolbaritem">';
301
309
                                        $Form = new Form( NULL, 'fmbar_create_checkchanges', 'post', 'none' );
302
310
                                        $Form->begin_form();
343
351
                                        $Form->end_form();
344
352
                                        echo '</div>';
345
353
                                }
 
354
                        }
346
355
 
347
356
 
348
357
                                /*