file-browser.html 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. {if $type=='image'}
  2. <div class="clearfix file-browser">
  3. <style type="text/css">
  4. .modal-dialog .file-browser .breadcrumb i{ font-size:1em;}
  5. </style>
  6. <ol class="breadcrumb">
  7. <li><a herf="javascript:;" onclick="imageBrowser.browser('');"><i class="fa fa-home">&nbsp;</i></a></li>
  8. {if empty($option['global'])}
  9. {if $year}
  10. <li><a herf="javascript:;" onclick="imageBrowser.browser('images/{$_W['uniacid']}/{$year}');">{$year}</a></li>
  11. {/if}
  12. {if $month}
  13. <li><a herf="javascript:;" onclick="imageBrowser.browser('images/{$_W['uniacid']}/{$year}/{$month}');">{$month}</a></li>
  14. {/if}
  15. {/if}
  16. </ol>
  17. {loop $files $file}
  18. {if $file['is_dir']}
  19. {if $file['filename'] == '..'}
  20. {if empty($_GPC['path']) || ($_GPC['path'] == 'images/'.$_W['uniacid']) || !empty($option['global'])}
  21. {else}
  22. <div title="上一级" onclick="{$callback}.browser('{php echo $parentbrowser;}');" class="thumbnail">
  23. <i class="fa fa-folder"></i>
  24. <span class="text-center">{$file['filename']}</span>
  25. </div>
  26. {/if}
  27. {else}
  28. <div title="{$file['filename']}" onclick="{$callback}.browser('{php echo $browser.'/'.$file['filename'];}');" class="thumbnail">
  29. <i class="fa fa-folder"></i>
  30. <span class="text-center">{$file['filename']}</span>
  31. </div>
  32. {/if}
  33. {else}
  34. <div title="{$file['filename']}" class="thumbnail{if $currentimage==$file['filename']} active{/if}">
  35. <em><img src="{$file['url']}" onclick="{$callback}.select({$file['entry']});" class="img-responsive"></em>
  36. <span class="text-center">{$file['filename']}</span>
  37. {if empty($option['global']) || (!empty($option['global']) && $_W['isfounder'])}
  38. <em class="close" title="删除这张图片" onclick="{$callback}.delete('{$file['attachment']}');return false;">×</em>
  39. {/if}
  40. </div>
  41. {/if}
  42. {/loop}
  43. </div>
  44. {else}
  45. <div class="clearfix file-browser">
  46. <style type="text/css">
  47. .modal-dialog .file-browser .breadcrumb i{ font-size:1em;}
  48. </style>
  49. <ol class="breadcrumb"></ol>
  50. {loop $files $file}
  51. {if $file['is_dir']}
  52. {if $file['filename'] == '..'}
  53. <div title="上一级" onclick="{$callback}.browser('{php echo str_replace('\\', '/', dirname($path));}');" class="thumbnail">
  54. {else}
  55. <div title="{$file['filename']}" onclick="{$callback}.browser('{$path}{$file['filename']}');" class="thumbnail">
  56. {/if}
  57. <i class="fa fa-folder"></i>
  58. <span class="text-center">{$file['filename']}</span>
  59. </div>
  60. {else}
  61. <div title="{$file['filename']}" class="thumbnail">
  62. <em><img src="./resource/images/nopic.jpg" onclick="{$callback}.select({$file['entry']});" class="img-responsive"></em>
  63. <span class="text-center">{$file['filename']}</span>
  64. <em class="close" title="删除这首音乐" onclick="{$callback}.delete('{$file['attachment']}', '{$path}');return false;">×</em>
  65. </div>
  66. {/if}
  67. {/loop}
  68. </div>
  69. {/if}