Ignore:
Timestamp:
08/23/24 03:03:32 (5 weeks ago)
Author:
ElenaMoskova <elena.moskova99@…>
Branches:
main
Children:
118e414
Parents:
57fc402
Message:

Providing access

Providing access to various functionalities

File:
1 edited

Legend:

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

    r57fc402 r72b1da2  
    4545        </th>
    4646
    47         <td>
     47       @*<td>
    4848            @Html.ActionLink("Edit", "Edit", new { id = item.id }) |
    4949            @Html.ActionLink("Answers", "Details", new { id = item.id }) |
    5050            @Html.ActionLink("Delete", "Delete", new { id = item.id })
    5151        </td>
     52        *@
     53           
     54
     55
     56
     57              @if (item.users_id == ViewBag.CurrentUserId)
     58              {
     59              <td>
     60            @Html.ActionLink("Edit", "Edit", new { id = item.id })
     61            @Html.ActionLink("Delete", "Delete", new { id = item.id })
     62             
     63        </td>
     64            }
     65
     66           
     67
     68            @if (item.users_id == ViewBag.CurrentUserId || item.users_id != ViewBag.CurrentUserId)
     69            {
     70                <td>
     71                   
     72                    @Html.ActionLink("Answers", "Details", new { id = item.id })
     73                   
     74
     75                </td>
     76            }
     77           
     78
     79
     80           
     81       
     82           
    5283    </tr>
    5384}
Note: See TracChangeset for help on using the changeset viewer.