diff --git a/src/Orchard.Web/Orchard.Web.csproj b/src/Orchard.Web/Orchard.Web.csproj index 686df66a8..f163cd1fa 100644 --- a/src/Orchard.Web/Orchard.Web.csproj +++ b/src/Orchard.Web/Orchard.Web.csproj @@ -99,8 +99,9 @@ - + + diff --git a/src/Orchard.Web/Themes/Contoso/Styles/search.css b/src/Orchard.Web/Themes/Contoso/Styles/search.css new file mode 100644 index 000000000..6b245a330 --- /dev/null +++ b/src/Orchard.Web/Themes/Contoso/Styles/search.css @@ -0,0 +1,24 @@ +form.search { + float:left; +} +form.search input { + display:inline; + width:20em; +} +.search-summary { + float:right; + font-style:italic; + margin-top:0; +} +.search-summary em { + font-weight:bold; +} +.search-results { + clear:both; +} +/* theme modifications */ +/*- Search (Page) -*/ +.search-results { margin: 0; padding-top: 1em; } +.search-results li { list-style: none; } +.search-results h3 { margin-bottom: 0; } +.search-results .content { padding-top:0; } \ No newline at end of file diff --git a/src/Orchard.Web/Themes/Contoso/Styles/site.css b/src/Orchard.Web/Themes/Contoso/Styles/site.css index 9c10187fd..9d119314c 100644 --- a/src/Orchard.Web/Themes/Contoso/Styles/site.css +++ b/src/Orchard.Web/Themes/Contoso/Styles/site.css @@ -265,8 +265,8 @@ body { background: #f3f4f4 url('../Content/Images/bkg.jpg') repeat-x; } /*- Page Navigation -*/ -#nav { background: transparent url('../Content/Images/menu-left.png') no-repeat left top; margin: 0px 0px 20px 0px; } -#nav .menu { margin: 0px; padding: 0px; height: 40px; background: transparent url('../Content/Images/menu-right.png') no-repeat right top; } +#nav { background: transparent url('../Content/Images/menu-right.png') no-repeat right top; margin: 0px 0px 20px 0px; } +#nav .menu { margin: 0px; padding: 0px; height: 40px; width:725px; background: transparent url('../Content/Images/menu-left.png') no-repeat left top; } #nav .menu li { float:left; list-style: none; background: transparent url('../Content/Images/menu-divider.png') repeat-y right top; } #nav .menu li a { display:block; margin: 0px 2px 1px 0px; padding: 11px 39px 4px 39px; height: 24px; color: #FFF; font-size: 1.2em; text-decoration: none; text-shadow: 0px -1px 0px #535550; } #nav .menu li a:hover { background: #9dc975 url('../Content/Images/menu-hover.png') repeat-x right top; } @@ -279,7 +279,11 @@ body { background: #f3f4f4 url('../Content/Images/bkg.jpg') repeat-x; } .admin li { float:left; list-style: none; padding: 0px 0px 5px 20px; } .admin li a {} - +/*- Search -*/ +#nav .search { display: inline; float: right; height: 40px; margin: -40px 8px 0 0; } +#nav .search input { border-color: #87B7CB; } +#nav .search input, #nav .search button { font-size: 1.2em; height:17px; padding: 3px; } +#nav .search button { background: #87B7CB; border: none; color: #FFF; float: right; height:25px; line-height: 1.5em; margin:7px 0; padding: 2px 6px 5px; text-shadow: 0px -1px 0px #A6A6A6; } /*========= Footer =========*/ @@ -387,6 +391,7 @@ body { background: #f3f4f4 url('../Content/Images/bkg.jpg') repeat-x; } margin-left:.5em; padding: 3px; border: 1px solid #CCC; + list-style: none; } .content-localization .content-localizations li:hover { diff --git a/src/Orchard.Web/Themes/Contoso/Views/DisplayTemplates/Items/Contents.Item.ascx b/src/Orchard.Web/Themes/Contoso/Views/DisplayTemplates/Items/Contents.Item.ascx deleted file mode 100644 index 796b6adeb..000000000 --- a/src/Orchard.Web/Themes/Contoso/Views/DisplayTemplates/Items/Contents.Item.ascx +++ /dev/null @@ -1,8 +0,0 @@ -<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> -<%@ Import Namespace="Orchard.Security"%> -<%@ Import Namespace="Orchard.Mvc.Html"%> -<%@ Import Namespace="Orchard.Mvc.ViewModels" %> -

<%:Html.ItemDisplayText(Model.Item)%>

-<% Html.Zone("metadata"); - Html.Zone("primary", ":manage :metadata"); - Html.ZonesAny(); %> \ No newline at end of file diff --git a/src/Orchard.Web/Themes/Contoso/Views/Layout.HomePage.ascx b/src/Orchard.Web/Themes/Contoso/Views/Layout.HomePage.ascx index 2532aa48c..494490701 100644 --- a/src/Orchard.Web/Themes/Contoso/Views/Layout.HomePage.ascx +++ b/src/Orchard.Web/Themes/Contoso/Views/Layout.HomePage.ascx @@ -15,7 +15,8 @@ <%-- Main Menu --%> <%-- Home Hero --%> diff --git a/src/Orchard.Web/Themes/Contoso/Views/Layout.ascx b/src/Orchard.Web/Themes/Contoso/Views/Layout.ascx index 65b29f167..80f451d0d 100644 --- a/src/Orchard.Web/Themes/Contoso/Views/Layout.ascx +++ b/src/Orchard.Web/Themes/Contoso/Views/Layout.ascx @@ -15,7 +15,8 @@ <%-- Main Menu --%> <%-- Main Content Area --%> diff --git a/src/Orchard.Web/Themes/Contoso/Views/Orchard.Search/Search/Index.ascx b/src/Orchard.Web/Themes/Contoso/Views/Orchard.Search/Search/Index.ascx new file mode 100644 index 000000000..42d977d19 --- /dev/null +++ b/src/Orchard.Web/Themes/Contoso/Views/Orchard.Search/Search/Index.ascx @@ -0,0 +1,16 @@ +<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> +<% Html.RegisterStyle("search.css"); %> +

<%:Html.TitleForPage(T("Search").Text)%>

<% +Html.Zone("search"); +if (!string.IsNullOrWhiteSpace(Model.Query)) { + if (Model.PageOfResults.Count() == 0) { %> +

<%=T.Plural("the one result", "zero results", Model.PageOfResults.Count()) %>

<% + } + else { %> +

<%=T.Plural("the one result", "{1} - {2} of {0} results", Model.PageOfResults.TotalItemCount, Model.PageOfResults.StartPosition, Model.PageOfResults.EndPosition)%>

<% + } +} +if (Model.PageOfResults != null && Model.PageOfResults.Count() > 0) { %> +<%=Html.UnorderedList(Model.PageOfResults, (r, i) => Html.DisplayForItem(r.Content) , "search-results contentItems") %> +<%=Html.Pager(Model.PageOfResults, Model.PageOfResults.PageNumber, Model.DefaultPageSize, new {q = Model.Query}) %><% +} %> \ No newline at end of file