- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/media.php
r1760 r1855 328 328 329 329 '<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++) 332 334 { 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>' : ''); 335 344 336 345 echo … … 361 370 '<h4>'.__('Add files').'</h4>'. 362 371 '<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"> '.__('Maximum file size allowed:').' '.files::size(DC_MAX_UPLOAD_SIZE).'</p>'.364 372 '<form id="fileupload" action="'.html::escapeURL($page_url).'" method="post" enctype="multipart/form-data" aria-disabled="false">'. 365 373 '<p>'.form::hidden(array('MAX_FILE_SIZE'),DC_MAX_UPLOAD_SIZE). … … 372 380 echo 373 381 '<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>'. 375 383 '<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"> '.__('Maximum file size allowed:').' '.files::size(DC_MAX_UPLOAD_SIZE).'</p>'; 376 387 377 388 echo … … 379 390 '<p class="one-file"><label for="upfilepriv" class="classic">'.__('Private').'</label> '. 380 391 form::checkbox(array('upfilepriv','upfilepriv'),1).'</p>'; 392 393 381 394 382 395 if (!$user_ui_enhanceduploader) { … … 454 467 $fname = $f->basename; 455 468 469 $class = 'media-item media-col-'.($i%2); 470 456 471 if ($f->d) { 457 472 $link = html::escapeURL($page_url).'&d='.html::sanitizeURL($f->relname); 458 473 if ($f->parent) { 459 474 $fname = '..'; 475 $class .= ' media-folder-up'; 476 } else { 477 $class .= ' media-folder'; 460 478 } 461 479 } else { … … 464 482 } 465 483 466 $class = 'media-item media-col-'.($i%2);467 468 484 $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 = ''; 473 489 474 490 if (!$f->d) { 475 $ res.=491 $lst .= 476 492 '<li>'.$f->media_title.'</li>'. 477 493 '<li>'. … … 482 498 } 483 499 484 $ res .= '<li class="media-action"> ';500 $act = ''; 485 501 486 502 if ($post_id && !$f->d) { 487 $res .= '<form action="post_media.php" method="post">'. 503 $act .= 504 '<form action="post_media.php" method="post">'. 488 505 '<input type="image" src="images/plus.png" alt="'.__('Attach this file to entry').'" '. 489 506 'title="'.__('Attach this file to entry').'" /> '. … … 496 513 497 514 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').'" '. 499 516 'title="'.__('Insert this file into entry').'" /></a> '; 500 517 } 501 518 502 519 if ($f->del) { 503 $ res.= '<a class="media-remove" '.520 $act .= '<a class="media-remove" '. 504 521 'href="'.html::escapeURL($page_url).'&d='. 505 522 rawurlencode($GLOBALS['d']).'&remove='.rawurlencode($f->basename).'">'. … … 507 524 } 508 525 509 $ res .= '</li>';526 $lst .= ($act != '' ? '<li class="media-action"> '.$act.'</li>' : ''); 510 527 511 528 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>'; 516 535 517 536 return $res;
Note: See TracChangeset
for help on using the changeset viewer.