rhymix/modules/admin/tpl/index.html
nagoon97 96a8e3ab62 UI bug fix
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12517 201d5d3c-b55e-5fd7-737f-ddc643e51545
2013-01-07 06:56:22 +00:00

216 lines
9.4 KiB
HTML

<include target="./_header.html" />
<load target="./js/jquery.jqplot.min.js" />
<load target="./js/jqplot.barRenderer.min.js" />
<load target="./js/jqplot.categoryAxisRenderer.min.js" />
<load target="./js/jqplot.pointLabels.min.js" />
<load target="./css/jquery.jqplot.min.css" />
<div class="content" id="content">
<div class="x_page-header">
<h1>{$lang->control_panel} <a class="x_icon-question-sign" href="./help/index.html#UMAN_dashboard" target="_blank">{$lang->help}</a></h1>
</div>
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<form action="./" method="post" class="message info x_clearfix" cond="!$isEnviromentGatheringAgreement">
<input type="hidden" name="module" value="admin" />
<input type="hidden" name="act" value="procAdminEnviromentGatheringAgreement" />
<h2>{$lang->install_env_agreement}</h2>
<p>{$lang->install_env_agreement_desc}</p>
<div class="x_btn-group x_pull-right" style="margin-bottom:10px">
<button type="submit" name="is_agree" value="false" class="x_btn x_btn-small">{$lang->disagree}</button>
<button type="submit" name="is_agree" value="true" class="x_btn x_btn-small x_btn-primary">{$lang->agree}</button>
</div>
</form>
<div class="message update" cond="$addTables || $needUpdate">
<h2 cond="$needUpdate && $addTables">{$lang->need_update_and_table}</h2>
<h2 cond="$needUpdate && !$addTables">{$lang->need_update}</h2>
<h2 cond="!$needUpdate && $addTables">{$lang->need_table}</h2>
<ul>
<block loop="$module_list => $key,$value">
<li style="margin:0 0 4px 0" cond="$value->need_install">{$value->module} - <button type="button" onclick="doInstallModule('{$value->module}')" class="x_btn x_btn-small">{$lang->cmd_create_db_table}</button></li>
<li style="margin:0 0 4px 0" cond="$value->need_update">{$value->module} - <button type="button" onclick="doUpdateModule('{$value->module}')" class="x_btn x_btn-small">{$lang->cmd_module_update}</button></li>
</block>
</ul>
</div>
<div class="message update" cond="count($newVersionList)">
<h2>{$lang->available_new_version}</h2>
<ul>
<li loop="$newVersionList => $key, $package" style="margin:0 0 4px 0">
[{$lang->typename[$package->type]} <a class="x_icon-question-sign" href="{$package->helpUrl}" target="_blank" cond="$package->helpUrl">{$lang->help}</a>] {$package->title} ver. {$package->version} - <a href="{$package->url}&amp;return_url={urlencode(getRequestUriByServerEnviroment())}">{$lang->update}</a>
</li>
</ul>
</div>
<div class="dashboard">
<div>
<section class="status">
<h2>{$lang->uv}</h2>
<div style="margin:10px 15px; height:150px" id="visitors"></div>
<div class="more">
<dl>
<dt>{$lang->menu_gnb['user']}:</dt><dd><a href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminList')}">{number_format($status->member->totalCount)}(<!--@if($status->member->todayCount > 0)-->+<!--@end-->{number_format($status->member->todayCount)})</a></dd>
</dl>
<a href="{getUrl('', 'module', 'admin', 'act', 'dispCounterAdminIndex')}"><i>&rsaquo;</i> {$lang->details}</a>
</div>
</section>
<section class="status">
<h2>{$lang->pv}</h2>
<div style="margin:10px 15px; height:150px" id="page_views"></div>
<div class="more">
<dl>
<dt>{$lang->menu_gnb_sub['document']}:</dt><dd><a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList')}">{number_format($status->document->totalCount)}(<!--@if($status->document->todayCount > 0)-->+<!--@end-->{number_format($status->document->todayCount)})</a></dd>
</dl>
<a href="{getUrl('', 'module', 'admin', 'act', 'dispCounterAdminIndex')}"><i>&rsaquo;</i> {$lang->details}</a>
</div>
</section>
</div>
<div>
<section class="document">
<h2>{$lang->latest_documents}</h2>
<ul>
<!--@foreach($latestDocumentList AS $key=>$value)-->
{@$document = $value->variables}
<li>
<a href="{getUrl('', 'document_srl', $document['document_srl'])}" target="_blank"><!--@if(trim($value->getTitle()))-->{$value->getTitle()}<!--@else--><strong>{$lang->no_title_document}</strong><!--@end--></a>
<span class="side">{$document['nick_name']}</span>
<form class="action">
<input type="hidden" name="module" value="admin" />
<input type="hidden" name="act" value="procDocumentManageCheckedDocument" />
<input type="hidden" name="cart[]" value="{$document['document_srl']}" />
<input type="hidden" name="success_return_url" value="{getUrl('', 'module', 'admin')}" />
<button type="submit" name="type" value="trash" class="x_icon-trash">{$lang->cmd_trash}</button>
<button type="submit" name="type" value="delete" class="x_icon-remove">{$lang->cmd_delete}</button>
</form>
</li>
<!--@end-->
<li cond="!is_array($latestDocumentList) || count($latestDocumentList) < 1">{$lang->no_data}</li>
</ul>
<p class="more"><a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList')}"><i>&rsaquo;</i> {$lang->more}</a></p>
</section>
<section class="reply">
<h2>{$lang->latest_comments}</h2>
<ul>
<!--@foreach($latestCommentList AS $key=>$value)-->
<li>
<a href="{getUrl('', 'document_srl', $value->document_srl)}#comment_{$value->comment_srl}" target="_blank"><!--@if(trim($value->content))-->{$value->getSummary()}<!--@else--><strong>{$lang->no_text_comment}</strong><!--@end--></a>
<span class="side">{$value->nick_name}</span>
<form class="action">
<input type="hidden" name="module" value="admin" />
<input type="hidden" name="act" value="procCommentAdminDeleteChecked" />
<input type="hidden" name="cart[]" value="{$value->comment_srl}" />
<input type="hidden" name="success_return_url" value="{getUrl('', 'module', 'admin')}" />
<button type="submit" name="is_trash" value="true" class="x_icon-trash">{$lang->cmd_trash}</button>
<button type="submit" name="is_trash" value="false" class="x_icon-remove">{$lang->cmd_delete}</button>
</form>
</li>
<!--@end-->
<li cond="!is_array($latestCommentList) || count($latestCommentList) < 1">{$lang->no_data}</li>
</ul>
<p class="more"><a href="{getUrl('', 'module', 'admin', 'act', 'dispCommentAdminList')}"><i>&rsaquo;</i> {$lang->more}</a></p>
</section>
</div>
</div>
</div>
<include target="./_footer.html" />
<script>
xe.lang.this_week = '{$lang->this_week}';
xe.lang.next_week = '{$lang->next_week}';
xe.lang.mon = '{$lang->mon}';
xe.lang.tue = '{$lang->tue}';
xe.lang.wed = '{$lang->wed}';
xe.lang.thu = '{$lang->thu}';
xe.lang.fri = '{$lang->fri}';
xe.lang.sat = '{$lang->sat}';
xe.lang.sun = '{$lang->sun}';
jQuery(function($){
// Dashboard portlet UI
$('.dashboard>div>section>ul>li')
.bind('mouseenter focusin', function(){
$(this).addClass('hover').find('>.action').show();
})
.bind('mouseleave focusout', function(){
if(!$(this).find(':focus').length){
$(this).removeClass('hover').find('>.action').hide();
}
});
});
function obj2Array(htObj){
var aRes = [];
for(var x in htObj){
if(!htObj.hasOwnProperty(x)) continue;
aRes.push(htObj[x]);
}
return aRes;
}
jQuery(function ($) {
$.exec_json("counter.getWeeklyUniqueVisitor", {}, function(htRes){
var aLastWeek = obj2Array(htRes.last_week.list);
var aThisWeek = obj2Array(htRes.this_week.list);
drawChart("visitors", "Weekly Visitors", aLastWeek, aThisWeek);
});
$.exec_json("counter.getWeeklyPageView", {}, function(htRes){
var aLastWeek = obj2Array(htRes.last_week.list);
var aThisWeek = obj2Array(htRes.this_week.list);
drawChart("page_views", "Weekly Page Views", aLastWeek, aThisWeek);
});
});
function drawChart(sContainerId, sTitle, aLastWeek, aThisWeek) {
$ = jQuery;
var s1 = aLastWeek;
var s2 = aThisWeek;
// Can specify a custom tick Array.
// Ticks should match up one for each y value (category) in the series.
var ticks = [xe.lang.sun,xe.lang.mon,xe.lang.tue,xe.lang.wed,xe.lang.thu,xe.lang.fri,xe.lang.sat];
var plot1 = $.jqplot(sContainerId, [s1, s2], {
// The "seriesDefaults" option is an options object that will
// be applied to all series in the chart.
seriesDefaults:{
renderer:$.jqplot.BarRenderer,
rendererOptions: {fillToZero: true}
},
// Custom labels for the series are specified with the "label"
// option on the series option. Here a series option object
// is specified for each series.
series:[
{label: xe.lang.next_week},
{label: xe.lang.this_week}
],
// Show the legend and put it outside the grid, but inside the
// plot container, shrinking the grid to accomodate the legend.
// A value of "outside" would not shrink the grid and allow
// the legend to overflow the container.
legend: {
show: true,
placement: 'outsideGrid'
},
axes: {
// Use a category axis on the x axis and use our custom ticks.
xaxis: {
renderer: $.jqplot.CategoryAxisRenderer,
ticks: ticks
},
// Pad the y axis just a little so bars can get close to, but
// not touch, the grid boundaries. 1.2 is the default padding.
yaxis: {
min: 0,
ticks: 1,
//tickOptions: {formatString: '%d'},
pad: 1.05
}
}
});
};
</script>