diff options
| author | Michael <[email protected]> | 2017-05-17 16:29:48 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-05-17 16:29:48 -0400 |
| commit | 4866bac3d9410799ffcc8180ccfd5e7ca3224fe4 (patch) | |
| tree | 0f9215bdee1fe06859a7c8994c0e0987b5272186 /Project-Unite/Views | |
| parent | 7e80b8ce18de4c8aaff1e8300997a2587e5a469b (diff) | |
| download | project-unite-4866bac3d9410799ffcc8180ccfd5e7ca3224fe4.tar.gz project-unite-4866bac3d9410799ffcc8180ccfd5e7ca3224fe4.tar.bz2 project-unite-4866bac3d9410799ffcc8180ccfd5e7ca3224fe4.zip | |
edit and delete buttons
Diffstat (limited to 'Project-Unite/Views')
| -rw-r--r-- | Project-Unite/Views/Forum/ViewTopic.cshtml | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Project-Unite/Views/Forum/ViewTopic.cshtml b/Project-Unite/Views/Forum/ViewTopic.cshtml index 61ef682..13a24f8 100644 --- a/Project-Unite/Views/Forum/ViewTopic.cshtml +++ b/Project-Unite/Views/Forum/ViewTopic.cshtml @@ -92,6 +92,17 @@ </div> </div> } + + @if (Request.IsAuthenticated) + { + if(User.Identity.IsModerator() || post.AuthorId == User.Identity.GetUserId()) + { + <ul class="nav nav-tabs"> + <li><a href="@Url.Action("EditPost", "Forum", new { id = post.Id })"><span class="glyphicon glyphicon-pencil"></span> Edit</a></li> + <li><a href="@Url.Action("DeletePost", "Forum", new { id = post.Id })"><span class="glyphicon glyphicon-trash"></span> Delete</a></li> + </ul> + } + } </div> </div> </div> |
