Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 2 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
View
18 JoMAR/Controllers/RoomsController.cs
@@ -38,13 +38,13 @@ public ActionResult PublicRooms()
public ActionResult edit(string returnUrl)
{
- JodADataContext db = new JodADataContext();
- ChatRoom room = (from p in db.ChatRooms
- where p.Name == Url.RequestContext.RouteData.Values.Last().Value
- select p).First();
-
+
+ JodADataContext db = new JodADataContext();
+ ChatRoom room = (from p in db.ChatRooms
+ where p.Name == Url.RequestContext.RouteData.Values.Last().Value
+ select p).First();
- return View(room);
+ return View(room);
}
public ActionResult create()
@@ -57,14 +57,11 @@ public ActionResult create()
return View(rooms);
}
-
- }
-
[HttpPost]
public ActionResult create(ChatRoom model, string returnUrl)
{
JodADataContext db = new JodADataContext();
-
+
if (ModelState.IsValid)
{
@@ -76,6 +73,7 @@ public ActionResult create(ChatRoom model, string returnUrl)
return RedirectToRoute(new { controller = "Chat", id = model.Name });
}
return View(model);
+ }
public ActionResult MyRooms()
{
View
8 JoMAR/Views/Rooms/About.cshtml
@@ -4,5 +4,11 @@
<h2>About</h2>
<p>
- Put content here.
+ Site is developed by:
+
+ <br /><br />- Jon Martin Mikalsen
+ <br />- Alexander Wold
+ <br />- Runar Ingebrigtsen
+
+ <br /><br />Altså: JoMAR
</p>
View
16 JoMAR/Views/Rooms/MyRooms.cshtml
@@ -4,8 +4,7 @@
ViewBag.Title = "MyRooms";
Layout = "~/Views/Shared/_Layout.cshtml";
}
-
-<h2>MyRooms</h2>
+<h2>My Rooms</h2>
<table>
<tr>
<th>
@@ -21,8 +20,8 @@
</tr>
@foreach (var item in Model)
-{
- if(item.aspnet_User.UserName.Equals(User.Identity.Name))
+{
+ if (item.aspnet_User.UserName.Equals(User.Identity.Name))
{
<tr>
<td>
@@ -40,14 +39,7 @@
</td>
</tr>
}
- else if(!item.aspnet_User.UserName.Equals(User.Identity.Name))
- {
- <tr>
- <td>
- No Rooms
- </td>
- </tr>
- }
}
</table>
+
View
2 JoMAR/Views/Shared/_Layout.cshtml
@@ -23,7 +23,7 @@
<li>@Html.ActionLink("Public Rooms", "PublicRooms", "Rooms")</li>
@if(Request.IsAuthenticated) {
<li>@Html.ActionLink("My Rooms", "MyRooms", "Rooms")</li>
- <li>@Html.ActionLink("Profile", "Profile", "User")</li>
+ <li>@Html.ActionLink("Profile", "Profile", "Rooms")</li>
}
<li>@Html.ActionLink("About", "About", "Rooms")</li>
</ul>

No commit comments for this range

Something went wrong with that request. Please try again.