forked from AppStateESS/systemsinventory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch_results.html
94 lines (85 loc) · 4.43 KB
/
search_results.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<div class="pager-listing" id="device-list" data-rpp="25">
<div id="device-deleted" class="alert alert-danger" style="display:none;">Device Deleted!</div>
<div style="text-align:right" class="pager-search"></div>
<strong>Total systems:</strong> <span class="pager-total-rows"></span>
<table class="table table-striped">
<thead class="pager-head">
<tr>
<th class="pager-header physical_id"></th>
<th class="pager-header department_id"></th>
<th class="pager-header location_id"></th>
<th class="pager-header model"></th>
<th class="pager-header room_number"></th>
<th class="pager-header username"></th>
<th class="pager-header purchase_date"></th>
</tr>
</thead>
<tbody class="pager-body">
<tr class="pager-row" data-row-id="">
<td class="pager-column physical_id"></td>
<td class="pager-column department_id"></td>
<td class="pager-column location_id"></td>
<td class="pager-column model"></td>
<td class="pager-column room_number"></td>
<td class="pager-column username"></td>
<td class="pager-column purchase_date"></td>
</tr>
</tbody>
</table>
<div class="page-list pagination pagination-centered"></div>
<div class="page-limit"></div>
</div>
<div id="device-modal" class="modal fade" role="dialog" style="display:none;">
<div class="modal-dialog">
<div class="modal-content" id="system-device-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title" id="modal-title"></h4>
<?php if (\Current_User::allow('systemsinventory', 'edit')): ?>
<div class="btn-group">
<input id="edit-device-button" class="btn btn-primary" onclick="enableFormFields()" type="button" value="Edit">
<input id="inventory-device-button" class="btn btn-success" onclick="inventoryDevice()" type="button" value="Inventory Device">
</div>
<div id="device-last-audit" class="text-danger" style="display:block;"><h3>This device has never been audited.</h3></div>
<?php endif; ?>
<div id="device-save-result" class="alert alert-success" style="display:none;"></div>
</div>
<div class="modal-body">
<form action="/" method="post" id="edit-device-form" class="phpws-form">
<div id="system-body"></div>
<div id="user-body"></div>
<div class="btn-group">
<?php if (\Current_User::allow('systemsinventory', 'edit')): ?>
<input id="edit-device-button1" class="btn btn-primary" onclick="enableFormFields()" type="button" value="Edit" />
<input id="delete-device-button" class="btn btn-danger" onclick="deleteDevice()" type="button" value="Delete" />
</div>
<input id="save-device-button" style="display:none;" class="btn btn-primary" type="submit" value="Save" />
<?php endif; ?>
</form>
</div>
<div class="modal-footer">
<!-- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>-->
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function () {
$('.pager-column').css('cursor', 'pointer');
Pagers.callback = runOnLoad
$('#edit-device-form').submit( function(event) {
event.preventDefault();
var posting = $.post('systemsinventory/system/save/', $('form#edit-device-form').serialize(), null ,'json');
posting.done(function( data ) {
var result = jQuery.parseJSON(posting['responseText']);
if(result.success)
$( "#device-save-result" ).empty().append( "Device Saved Successfully" );
else
$( "#device-save-result" ).empty().append( "There was a problem saving device!" );
$("#device-save-result").css("display", "block");
$('#device-modal').animate({scrollTop:0}, 'fast');
Pagers.reload('device-list');
});
});
});
</script>