showing entries of timeline instead of a json blob, tweaking other UI bits
This commit is contained in:
parent
15c0345c79
commit
168b2d24eb
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,3 +8,4 @@
|
||||
|
||||
TwitterPractice/TwitterPractice/bin
|
||||
TwitterPractice/bin/EntityFramework.xml
|
||||
App_Data
|
||||
|
@ -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"];
|
||||
|
@ -1,14 +1,29 @@
|
||||
@{ViewBag.Title = "Home Page";}
|
||||
@using Newtonsoft.Json.Linq;
|
||||
@{ViewBag.Title = "Home Page";}
|
||||
|
||||
<h2>@ViewBag.Message</h2>
|
||||
@if (ViewBag.HasQsVars)
|
||||
{
|
||||
<h3>Request Variables:</h3>
|
||||
<ul>
|
||||
@foreach(string key in ViewBag.QueryString) {
|
||||
@foreach (string key in ViewBag.QueryString)
|
||||
{
|
||||
<li>@key = @ViewBag.QueryString[key]</li>
|
||||
}
|
||||
</ul>
|
||||
|
||||
}
|
||||
|
||||
<div id="user-timeline">
|
||||
<h4>user timeline for @ViewBag.Username</h4>
|
||||
<pre>@ViewBag.UserTimeline</pre>
|
||||
|
||||
<ul id="timeline-entries">
|
||||
@foreach (JObject entry in ViewBag.UserTimeline)
|
||||
{
|
||||
<li class="timeline-entry">
|
||||
@entry["text"]
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
|
||||
<!-- @ViewBag.UserTimeline -->
|
||||
</div>
|
@ -11,7 +11,7 @@
|
||||
<div class="page">
|
||||
<header>
|
||||
<div id="title">
|
||||
<h1>Twitter Practice</h1>
|
||||
<h1>@ViewBag.Title</h1>
|
||||
</div>
|
||||
<div id="logindisplay">
|
||||
@Html.Partial("_LogOnPartial")
|
||||
|
Loading…
Reference in New Issue
Block a user