@{
    ViewBag.Title = "filelist";
    Layout = "~/Views/Shared/_Layout_noframe.cshtml";
    List<string> list = ViewBag.list as List<string>;
}
@section header{
    <script type="text/javascript" src="@Url.Content("~/Scripts/common.js")"></script>
    <script type="text/javascript">
        jQuery(function ($) {
            function choose(obj) {
                window.opener.CKEDITOR.tools.callFunction(@ViewBag.CKEditorFuncNum, obj)
                window.close();
            }
            $(".op").click(function(){
                var fileurl = $(this).attr("rel");
                choose(fileurl);
            });
        });
    </script>
}
@if (list.Count == 0)
{
    <div class="nv">
        <div class="nv-left" style="font-size: 14px;">
            图片目录中没有图片，请先上传。
        </div>
    </div>
}
else
{
    <div class="content">
        <table class="list-table">
            <tr>
                <th>
                    文件名
                </th>
                <th>
                    操作
                </th>
            </tr>
            @foreach (var m in list)
            {
                <tr>
                    <td style="text-align: left">
                        @m
                    </td>
                    <td>
                        <a class="op" href="#" rel="@string.Format("/upload/{0}",m)">选择</a>
                    </td>
                </tr>
            }
        </table>
        @Html.Raw(ViewBag.pagestr)
    </div>
}
