Skip to content

Commit

Permalink
Committing sam's changes, apparently... something is wrong here.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan@Ryan-HP authored and Ryan@Ryan-HP committed Mar 17, 2012
1 parent f6ca6a8 commit 5fbe983
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 19 deletions.
9 changes: 6 additions & 3 deletions CodeProse.Shifter/CodeProse.Shifter.csproj
Expand Up @@ -84,6 +84,7 @@
<Content Include="content\themeroller-icon-set-vector-32px.png" />
<Content Include="content\topnav.js" />
<Content Include="wireframes\assign-shifts.htm" />
<Content Include="wireframes\default.htm" />
<Content Include="wireframes\manage-shifts.htm" />
<Content Include="wireframes\view-calendar.htm" />
<Content Include="wireframes\view-shift.htm" />
Expand All @@ -95,11 +96,10 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<SubType>Designer</SubType>
</Content>
<Content Include="views\index.cshtml" />
<None Include="views\login.cshtml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Content Include="wireframes\default.htm" />
<Content Include="wireframes\home.htm" />
<Content Include="views\members.cshtml" />
<Content Include="content\fullcalendar.css" />
<Content Include="content\fullcalendar.js" />
Expand All @@ -126,9 +126,10 @@
<Compile Include="domain\Shift.cs" />
<Compile Include="domain\ShiftTime.cs" />
<Compile Include="domain\User.cs" />
<Compile Include="models\IndexModel.cs" />
<Compile Include="models\HomeModel.cs" />
<Compile Include="models\LoginModel.cs" />
<Compile Include="models\MasterModel.cs" />
<Compile Include="modules\HomeModule.cs" />
<Compile Include="modules\MembersDataModule.cs" />
<Compile Include="modules\LoginModule.cs" />
<Compile Include="modules\IndexModule.cs" />
Expand All @@ -143,6 +144,8 @@
</ItemGroup>
<ItemGroup>
<None Include="views\calendar.cshtml" />
<Content Include="views\home.cshtml" />
<Content Include="views\index.cshtml" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
Expand Down
6 changes: 2 additions & 4 deletions CodeProse.Shifter/modules/IndexModule.cs
Expand Up @@ -3,7 +3,7 @@

namespace CodeProse.Shifter.modules
{
public class IndexModule : SecureModule
public class IndexModule : NancyModule
{
public IndexModule()
{
Expand All @@ -13,9 +13,7 @@ public IndexModule()

private Response Index()
{
var model = new IndexModel();
model.UserName = Context.CurrentUser.UserName;
return View["index", model];
return View["index"];
}
}
}
7 changes: 6 additions & 1 deletion CodeProse.Shifter/modules/LoginModule.cs
Expand Up @@ -31,7 +31,12 @@ public LoginModule(IUserRepository users)
return Context.GetRedirect("~/login?error=true");
}
return this.LoginAndRedirect(userId, DateTime.Now.AddDays(7), "~/");
return this.LoginAndRedirect(userId, DateTime.Now.AddDays(7), "~/home");
};

Get["/logout"] = x =>
{
return this.LogoutAndRedirect("~/index");
};
}
}
Expand Down
2 changes: 1 addition & 1 deletion CodeProse.Shifter/modules/WireframeModule.cs
Expand Up @@ -10,7 +10,7 @@ public class WireframeModule : SecureModule
{
public WireframeModule() : base("/wireframes")
{
Get["/{page}"] = x => View["wireframes/" + x.page.ToString(), new IndexModel { UserName = Context.CurrentUser.UserName}];
Get["/{page}"] = x => View["wireframes/" + x.page.ToString(), new HomeModel { UserName = Context.CurrentUser.UserName}];
}
}
}
57 changes: 47 additions & 10 deletions CodeProse.Shifter/views/index.cshtml
@@ -1,10 +1,47 @@
@{
Layout = "layouts/base.cshtml";
}

<h1>Welcome to Shifter</h1>
@Html.Partial("partials/news-feed.cshtml")

@section Title {
<title>Welcome to Shifter!</title>
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Shifter</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
<!--<link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" />-->
<link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/sunny/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="content/base.css" />
<script type="text/javascript">
$(function () {
$("input[type=submit]").button();
});
</script>
</head>
<body>
<div id="topnav" class="ui-widget-header">
<div id="user">
<a href="login">Login</a>
</div>
<div style="clear: both;">
</div>
</div>
<div id="content">
<div style="width: 900px; margin: 0 auto">
<div id="logo">
<h2>
make your people</h2>
<h1>
shiftable</h1>
</div>
<div id="signup" class="stacked" style="float: left;">
<label for="CompanyName">
Company Name</label>
<input type="text" name="CompanyName" />
<label for="Email">
Email</label>
<input type="text" name="Email" />
<label for="Password">
Password</label>
<input type="password" name="Password" />
<input type="submit" value="Sign Up" />
</div>
</div>
</div>
</body>
</html>

0 comments on commit 5fbe983

Please sign in to comment.