-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
130 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,66 @@ | ||
<div class="modal modal-members modal-primary fade" tabindex="-1" id="subscribers" aria-labelledby="modal-title"> | ||
<div class="modal-dialog modal-dialog-scrollable"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<h5 class="modal-title" id="modal-title"><?php echo _txt('pl.grouperlite.group.info.members-heading'); ?></h5> | ||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> | ||
<span aria-hidden="true">×</span> | ||
<span class="sr-only">Close</span> | ||
</button> | ||
</div> | ||
<div class="modal-body loader text-center"> | ||
<i class="fa fa-spinner fa-pulse fa-3x fa-fw" aria-hidden="true"></i> | ||
<p class="sr-only">Loading...</p> | ||
</div> | ||
<div class="modal-body msg"> | ||
<p>There was an error retrieving the subscribers.</p> | ||
</div> | ||
<div class="modal-body subs"> | ||
<table class="table table-striped"> | ||
<tbody> | ||
<?php foreach ($subscribers as $sub) : ?> | ||
<tr> | ||
<td><?php echo $sub['name']; ?></td> | ||
<td><?php echo $sub['id']; ?></td> | ||
</tr> | ||
<?php endforeach; ?> | ||
</tbody> | ||
</table> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-grouper btn-link" data-dismiss="modal"><?php echo _txt('pl.grouperlite.action.close'); ?></button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<script> | ||
var url = '<?php print $this->Html->url( | ||
array( | ||
'plugin' => "grouper_lite", | ||
'controller' => 'grouper_groups', | ||
'action' => 'groupSubscribers' | ||
) | ||
); ?>'; | ||
$('.members-btn').click(function(ev) { | ||
var $this = $(this); | ||
var id = $this.data('id'); | ||
var modal = $('#subscribers'); | ||
modal.addClass('loading'); | ||
modal.modal('toggle'); | ||
|
||
<table class="table table-striped"> | ||
<tbody> | ||
<?php foreach ($subscribers as $sub) : ?> | ||
<tr> | ||
<td><?php echo $sub['name']; ?></td> | ||
<td><?php echo $sub['id']; ?></td> | ||
</tr> | ||
<?php endforeach; ?> | ||
</tbody> | ||
</table> | ||
$.ajax({ | ||
url: url + '?groupname=' + id, | ||
dataType: 'json', | ||
success: function(data) { | ||
console.log(data); | ||
|
||
}, | ||
error: function() { | ||
modal.addClass('error'); | ||
}, | ||
complete: function() { | ||
modal.removeClass('loading'); | ||
} | ||
}) | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters