$template_filerow .= '<td class="perms"> </td>'; } if ($UserSettings->get('fm_showfsowner')) { $template_filerow .= '<td class="fsowner"> </td>'; } if ($UserSettings->get('fm_showfsgroup')) { $template_filerow .= '<td class="fsgroup"> </td>'; } $template_filerow .= '<td class="actions lastcol">'; if ($UserSettings->get('fm_showdate') == 'no') { // Display status in the last column if column with datetime is hidden $template_filerow .= '<span class="qq-upload-status">' . TS_('Uploading...') . '</span> '; } $template_filerow .= '<a class="qq-upload-cancel" href="#">' . TS_('Cancel') . '</a>' . '</td>' . '</tr></table>'; // Display a button to quick upload the files by drag&drop method display_dragdrop_upload_button(array('fileroot_ID' => $fm_FileRoot->ID, 'path' => $path, 'list_style' => 'table', 'template_filerow' => $template_filerow, 'display_support_msg' => false, 'additional_dropzone' => '#filelist_tbody', 'filename_before' => $icon_to_link_files)); ?> </td> </tr> <?php } if ($countFiles > 0) { // ------------- // Footer with "check all", "with selected: ..": // -------------- ?> <tr class="listfooter firstcol lastcol file_selector"> <td colspan="<?php echo $filetable_cols; ?> ">
$title = $current_File->dget('title'); if ($title !== '') { $r .= '<span class="filemeta"> - ' . $title . '</span>'; } return $r; } $Results->cols[] = array('th' => T_('Destination'), 'td' => '%display_link()%', 'td_class' => 'fm_filename'); $Results->cols[] = array('th' => T_('Link ID'), 'td' => '$link_ID$', 'th_class' => 'shrinkwrap', 'td_class' => 'shrinkwrap'); if ($current_User->check_perm('files', 'view', false, $Blog->ID)) { $Results->cols[] = array('th' => T_('Actions'), 'td_class' => 'shrinkwrap', 'td' => '%link_actions( #link_ID#, {ROW_IDX_TYPE}, "' . $LinkOwner->type . '" )%'); } $Results->cols[] = array('th' => T_('Position'), 'td_class' => 'shrinkwrap', 'td' => '%display_link_position( {row} )%'); // Add attr "id" to handle quick uploader $compact_results_params = $AdminUI->get_template('compact_results'); $compact_results_params['body_start'] = str_replace('<tbody', '<tbody id="filelist_tbody"', $compact_results_params['body_start']); $compact_results_params['no_results_start'] = str_replace('<tbody', '<tbody id="filelist_tbody"', $compact_results_params['no_results_start']); $Results->display($compact_results_params); // Print out JavaScript to change a link position echo_link_position_js(); if ($Results->total_pages == 0) { // If no results we should get a template of headers in order to add it on first quick upload ob_start(); $Results->display_col_headers(); $table_headers = ob_get_clean(); } else { // Headers are already on the page $table_headers = ''; } // Display a button to quick upload the files by drag&drop method display_dragdrop_upload_button(array('before' => '<div id="fileuploader_form">', 'after' => '</div>', 'fileroot_ID' => FileRoot::gen_ID('collection', $Blog->ID), 'path' => '/quick-uploads/' . ($LinkOwner->type == 'item' ? 'p' : 'c') . $LinkOwner->link_Object->ID . '/', 'list_style' => 'table', 'template_filerow' => '<table><tr>' . '<td class="firstcol shrinkwrap qq-upload-image"><span class="qq-upload-spinner"> </span></td>' . '<td class="qq-upload-file fm_filename"> </td>' . '<td class="qq-upload-link-id shrinkwrap"> </td>' . '<td class="qq-upload-link-actions shrinkwrap">' . '<div class="qq-upload-status">' . TS_('Uploading...') . '<span class="qq-upload-spinner"></span>' . '<span class="qq-upload-size"></span>' . '<a class="qq-upload-cancel" href="#">' . TS_('Cancel') . '</a>' . '</div>' . '</td>' . '<td class="qq-upload-link-position lastcol shrinkwrap"></td>' . '</tr></table>', 'display_support_msg' => false, 'additional_dropzone' => '#filelist_tbody', 'filename_before' => '', 'LinkOwner' => $LinkOwner, 'display_status_success' => false, 'status_conflict_place' => 'before_button', 'conflict_file_format' => 'full_path_link', 'resize_frame' => true, 'table_headers' => $table_headers));