admin dashboard data

pull/137/head
ruibaby 2019-03-14 16:37:02 +08:00
parent ef3780369d
commit af29e37379
2 changed files with 28 additions and 40 deletions

View File

@ -18,9 +18,7 @@ public class PostWithTitleDTO implements OutputConverter<PostWithTitleDTO, Post>
private Integer id; private Integer id;
/**
*
*/
private String title; private String title;
private String type;
} }

View File

@ -156,7 +156,7 @@
<#if (options.widget_postcount!'true')=='true'> <#if (options.widget_postcount!'true')=='true'>
<div class="col-lg-3 col-xs-6" id="widgetPostCountBody"> <div class="col-lg-3 col-xs-6" id="widgetPostCountBody">
<div class="small-box bg-aqua"> <div class="small-box bg-aqua">
<div class="inner"><h3><@articleTag method="postsCount">${postsCount!0}</@articleTag></h3><p><@spring.message code='admin.index.widgets.posts' /></p></div> <div class="inner"><h3>${postsCount!0}</h3><p><@spring.message code='admin.index.widgets.posts' /></p></div>
<div class="icon"><i class="ion ion-bag"></i></div> <div class="icon"><i class="ion ion-bag"></i></div>
<a data-pjax="true" href="/admin/posts" class="small-box-footer"><@spring.message code='common.btn.view-all' /> <i class="fa fa-arrow-circle-right"></i></a> <a data-pjax="true" href="/admin/posts" class="small-box-footer"><@spring.message code='common.btn.view-all' /> <i class="fa fa-arrow-circle-right"></i></a>
</div> </div>
@ -165,7 +165,7 @@
<#if (options.widget_commentcount!'true')=='true'> <#if (options.widget_commentcount!'true')=='true'>
<div class="col-lg-3 col-xs-6" id="widgetCommentCountBody"> <div class="col-lg-3 col-xs-6" id="widgetCommentCountBody">
<div class="small-box bg-green"> <div class="small-box bg-green">
<div class="inner"><h3>${commentCount!0}</h3><p><@spring.message code='admin.index.widgets.comments' /></p></div> <div class="inner"><h3>${commentsCount!0}</h3><p><@spring.message code='admin.index.widgets.comments' /></p></div>
<div class="icon"><i class="ion ion-stats-bars"></i></div> <div class="icon"><i class="ion ion-stats-bars"></i></div>
<a data-pjax="true" href="/admin/comments" class="small-box-footer"><@spring.message code='common.btn.view-all' /> <i class="fa fa-arrow-circle-right"></i></a> <a data-pjax="true" href="/admin/comments" class="small-box-footer"><@spring.message code='common.btn.view-all' /> <i class="fa fa-arrow-circle-right"></i></a>
</div> </div>
@ -174,7 +174,7 @@
<#if (options.widget_attachmentcount!'true')=='true'> <#if (options.widget_attachmentcount!'true')=='true'>
<div class="col-lg-3 col-xs-6" id="widgetAttachmentCountBody"> <div class="col-lg-3 col-xs-6" id="widgetAttachmentCountBody">
<div class="small-box bg-yellow"> <div class="small-box bg-yellow">
<div class="inner"><h3>${mediaCount!0}</h3><p><@spring.message code='admin.index.widgets.attachments' /></p></div> <div class="inner"><h3>${attachmentsCount!0}</h3><p><@spring.message code='admin.index.widgets.attachments' /></p></div>
<div class="icon"><i class="ion ion-person-add"></i></div> <div class="icon"><i class="ion ion-person-add"></i></div>
<a data-pjax="true" href="/admin/attachments" class="small-box-footer"><@spring.message code='common.btn.upload-image' /> <i class="fa fa-arrow-circle-right"></i></a> <a data-pjax="true" href="/admin/attachments" class="small-box-footer"><@spring.message code='common.btn.upload-image' /> <i class="fa fa-arrow-circle-right"></i></a>
</div> </div>
@ -211,13 +211,13 @@
<th><@spring.message code='common.th.status' /></th> <th><@spring.message code='common.th.status' /></th>
<th><@spring.message code='common.th.date' /></th> <th><@spring.message code='common.th.date' /></th>
</tr> </tr>
<#if postsLatest??> <#if latestPosts??>
<#list postsLatest as post> <#list latestPosts as post>
<tr> <tr>
<#if post.postStatus == 0> <#if post.postStatus == 0>
<td><a target="_blank" href="/archives/${post.postUrl}">${post.postTitle}</a></td> <td><a target="_blank" href="/archives/${post.postUrl}">${post.title}</a></td>
<#else > <#else >
<td>${post.postTitle}</td> <td>${post.title}</td>
</#if> </#if>
<td class="text-center"> <td class="text-center">
<#if post.postStatus==0> <#if post.postStatus==0>
@ -228,7 +228,7 @@
<span class="label bg-red"><@spring.message code='common.status.recycle-bin' /></span> <span class="label bg-red"><@spring.message code='common.status.recycle-bin' /></span>
</#if> </#if>
</td> </td>
<td><@common.timeline datetime="${post.postDate!}"?datetime /></td> <td><@common.timeline datetime="${post.createTime!}"?datetime /></td>
</tr> </tr>
</#list> </#list>
<#else> <#else>
@ -261,29 +261,19 @@
<th><@spring.message code='common.th.status' /></th> <th><@spring.message code='common.th.status' /></th>
<th><@spring.message code='common.th.date' /></th> <th><@spring.message code='common.th.date' /></th>
</tr> </tr>
<#if commentsLatest??> <#if latestComments??>
<#list commentsLatest as comment> <#list latestComments as comment>
<tr> <tr>
<td>${comment.commentAuthor}</td> <td>${comment.author!}</td>
<td> <td>
<#if comment.post.postType=="post"> <#if comment.post.type=="post">
<a target="_blank" href="/archives/${comment.post.getPostUrl()}">${comment.post.postTitle}</a> <a target="_blank" href="/archives/${comment.post.getPostUrl()}">${comment.post.title!}</a>
<#else> <#else>
<a target="_blank" href="/p/${comment.post.getPostUrl()}">${comment.post.postTitle}</a> <a target="_blank" href="/p/${comment.post.getPostUrl()}">${comment.post.title!}</a>
</#if> </#if>
</td> </td>
<td> <td>
<#switch comment.commentStatus> ${comment.content!}
<#case 0>
${comment.commentContent}
<#break>
<#case 1>
${comment.commentContent}
<#break>
<#case 2>
${comment.commentContent}
<#break>
</#switch>
</td> </td>
<td> <td>
<#switch comment.commentStatus> <#switch comment.commentStatus>
@ -298,7 +288,7 @@
<#break > <#break >
</#switch> </#switch>
</td> </td>
<td><@common.timeline datetime="${comment.commentDate}"?datetime /></td> <td><@common.timeline datetime="${comment.createTime}"?datetime /></td>
</tr> </tr>
</#list> </#list>
<#else> <#else>
@ -338,15 +328,15 @@
<th>IP</th> <th>IP</th>
<th><@spring.message code='common.th.date' /></th> <th><@spring.message code='common.th.date' /></th>
</tr> </tr>
<#if logsLatest??> <#if latestLogs??>
<#list logsLatest as log> <#list latestLogs as log>
<tr> <tr>
<td>${log.logTitle}</td> <td>${log.type}</td>
<td>${log.logContent}</td> <td>${log.content}</td>
<td>${log.logIp}</td> <td>${log.ipAddress}</td>
<td>${log.logCreated?string("yyyy-MM-dd HH:mm")}</td> <td>${log.createTime?string("yyyy-MM-dd HH:mm")}</td>
</tr> </tr>
</#list> </#list>
<#else> <#else>
<tr><td><@spring.message code='common.text.no-data' /></td></tr> <tr><td><@spring.message code='common.text.no-data' /></td></tr>
</#if> </#if>
@ -368,9 +358,9 @@
<div class="modal-body"> <div class="modal-body">
<p>「${options.blog_title!}」<@spring.message code='admin.index.blog-data.days-count-before' /><span id="blogStartDay">${hadDays!}</span><@spring.message code='admin.index.blog-data.days-count-after' /></p> <p>「${options.blog_title!}」<@spring.message code='admin.index.blog-data.days-count-before' /><span id="blogStartDay">${hadDays!}</span><@spring.message code='admin.index.blog-data.days-count-after' /></p>
<p><@spring.message code='admin.index.blog-data.during' /></p> <p><@spring.message code='admin.index.blog-data.during' /></p>
<p><@spring.message code='admin.index.blog-data.posts-count-before' />&nbsp;<@articleTag method="postsCount">${postsCount!0}</@articleTag>&nbsp;<@spring.message code='admin.index.blog-data.posts-count-after' /></p> <p><@spring.message code='admin.index.blog-data.posts-count-before' />&nbsp;${postsCount!0}&nbsp;<@spring.message code='admin.index.blog-data.posts-count-after' /></p>
<p><@spring.message code='admin.index.blog-data.tags-count-before' />&nbsp;<@commonTag method="tags">${tags?size}</@commonTag>&nbsp;<@spring.message code='admin.index.blog-data.tags-count-after' /></p> <p><@spring.message code='admin.index.blog-data.tags-count-before' />&nbsp;<@commonTag method="tags">${tags?size}</@commonTag>&nbsp;<@spring.message code='admin.index.blog-data.tags-count-after' /></p>
<p><@spring.message code='admin.index.blog-data.comments-count-before' />&nbsp;${commentCount}&nbsp;<@spring.message code='admin.index.blog-data.comments-count-after' /></p> <p><@spring.message code='admin.index.blog-data.comments-count-before' />&nbsp;${commentsCount!}&nbsp;<@spring.message code='admin.index.blog-data.comments-count-after' /></p>
<p><@spring.message code='admin.index.blog-data.links-count-before' />&nbsp;<@commonTag method="links">${links?size}</@commonTag>&nbsp;<@spring.message code='admin.index.blog-data.links-count-after' /></p> <p><@spring.message code='admin.index.blog-data.links-count-before' />&nbsp;<@commonTag method="links">${links?size}</@commonTag>&nbsp;<@spring.message code='admin.index.blog-data.links-count-after' /></p>
<p><@spring.message code='admin.index.blog-data.views-count-before' />&nbsp;${postViewsSum!0}&nbsp;<@spring.message code='admin.index.blog-data.views-count-after' /></p> <p><@spring.message code='admin.index.blog-data.views-count-before' />&nbsp;${postViewsSum!0}&nbsp;<@spring.message code='admin.index.blog-data.views-count-after' /></p>
<p><@spring.message code='admin.index.blog-data.motto' /></p> <p><@spring.message code='admin.index.blog-data.motto' /></p>