forked from mapasculturais/mapasculturais
-
Notifications
You must be signed in to change notification settings - Fork 0
/
list.php
76 lines (74 loc) · 2.64 KB
/
list.php
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
<link href="//cdnjs.cloudflare.com/ajax/libs/x-editable/1.4.5/bootstrap-editable/css/bootstrap-editable.css" rel="stylesheet"/>
<script src="//cdnjs.cloudflare.com/ajax/libs/x-editable/1.4.5/bootstrap-editable/js/bootstrap-editable.min.js"></script>
<style>
table.table > tbody > tr > td {
height: 30px;
vertical-align: middle;
}
.test-edit{
color:green;
}
</style>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>ID</th>
<th>Nome</th>
<th>Descrição</th>
</tr>
</thead>
<tbody>
<?php
foreach ($objects as $object){ ?>
<tr>
<td>
<?php echo $object->id?>
<a class="test-edit" href="<?php echo $this->controller->createUrl('edit', array('id'=>$object->id))?>">edit</a>
</td>
<td>
<a href="#" data-name="name" data-type="text"
data-pk="<?php echo $object->id?>"
data-original-title="Nome"
data-mode="inline"
class="editable editable-click" style="display: inline;">
<?php echo $object->name ?></a>
</td>
<td>
<a href="#" data-name="short_description" data-type="textarea"
data-pk="1" data-placeholder="Your comments here..."
data-original-title="Enter comments"
data-showButtons="bottom"
data-placement="left"
data-mode="inline"
class="editable editable-pre-wrapped editable-click" style="display: inline;">
<?php echo $object->shortDescription ?>
</a>
<!-- <div data-name="short_description" data-pk="--><?php //echo $space->id?><!--"-->
<!-- data-type="wysihtml5" data-toggle="manual" data-original-title="Descrição"-->
<!-- class="editable editable-click" tabindex="-1" style="display: block;">-->
<!-- -->
<!-- </div>-->
</td>
</tr>
<?php
}?>
</tbody>
<tfoot>
<th></th>
<th></th>
</tfoot>
</table>
<script>
jQuery(function(){
//$.fn.editable.defaults.mode = 'inline';
$('.editable').editable();
// $('.editable-inline').editable({
// mode: 'inline',
// url: '/teste/save',
// type: 'text',
// pk: 1,
// name: 'username',
// title: 'Enter username'
// });
})
</script>