Create form on admin/plugins page to add plugin git repo using PHPGit
This commit is contained in:
parent
7fac859fbd
commit
95b9669213
@ -1327,6 +1327,15 @@ 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');
|
$t = get_markup_template('admin_plugins.tpl');
|
||||||
return replace_macros($t, array(
|
return replace_macros($t, array(
|
||||||
'$title' => t('Administration'),
|
'$title' => t('Administration'),
|
||||||
@ -1337,6 +1346,9 @@ class Admin extends \Zotlabs\Web\Controller {
|
|||||||
'$plugins' => $plugins,
|
'$plugins' => $plugins,
|
||||||
'$disabled' => t('Disabled - version incompatibility'),
|
'$disabled' => t('Disabled - version incompatibility'),
|
||||||
'$form_security_token' => get_form_security_token('admin_plugins'),
|
'$form_security_token' => get_form_security_token('admin_plugins'),
|
||||||
|
'$addclone' => t('Add Plugin Repo'),
|
||||||
|
'$expandform' => false,
|
||||||
|
'$form' => $admin_plugins_add_repo_form
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,16 @@
|
|||||||
<div class="generic-content-wrapper-styled" id='adminpage'>
|
<div class="generic-content-wrapper">
|
||||||
<h1>{{$title}} - {{$page}}</h1>
|
<div class="section-title-wrapper">
|
||||||
|
<div class="pull-right">
|
||||||
|
<button class="btn btn-success btn-xs" onclick="openClose('form');">{{$addrepo}}</button>
|
||||||
|
</div>
|
||||||
|
<h2 id="title">{{$title}} - {{$page}}</h2>
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div>
|
||||||
|
<div id="form" class="section-content-tools-wrapper"{{if !$expandform}} style="display:none;"{{/if}}>
|
||||||
|
{{$form}}
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
||||||
|
<div class="section-content-wrapper-np">
|
||||||
<ul id='pluginslist'>
|
<ul id='pluginslist'>
|
||||||
{{foreach $plugins as $p}}
|
{{foreach $plugins as $p}}
|
||||||
<li class='plugin {{$p.1}}'>
|
<li class='plugin {{$p.1}}'>
|
||||||
@ -16,4 +26,5 @@
|
|||||||
</li>
|
</li>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
8
view/tpl/admin_plugins_addrepo.tpl
Normal file
8
view/tpl/admin_plugins_addrepo.tpl
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<form id="add-plugin-repo-form" action="{{$post}}" method="post" >
|
||||||
|
|
||||||
|
<p class="descriptive-text">{{$desc}}</p>
|
||||||
|
{{include file="field_input.tpl" field=$repoURL}}
|
||||||
|
<div class="btn-group pull-right">
|
||||||
|
<button id="add-plugin-repo-submit" class="btn btn-primary" type="submit" name="submit">{{$submit}}</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
Reference in New Issue
Block a user