#18844: Fixing exception when previewing an empty query

Work Item: 18844

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2012-09-21 16:06:49 -07:00
parent 411a9f24a2
commit 2c33262cf4
2 changed files with 7 additions and 3 deletions

View File

@@ -109,7 +109,9 @@
<fieldset>
@Html.ActionLink(T("Preview").ToString(), "Preview", new { Model.Id }, new { @class = "button" })
@if(Model.FilterGroups.SelectMany(x => x.Filters).Any()) {
@Html.ActionLink(T("Preview").ToString(), "Preview", new { Model.Id }, new { @class = "button" });
}
@Html.ActionLink(T("Close").ToString(), "Index", new { }, new { @class = "button" })
</fieldset>

View File

@@ -63,8 +63,10 @@
<td>
@Html.ActionLink(T("Properties").ToString(), "Edit", new { Area = "Contents", id = entry.QueryId, returnurl = HttpContext.Current.Request.RawUrl }) |
@Html.ActionLink(T("Edit").ToString(), "Edit", new { id = entry.QueryId }) |
@Html.ActionLink(T("Delete").ToString(), "Delete", new { id = entry.QueryId }, new { itemprop = "RemoveUrl UnsafeUrl" }) |
@Html.ActionLink(T("Preview").ToString(), "Preview", new { id = entry.QueryId })
@Html.ActionLink(T("Delete").ToString(), "Delete", new { id = entry.QueryId }, new { itemprop = "RemoveUrl UnsafeUrl" })
@if (entry.Query.FilterGroups.SelectMany(x => x.Filters).Any()) {
<text>| </text> @Html.ActionLink(T("Preview").ToString(), "Preview", new { id = entry.QueryId })
}
</td>
</tr>
index++;