aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-10-31 18:04:01 -0700
committerzotlabs <mike@macgirvin.com>2017-10-31 18:04:01 -0700
commitbff1e215cce27706fabe9f1764bce5c5a5b3b434 (patch)
treea8d8b0b4e38b242eb583bbd8996b60cf64540040
parent6efef3922b9fe6864c0855e6407b77ca54af70c5 (diff)
downloadvolse-hubzilla-bff1e215cce27706fabe9f1764bce5c5a5b3b434.tar.gz
volse-hubzilla-bff1e215cce27706fabe9f1764bce5c5a5b3b434.tar.bz2
volse-hubzilla-bff1e215cce27706fabe9f1764bce5c5a5b3b434.zip
pdledit - show original/system layout text for comparison
-rw-r--r--Zotlabs/Module/Pdledit.php8
-rw-r--r--view/tpl/pdledit.tpl3
2 files changed, 9 insertions, 2 deletions
diff --git a/Zotlabs/Module/Pdledit.php b/Zotlabs/Module/Pdledit.php
index f8af470ac..9b86b599b 100644
--- a/Zotlabs/Module/Pdledit.php
+++ b/Zotlabs/Module/Pdledit.php
@@ -77,8 +77,10 @@ class Pdledit extends \Zotlabs\Web\Controller {
}
$t = get_pconfig(local_channel(),'system',$module);
- if(! $t)
- $t = file_get_contents(theme_include($module));
+ $s = file_get_contents(theme_include($module));
+ if(! $t) {
+ $t = $s;
+ }
if(! $t) {
notice( t('Layout not found.') . EOL);
return '';
@@ -89,7 +91,9 @@ class Pdledit extends \Zotlabs\Web\Controller {
'$mname' => t('Module Name:'),
'$help' => t('Layout Help'),
'$another' => t('Edit another layout'),
+ '$original' => t('System layout'),
'$module' => argv(1),
+ '$src' => $s,
'$content' => htmlspecialchars($t,ENT_COMPAT,'UTF-8'),
'$submit' => t('Submit')
));
diff --git a/view/tpl/pdledit.tpl b/view/tpl/pdledit.tpl
index 2ea89b6c1..66b8209c9 100644
--- a/view/tpl/pdledit.tpl
+++ b/view/tpl/pdledit.tpl
@@ -11,7 +11,10 @@
<br />
<br />
+<div class="descriptive-text">{{$original}}</div>
+<pre><code>{{$src}}</code></pre>
+<br />
<form action="pdledit" method="post" >
<input type="hidden" name="module" value="{{$module}}" />