1
0
Fork 0

show experimental and unsupported theme status on theme admin page

This commit is contained in:
friendica 2012-02-26 04:17:02 -08:00
parent fb8675f349
commit 5f7858a688
11 changed files with 14 additions and 3 deletions

View file

@ -225,9 +225,16 @@ function get_theme_info($theme){
'description' => "", 'description' => "",
'author' => array(), 'author' => array(),
'maintainer' => array(), 'maintainer' => array(),
'version' => "" 'version' => "",
'experimental' => false,
'unsupported' => false
); );
if(file_exists("view/theme/$theme/experimental"))
$info['experimental'] = true;
if(file_exists("view/theme/$theme/unsupported"))
$info['unsupported'] = true;
if (!is_file("view/theme/$theme/theme.php")) return $info; if (!is_file("view/theme/$theme/theme.php")) return $info;
$f = file_get_contents("view/theme/$theme/theme.php"); $f = file_get_contents("view/theme/$theme/theme.php");

View file

@ -711,7 +711,7 @@ function admin_page_themes(&$a){
return; // NOTREACHED return; // NOTREACHED
} }
// display plugin details // display theme details
require_once('library/markdown.php'); require_once('library/markdown.php');
if (theme_status($themes,$theme)) { if (theme_status($themes,$theme)) {
@ -769,7 +769,9 @@ function admin_page_themes(&$a){
'$submit' => t('Submit'), '$submit' => t('Submit'),
'$baseurl' => $a->get_baseurl(), '$baseurl' => $a->get_baseurl(),
'$function' => 'themes', '$function' => 'themes',
'$plugins' => $xthemes '$plugins' => $xthemes,
'$experimental' => t('[Experimental]'),
'$unsupported' => t('[Unsupported]')
)); ));
} }

View file

@ -6,6 +6,8 @@
<li class='plugin $p.1'> <li class='plugin $p.1'>
<a class='toggleplugin' href='$baseurl/admin/$function/$p.0?a=t' title="{{if $p.1==on }}Disable{{ else }}Enable{{ endif }}" ><span class='icon $p.1'></span></a> <a class='toggleplugin' href='$baseurl/admin/$function/$p.0?a=t' title="{{if $p.1==on }}Disable{{ else }}Enable{{ endif }}" ><span class='icon $p.1'></span></a>
<a href='$baseurl/admin/$function/$p.0'><span class='name'>$p.2.name</span></a> - <span class="version">$p.2.version</span> <a href='$baseurl/admin/$function/$p.0'><span class='name'>$p.2.name</span></a> - <span class="version">$p.2.version</span>
{{ if $p.2.experimental }} $experimental {{ endif }}{{ if $p.2.unsupported }} $unsupported {{ endif }}
<div class='desc'>$p.2.description</div> <div class='desc'>$p.2.description</div>
</li> </li>
{{ endfor }} {{ endfor }}

View file

View file

View file

View file

View file

View file

View file

View file