pdledit - show original/system layout text for comparison

This commit is contained in:
zotlabs 2017-10-31 18:04:01 -07:00
parent 6efef3922b
commit bff1e215cc
2 changed files with 9 additions and 2 deletions

View File

@ -77,8 +77,10 @@ class Pdledit extends \Zotlabs\Web\Controller {
} }
$t = get_pconfig(local_channel(),'system',$module); $t = get_pconfig(local_channel(),'system',$module);
if(! $t) $s = file_get_contents(theme_include($module));
$t = file_get_contents(theme_include($module)); if(! $t) {
$t = $s;
}
if(! $t) { if(! $t) {
notice( t('Layout not found.') . EOL); notice( t('Layout not found.') . EOL);
return ''; return '';
@ -89,7 +91,9 @@ class Pdledit extends \Zotlabs\Web\Controller {
'$mname' => t('Module Name:'), '$mname' => t('Module Name:'),
'$help' => t('Layout Help'), '$help' => t('Layout Help'),
'$another' => t('Edit another layout'), '$another' => t('Edit another layout'),
'$original' => t('System layout'),
'$module' => argv(1), '$module' => argv(1),
'$src' => $s,
'$content' => htmlspecialchars($t,ENT_COMPAT,'UTF-8'), '$content' => htmlspecialchars($t,ENT_COMPAT,'UTF-8'),
'$submit' => t('Submit') '$submit' => t('Submit')
)); ));

View File

@ -11,7 +11,10 @@
<br /> <br />
<br /> <br />
<div class="descriptive-text">{{$original}}</div>
<pre><code>{{$src}}</code></pre>
<br />
<form action="pdledit" method="post" > <form action="pdledit" method="post" >
<input type="hidden" name="module" value="{{$module}}" /> <input type="hidden" name="module" value="{{$module}}" />