Permalink
Browse files

Add search and redirect to correct search page according to the type.

  • Loading branch information...
1 parent adb3697 commit 8e7eb2cf8e0f4cd716388604b12c9800a13d45bc @agriffard agriffard committed May 27, 2016
Showing with 3 additions and 1 deletion.
  1. +3 −1 Views/Package/Index.cshtml
@@ -2,6 +2,8 @@
IEnumerable<object> searchResults = Model.ContentItems;
Model.ContentItems.Classes.Add("content-items");
+ Layout.NavBar.Add(New.SearchForm(), "6");
+
string packageType = string.Empty;
if (Model.Type == "Module") {
packageType = "Modules";
@@ -12,7 +14,7 @@
}
<div class="pull-right">
- <form action="@Url.Content("~/Packages/Modules")" method="get" class="form-group form-inline">
+ <form action="@Url.Content("~/Packages/" + packageType)" method="get" class="form-group form-inline">
@*<input type="text" name="q" class="form-control" placeholder="Search @packageType" value="@Request.QueryString["q"]">
<input type="submit" class="btn btn-primary" value="@T("Search")">*@
<label class="control-label">@T("Sort")</label>

0 comments on commit 8e7eb2c

Please sign in to comment.