Skip to content

Commit

Permalink
resolved conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Sep 27, 2021
1 parent 7d03f55 commit 763d84a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
25 changes: 15 additions & 10 deletions View/Elements/Components/subscriberList.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,7 @@
</div>
<div class="modal-body subs">
<table class="table table-striped">
<tbody>
<?php var_dump($subscribers) ?>
<?php foreach ($subscribers as $sub) : ?>
<tr>
<td><?php echo $sub['name']; ?></td>
<td><?php echo $sub['id']; ?></td>
</tr>
<?php endforeach; ?>
</tbody>
<tbody id="sub-body"></tbody>
</table>
</div>
<div class="modal-footer">
Expand Down Expand Up @@ -53,8 +45,21 @@
url: url + '?groupname=' + id,
dataType: 'json',
success: function(data) {
console.log(data);
$('#sub-body').html(data.reduce(function (table, item) {
var row = [
'<tr>',
'<td>',
item.name,
'</td>',
'<td>',
item.id,
'</td>',
'</tr>'
].join('');

table += row;
return table;
}, ''))
},
error: function() {
modal.addClass('error');
Expand Down
2 changes: 1 addition & 1 deletion View/GrouperGroups/groupmember.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,4 @@ $numColumns = count($columns);
<p class="lead mb-0 text-center"><?php echo _txt('pl.grouperlite.groups.zero-state'); ?></p>
</div>
<?php endif; ?>
<?php echo $this->element('Components/subscriberList', array('subscribers' => $subscribers)); ?>
<?php echo $this->element('Components/subscriberList'); ?>

0 comments on commit 763d84a

Please sign in to comment.