Commits

Anonymous committed 3997fd0

Adding favicon & title.

Comments (1)

Files changed (6)

HamOntFire.Web/Content/favicon.ico

Binary file added.

HamOntFire.Web/Controllers/HomeController.cs

 using System.Web.Mvc;
 using HamOntFire.Core;
 using HamOntFire.Core.Domain;
-using Raven.Client;
 
 namespace HamOntFire.Web.Controllers
 {
         // GET: /Home/
         public ActionResult Index()
         {
+            ViewBag.Title = "Home";
             return View();
         }
 
 
         public ActionResult About()
         {
+            ViewBag.Title = "About";
             return View();
         }
     }
 
-    public abstract class RavenController : Controller
-    {
-        public IDocumentSession RavenSession { get; protected set; }
-
-        protected override void OnActionExecuting(ActionExecutingContext filterContext)
-        {
-            RavenSession = MvcApplication.Store.OpenSession();
-        }
-
-        protected override void OnActionExecuted(ActionExecutedContext filterContext)
-        {
-            if (filterContext.IsChildAction)
-                return;
-
-            using (RavenSession)
-            {
-                if (filterContext.Exception != null)
-                    return;
-
-                if (RavenSession != null)
-                    RavenSession.SaveChanges();
-            }
-        }
-    }
-
     public class LogEvent : WebRequestErrorEvent
     {
         public LogEvent(string message) : base(null, null, 100001, new Exception(message))

HamOntFire.Web/Controllers/RavenController.cs

+using System.Web.Mvc;
+using Raven.Client;
+
+namespace HamOntFire.Web.Controllers
+{
+    public abstract class RavenController : Controller
+    {
+        public IDocumentSession RavenSession { get; protected set; }
+
+        protected override void OnActionExecuting(ActionExecutingContext filterContext)
+        {
+            RavenSession = MvcApplication.Store.OpenSession();
+        }
+
+        protected override void OnActionExecuted(ActionExecutedContext filterContext)
+        {
+            if (filterContext.IsChildAction)
+                return;
+
+            using (RavenSession)
+            {
+                if (filterContext.Exception != null)
+                    return;
+
+                if (RavenSession != null)
+                    RavenSession.SaveChanges();
+            }
+        }
+    }
+}

HamOntFire.Web/Controllers/StatisticsController.cs

-using System;
-using System.Collections.Generic;
+using System.Collections.Generic;
 using System.Drawing.Imaging;
 using System.IO;
 using System.Linq;
-using System.Web;
 using System.Web.Mvc;
 using System.Web.Script.Serialization;
 using System.Web.UI;
         // GET: /Statistics/
         public ActionResult Index()
         {
+            ViewBag.Title = "Stats";
+
             var vm = new StatisticsViewModel();
 
             // Event Count by Event Type

HamOntFire.Web/HamOntFire.Web.csproj

   <ItemGroup>
     <Compile Include="App_Start\RegisterHubs.cs" />
     <Compile Include="Controllers\HomeController.cs" />
+    <Compile Include="Controllers\RavenController.cs" />
     <Compile Include="Controllers\StatisticsController.cs" />
     <Compile Include="Global.asax.cs">
       <DependentUpon>Global.asax</DependentUpon>
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
   <ItemGroup>
+    <Content Include="Content\favicon.ico" />
     <Content Include="Global.asax" />
     <Content Include="Content\Site.css" />
     <Content Include="Scripts\jquery.signalR-1.0.0-rc1.js" />

HamOntFire.Web/Views/Shared/_Layout.cshtml

 <html>
 <head>
     <meta charset="utf-8" />
-    <title>@ViewBag.Title</title>
+    <title>HamOntFire | @ViewBag.Title</title>
     <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
+    <link href="@Url.Content("~/Content/favicon.ico")" rel="shortcut icon"/>
     <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript"></script>
     <script src="//maps.googleapis.com/maps/api/js?sensor=false&libraries=places" type="text/javascript"></script>
     <script src="//code.highcharts.com/highcharts.js" type="text/javascript"></script>