<h2>Products
    <div class="form-group col-md-9 pull-right">
        <div class="col-md-10">
            <input type="text" class="form-control" placeholder="Search: n:Name, a:Active, u:Units, t:Type and e:true for extended properties" ng-model="search">
        </div>
        <div class="col-md-2">
        <a href="/Product" class="btn btn-success btn-block">Add <i
                class="glyphicon glyphicon-plus"></i></a>
            </div>
    </div>
</h2>
<table class="table table-condensed table-bordered table-striped" keypress="shortcuts">
    <thead>
    <tr>
        <th class="text-right">Code</th>
        <th>Name</th>
        <th class="text-right">Price</th>
        <th ng-if="showExtended" class="text-right">Yield</th>
        <th>Type</th>
        <th>Is Active?</th>
    </tr>
    </thead>
    <tbody>
    <tr id="{{$index}}" ng-repeat="item in products" ng-class="{warning:$index==selected}"
        ng-click="setSelected($index)">
        <td class="text-right">{{item.Code}}</td>
        <td><a href="{{item.Url}}">{{item.Name}} ({{showExtended ? item.Fraction + ' ' + item.FractionUnits + ' = 1 ' : ''}}{{item.Units}})</a></td>
        <td class="text-right">{{item.Price | currency}}</td>
        <td ng-if="showExtended" class="text-right">{{item.ProductYield * 100 | number:2}}%</td>
        <td>{{item.ProductGroup}}</td>
        <td>{{item.IsActive}}</td>
    </tr>
    </tbody>
</table>
