mirror of
https://github.com/getrebuild/rebuild.git
synced 2024-11-10 17:04:33 +08:00
admin
This commit is contained in:
parent
9250a8cc58
commit
fd028b5e2f
4 changed files with 18 additions and 13 deletions
|
@ -1,4 +1,5 @@
|
|||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.rebuild.web.admin.AdminEntryControll"%>
|
||||
<%@ page import="com.rebuild.utils.AppUtils"%>
|
||||
<%@ page import="com.rebuild.server.Application"%>
|
||||
<%@ page import="com.rebuild.server.bizz.privileges.User"%>
|
||||
|
@ -26,20 +27,20 @@ final String showName = UserHelper.getShowName(currentUser);
|
|||
<div class="user-name"><%=showName%></div>
|
||||
<div class="user-id"><%=StringUtils.defaultIfBlank(currentUser.getEmail(), "邮箱未设置")%></div>
|
||||
</div>
|
||||
<a class="dropdown-item" href="${baseUrl}/me/profile"><span class="icon zmdi zmdi-account-box"></span>个人设置</a>
|
||||
<a class="dropdown-item" href="${baseUrl}/user/logout"><span class="icon zmdi zmdi-power"></span>退出</a>
|
||||
<a class="dropdown-item" href="${baseUrl}/me/profile"><i class="icon zmdi zmdi-account-box"></i>个人设置</a>
|
||||
<a class="dropdown-item" href="${baseUrl}/user/logout"><i class="icon zmdi zmdi-power"></i>退出</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="page-title"><span><%=request.getParameter("pageTitle")%></span></div>
|
||||
<ul class="nav navbar-nav float-right rb-icons-nav">
|
||||
<% if (currentUser.isAdmin()) { %>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link" href="${baseUrl}/admin/systems" title="系统配置"><span class="icon zmdi zmdi-settings"></span></a>
|
||||
<li class="nav-item dropdown J_admin-settings" data-verified="<%=AdminEntryControll.isAdminVerified(request)%>">
|
||||
<a class="nav-link" href="${baseUrl}/admin/systems" title="系统配置"><i class="icon zmdi zmdi-settings"></i></a>
|
||||
</li>
|
||||
<%} %>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link" href="${baseUrl}/app/notifications" title="通知"><span class="icon zmdi zmdi-notifications"></span></a>
|
||||
<a class="nav-link" href="${baseUrl}/app/notifications" title="通知"><i class="icon zmdi zmdi-notifications"></i></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -282,7 +282,7 @@ class RbListPagination extends React.Component {
|
|||
let props = this.props
|
||||
this.pageTotal = Math.ceil(props.rowTotal / props.pageSize)
|
||||
if (this.pageTotal <= 0) this.pageTotal = 1
|
||||
const pages = calcPages(this.pageTotal, props.pageNo)
|
||||
const pages = $calcPages(this.pageTotal, props.pageNo)
|
||||
return (
|
||||
<div className="row rb-datatable-footer">
|
||||
<div className="col-sm-5">
|
||||
|
|
|
@ -19,8 +19,13 @@ $(function(){
|
|||
|
||||
if (rb.isAdminUser == true) {
|
||||
$('.J_for-admin').removeClass('hide')
|
||||
if (location.href.indexOf('/admin/') == -1) {
|
||||
if ($('.J_admin-settings').data('verified') == true){
|
||||
$('.J_admin-settings a').attr('title', '系统配置 (已验证管理员权限)')
|
||||
$('.J_admin-settings a i').addClass('text-danger')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
const __initNavs = function(){
|
||||
|
@ -36,7 +41,7 @@ const __initNavs = function(){
|
|||
$('.left-sidebar-spacer').toggleClass('open')
|
||||
}).text($('.rb-right-navbar .page-title').text())
|
||||
|
||||
// ASide
|
||||
// aside
|
||||
let aside = $('.page-aside');
|
||||
if (aside.length > 0) {
|
||||
$('.page-aside .aside-header').click(function(){
|
||||
|
@ -55,7 +60,7 @@ const __initNavs = function(){
|
|||
// 计算分页
|
||||
// @tp 总计页面
|
||||
// @cp 当前页面
|
||||
const calcPages = function(tp, cp){
|
||||
const $calcPages = function(tp, cp){
|
||||
tp = ~~tp; cp = ~~cp;
|
||||
let pages = [];
|
||||
if (tp <= 8){
|
||||
|
@ -73,5 +78,4 @@ const calcPages = function(tp, cp){
|
|||
if (end <= tp - 1) pages.push('.');
|
||||
if (end <= tp) pages.push(tp);
|
||||
return pages;
|
||||
|
||||
}
|
|
@ -28,7 +28,7 @@
|
|||
<div class="tab-container">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item"><a class="nav-link active" href="#tab-rbview" data-toggle="tab">视图</a></li>
|
||||
<a class="vtab-settings" title="设置相关项"><i class="zmdi zmdi-settings"></i> </a>
|
||||
<a class="vtab-settings J_for-admin hide" title="配置相关项"><i class="zmdi zmdi-settings"></i> </a>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tab-rbview"></div>
|
||||
|
@ -52,8 +52,8 @@
|
|||
<div class="btn-group J_actions">
|
||||
<button class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown"><i class="icon zmdi zmdi-plus"></i> 新建相关</button>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item J_delete"><i class="icon zmdi zmdi-settings"></i> 设置</a>
|
||||
<div class="dropdown-divider J_for-admin hide"></div>
|
||||
<a class="dropdown-item J_for-admin hide"><i class="icon zmdi zmdi-settings"></i> 配置新建</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue