mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
Support event handler (trigger) to customize the content of the admin dashboard
This commit is contained in:
parent
72ab8ea8fc
commit
286dc76e78
4 changed files with 54 additions and 24 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
<load target="js/dashboard_default.js" />
|
<load target="js/dashboard_default.js" />
|
||||||
<load target="js/dashboard_counter.js" />
|
<load target="js/dashboard_counter.js" />
|
||||||
|
|
||||||
<div>
|
{@ ob_start()}
|
||||||
<section class="status">
|
<section class="status">
|
||||||
<h2>{$lang->uv}</h2>
|
<h2>{$lang->uv}</h2>
|
||||||
<div style="margin:10px 15px;height:142px" id="visitors"></div>
|
<div style="margin:10px 15px;height:142px" id="visitors"></div>
|
||||||
|
|
@ -13,7 +13,10 @@
|
||||||
<a href="{getUrl('', 'module', 'admin', 'act', 'dispCounterAdminIndex')}"><i>›</i> {$lang->details}</a>
|
<a href="{getUrl('', 'module', 'admin', 'act', 'dispCounterAdminIndex')}"><i>›</i> {$lang->details}</a>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="status">
|
{@ $dashboard_stack->left[] = ob_get_clean()}
|
||||||
|
|
||||||
|
{@ ob_start()}
|
||||||
|
<section class="status">
|
||||||
<h2>{$lang->pv}</h2>
|
<h2>{$lang->pv}</h2>
|
||||||
<div style="margin:10px 15px;height:142px" id="page_views"></div>
|
<div style="margin:10px 15px;height:142px" id="page_views"></div>
|
||||||
<div class="more">
|
<div class="more">
|
||||||
|
|
@ -24,9 +27,9 @@
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<style scoped>.jqplot-table-legend{background:#fff;top:13px!important}</style>
|
<style scoped>.jqplot-table-legend{background:#fff;top:13px!important}</style>
|
||||||
</div>
|
{@ $dashboard_stack->left[] = ob_get_clean()}
|
||||||
|
|
||||||
<div>
|
{@ ob_start()}
|
||||||
<section class="document">
|
<section class="document">
|
||||||
<h2>{$lang->latest_documents}</h2>
|
<h2>{$lang->latest_documents}</h2>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
@ -47,6 +50,9 @@
|
||||||
</ul>
|
</ul>
|
||||||
<p class="more"><a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList')}"><i>›</i> {$lang->more}</a></p>
|
<p class="more"><a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList')}"><i>›</i> {$lang->more}</a></p>
|
||||||
</section>
|
</section>
|
||||||
|
{@ $dashboard_stack->right[] = ob_get_clean()}
|
||||||
|
|
||||||
|
{@ ob_start()}
|
||||||
<section class="reply">
|
<section class="reply">
|
||||||
<h2>{$lang->latest_comments}</h2>
|
<h2>{$lang->latest_comments}</h2>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
@ -66,7 +72,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
<p class="more"><a href="{getUrl('', 'module', 'admin', 'act', 'dispCommentAdminList')}"><i>›</i> {$lang->more}</a></p>
|
<p class="more"><a href="{getUrl('', 'module', 'admin', 'act', 'dispCommentAdminList')}"><i>›</i> {$lang->more}</a></p>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
{@ $dashboard_stack->right[] = ob_get_clean()}
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
xe.lang.this_week = '{$lang->this_week}';
|
xe.lang.this_week = '{$lang->this_week}';
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<config autoescape="on" />
|
<config autoescape="on" />
|
||||||
<load target="js/dashboard_default.js" />
|
<load target="js/dashboard_default.js" />
|
||||||
|
|
||||||
<div>
|
{@ ob_start()}
|
||||||
<section class="member">
|
<section class="member">
|
||||||
<h2>{$lang->member}</h2>
|
<h2>{$lang->member}</h2>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
@ -17,9 +17,9 @@
|
||||||
<a href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminList')}"><i class="xi-angle-right"></i><span>{$lang->more}</span></a>
|
<a href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminList')}"><i class="xi-angle-right"></i><span>{$lang->more}</span></a>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
{@ $dashboard_stack->left[] = ob_get_clean()}
|
||||||
|
|
||||||
<div>
|
{@ ob_start()}
|
||||||
<section class="document">
|
<section class="document">
|
||||||
<h2>{$lang->latest_documents}</h2>
|
<h2>{$lang->latest_documents}</h2>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
@ -45,6 +45,9 @@
|
||||||
<a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList')}"><i class="xi-angle-right"></i><span>{$lang->more}</span></a>
|
<a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList')}"><i class="xi-angle-right"></i><span>{$lang->more}</span></a>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
{@ $dashboard_stack->right[] = ob_get_clean()}
|
||||||
|
|
||||||
|
{@ ob_start()}
|
||||||
<section class="reply">
|
<section class="reply">
|
||||||
<h2>{$lang->latest_comments}</h2>
|
<h2>{$lang->latest_comments}</h2>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
@ -65,4 +68,5 @@
|
||||||
<p class="more"><a href="{getUrl('', 'module', 'admin', 'act', 'dispCommentAdminList')}"><i class="xi-angle-right"></i><span>{$lang->more}</span></a></p>
|
<p class="more"><a href="{getUrl('', 'module', 'admin', 'act', 'dispCommentAdminList')}"><i class="xi-angle-right"></i><span>{$lang->more}</span></a></p>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
{@ $dashboard_stack->right[] = ob_get_clean()}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1281,19 +1281,21 @@ margin-bottom: 10px;
|
||||||
|
|
||||||
/* Dashboard */
|
/* Dashboard */
|
||||||
.x .dashboard {
|
.x .dashboard {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
.x .dashboard:after {
|
.x .dashboard > div {
|
||||||
content: "";
|
width: calc(50% - 12.5px);
|
||||||
display: block;
|
|
||||||
clear: both;
|
|
||||||
}
|
}
|
||||||
.x .dashboard>div {
|
@media all and (max-width: 800px) {
|
||||||
float: right;
|
.x .dashboard {
|
||||||
width: 49%;
|
flex-direction: column;
|
||||||
}
|
align-items: stretch;
|
||||||
.x .dashboard>div:first-child {
|
}
|
||||||
float: left;
|
.x .dashboard > div {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.x .dashboard>div>section {
|
.x .dashboard>div>section {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@
|
||||||
<h2>{$lang->update_available}</h2>
|
<h2>{$lang->update_available}</h2>
|
||||||
<p>{$lang->core_update_available} <a href="https://rhymix.org/" target="_blank">{$lang->core_update_link}</a></p>
|
<p>{$lang->core_update_available} <a href="https://rhymix.org/" target="_blank">{$lang->core_update_link}</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--// Notice about cleaning up unnecessary core files -->
|
<!--// Notice about cleaning up unnecessary core files -->
|
||||||
<div class="message update cleanup_list" cond="$cleanup_list">
|
<div class="message update cleanup_list" cond="$cleanup_list">
|
||||||
<h2>{$lang->msg_cleanup_notice_title}</h2>
|
<h2>{$lang->msg_cleanup_notice_title}</h2>
|
||||||
|
|
@ -91,12 +91,30 @@
|
||||||
|
|
||||||
<!--// Real dashboard begins here -->
|
<!--// Real dashboard begins here -->
|
||||||
<div class="dashboard">
|
<div class="dashboard">
|
||||||
<block cond="$counterAddonActivated">
|
{@
|
||||||
|
$dashboard_stack = new stdClass;
|
||||||
|
$dashboard_stack->left = [];
|
||||||
|
$dashboard_stack->right = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
<!--@if($counterAddonActivated)-->
|
||||||
<include target="./_dashboard_counter.html" />
|
<include target="./_dashboard_counter.html" />
|
||||||
</block>
|
<!--@else-->
|
||||||
<block cond="!$counterAddonActivated">
|
|
||||||
<include target="./_dashboard_default.html" />
|
<include target="./_dashboard_default.html" />
|
||||||
</block>
|
<!--@endif-->
|
||||||
|
|
||||||
|
<!--// Call event handler -->
|
||||||
|
{@ ModuleHandler::triggerCall('admin.dashboard', 'before', $dashboard_stack)}
|
||||||
|
|
||||||
|
<!--// Left stack -->
|
||||||
|
<div>
|
||||||
|
{implode("\n", $dashboard_stack->left)|noescape}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--// Right stack -->
|
||||||
|
<div>
|
||||||
|
{implode("\n", $dashboard_stack->right)|noescape}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue