From 95b96692130e0a949375e133c1aa879efd0cfb2e Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Sun, 1 May 2016 21:20:49 -0400 Subject: Create form on admin/plugins page to add plugin git repo using PHPGit --- Zotlabs/Module/Admin.php | 14 +++++++++++++- view/tpl/admin_plugins.tpl | 19 +++++++++++++++---- view/tpl/admin_plugins_addrepo.tpl | 8 ++++++++ 3 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 view/tpl/admin_plugins_addrepo.tpl diff --git a/Zotlabs/Module/Admin.php b/Zotlabs/Module/Admin.php index 1d37b41bc..bad717567 100644 --- a/Zotlabs/Module/Admin.php +++ b/Zotlabs/Module/Admin.php @@ -1326,7 +1326,16 @@ class Admin extends \Zotlabs\Web\Controller { } } } - + + $admin_plugins_add_repo_form= replace_macros( + get_markup_template('admin_plugins_addrepo.tpl'), array( + '$post' => 'admin/plugins', + '$desc' => t('Enter the public git repository URL of the plugin repo.'), + '$repoURL' => array('repoURL', t('Plugin repo git URL'), '', ''), + '$submit' => t('Download Plugin Repo') + ) + ); + $t = get_markup_template('admin_plugins.tpl'); return replace_macros($t, array( '$title' => t('Administration'), @@ -1337,6 +1346,9 @@ class Admin extends \Zotlabs\Web\Controller { '$plugins' => $plugins, '$disabled' => t('Disabled - version incompatibility'), '$form_security_token' => get_form_security_token('admin_plugins'), + '$addclone' => t('Add Plugin Repo'), + '$expandform' => false, + '$form' => $admin_plugins_add_repo_form )); } diff --git a/view/tpl/admin_plugins.tpl b/view/tpl/admin_plugins.tpl index 4b91f9e46..1493d13a4 100755 --- a/view/tpl/admin_plugins.tpl +++ b/view/tpl/admin_plugins.tpl @@ -1,6 +1,16 @@ -
-

{{$title}} - {{$page}}

- +
+
+
+ +
+

{{$title}} - {{$page}}

+
+
+ +
+
    {{foreach $plugins as $p}}
  • @@ -16,4 +26,5 @@
  • {{/foreach}}
-
+
+
\ No newline at end of file diff --git a/view/tpl/admin_plugins_addrepo.tpl b/view/tpl/admin_plugins_addrepo.tpl new file mode 100644 index 000000000..f6264f879 --- /dev/null +++ b/view/tpl/admin_plugins_addrepo.tpl @@ -0,0 +1,8 @@ +
+ +

{{$desc}}

+ {{include file="field_input.tpl" field=$repoURL}} +
+ +
+
-- cgit v1.2.3