Ignore:
Timestamp:
08/29/24 20:27:21 (3 months ago)
Author:
ElenaMoskova <elena.moskova99@…>
Branches:
main
Children:
99d0ecc
Parents:
a850333
Message:

fix issues

fix bugs with nested tables
fix delete nested fk items

File:
1 edited

Legend:

Unmodified
Added
Removed
  • PostgreSqlDotnetCore/Views/Blog/Details.cshtml

    ra850333 re90ba32  
    7777
    7878                <td>
    79                     @Html.ActionLink("Edit", "Edit", "BlogPostAnswers", new { id = item.id }) |
    80                     @Html.ActionLink("Details", "Details", "BlogPostAnswers", new { id = item.id }) |
    81                     @Html.ActionLink("Delete", "Delete", "BlogPostAnswers", new { id = item.id })
    82 
     79                 
     80                    @Html.ActionLink("Details", "Details", "BlogPostAnswers", new { id = item.id })
    8381                    @Html.ActionLink("Create an Answer", "Create", "BlogPostAnswers", new { id = item.BlogPostConsultationid, parentId = item.id })
    8482                </td>
     83
     84                @if (item.usersid == ViewBag.CurrentUserId)
     85
     86                {
     87                    <td>
     88                       
     89                        @Html.ActionLink("Edit", "Edit", "BlogPostAnswers", new { id = item.id })
     90                        @Html.ActionLink("Delete", "Delete", "BlogPostAnswers", new { id = item.id })
     91                       
     92
     93                    </td>
     94                }
     95
     96
    8597            </tr>
    8698        }
     
    90102<p>
    91103    @Html.ActionLink("Create an Answer", "Create", "BlogPostAnswers", new { id = Model.id, parentId = Model.id })
    92     @Html.ActionLink("Edit", "Edit", new { id = Model.id }) |
    93104    @Html.ActionLink("Back to List", "Index")
    94105</p>
     106
     107
     108@if (Model.users_id == ViewBag.CurrentUserId)
     109
     110{
     111    <p>
     112        @Html.ActionLink("Edit", "Edit", new { id = Model.id })
     113       
     114
     115    </p>
     116}
Note: See TracChangeset for help on using the changeset viewer.