Permalink
Browse files

Start on css/layout

  • Loading branch information...
ehelin committed May 29, 2018
1 parent 1dd6960 commit 6d36bd496d2f5e374c73a0a7e0cc5977ef75f5a8
@@ -1,57 +1,59 @@
@model LocationModel
@{
ViewData["Title"] = "Location Details";
}
@{bool modelLocationNameExists = Model != null && !string.IsNullOrEmpty(Model.LocationName);}
@{bool modelLocationIdExists = Model != null && Model.LocationiId > 0;}
@{bool modelLocationDetailsIdExists = Model != null && Model.LocationDetails != null && Model.LocationDetails.LocationDetailId > 0;}
@{bool modelWeatherExists = Model != null && Model.LocationDetails != null && !string.IsNullOrEmpty(Model.LocationDetails.Weather);}
@{bool modelPeopleExists = Model != null && Model.LocationDetails != null && !string.IsNullOrEmpty(Model.LocationDetails.People);}
@{bool modelFoodExists = Model != null && Model.LocationDetails != null && Model.LocationDetails != null && !string.IsNullOrEmpty(Model.LocationDetails.Food);}
@{ Html.RenderPartial("Title"); }
@if (Model.isEdit || Model.isNew)
{
@using (Html.BeginForm("DetailsPost", "Location", FormMethod.Post))
<div id="pageTitle">
<p>Location Details</p>
</div>
<div id="pageBodyDetailForm">
@{bool modelLocationNameExists = Model != null && !string.IsNullOrEmpty(Model.LocationName);}
@{bool modelLocationIdExists = Model != null && Model.LocationiId > 0;}
@{bool modelLocationDetailsIdExists = Model != null && Model.LocationDetails != null && Model.LocationDetails.LocationDetailId > 0;}
@{bool modelWeatherExists = Model != null && Model.LocationDetails != null && !string.IsNullOrEmpty(Model.LocationDetails.Weather);}
@{bool modelPeopleExists = Model != null && Model.LocationDetails != null && !string.IsNullOrEmpty(Model.LocationDetails.People);}
@{bool modelFoodExists = Model != null && Model.LocationDetails != null && Model.LocationDetails != null && !string.IsNullOrEmpty(Model.LocationDetails.Food);}
@if (Model.isEdit || Model.isNew)
{
<p>Location Details</p>
<label>Location Name</label>
@Html.TextBox("Model.LocationName", modelLocationNameExists ? Model.LocationName : null)
<br />
<label>Weather</label>
@Html.TextBox("Model.LocationDetails.Weather", modelWeatherExists ? Model.LocationDetails.Weather : null)
<br />
<label>People</label>
@Html.TextBox("Model.LocationDetails.People", modelPeopleExists ? Model.LocationDetails.People : null)
<br />
<label>Food</label>
@Html.TextBox("Model.LocationDetails.Food", modelFoodExists ? Model.LocationDetails.Food : null)
<br />
<input type="submit" value="Submit" />
@Html.Hidden("Model.LocationiId", modelLocationIdExists ? Model.LocationiId : 0);
@Html.Hidden("Model.LocationDetails.LocationDetailId", modelLocationDetailsIdExists ? Model.LocationDetails.LocationDetailId : 0);
@Html.Hidden("Model.isEdit", Model.isEdit);
@using (Html.BeginForm("DetailsPost", "Location", FormMethod.Post))
{
<label>Location Name</label>
@Html.TextBox("Model.LocationName", modelLocationNameExists ? Model.LocationName : null)
<br />
<label>Weather</label>
@Html.TextBox("Model.LocationDetails.Weather", modelWeatherExists ? Model.LocationDetails.Weather : null)
<br />
<label>People</label>
@Html.TextBox("Model.LocationDetails.People", modelPeopleExists ? Model.LocationDetails.People : null)
<br />
<label>Food</label>
@Html.TextBox("Model.LocationDetails.Food", modelFoodExists ? Model.LocationDetails.Food : null)
<br />
<input type="submit" value="Submit" />
@Html.Hidden("Model.LocationiId", modelLocationIdExists ? Model.LocationiId : 0);
@Html.Hidden("Model.LocationDetails.LocationDetailId", modelLocationDetailsIdExists ? Model.LocationDetails.LocationDetailId : 0);
@Html.Hidden("Model.isEdit", Model.isEdit);
}
}
}
else
{
@using (Html.BeginForm("DetailsPost", "Location", FormMethod.Post))
else
{
<p>Location Details</p>
<label>Location Name:&nbsp;</label>
@Html.Label("Model.LocationName", Model.LocationName)
<br />
<label>Weather:&nbsp;</label>
@Html.Label("Model.LocationDetails.Weather", Model.LocationDetails.Weather)
<br />
<label>People:&nbsp;</label>
@Html.Label("Model.LocationDetails.People", Model.LocationDetails.People)
<br />
<label>Food:&nbsp;</label>
@Html.Label("Model.LocationDetails.Food", Model.LocationDetails.Food)
<br />
@using (Html.BeginForm("DetailsPost", "Location", FormMethod.Post))
{
<label>Location Name:&nbsp;</label>
@Html.Label("Model.LocationName", Model.LocationName)
<br />
<label>Weather:&nbsp;</label>
@Html.Label("Model.LocationDetails.Weather", Model.LocationDetails.Weather)
<br />
<label>People:&nbsp;</label>
@Html.Label("Model.LocationDetails.People", Model.LocationDetails.People)
<br />
<label>Food:&nbsp;</label>
@Html.Label("Model.LocationDetails.Food", Model.LocationDetails.Food)
<br />
}
}
}
<br />
<br />
@Html.ActionLink("Summary", "Index", "Location")
</div>
<div id="pageNavigation">
@Html.ActionLink("Summary", "Index", "Location")
</div>
@@ -1,18 +1,23 @@
@model LocationsModel
@{
ViewData["Title"] = "Location Summary";
}
<p>Location Summary</p>
<ul>
@foreach (LocationModel location in Model.Locations)
{
<li>
<input type="button" value="Edit" onclick="location.href='@Url.Action("Details", "Location", new { id = @location.LocationiId, isEdit = true, isDelete = false })';" />
<input type="button" value="Delete" onclick="location.href='@Url.Action("Delete", "Location", new { id = @location.LocationiId })';" />
@Html.ActionLink(location.LocationName, "Details", "Location", new { id = @location.LocationiId }, null)
</li>
}
</ul>
<input type="button" value="New" onclick="location.href='@Url.Action("Details", "Location", new { id = 0, isEdit = false, isDelete = false })';" />
@{ Html.RenderPartial("Title"); }
<div id="pageTitle">
<p>Location Summary</p>
</div>
<div id="pageBodyList">
<ul>
@foreach (LocationModel location in Model.Locations)
{
<li>
<input type="button" value="Edit" onclick="location.href='@Url.Action("Details", "Location", new { id = @location.LocationiId, isEdit = true, isDelete = false })';" />
<input type="button" value="Delete" onclick="location.href='@Url.Action("Delete", "Location", new { id = @location.LocationiId })';" />
@Html.ActionLink(location.LocationName, "Details", "Location", new { id = @location.LocationiId }, null)
</li>
}
</ul>
</div>
<div id="pageNavigation">
<input type="button" value="New" onclick="location.href='@Url.Action("Details", "Location", new { id = 0, isEdit = false, isDelete = false })';" />
</div>
@@ -0,0 +1,6 @@
@{
ViewData["Title"] = "The Awesome Location Manager' (TALM)";
}
<h2>The Awesome Location Manager (TALM)</h2>
@@ -15,7 +15,6 @@
</ItemGroup>
<ItemGroup>
<Folder Include="wwwroot\css\" />
<Folder Include="wwwroot\images\" />
<Folder Include="wwwroot\js\" />
<Folder Include="wwwroot\lib\" />
@@ -0,0 +1 @@

0 comments on commit 6d36bd4

Please sign in to comment.