From a7a09cdcfb6779752aa154908abc06adbee0421f Mon Sep 17 00:00:00 2001 From: Mzhelskiy Maxim Date: Sat, 5 Jun 2010 11:18:07 +0000 Subject: [PATCH] =?UTF-8?q?=D1=88=D0=B0=D0=B1=D0=BB=D0=BE=D0=BD=20develope?= =?UTF-8?q?r=20=20=D0=BA=20=D0=BF=D0=BB=D0=B0=D0=B3=D0=B8=D0=BD=D0=B0?= =?UTF-8?q?=D0=BC=20page=20=D0=B8=20profiler?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- engine/classes/ActionPlugin.class.php | 1 + plugins/page/plugin.xml | 2 +- .../skin/developer/actions/ActionPage/add.tpl | 91 ++++++++ .../developer/actions/ActionPage/admin.tpl | 59 +++++ .../developer/actions/ActionPage/page.tpl | 14 ++ .../templates/skin/developer/css/style.css | 4 + .../skin/developer/images/document.gif | Bin 0 -> 94 bytes .../skin/developer/images/folder.gif | Bin 0 -> 90 bytes plugins/profiler/plugin.xml | 2 +- .../actions/ActionProfiler/ajax/level.tpl | 14 ++ .../actions/ActionProfiler/ajax/report.tpl | 22 ++ .../actions/ActionProfiler/ajax/tree.tpl | 9 + .../actions/ActionProfiler/report.tpl | 46 ++++ .../actions/ActionProfiler/sidebar.tpl | 89 ++++++++ .../templates/skin/developer/css/style.css | 1 + .../templates/skin/developer/images/close.gif | Bin 0 -> 70 bytes .../templates/skin/developer/images/open.gif | Bin 0 -> 73 bytes .../templates/skin/developer/js/profiler.js | 207 ++++++++++++++++++ 18 files changed, 559 insertions(+), 2 deletions(-) create mode 100644 plugins/page/templates/skin/developer/actions/ActionPage/add.tpl create mode 100644 plugins/page/templates/skin/developer/actions/ActionPage/admin.tpl create mode 100644 plugins/page/templates/skin/developer/actions/ActionPage/page.tpl create mode 100644 plugins/page/templates/skin/developer/css/style.css create mode 100644 plugins/page/templates/skin/developer/images/document.gif create mode 100644 plugins/page/templates/skin/developer/images/folder.gif create mode 100644 plugins/profiler/templates/skin/developer/actions/ActionProfiler/ajax/level.tpl create mode 100644 plugins/profiler/templates/skin/developer/actions/ActionProfiler/ajax/report.tpl create mode 100644 plugins/profiler/templates/skin/developer/actions/ActionProfiler/ajax/tree.tpl create mode 100644 plugins/profiler/templates/skin/developer/actions/ActionProfiler/report.tpl create mode 100644 plugins/profiler/templates/skin/developer/actions/ActionProfiler/sidebar.tpl create mode 100644 plugins/profiler/templates/skin/developer/css/style.css create mode 100644 plugins/profiler/templates/skin/developer/images/close.gif create mode 100644 plugins/profiler/templates/skin/developer/images/open.gif create mode 100644 plugins/profiler/templates/skin/developer/js/profiler.js diff --git a/engine/classes/ActionPlugin.class.php b/engine/classes/ActionPlugin.class.php index ddcb8f7a..0ed39448 100644 --- a/engine/classes/ActionPlugin.class.php +++ b/engine/classes/ActionPlugin.class.php @@ -37,6 +37,7 @@ abstract class ActionPlugin extends Action { public function __construct(Engine $oEngine, $sAction) { parent::__construct($oEngine, $sAction); $this->Viewer_Assign('sTemplatePathPlugin',rtrim($this->getTemplatePathPlugin(),'/')); + $this->Viewer_Assign('sTemplateWebPathPlugin',Plugin::GetTemplateWebPath(get_class($this))); } /** diff --git a/plugins/page/plugin.xml b/plugins/page/plugin.xml index e0274a78..cb56c6f7 100644 --- a/plugins/page/plugin.xml +++ b/plugins/page/plugin.xml @@ -7,7 +7,7 @@ LiveStreet Developers Team http://livestreet.ru - 1.0.1 + 1.0.2 0.4.1 diff --git a/plugins/page/templates/skin/developer/actions/ActionPage/add.tpl b/plugins/page/templates/skin/developer/actions/ActionPage/add.tpl new file mode 100644 index 00000000..23201340 --- /dev/null +++ b/plugins/page/templates/skin/developer/actions/ActionPage/add.tpl @@ -0,0 +1,91 @@ +{include file='window_load_img.tpl' sToLoad='page_text'} + + + + +{if $oConfig->GetValue('view.tinymce')} + + {literal} + + {/literal} +{/if} + + +
+ + +


+

+ + +


+

+ + +


+

+ + + + {if !$oConfig->GetValue('view.tinymce')} +
+ + + + +   + + + + + + +
+ {/if} +

+ +


+ + {$aLang.page_create_seo_keywords_notice}

+ +


+ + {$aLang.page_create_seo_description_notice}

+ +

+ +

+ + +

+ + +
\ No newline at end of file diff --git a/plugins/page/templates/skin/developer/actions/ActionPage/admin.tpl b/plugins/page/templates/skin/developer/actions/ActionPage/admin.tpl new file mode 100644 index 00000000..2c95aa8d --- /dev/null +++ b/plugins/page/templates/skin/developer/actions/ActionPage/admin.tpl @@ -0,0 +1,59 @@ +{include file='header.tpl'} + + + + +
+

{$aLang.page_admin}

+ + + {if $aParams.0=='new'} +

{$aLang.page_create}

+ {include file="$sTemplatePathPlugin/actions/ActionPage/add.tpl"} + {elseif $aParams.0=='edit'} +

{$aLang.page_edit} «{$oPageEdit->getTitle()}»

+ {include file="$sTemplatePathPlugin/actions/ActionPage/add.tpl"} + {else} + {$aLang.page_new}

+ {/if} + + + + + + + + + + + + + + {foreach from=$aPages item=oPage name=el2} + + + + + + + {/foreach} + +
{$aLang.page_admin_title}{$aLang.page_admin_url}{$aLang.page_admin_active}{$aLang.page_admin_action}
+ + {$oPage->getTitle()} + + /{$oPage->getUrlFull()}/ + + {if $oPage->getActive()} + {$aLang.page_admin_active_yes} + {else} + {$aLang.page_admin_active_no} + {/if} + + {$aLang.page_admin_action_edit} + {$aLang.page_admin_action_delete} +
+
+ + +{include file='footer.tpl'} \ No newline at end of file diff --git a/plugins/page/templates/skin/developer/actions/ActionPage/page.tpl b/plugins/page/templates/skin/developer/actions/ActionPage/page.tpl new file mode 100644 index 00000000..082769a5 --- /dev/null +++ b/plugins/page/templates/skin/developer/actions/ActionPage/page.tpl @@ -0,0 +1,14 @@ +{assign var="noSidebar" value=true} +{include file='header.tpl'} + +
+
+ {if $oConfig->GetValue('view.tinymce')} + {$oPage->getText()} + {else} + {$oPage->getText()|nl2br} + {/if} +
+
+ +{include file='footer.tpl'} \ No newline at end of file diff --git a/plugins/page/templates/skin/developer/css/style.css b/plugins/page/templates/skin/developer/css/style.css new file mode 100644 index 00000000..2221a2bb --- /dev/null +++ b/plugins/page/templates/skin/developer/css/style.css @@ -0,0 +1,4 @@ +.table a { color: #333; } +.table a:hover { color: #666; } + +.page-new { padding-left: 13px; background: url(../images/document.gif) no-repeat 0 3px; color: #555; } \ No newline at end of file diff --git a/plugins/page/templates/skin/developer/images/document.gif b/plugins/page/templates/skin/developer/images/document.gif new file mode 100644 index 0000000000000000000000000000000000000000..b73f1a970e4235940487d09d63960be4397d9824 GIT binary patch literal 94 zcmZ?wbhEHbG2i(StHNLn05#$w&;S4c literal 0 HcmV?d00001 diff --git a/plugins/page/templates/skin/developer/images/folder.gif b/plugins/page/templates/skin/developer/images/folder.gif new file mode 100644 index 0000000000000000000000000000000000000000..45948a0cf6c83572b35feb6fd07a2258a7ee3990 GIT binary patch literal 90 zcmZ?wbhEHb+Z^oq?4>2gnAh sLiveStreet Developers Team http://livestreet.ru/ - 1.0.0 + 1.0.1 0.4.1 diff --git a/plugins/profiler/templates/skin/developer/actions/ActionProfiler/ajax/level.tpl b/plugins/profiler/templates/skin/developer/actions/ActionProfiler/ajax/level.tpl new file mode 100644 index 00000000..b356c7c6 --- /dev/null +++ b/plugins/profiler/templates/skin/developer/actions/ActionProfiler/ajax/level.tpl @@ -0,0 +1,14 @@ +
+ + {foreach from=$oReport->getAllEntries() item=oEntry} + + + + + + + + + {/foreach} +
{if $oEntry->getChildCount()!=0}+{/if}{$oEntry->getId()}{$oEntry->getName()}{$oEntry->getTimeFull()}{$oReport->getEntryFullShare($oEntry->getId())}% ({$oReport->getEntryShare($oEntry->getId())}%){$oEntry->getComment()}
+
\ No newline at end of file diff --git a/plugins/profiler/templates/skin/developer/actions/ActionProfiler/ajax/report.tpl b/plugins/profiler/templates/skin/developer/actions/ActionProfiler/ajax/report.tpl new file mode 100644 index 00000000..d3f2f639 --- /dev/null +++ b/plugins/profiler/templates/skin/developer/actions/ActionProfiler/ajax/report.tpl @@ -0,0 +1,22 @@ +{if $oReport} + {$aLang.profiler_entries_show_tree} + {$aLang.profiler_entries_show_all} ({$oReport->getStat('count')}) + {$aLang.profiler_entries_show_query} ({$oReport->getStat('query')}) + +
+ + {foreach from=$oReport->getAllEntries() item=oEntry} + + + + + + + + + {/foreach} +
{$oEntry->getId()}{$oEntry->getName()}{$oEntry->getTimeFull()}{$oReport->getEntryFullShare($oEntry->getId())}% ({$oReport->getEntryShare($oEntry->getId())}%){$oEntry->getComment()}
+
+{else} + {$aLang.error} +{/if} \ No newline at end of file diff --git a/plugins/profiler/templates/skin/developer/actions/ActionProfiler/ajax/tree.tpl b/plugins/profiler/templates/skin/developer/actions/ActionProfiler/ajax/tree.tpl new file mode 100644 index 00000000..1f69ef25 --- /dev/null +++ b/plugins/profiler/templates/skin/developer/actions/ActionProfiler/ajax/tree.tpl @@ -0,0 +1,9 @@ +{if $oReport} + {$aLang.profiler_entries_show_tree} + {$aLang.profiler_entries_show_all} ({$oReport->getStat('count')}) + {$aLang.profiler_entries_show_query} ({$oReport->getStat('query')}) + + {include file='profiler/templates/skin/developer/actions/ActionProfiler/ajax/level.tpl'} +{else} + {$aLang.error} +{/if} \ No newline at end of file diff --git a/plugins/profiler/templates/skin/developer/actions/ActionProfiler/report.tpl b/plugins/profiler/templates/skin/developer/actions/ActionProfiler/report.tpl new file mode 100644 index 00000000..0cb0a912 --- /dev/null +++ b/plugins/profiler/templates/skin/developer/actions/ActionProfiler/report.tpl @@ -0,0 +1,46 @@ +{include file='header.tpl' noShowSystemMessage=false} + + + + + + + + +

{$aLang.profiler_reports_title}

+ +
+ + + + + + + + + + + + + + + {foreach from=$aReports item=oReport} + + + + + + + + {/foreach} + +
{$aLang.profiler_table_date}{$aLang.profiler_table_time_full}{$aLang.profiler_table_count_id}
+{date_format date=$oReport.request_date}{$oReport.time_full}{$oReport.count_time_id}
+ + +
+ + +{include file='pagination.tpl' aPaging="$aPaging"} +{include file='footer.tpl'} \ No newline at end of file diff --git a/plugins/profiler/templates/skin/developer/actions/ActionProfiler/sidebar.tpl b/plugins/profiler/templates/skin/developer/actions/ActionProfiler/sidebar.tpl new file mode 100644 index 00000000..0741d865 --- /dev/null +++ b/plugins/profiler/templates/skin/developer/actions/ActionProfiler/sidebar.tpl @@ -0,0 +1,89 @@ +
+
+ {$aLang.profiler_filter_highlight} ({$aLang.profiler_filter_seconds}):
+ +
+
+ +
+

{$aLang.profiler_dbstat_title}

+ +
+

{$aLang.profiler_dbstat_count}: {$aDatabaseStat.count}
+ {$aLang.profiler_dbstat_max_date}: {$aDatabaseStat.max_date}

+ +


+
+ {$aLang.profiler_import_notice}

+ + +
+
+ + +
+

{$aLang.profiler_filter_title}

+ + {literal} + + {/literal} + + +
+


+ — +
+ {$aLang.profiler_filter_notice_date}

+ +


+
+ {$aLang.profiler_filter_notice_time}

+ +


+

+ + +
+ + +
\ No newline at end of file diff --git a/plugins/profiler/templates/skin/developer/css/style.css b/plugins/profiler/templates/skin/developer/css/style.css new file mode 100644 index 00000000..eebf0d0d --- /dev/null +++ b/plugins/profiler/templates/skin/developer/css/style.css @@ -0,0 +1 @@ +a.profiler { margin: 2px; padding: 4px 5px; text-decoration: none; } a.profiler.active { background: #333; color: #fff; } .profiler.entries { margin-top: 5px; } .profiler-table .has-child { background: #f4f4f4; } .profiler-table .filter { background: #dafad8; } .profiler-highlight { color: #4bb23b; } \ No newline at end of file diff --git a/plugins/profiler/templates/skin/developer/images/close.gif b/plugins/profiler/templates/skin/developer/images/close.gif new file mode 100644 index 0000000000000000000000000000000000000000..fe57e389694a3bdc4a551ec227d40612388666be GIT binary patch literal 70 zcmZ?wbhEHbM1;W_0B!OZi2wiq literal 0 HcmV?d00001 diff --git a/plugins/profiler/templates/skin/developer/images/open.gif b/plugins/profiler/templates/skin/developer/images/open.gif new file mode 100644 index 0000000000000000000000000000000000000000..9fe9fc61548a21e1ba312888a774d3c9517e4620 GIT binary patch literal 73 zcmZ?wbhEHbiTime) { + el.getParent('tr').addClass(thisObj.options.classes.filterNode); + } + }); + } +}); + +var lsProfiler; + +window.addEvent('domready', function() { + lsProfiler = new lsProfilerClass({ + img: { + path: DIR_PLUGIN_SKIN+'/images/' + }, + classes: { + openImg: 'folding-open', + closeImg: 'folding', + filterNode: 'filter' + } + }); +}); \ No newline at end of file