From c6303e947704851702729b13226b361fa113d9d2 Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Wed, 29 Sep 2010 11:07:19 -0700 Subject: [PATCH] Load advisory message in dashboard - Current implementation uses a local file, publish it on orcharproject.net later --HG-- branch : dev --- src/Orchard.Web/Advisory.html | 14 ++++++++++++++ .../Dashboard/Controllers/HelperController.cs | 12 ++++++++++++ src/Orchard.Web/Core/Dashboard/Routes.cs | 15 +++++++++++++++ .../Core/Dashboard/Views/Admin/Index.cshtml | 17 +++++++++++++++++ .../Core/Dashboard/Views/Helper/Index.cshtml | 16 ++++++++++++++++ .../Views/Admin/Edit.cshtml | 2 ++ .../Themes/TheAdmin/Styles/site.css | 18 +++++++++--------- 7 files changed, 85 insertions(+), 9 deletions(-) create mode 100644 src/Orchard.Web/Advisory.html create mode 100644 src/Orchard.Web/Core/Dashboard/Controllers/HelperController.cs create mode 100644 src/Orchard.Web/Core/Dashboard/Views/Helper/Index.cshtml diff --git a/src/Orchard.Web/Advisory.html b/src/Orchard.Web/Advisory.html new file mode 100644 index 000000000..e1951380b --- /dev/null +++ b/src/Orchard.Web/Advisory.html @@ -0,0 +1,14 @@ + + + + + + + + \ No newline at end of file diff --git a/src/Orchard.Web/Core/Dashboard/Controllers/HelperController.cs b/src/Orchard.Web/Core/Dashboard/Controllers/HelperController.cs new file mode 100644 index 000000000..19afad490 --- /dev/null +++ b/src/Orchard.Web/Core/Dashboard/Controllers/HelperController.cs @@ -0,0 +1,12 @@ +using System.Web.Mvc; +using Orchard.Themes; + +namespace Orchard.Core.Dashboard.Controllers { + [Themed(false)] + public class HelperController : Controller { + + public ActionResult Index() { + return View(); + } + } +} \ No newline at end of file diff --git a/src/Orchard.Web/Core/Dashboard/Routes.cs b/src/Orchard.Web/Core/Dashboard/Routes.cs index 7662158f1..7a1929a20 100644 --- a/src/Orchard.Web/Core/Dashboard/Routes.cs +++ b/src/Orchard.Web/Core/Dashboard/Routes.cs @@ -26,6 +26,21 @@ namespace Orchard.Core.Dashboard { {"area", "Dashboard"} }, new MvcRouteHandler()) + }, + new RouteDescriptor { + Priority = -5, + Route = new Route( + "Admin/DashboardProxy", + new RouteValueDictionary { + {"area", "Dashboard"}, + {"controller", "Helper"}, + {"action", "Index"} + }, + new RouteValueDictionary(), + new RouteValueDictionary { + {"area", "Dashboard"} + }, + new MvcRouteHandler()) } }; } diff --git a/src/Orchard.Web/Core/Dashboard/Views/Admin/Index.cshtml b/src/Orchard.Web/Core/Dashboard/Views/Admin/Index.cshtml index 527adf575..bc5395e4b 100644 --- a/src/Orchard.Web/Core/Dashboard/Views/Admin/Index.cshtml +++ b/src/Orchard.Web/Core/Dashboard/Views/Admin/Index.cshtml @@ -1,5 +1,22 @@ @model dynamic + + + +

@Html.TitleForPage(T("Welcome to Orchard").ToString())

@T("This is the place where you can manage your web site, its appearance and its contents. Please take a moment to explore the different menu items on the left of the screen to familiarize yourself with the features of the application. For example, try to change the theme through the “Manage Themes” menu entry. You can also create new pages and manage existing ones through the “Manage Pages” menu entry or create blogs through “Manage Blogs”.")

@T("Have fun!")
@T("The Orchard Team")

+ + diff --git a/src/Orchard.Web/Core/Dashboard/Views/Helper/Index.cshtml b/src/Orchard.Web/Core/Dashboard/Views/Helper/Index.cshtml new file mode 100644 index 000000000..9d9ab4a85 --- /dev/null +++ b/src/Orchard.Web/Core/Dashboard/Views/Helper/Index.cshtml @@ -0,0 +1,16 @@ + + + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/Edit.cshtml b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/Edit.cshtml index 8f3f0e8b8..f9f3bf024 100644 --- a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/Edit.cshtml +++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/Edit.cshtml @@ -36,9 +36,11 @@ @using(Script.Foot()){ } \ No newline at end of file diff --git a/src/Orchard.Web/Themes/TheAdmin/Styles/site.css b/src/Orchard.Web/Themes/TheAdmin/Styles/site.css index f6906f7c5..4aabf0eba 100644 --- a/src/Orchard.Web/Themes/TheAdmin/Styles/site.css +++ b/src/Orchard.Web/Themes/TheAdmin/Styles/site.css @@ -366,14 +366,6 @@ span.message { .messages a { font-weight:bold; } -.message-Confirmation { - background:#D1F2A5; /* green */ - border:1px solid #BCD994; -} -.message-Warning { - background:#fdf5bc; /* yellow */ - border:1px solid #ffea9b; -} /* todo: (heskew) what else (other inputs) needs this? */ .critical.message, .validation-summary-errors, .input-validation-error.text-box, .input-validation-error.text { @@ -388,7 +380,15 @@ span.message { border:1px solid #cfe493; color:#062232; } -.debug.message { +.message-Warning { + background:#fdf5bc; /* yellow */ + border:1px solid #ffea9b; +} +.message-Error { + background:#e68585; /* green */ + border:1px solid #990808; + color:#fff; +}.debug.message { background:#eee; border:1px dashed #D2D6C6; color:#7a7a7a;