Add object for results details
This commit is contained in:
@@ -5,7 +5,9 @@ namespace LeafWeb.WebCms.Controllers
|
||||
{
|
||||
public const int ManageQueue = 1107;
|
||||
public const int Chart = 1100;
|
||||
public const int Details = 1111;
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public const int Details_Admin = 1111;
|
||||
public const int Details_Results = 0;
|
||||
public const int PasswordResetRequest = 1164;
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace LeafWeb.WebCms.Controllers
|
||||
RedirectToUmbracoPage(LeafWebPageIds.ManageQueue);
|
||||
}
|
||||
|
||||
var viewModel = new LeafInputDetails(leafInput);
|
||||
var viewModel = new LeafInputDetails_Admin(leafInput);
|
||||
return View(viewModel);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace LeafWeb.WebCms.Controllers
|
||||
{
|
||||
public class ResultsController : BaseController
|
||||
{
|
||||
//[MemberAuthorize(AllowGroup = "Authenticated")]
|
||||
[MemberAuthorize(AllowGroup = "Authenticated")]
|
||||
public ActionResult Index(LeafDataQuery query)
|
||||
{
|
||||
var resultItems =
|
||||
@@ -29,7 +29,7 @@ namespace LeafWeb.WebCms.Controllers
|
||||
}
|
||||
|
||||
|
||||
//[MemberAuthorize(AllowGroup = "Authenticated")]
|
||||
[MemberAuthorize(AllowGroup = "Authenticated")]
|
||||
[HttpPost]
|
||||
public ActionResult Search(LeafDataQuery query)
|
||||
{
|
||||
@@ -41,6 +41,21 @@ namespace LeafWeb.WebCms.Controllers
|
||||
return RedirectToCurrentUmbracoPage(query.GetNameValueCollection());
|
||||
}
|
||||
|
||||
public ActionResult Details(int id)
|
||||
{
|
||||
var leafInput = DataService.GetLeafInput(id);
|
||||
|
||||
if (leafInput == null)
|
||||
{
|
||||
SetStatusMessage($"LeafInput '${id}' not found, may have been deleted?");
|
||||
RedirectToUmbracoPage(LeafWebPageIds.ManageQueue);
|
||||
}
|
||||
|
||||
var viewModel = new LeafInputDetails_Admin(leafInput);
|
||||
return View(viewModel);
|
||||
}
|
||||
|
||||
|
||||
public ActionResult Recent()
|
||||
{
|
||||
var dateThreshold = DateTime.Today.Subtract(TimeSpan.FromDays(90));
|
||||
|
||||
Reference in New Issue
Block a user