Default to user only data on search page
This commit is contained in:
@@ -14,6 +14,9 @@ namespace LeafWeb.WebCms.Controllers
|
|||||||
[MemberAuthorize(AllowGroup = "Authenticated")]
|
[MemberAuthorize(AllowGroup = "Authenticated")]
|
||||||
public ActionResult Index(LeafDataQuery query)
|
public ActionResult Index(LeafDataQuery query)
|
||||||
{
|
{
|
||||||
|
if (!query.HasParameters && !TempData.ContainsKey("Posted"))
|
||||||
|
query.usr = true;
|
||||||
|
|
||||||
var resultItems =
|
var resultItems =
|
||||||
DataService.GetLeafInputsOrdered();
|
DataService.GetLeafInputsOrdered();
|
||||||
|
|
||||||
@@ -39,6 +42,8 @@ namespace LeafWeb.WebCms.Controllers
|
|||||||
return CurrentUmbracoPage();
|
return CurrentUmbracoPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TempData["Posted"] = true;
|
||||||
|
|
||||||
return RedirectToCurrentUmbracoPage(query.GetNameValueCollection());
|
return RedirectToCurrentUmbracoPage(query.GetNameValueCollection());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -76,5 +76,10 @@ namespace LeafWeb.WebCms.Models
|
|||||||
&& string.IsNullOrEmpty(phips2)
|
&& string.IsNullOrEmpty(phips2)
|
||||||
&& !compl
|
&& !compl
|
||||||
);
|
);
|
||||||
|
|
||||||
|
public bool HasParameters =>
|
||||||
|
HasExtendedParameters
|
||||||
|
|| !string.IsNullOrEmpty(q)
|
||||||
|
|| usr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user