From 168b2d24eb0ba208fbb1bce1c7a3549420bfb93c Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sun, 31 Jul 2011 22:38:00 -0400 Subject: [PATCH] showing entries of timeline instead of a json blob, tweaking other UI bits --- .gitignore | 1 + .../Controllers/HomeController.cs | 1 + .../TwitterPractice/Views/Home/Index.cshtml | 23 +++++++++++++++---- .../Views/Shared/_Layout.cshtml | 2 +- 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 0a224c5..a432b93 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ TwitterPractice/TwitterPractice/bin TwitterPractice/bin/EntityFramework.xml +App_Data diff --git a/TwitterPractice/TwitterPractice/Controllers/HomeController.cs b/TwitterPractice/TwitterPractice/Controllers/HomeController.cs index 0f0a034..9e0c2d8 100644 --- a/TwitterPractice/TwitterPractice/Controllers/HomeController.cs +++ b/TwitterPractice/TwitterPractice/Controllers/HomeController.cs @@ -20,6 +20,7 @@ namespace TwitterPractice.Controllers public ActionResult Index() { + ViewBag.HasQsVars = (Request.QueryString.Keys.Count > 0); ViewBag.QueryString = Request.QueryString; ViewBag.Message = title; string username = Request.QueryString["username"]; diff --git a/TwitterPractice/TwitterPractice/Views/Home/Index.cshtml b/TwitterPractice/TwitterPractice/Views/Home/Index.cshtml index b5acd75..577d7bb 100644 --- a/TwitterPractice/TwitterPractice/Views/Home/Index.cshtml +++ b/TwitterPractice/TwitterPractice/Views/Home/Index.cshtml @@ -1,14 +1,29 @@ -@{ViewBag.Title = "Home Page";} +@using Newtonsoft.Json.Linq; +@{ViewBag.Title = "Home Page";}

@ViewBag.Message

+@if (ViewBag.HasQsVars) +{

Request Variables:

- +} +

user timeline for @ViewBag.Username

-
@ViewBag.UserTimeline
+ + + +
\ No newline at end of file diff --git a/TwitterPractice/TwitterPractice/Views/Shared/_Layout.cshtml b/TwitterPractice/TwitterPractice/Views/Shared/_Layout.cshtml index 93eea4c..ef0dd5e 100644 --- a/TwitterPractice/TwitterPractice/Views/Shared/_Layout.cshtml +++ b/TwitterPractice/TwitterPractice/Views/Shared/_Layout.cshtml @@ -11,7 +11,7 @@
-

Twitter Practice

+

@ViewBag.Title

@Html.Partial("_LogOnPartial")