Skip to content

Instantly share code, notes, and snippets.

@gugote
Last active August 29, 2015 14:08
Show Gist options
  • Save gugote/4a0350fd173ffdfa11b4 to your computer and use it in GitHub Desktop.
Save gugote/4a0350fd173ffdfa11b4 to your computer and use it in GitHub Desktop.
<div class="pageheader">
<h2><i class="fa fa-pencil"></i> Doorbots page <span>View, update or unlink doorbots</span></h2>
<div class="breadcrumb-wrapper">
<span class="label">You are here:</span>
<ol class="breadcrumb">
<li><a href="#/user" class="active">Users</a></li>
</ol>
</div>
</div>
<div class="contentpanel" id="doorbotList">
<div class="col-sm-12">
<div class="panel-heading">
<button class="btn btn-primary pull-right" id="batchAssign" ng-click="openFirmwareModal()" ng-show="doorbotsTableParams.$params.filter.kind==='doorbell'">batch assign</button>
<h3 class="panel-title ttl-wfilters">Active doorbots <a href="#" class="togglefilters">Filters <i class="fa fa-filter"></i></a></h3>
</div>
<div class="table-responsive dashboard-datatable">
<table class="table" id="doorbotsList" ng-table="doorbotsTableParams" show-filter="true">
<tr class="odd gradeX" ng-repeat="doorbot in doorbots" >
<td data-title="'Nickname'" filter="{ 'description': 'description' }" sortable="'description'">
{{doorbot.description}}
</td>
<td data-title="'Product'" filter="{ 'kind': 'kind' }" sortable="'kind'">
{{doorbot.kind}}
</td>
<td data-title="'Mac id'" filter="{ 'device_id': 'device_id' }" sortable="'device_id'">
<a href="#/doorbots/{{doorbot.id}}">{{doorbot.device_id}}</a>
</td>
<td data-title="'Time zone'" filter="{ 'time_zone': 'time_zone' }" sortable="'time_zone'">
{{doorbot.time_zone}}
</td>
<td data-title="'Created at'" sortable="'created_at'">
{{doorbot.created_at | formatDate:"MM/DD/YYYY hh:mm:ss A"}}
</td>
<td data-title="'Firmware (FC)'" filter="{ 'firmware_fc': 'firmware_fc' }" sortable="'firmware_fc'">
{{doorbot.firmware_fc}}
</td>
<td data-title="'Firmware (SR)'" sortable="'firmware_sr'">
{{doorbot.firmware_sr}}
</td>
<td class="tag-list" data-title="'Tags'" filter="{ 'tags': 'tags' }">
<ul style="margin:0;padding:0;list-style:none">
<li style="float:left;margin-right:5px" ng-repeat="tag in doorbot.tags">
<span class="label label-info"><i>{{tag}}</i></span>
</li>
</ul>
</td>
<td>
<a title="Edit doorbot" ng-click="doorbot.editable = true" class="edit-row" ng-hide="doorbot.editable"><i class="fa fa-edit"></i></a>
<a title="Save doorbot" ng-click="saveDoorbot(doorbot)" class="edit-row" ng-show="doorbot.editable" id="save_doorbot"><i class="fa fa-save"></i></a>
</td>
</tr>
</table>
<script type="text/ng-template" id="ng-table/filters/description.html">
<input value="{{doorbot.description}}" ng-show="doorbot.editable" ng-model="doorbot.description" class="input-sm form-control" id="descriptionInput"/>
<label ng-hide="doorbot.editable">{{doorbot.description}}</label>
<span><i class="fa fa-filter"></i></span>
</script>
<script type="text/ng-template" id="ng-table/filters/kind.html">
<input type="text" ng-model="params.filter()[name]" name="filter-kind" placeholder="Filter by kind" class="form-control" />
<span><i class="fa fa-filter"></i></span>
</script>
<script type="text/ng-template" id="ng-table/filters/device_id.html">
<input type="text" ng-model="params.filter()[name]" name="filter-macid" placeholder="Filter by Mac ID" class="form-control" />
<span><i class="fa fa-filter"></i></span>
</script>
<script type="text/ng-template" id="ng-table/filters/time_zone.html">
<input type="text" ng-model="params.filter()[name]" name="filter-timezone" placeholder="Filter by Time Zone" class="form-control" />
<span><i class="fa fa-filter"></i></span>
</script>
<script type="text/ng-template" id="ng-table/filters/firmware_fc.html">
<input type="text" ng-model="params.filter()[name]" name="filter-firmware" placeholder="Filter by Firmware" class="form-control" />
<span><i class="fa fa-filter"></i></span>
</script>
<script type="text/ng-template" id="ng-table/filters/tags.html">
<input type="text" ng-model="params.filter()[name]" name="filter-tags" placeholder="Filter by Tags" class="form-control" />
<span><i class="fa fa-filter"></i></span>
</script>
</div><!-- table-responsive -->
</div><!-- col-sm-12 -->
</div><!-- row -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment