Advertisement
Guest User

Untitled

a guest
May 22nd, 2015
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.42 KB | None | 0 0
  1. <template>
  2.   <h2>${heading}</h2>
  3.   <button click.trigger="add()" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;
  4.     <label>${'common.add' | t }</label>
  5.   </button>
  6.   <table class="table table-hover">
  7.     <thead>
  8.       <tr>
  9.         <th class="col-sm-1">${'common.N' | t }</th>
  10.         <th class="col-sm-3">${'common.name' | t }</th>
  11.         <th class="col-sm-2">${'buildings.capacity' | t }</th>
  12.         <th class="col-sm-2">${'buildings.address' | t }</th>
  13.         <th class="col-sm-2">${'buildings.state' | t }</th>
  14.         <th class="col-sm-2"> </th>
  15.       </tr>
  16.     </thead>
  17.     <tbody>
  18.       <tr repeat.for="building of buildings">
  19.         <td>${$index + 1}</td>
  20.         <td validate.bind="building.validation">
  21.           <div class="form-group">
  22.             <label show.bind="!building.isInEditMode">${building.name}</label>
  23.             <input type="text" validate="${building.name}" value.bind="building.name" show.bind="building.isInEditMode" class="form-control"/>
  24.           </div>
  25.         </td>
  26.         <td>
  27.           <label show.bind="!building.isInEditMode">${building.capacity}</label>
  28.           <input type="text" value.bind="building.capacity" show.bind="building.isInEditMode" class="form-control"/>
  29.         </td>
  30.         <td>
  31.           <label show.bind="!building.isInEditMode">${building.address}</label>
  32.           <input type="text" value.bind="building.address" show.bind="building.isInEditMode" class="form-control"/>
  33.         </td>
  34.         <td>
  35.           <label show.bind="!building.isInEditMode">${building.buildingStateName}</label>
  36.           <select type="text" value.bind="building.buildingStateId" show.bind="building.isInEditMode" class="form-control">
  37.             <option>Choose</option>
  38.             <option repeat.for="state of $parent.buildingStates" value.bind="state.id">${state.name}</option>
  39.           </select>
  40.         </td>
  41.         <td>
  42.           <button click.trigger="$parent.save(building)" show.bind="building.isInEditMode" disabled.bind="!building.validation.result.isValid" class="btn btn-success"><i class="fa fa-save fa-lg"></i></button>
  43.           <button click.trigger="building.edit()" show.bind="!building.isInEditMode" class="btn btn-default"><i class="fa fa-pencil fa-lg"></i></button>
  44.           <button click.trigger="$parent.delete(building)" class="btn btn-danger"><i class="fa fa-trash-o fa-lg"></i></button>
  45.         </td>
  46.       </tr>
  47.     </tbody>
  48.   </table>
  49. </template>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement