Default to user only data on search page

This commit is contained in:
2020-07-21 21:30:33 -04:00
parent cd6bd2d0e5
commit 6a18b1be58
2 changed files with 10 additions and 0 deletions
+5
View File
@@ -14,6 +14,9 @@ namespace LeafWeb.WebCms.Controllers
[MemberAuthorize(AllowGroup = "Authenticated")]
public ActionResult Index(LeafDataQuery query)
{
if (!query.HasParameters && !TempData.ContainsKey("Posted"))
query.usr = true;
var resultItems =
DataService.GetLeafInputsOrdered();
@@ -39,6 +42,8 @@ namespace LeafWeb.WebCms.Controllers
return CurrentUmbracoPage();
}
TempData["Posted"] = true;
return RedirectToCurrentUmbracoPage(query.GetNameValueCollection());
}
+5
View File
@@ -76,5 +76,10 @@ namespace LeafWeb.WebCms.Models
&& string.IsNullOrEmpty(phips2)
&& !compl
);
public bool HasParameters =>
HasExtendedParameters
|| !string.IsNullOrEmpty(q)
|| usr;
}
}