Default to user only data on search page
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
@@ -76,5 +76,10 @@ namespace LeafWeb.WebCms.Models
|
||||
&& string.IsNullOrEmpty(phips2)
|
||||
&& !compl
|
||||
);
|
||||
|
||||
public bool HasParameters =>
|
||||
HasExtendedParameters
|
||||
|| !string.IsNullOrEmpty(q)
|
||||
|| usr;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user