YNICTE/BO/Views/cc/memoview.cshtml

89 lines
3.5 KiB
Plaintext
Raw Permalink Normal View History

2020-10-12 14:39:23 +09:00
@model NP.Model.VMCC
@{
Layout = "~/Views/Shared/_PopupLayout.cshtml";
}
<section class="panel panel-default">
<div class="table-responsive">
<table class="table b-t b-light viewtable">
<colgroup>
<col width="150" />
<col />
</colgroup>
<tbody id="tbody1">
<tr style="@("R".Equals(Model.sendorrcv)?"":"display: none;")">
<th width="100">보낸사람</th>
<td>@Model.Memo.cnoname @Model.Memo.cdtymdbrhms</td>
</tr>
<tr style="@("R".Equals(Model.sendorrcv)?"display: none;":"")">
<th width="100">받는사람</th>
<td><ul>@Html.Raw(string.Join("", Model.Memos.Select(s => string.Format("<li>-{0} {1} {2}</li>", s.username, s.isread > 0 ? "열람" : "미열람", s.rdatetext))))</ul></td>
</tr>
<tr>
<th width="100">시간</th>
<td>@Model.Memo.cdtymdhms</td>
</tr>
<tr><th width="100">제목</th><td><ul>@Model.Memo.mtitle</ul></td></tr>
<tr><th width="100">내용</th><td style="white-space: pre-wrap">@Html.Raw(Model.Memo.mcontents.Replace(System.Environment.NewLine, "<br />"))</td></tr>
<tr style="@(Model.FileList == null || Model.FileList.Count() < 1 ? "display: none;":"")">
<th width="100">첨부파일</th>
<td>
@Html.Partial("./Partial/File", Model.FileList, new ViewDataDictionary {
{ "name", "fgno" },{"value", 0 },{ "fname", "file"},
{"width", null },{"folder", "Resume" },{"filecount", 5 },
{"readmode", 1 },{"hidemode", 0 },
{ "isimage", 0 },{ "imageid", "" },{ "dftsrc", "" },
{ "fileext", "" }
})
</td>
</tr>
</tbody>
</table>
</div>
</section>
<div class="text-center">
@if ("R".Equals(Model.sendorrcv))
{
<a href="#" class="btn btn-primary" onclick="save(1);">답장</a>
}
<a href="#" class="btn btn-danger" onclick="save(0);">삭제</a>
&nbsp;
<a href="#" class="btn btn-default" onclick="closethis()">닫기</a>
</div>
<style type="text/css">
#tbody1 tr td ul{max-height: 150px; line-height: 22px; overflow: auto; }
</style>
@section scriptsHeader{
}
@section scripts{
<script>
function save(idx) {
if (idx == 0) {
if (confirm("삭제하시겠습니까?")) {
capp("/acommon/delmemo", { sendrcv: '@Model.sendorrcv', mnos: @Model.Memo.mno.ToString()}, "cbdel");
}
}
else {
location.href="/cc/memosend?mno=@(Model.mno)";
}
}
function cbdel() {
if (capResult.code == 1000) {
msg("삭제되었습니다.");
msgthis(500);
}
}
function msgthis(t) {
$("a.mainokbutton,a.mainokbutton2").hide();
setTimeout(function () {
parent.submitnew(null, 1, true);
}, t);
}
function closethis() {
if ('@Model.sendorrcv' == "R") {
msgthis(1);
}
parent.hideframemainlayer();
}
</script>
}