1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-02 07:47:32 +00:00

add account view to sysadmin app router

This commit is contained in:
lian 2016-05-17 14:09:24 +08:00
parent 80a3b1e7d7
commit ca1a817dbd
2 changed files with 25 additions and 3 deletions

View File

@ -1,4 +1,4 @@
{% load i18n %}
{% load avatar_tags i18n %}
<script type="text/template" id="side-nav-tmpl">
<h3 class="hd">{% trans "System Admin" %}</h3>
@ -214,3 +214,21 @@
<td><%- error_msg %></td>
<td><time title='<%- time %>'><%- time_from_now %></time></td>
</script>
<script type="text/template" id="user-info-popup-tmpl">
<div class="outer-caret up-outer-caret"><div class="inner-caret"></div></div>
<div class="popover-con">
<div class="item ovhd">
{% avatar request.user 36 %}
<div class="txt">
<%- app.pageOptions.name %><br />
<%- app.pageOptions.email %>
</div>
</div>
<div class="loading-icon loading-tip"></div>
<p class="error alc hide"></p>
<div id="space-traffic" class="hide"></div>
<a class="item" href="{{ SITE_ROOT }}profile/">{% trans "Settings" %}</a>
<a href="{{ SITE_ROOT }}accounts/logout/" class="item" id="logout">{% trans "Log out" %}</a>
</div>
</script>

View File

@ -7,9 +7,11 @@ define([
'sysadmin-app/views/dashboard',
'sysadmin-app/views/desktop-devices',
'sysadmin-app/views/mobile-devices',
'sysadmin-app/views/device-errors'
'sysadmin-app/views/device-errors',
'app/views/account'
], function($, Backbone, Common, SideNavView, DashboardView,
DesktopDevicesView, MobileDevicesView, DeviceErrorsView) {
DesktopDevicesView, MobileDevicesView, DeviceErrorsView,
AccountView) {
"use strict";
var Router = Backbone.Router.extend({
@ -39,6 +41,8 @@ define([
this.mobileDevicesView = new MobileDevicesView();
this.deviceErrorsView = new DeviceErrorsView();
app.ui.accountView = this.accountView = new AccountView();
this.currentView = this.dashboardView;
$('#info-bar .close').click(Common.closeTopNoticeBar);