Dotclear


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/media.php

    r1760 r1855  
    328328      
    329329     '<p class="pagination">'.__('Page(s)').' : '.$pager->getLinks().'</p>'; 
    330       
    331      for ($i=$pager->index_start, $j=0; $i<=$pager->index_end; $i++, $j++) 
     330 
     331     $dgroup = ''; 
     332     $fgroup = ''; 
     333     for ($i=$pager->index_start, $j=0; $i<=$pager->index_end; $i++,$j++) 
    332334     { 
    333           echo mediaItemLine($items[$i],$j); 
    334      } 
     335          if ($items[$i]->d) { 
     336               $dgroup .= mediaItemLine($items[$i],$j); 
     337          } else { 
     338               $fgroup .= mediaItemLine($items[$i],$j); 
     339          } 
     340     } 
     341     echo  
     342          ($dgroup != '' ? '<div class="folders-group">'.$dgroup.'</div>' : ''). 
     343          ($fgroup != '' ? '<div class="files-group">'.$fgroup.'</div>' : ''); 
    335344      
    336345     echo 
     
    361370     '<h4>'.__('Add files').'</h4>'. 
    362371     '<p>'.__('Please take care to publish media that you own and that are not protected by copyright.').'</p>'. 
    363      '<p class="max-sizer form-note info">&nbsp;'.__('Maximum file size allowed:').' '.files::size(DC_MAX_UPLOAD_SIZE).'</p>'. 
    364372     '<form id="fileupload" action="'.html::escapeURL($page_url).'" method="post" enctype="multipart/form-data" aria-disabled="false">'. 
    365373     '<p>'.form::hidden(array('MAX_FILE_SIZE'),DC_MAX_UPLOAD_SIZE). 
     
    372380     echo 
    373381     '<p><label for="upfile">'.'<span class="add-label one-file">'.__('Choose file').'</span>'.'</label>'. 
    374      '<button class="button add">'.__('Choose files').'</button>'. 
     382     '<button class="button choose_files">'.__('Choose files').'</button>'. 
    375383     '<input type="file" id="upfile" name="upfile[]"'.($user_ui_enhanceduploader?' multiple="mutiple"':'').' data-url="'.html::escapeURL($page_url).'" /></p>'; 
     384 
     385     echo 
     386     '<p class="max-sizer form-note">&nbsp;'.__('Maximum file size allowed:').' '.files::size(DC_MAX_UPLOAD_SIZE).'</p>'; 
    376387 
    377388     echo 
     
    379390     '<p class="one-file"><label for="upfilepriv" class="classic">'.__('Private').'</label> '. 
    380391     form::checkbox(array('upfilepriv','upfilepriv'),1).'</p>'; 
     392 
     393 
    381394 
    382395     if (!$user_ui_enhanceduploader) { 
     
    454467     $fname = $f->basename; 
    455468      
     469     $class = 'media-item media-col-'.($i%2); 
     470      
    456471     if ($f->d) { 
    457472          $link = html::escapeURL($page_url).'&amp;d='.html::sanitizeURL($f->relname); 
    458473          if ($f->parent) { 
    459474               $fname = '..'; 
     475               $class .= ' media-folder-up'; 
     476          } else { 
     477               $class .= ' media-folder'; 
    460478          } 
    461479     } else { 
     
    464482     } 
    465483      
    466      $class = 'media-item media-col-'.($i%2); 
    467       
    468484     $res = 
    469      '<div class="'.$class.'"><a class="media-icon media-link" href="'.$link.'">'. 
    470      '<img src="'.$f->media_icon.'" alt="" /></a>'. 
    471      '<ul>'. 
    472      '<li><a class="media-link" href="'.$link.'">'.$fname.'</a></li>'; 
     485     '<div class="'.$class.'"><p><a class="media-icon media-link" href="'.$link.'">'. 
     486     '<img src="'.$f->media_icon.'" alt="" />'.$fname.'</a></p>'; 
     487 
     488     $lst = ''; 
    473489      
    474490     if (!$f->d) { 
    475           $res .= 
     491          $lst .= 
    476492          '<li>'.$f->media_title.'</li>'. 
    477493          '<li>'. 
     
    482498     } 
    483499      
    484      $res .= '<li class="media-action">&nbsp;'; 
     500     $act = ''; 
    485501      
    486502     if ($post_id && !$f->d) { 
    487           $res .= '<form action="post_media.php" method="post">'. 
     503          $act .=  
     504          '<form action="post_media.php" method="post">'. 
    488505          '<input type="image" src="images/plus.png" alt="'.__('Attach this file to entry').'" '. 
    489506          'title="'.__('Attach this file to entry').'" /> '. 
     
    496513      
    497514     if ($popup && !$f->d) { 
    498           $res .= '<a href="'.$link.'"><img src="images/plus.png" alt="'.__('Insert this file into entry').'" '. 
     515          $act .= '<a href="'.$link.'"><img src="images/plus.png" alt="'.__('Insert this file into entry').'" '. 
    499516          'title="'.__('Insert this file into entry').'" /></a> '; 
    500517     } 
    501518      
    502519     if ($f->del) { 
    503           $res .= '<a class="media-remove" '. 
     520          $act .= '<a class="media-remove" '. 
    504521          'href="'.html::escapeURL($page_url).'&amp;d='. 
    505522          rawurlencode($GLOBALS['d']).'&amp;remove='.rawurlencode($f->basename).'">'. 
     
    507524     } 
    508525      
    509      $res .= '</li>'; 
     526     $lst .= ($act != '' ? '<li class="media-action">&nbsp;'.$act.'</li>' : ''); 
    510527      
    511528     if ($f->type == 'audio/mpeg3') { 
    512           $res .= '<li>'.dcMedia::mp3player($f->file_url,'index.php?pf=player_mp3.swf').'</li>'; 
    513      } 
    514       
    515      $res .= '</ul></div>'; 
     529          $lst .= '<li>'.dcMedia::mp3player($f->file_url,'index.php?pf=player_mp3.swf').'</li>'; 
     530     } 
     531      
     532     $res .=   ($lst != '' ? '<ul>'.$lst.'</ul>' : ''); 
     533 
     534     $res .= '</div>'; 
    516535      
    517536     return $res; 
Note: See TracChangeset for help on using the changeset viewer.

Sites map