我有一些标签: <div class="page-tabs"> <ul class="nav nav-tabs"> <li class='@(ViewBag.IsAmendment == "0" ? "active" : "")'> <a href='@Url.Action("ReviewDetails", "SongsManagement")' title="Original">Original</a> </li> @if (!Model.OriginalWork.IsNew) { <li class='@(ViewBag.IsAmendment == "1" ? "active" : "")'> <a href='@Url.Action("ReviewDetails", "SongsManagement",new {isAmendment=1} )' title="Amendment">Active Amendment</a> </li>} </ul></div>当前显示的是 Original,然后如果 DB 中的 IsNew 发生更改,则显示 Active。有没有办法可以隐藏原始选项卡。然后在有有效修订时将其与原件一起展示?
1 回答
catspeake
TA贡献1111条经验 获得超0个赞
<div class="page-tabs">
<ul class="nav nav-tabs">
@if (!Model.OriginalWork.IsNew)
{
if(ViewBag.IsAmendment == "1")
{
<li>
<a href='@Url.Action("ReviewDetails", "SongsManagement")' title="Original">Original</a>
</li>
}
<li class='@(ViewBag.IsAmendment == "1" ? "active" : "")'>
<a href='@Url.Action("ReviewDetails", "SongsManagement",new {isAmendment=1} )' title="Amendment">Active Amendment</a>
</li>
}
</ul>
</div>
- 1 回答
- 0 关注
- 176 浏览
添加回答
举报
0/150
提交
取消