Ignore:
Timestamp:
08/28/24 21:41:13 (4 weeks ago)
Author:
ElenaMoskova <elena.moskova99@…>
Branches:
main
Children:
a850333
Parents:
118e414
Message:

Use of views

  1. Use of views in VetCenters.
  2. Ability to provide a response to a given response.
Location:
PostgreSqlDotnetCore/Views
Files:
2 added
6 edited

Legend:

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

    r118e414 re9bb9d1  
    5757
    5858            @if (item.users_id == ViewBag.CurrentUserId)
     59               
    5960            {
    6061                <td>
     
    6465                </td>
    6566            }
    66 
     67           
     68         
    6769
    6870            @if (item.users_id == ViewBag.CurrentUserId || item.users_id != ViewBag.CurrentUserId)
  • PostgreSqlDotnetCore/Views/BlogPostAnswers/Details.cshtml

    r118e414 re9bb9d1  
    2929    </dl>
    3030</div>
     31<br/>
     32@{
     33    if(Model.blogPostAnswers.Count > 0)
     34    {
     35
     36        <h4>Replay under Answers</h4>
     37        <hr />
     38        foreach (BlogPostAnswers item in Model.blogPostAnswers)
     39        {
     40
     41            <dl class="dl-horizontal">
     42                <dt>
     43                    @Html.DisplayNameFor(model => item.parent_id)
     44                </dt>
     45
     46                <dd>
     47                    @Html.DisplayFor(model => item.parent_id)
     48                </dd>
     49
     50                <dt>
     51                    @Html.DisplayNameFor(model => item.reply)
     52                </dt>
     53                <dd>
     54                    @Html.DisplayFor(model => item.reply)
     55                </dd>
     56
     57
     58            </dl>
     59        }
     60        <hr />
     61    }
     62}
    3163<p>
    3264    @Html.ActionLink("Edit", "Edit", new { id = Model.id }) |
  • PostgreSqlDotnetCore/Views/PetCares/Create.cshtml

    r118e414 re9bb9d1  
    7474        </div>
    7575
     76        <div class="form-group">
     77            <label class="control-label col-md-2" for="pet_id">UserPet:</label>
     78            <div class="col-md-10">
     79                @Html.DropDownList("pet_id", (SelectList)ViewBag.Pets, "Select Pets", new { @class = "form-control" })
     80            </div>
     81        </div>
     82
    7683
    7784    <div class="form-group">
  • PostgreSqlDotnetCore/Views/Products/Index.cshtml

    r118e414 re9bb9d1  
    108108                                    @Html.ActionLink("Details", "Details", new { id = item.id }) |
    109109                                    @Html.ActionLink("Delete", "Delete", new { id = item.id })
     110                                    @Html.ActionLink("Procedure", "Procedure", new { id = item.id })
    110111                                </div>
    111112                            }
  • PostgreSqlDotnetCore/Views/VetCenter/Details.cshtml

    r118e414 re9bb9d1  
    1 @model PostgreSqlDotnetCore.Models.VetCenter
     1@model PostgreSqlDotnetCore.Models.VetCenterWithCity
    22
    33@{
     
    55}
    66
    7 <h2>Details</h2>
     7<h2>Details for @Model.vet_center_name</h2>
    88
    9 <div>
    10     <h4>VetCenter</h4>
    11     <hr />
    12     <dl class="dl-horizontal">
    13         <dt>
    14             @Html.DisplayNameFor(model => model.name)
    15         </dt>
     9<table class="table">
     10    <tr>
     11        <th>@Html.DisplayNameFor(model => model.vet_center_name)</th>
     12        <td>@Html.DisplayFor(model => model.vet_center_name)</td>
     13    </tr>
     14    <tr>
     15        <th>@Html.DisplayNameFor(model => model.adress)</th>
     16        <td>@Html.DisplayFor(model => model.adress)</td>
     17    </tr>
     18    <tr>
     19        <th>@Html.DisplayNameFor(model => model.workinghours)</th>
     20        <td>@Html.DisplayFor(model => model.workinghours)</td>
     21    </tr>
     22    <tr>
     23        <th>@Html.DisplayNameFor(model => model.description)</th>
     24        <td>@Html.DisplayFor(model => model.description)</td>
     25    </tr>
     26    <tr>
     27        <th>@Html.DisplayNameFor(model => model.phonenumber)</th>
     28        <td>@Html.DisplayFor(model => model.phonenumber)</td>
     29    </tr>
     30    <tr>
     31        <th>@Html.DisplayNameFor(model => model.latitude)</th>
     32        <td>@Html.DisplayFor(model => model.latitude)</td>
     33    </tr>
     34    <tr>
     35        <th>@Html.DisplayNameFor(model => model.longitude)</th>
     36        <td>@Html.DisplayFor(model => model.longitude)</td>
     37    </tr>
     38    <tr>
     39        <th>@Html.DisplayNameFor(model => model.city_name)</th>
     40        <td>@Html.DisplayFor(model => model.city_name)</td>
     41    </tr>
     42</table>
    1643
    17         <dd>
    18             @Html.DisplayFor(model => model.name)
    19         </dd>
     44@if (ViewBag.hasAccess != null && ViewBag.hasAccess == true)
     45{
     46    <p>
     47        @Html.ActionLink("Edit", "Edit", new { id = Model.id }) |
     48        @Html.ActionLink("Delete", "Delete", new { id = Model.id })
     49    </p>
     50}
    2051
    21         <dt>
    22             @Html.DisplayNameFor(model => model.adress)
    23         </dt>
    24 
    25         <dd>
    26             @Html.DisplayFor(model => model.adress)
    27         </dd>
    28         <dt>
    29             @Html.DisplayNameFor(model => model.description)
    30         </dt>
    31 
    32         <dd>
    33             @Html.DisplayFor(model => model.description)
    34         </dd>
    35         <dt>
    36             @Html.DisplayNameFor(model => model.workinghours)
    37         </dt>
    38 
    39         <dd>
    40             @Html.DisplayFor(model => model.workinghours)
    41         </dd>
    42         <dt>
    43             @Html.DisplayNameFor(model => model.phonenumber)
    44         </dt>
    45 
    46         <dd>
    47             @Html.DisplayFor(model => model.phonenumber)
    48         </dd>
    49         <dt>
    50             @Html.DisplayNameFor(model => model.latitude)
    51         </dt>
    52 
    53         <dd>
    54             @Html.DisplayFor(model => model.latitude)
    55         </dd>
    56         <dt>
    57             @Html.DisplayNameFor(model => model.longitude)
    58         </dt>
    59 
    60         <dd>
    61             @Html.DisplayFor(model => model.longitude)
    62         </dd>
    63         <dt>
    64             @Html.DisplayNameFor(model => model.citiesid)
    65         </dt>
    66 
    67         <dd>
    68             @Html.DisplayFor(model => model.citiesid)
    69         </dd>
    70 
    71 
    72     </dl>
    73 </div>
    7452<p>
    75     @Html.ActionLink("Edit", "Edit", new { id = Model.id }) |
    7653    @Html.ActionLink("Back to List", "Index")
    7754</p>
  • PostgreSqlDotnetCore/Views/VetCenter/Index.cshtml

    r118e414 re9bb9d1  
    11@using Microsoft.AspNetCore.Identity
    22@inject SignInManager<IdentityUser> SignInManager
    3 @model IEnumerable<PostgreSqlDotnetCore.Models.VetCenter>
     3@* IEnumerable<PostgreSqlDotnetCore.Models.VetCenter>*@
     4@model IEnumerable<PostgreSqlDotnetCore.Models.VetCenterWithCity>
     5
    46
    57@{
     
    2325    <tr>
    2426        <th>
    25             @Html.DisplayNameFor(model => model.name)
     27            @Html.DisplayNameFor(model => model.vet_center_name)
    2628        </th>
    2729        <th>
     
    4547        </th>
    4648        <th>
    47             @Html.DisplayNameFor(model => model.citiesid)
     49            @Html.DisplayNameFor(model => model.city_name)
    4850        </th>
    4951        <th></th>
     
    5456        <tr>
    5557            <td>
    56                 @Html.DisplayFor(modelItem => item.name)
     58                @Html.DisplayFor(modelItem => item.vet_center_name)
    5759            </td>
    5860            <td>
     
    7678            </td>
    7779            <td>
    78                 @Html.DisplayFor(modelItem => item.citiesid)
     80                @Html.DisplayFor(modelItem => item.city_name)
    7981            </td>
    8082            <td>
     
    8587            </td>
    8688
    87            
    8889
    89          @*   @if ((SignInManager.IsSignedIn(User)))
    90             {
    91                 <td>
    9290
    93                     @Html.ActionLink("Edit", "Edit", new { id = item.id }) |
    94                     @Html.ActionLink("Details", "Details", new { id = item.id }) |
    95                     @Html.ActionLink("Delete", "Delete", new { id = item.id })
     91            @*   @if ((SignInManager.IsSignedIn(User)))
     92        {
     93        <td>
    9694
    97                 </td>
    98             }
    99            *@
     95        @Html.ActionLink("Edit", "Edit", new { id = item.id }) |
     96        @Html.ActionLink("Details", "Details", new { id = item.id }) |
     97        @Html.ActionLink("Delete", "Delete", new { id = item.id })
     98
     99        </td>
     100        }
     101        *@
    100102
    101103            @* Додадете условие за проверка на улогите *@
Note: See TracChangeset for help on using the changeset viewer.