Skip to content
Snippets Groups Projects
owner-details.template.html 2.12 KiB
Newer Older
Dapeng's avatar
Dapeng committed
<h2>Owner Information</h2>

<table class="table table-striped">
    <tr>
        <th class="col-sm-3">Name</th>
        <td><b>{{$ctrl.owner.firstName}} {{$ctrl.owner.lastName}}</b></td>
    </tr>
    <tr>
        <th>Address</th>
        <td>{{$ctrl.owner.address}}</td>
    </tr>
    <tr>
        <th>City</th>
        <td>{{$ctrl.owner.city}}</td>
    </tr>
    <tr>
        <th>Telephone</th>
        <td>{{$ctrl.owner.telephone}}</td>
    </tr>
    <tr>
        <td>
Maciej Szarlinski's avatar
Maciej Szarlinski committed
            <a class="btn btn-default" ui-sref="ownerEdit({ownerId: $ctrl.owner.id})">Edit Owner</a>
Dapeng's avatar
Dapeng committed
        </td>
        <td>
Maciej Szarlinski's avatar
Maciej Szarlinski committed
            <a ui-sref="petNew({ownerId: $ctrl.owner.id})" class="btn btn-default">Add New Pet</a>
Dapeng's avatar
Dapeng committed
        </td>
    </tr>
</table>

<h2>Pets and Visits</h2>

Antoine Rey's avatar
Antoine Rey committed
<table class="table table-striped">
Maciej Szarlinski's avatar
Maciej Szarlinski committed
    <tr ng-repeat="pet in $ctrl.owner.pets track by pet.id">
Antoine Rey's avatar
Antoine Rey committed
        <td valign="top">
            <dl class="dl-horizontal">
                <dt>Name</dt>
Maciej Szarlinski's avatar
Maciej Szarlinski committed
                <dd><a ui-sref="petEdit({ownerId: $ctrl.owner.id, petId: pet.id})">{{pet.name}}</a></dd>
Antoine Rey's avatar
Antoine Rey committed
                <dt>Birth Date</dt>
                <dd>{{pet.birthDate | date:'yyyy MMM dd'}}</dd>
                <dt>Type</dt>
                <dd>{{pet.type.name}}</dd>
            </dl>
        </td>
        <td valign="top">
            <table class="table-condensed">
                <!-- TODO: no visits in pet resource -->
Antoine Rey's avatar
Antoine Rey committed
                <thead>
                <tr>
                    <th>Visit Date</th>
                    <th>Description</th>
                </tr>
                </thead>
Maciej Szarlinski's avatar
Maciej Szarlinski committed
                <tr ng-repeat="visit in pet.visits track by visit.id">
Antoine Rey's avatar
Antoine Rey committed
                    <td>{{visit.date | date:'yyyy MMM dd'}}</td>
                    <td>{{visit.description}}</td>
                </tr>
                <tr>
                    <td>
Maciej Szarlinski's avatar
Maciej Szarlinski committed
                        <a ui-sref="petEdit({ownerId: $ctrl.owner.id, petId: pet.id})">Edit Pet</a>
Antoine Rey's avatar
Antoine Rey committed
                    </td>
                    <td>
Maciej Szarlinski's avatar
Maciej Szarlinski committed
                        <a ui-sref="visits({ownerId: $ctrl.owner.id, petId: pet.id})">Add Visit</a>
Antoine Rey's avatar
Antoine Rey committed
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
Dapeng's avatar
Dapeng committed