Theme listing works again, added some docs for theme and plugin listing funkctions

This commit is contained in:
Tobias Diekershoff 2016-01-15 20:03:41 +01:00
parent 629c69d9dd
commit 11aa76c270
1 changed files with 21 additions and 2 deletions

View File

@ -1314,6 +1314,15 @@ function admin_page_users(&$a){
/** /**
* @brief Plugins admin page * @brief Plugins admin page
*
* This function generates the admin panel page for managing plugins on the
* friendica node.
*
* The template used for displaying the list of plugins and the details of the
* plugin are the same as used for the templates.
*
* The returned string returned hulds the HTML code of the page.
*
* @param App $a * @param App $a
* @return string * @return string
*/ */
@ -1507,7 +1516,15 @@ function rebuild_theme_table($themes) {
/** /**
* Themes admin page * @brief Themes admin page
*
* This function generates the admin panel page to control the themes available
* on the friendica node.
*
* The template used for displaying the list of themes and the details of the
* themes are the same as used for the plugins.
*
* The returned string contains the HTML code of the admin panel page.
* *
* @param App $a * @param App $a
* @return string * @return string
@ -1619,6 +1636,7 @@ function admin_page_themes(&$a){
if(! stristr($screenshot[0],$theme)) if(! stristr($screenshot[0],$theme))
$screenshot = null; $screenshot = null;
$t = get_markup_template("admin_plugins_details.tpl"); $t = get_markup_template("admin_plugins_details.tpl");
return replace_macros($t, array( return replace_macros($t, array(
'$title' => t('Administration'), '$title' => t('Administration'),
@ -1626,7 +1644,6 @@ function admin_page_themes(&$a){
'$toggle' => t('Toggle'), '$toggle' => t('Toggle'),
'$settings' => t('Settings'), '$settings' => t('Settings'),
'$baseurl' => $a->get_baseurl(true), '$baseurl' => $a->get_baseurl(true),
'$plugin' => $theme, '$plugin' => $theme,
'$status' => $status, '$status' => $status,
'$action' => $action, '$action' => $action,
@ -1679,6 +1696,8 @@ function admin_page_themes(&$a){
'$baseurl' => $a->get_baseurl(true), '$baseurl' => $a->get_baseurl(true),
'$function' => 'themes', '$function' => 'themes',
'$plugins' => $xthemes, '$plugins' => $xthemes,
'$pcount' => count($themes),
'$noplugshint' => sprintf(t('No themes found on the system. They should be paced in %1$s'),'<code>/view/themes</code>'),
'$experimental' => t('[Experimental]'), '$experimental' => t('[Experimental]'),
'$unsupported' => t('[Unsupported]'), '$unsupported' => t('[Unsupported]'),
'$form_security_token' => get_form_security_token("admin_themes"), '$form_security_token' => get_form_security_token("admin_themes"),