aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-05-07 18:39:19 -0400
committerAndrew Manning <tamanning@zoho.com>2016-05-07 18:39:19 -0400
commit0746794e8145eac0608eef26b9c6d3d0ae5319cc (patch)
tree883fb17d04aa6a9e9ad6deb31c858fd4c63a787a /view/tpl
parent284d86ad7681d05c3e362bddf39e1b7759ab20a5 (diff)
downloadvolse-hubzilla-0746794e8145eac0608eef26b9c6d3d0ae5319cc.tar.gz
volse-hubzilla-0746794e8145eac0608eef26b9c6d3d0ae5319cc.tar.bz2
volse-hubzilla-0746794e8145eac0608eef26b9c6d3d0ae5319cc.zip
New plugin repo cloned using new GitRepo class. Readme and info displayed in wide modal dialog.
Diffstat (limited to 'view/tpl')
-rwxr-xr-xview/tpl/admin_plugins.tpl19
-rw-r--r--view/tpl/generic_modal.tpl15
2 files changed, 23 insertions, 11 deletions
diff --git a/view/tpl/admin_plugins.tpl b/view/tpl/admin_plugins.tpl
index 97759f817..3ba83986f 100755
--- a/view/tpl/admin_plugins.tpl
+++ b/view/tpl/admin_plugins.tpl
@@ -34,7 +34,7 @@
</div>
</div>
-
+{{$newRepoModal}}
<script>
function adminPluginsAddRepo() {
var repoURL = $('#id_repoURL').val();
@@ -44,16 +44,13 @@
function(response) {
$('#chat-rotator').spin(false);
if (response.success) {
- $('#new-repo-info').html('<h3>Repo Info</h3><p>' + response.message + '</p>');
-
- $('#new-repo-info').append('<h4>Branches</h4><p>'+JSON.stringify(response.repo.branches)+'</p>');
- $('#new-repo-info').append('<h4>URL</h4><p>'+response.repo.url+'</p>');
- $('#new-repo-info').append('<h4>Objects</h4><ul>');
- for(var i = 0; i<response.repo.objects.length; i++) {
- $('#new-repo-info').append('<li>'+response.repo.objects[i]+'</li>');
- }
- $('#new-repo-info').append('</ul>');
- $('#new-repo-info').append('<h4>Readme</h4><p>'+response.repo.readme+'</p>');
+ var modalBody = $('#generic-modal-body-{{$newRepoModalID}}');
+ modalBody.html('<div>'+response.repo.readme+'</div>');
+ modalBody.append('<h2>Repo Info</h2><p>Message: ' + response.message + '</p>');
+ modalBody.append('<h4>Branches</h4><p>'+JSON.stringify(response.repo.branches)+'</p>');
+ modalBody.append('<h4>Remotes</h4><p>'+JSON.stringify(response.repo.remote)+'</p>');
+ $('.modal-dialog').width('80%');
+ $('#generic-modal-{{$newRepoModalID}}').modal();
} else {
window.console.log('Error adding repo :' + response['message']);
}
diff --git a/view/tpl/generic_modal.tpl b/view/tpl/generic_modal.tpl
new file mode 100644
index 000000000..3f7326e71
--- /dev/null
+++ b/view/tpl/generic_modal.tpl
@@ -0,0 +1,15 @@
+<div class="modal" id="generic-modal-{{$id}}" tabindex="-1" role="dialog" aria-labelledby="generic-modal-{{$id}}" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+ <h4 class="modal-title" id="generic-modal-title-{{$id}}">{{$title}}</h4>
+ </div>
+ <div class="modal-body" id="generic-modal-body-{{$id}}"></div>
+ <div class="modal-footer">
+ <button id="generic-modal-cancel-{{$id}}" type="button" class="btn btn-default" data-dismiss="modal">{{$cancel}}</button>
+ <button id="generic-modal-ok-{{$id}}" type="button" class="btn btn-primary">{{$ok}}</button>
+ </div>
+ </div><!-- /.modal-content -->
+ </div><!-- /.modal-dialog -->
+</div><!-- /.modal --> \ No newline at end of file