mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-06-28 15:45:35 +08:00
1、添加超级管理器编辑文档权限
2、新增CDN静态文件加速
This commit is contained in:
parent
45ad5a0c7f
commit
095957eecf
@ -13,6 +13,7 @@ import (
|
||||
"github.com/lifei6671/gocaptcha"
|
||||
"github.com/lifei6671/godoc/conf"
|
||||
"github.com/lifei6671/godoc/models"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// RegisterDataBase 注册数据库
|
||||
@ -86,6 +87,48 @@ func RegisterCommand() {
|
||||
|
||||
func RegisterFunction() {
|
||||
beego.AddFuncMap("config", models.GetOptionValue)
|
||||
|
||||
beego.AddFuncMap("cdn", func(p string) string {
|
||||
cdn := beego.AppConfig.DefaultString("cdn","")
|
||||
if strings.HasPrefix(p,"/") && strings.HasSuffix(cdn,"/"){
|
||||
return cdn + string(p[1:])
|
||||
}
|
||||
if !strings.HasPrefix(p,"/") && !strings.HasSuffix(cdn,"/"){
|
||||
return cdn + "/" + p
|
||||
}
|
||||
return cdn + p
|
||||
});
|
||||
|
||||
beego.AddFuncMap("cdnjs", func(p string) string {
|
||||
cdn := beego.AppConfig.DefaultString("cdnjs","")
|
||||
if strings.HasPrefix(p,"/") && strings.HasSuffix(cdn,"/"){
|
||||
return cdn + string(p[1:])
|
||||
}
|
||||
if !strings.HasPrefix(p,"/") && !strings.HasSuffix(cdn,"/"){
|
||||
return cdn + "/" + p
|
||||
}
|
||||
return cdn + p
|
||||
});
|
||||
beego.AddFuncMap("cdncss", func(p string) string {
|
||||
cdn := beego.AppConfig.DefaultString("cdncss","")
|
||||
if strings.HasPrefix(p,"/") && strings.HasSuffix(cdn,"/"){
|
||||
return cdn + string(p[1:])
|
||||
}
|
||||
if !strings.HasPrefix(p,"/") && !strings.HasSuffix(cdn,"/"){
|
||||
return cdn + "/" + p
|
||||
}
|
||||
return cdn + p
|
||||
});
|
||||
beego.AddFuncMap("cdnimg", func(p string) string {
|
||||
cdn := beego.AppConfig.DefaultString("cdnimg","")
|
||||
if strings.HasPrefix(p,"/") && strings.HasSuffix(cdn,"/"){
|
||||
return cdn + string(p[1:])
|
||||
}
|
||||
if !strings.HasPrefix(p,"/") && !strings.HasSuffix(cdn,"/"){
|
||||
return cdn + "/" + p
|
||||
}
|
||||
return cdn + p
|
||||
});
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
@ -64,4 +64,11 @@ mail_expired=30
|
||||
|
||||
|
||||
###############配置PDF生成工具地址###################
|
||||
wkhtmltopdf=D:/Program Files/wkhtmltopdf/bin/wkhtmltopdf.exe
|
||||
wkhtmltopdf=D:/Program Files/wkhtmltopdf/bin/wkhtmltopdf.exe
|
||||
|
||||
###############配置CDN加速##################
|
||||
cdn=
|
||||
cdnjs=
|
||||
cdncss=
|
||||
cdnimg=
|
||||
|
||||
|
@ -505,24 +505,35 @@ func (c *BookController) Release() {
|
||||
c.Prepare()
|
||||
|
||||
identify := c.GetString("identify")
|
||||
book ,err := models.NewBookResult().FindByIdentify(identify,c.Member.MemberId)
|
||||
|
||||
if err != nil {
|
||||
if err == models.ErrPermissionDenied {
|
||||
c.JsonResult(6001,"权限不足")
|
||||
}
|
||||
if err == orm.ErrNoRows {
|
||||
c.JsonResult(6002,"项目不存在")
|
||||
}
|
||||
beego.Error(err)
|
||||
c.JsonResult(6003,"未知错误")
|
||||
}
|
||||
if book.RoleId != conf.BookAdmin && book.RoleId != conf.BookFounder && book.RoleId != conf.BookEditor{
|
||||
c.JsonResult(6003,"权限不足")
|
||||
}
|
||||
book_id := 0
|
||||
|
||||
if c.Member.Role == conf.MemberSuperRole {
|
||||
book,err := models.NewBook().FindByFieldFirst("identify",identify)
|
||||
if err != nil {
|
||||
|
||||
}
|
||||
book_id = book.BookId
|
||||
}else {
|
||||
book, err := models.NewBookResult().FindByIdentify(identify, c.Member.MemberId)
|
||||
|
||||
if err != nil {
|
||||
if err == models.ErrPermissionDenied {
|
||||
c.JsonResult(6001, "权限不足")
|
||||
}
|
||||
if err == orm.ErrNoRows {
|
||||
c.JsonResult(6002, "项目不存在")
|
||||
}
|
||||
beego.Error(err)
|
||||
c.JsonResult(6003, "未知错误")
|
||||
}
|
||||
if book.RoleId != conf.BookAdmin && book.RoleId != conf.BookFounder && book.RoleId != conf.BookEditor {
|
||||
c.JsonResult(6003, "权限不足")
|
||||
}
|
||||
book_id = book.BookId
|
||||
}
|
||||
go func(identify string) {
|
||||
models.NewDocument().ReleaseContent(book.BookId)
|
||||
models.NewDocument().ReleaseContent(book_id)
|
||||
pdfpath := "cache/" + identify + ".pdf"
|
||||
|
||||
if _,err := os.Stat(pdfpath); os.IsExist(err){
|
||||
|
@ -32,6 +32,10 @@ func isReadable (identify,token string,c *DocumentController) *models.BookResult
|
||||
beego.Error(err)
|
||||
c.Abort("500")
|
||||
}
|
||||
if c.Member != nil && c.Member.Role == conf.MemberSuperRole {
|
||||
bookResult := book.ToBookResult()
|
||||
return bookResult
|
||||
}
|
||||
//如果文档是私有的
|
||||
if book.PrivatelyOwned == 1 {
|
||||
|
||||
@ -61,6 +65,7 @@ func isReadable (identify,token string,c *DocumentController) *models.BookResult
|
||||
bookResult := book.ToBookResult()
|
||||
|
||||
if c.Member != nil {
|
||||
|
||||
rel, err := models.NewRelationship().FindByBookIdAndMemberId(bookResult.BookId, c.Member.MemberId)
|
||||
|
||||
if err == nil {
|
||||
@ -191,16 +196,27 @@ func (c *DocumentController) Edit() {
|
||||
c.Abort("404")
|
||||
}
|
||||
|
||||
bookResult,err := models.NewBookResult().FindByIdentify(identify,c.Member.MemberId)
|
||||
bookResult := models.NewBookResult()
|
||||
//如果是超级管理者,则不判断权限
|
||||
if c.Member.Role == conf.MemberSuperRole {
|
||||
book,err := models.NewBook().FindByFieldFirst("identify",identify)
|
||||
if err != nil {
|
||||
c.JsonResult(6002, "项目不存在或权限不足")
|
||||
}
|
||||
bookResult = book.ToBookResult()
|
||||
|
||||
if err != nil {
|
||||
beego.Error("DocumentController.Edit => ",err)
|
||||
}else {
|
||||
bookResult, err := models.NewBookResult().FindByIdentify(identify, c.Member.MemberId)
|
||||
|
||||
c.Abort("403")
|
||||
}
|
||||
if bookResult.RoleId == conf.BookObserver {
|
||||
if err != nil {
|
||||
beego.Error("DocumentController.Edit => ", err)
|
||||
|
||||
c.JsonResult(6002,"项目不存在或权限不足")
|
||||
c.Abort("403")
|
||||
}
|
||||
if bookResult.RoleId == conf.BookObserver {
|
||||
|
||||
c.JsonResult(6002, "项目不存在或权限不足")
|
||||
}
|
||||
}
|
||||
|
||||
//根据不同编辑器类型加载编辑器
|
||||
@ -260,16 +276,27 @@ func (c *DocumentController) Create() {
|
||||
c.JsonResult(6006,"文档标识已被使用")
|
||||
}
|
||||
}
|
||||
book_id := 0
|
||||
//如果是超级管理员则不判断权限
|
||||
if c.Member.Role == conf.MemberSuperRole {
|
||||
book,err := models.NewBook().FindByFieldFirst("identify",identify)
|
||||
if err != nil {
|
||||
beego.Error(err)
|
||||
c.JsonResult(6002, "项目不存在或权限不足")
|
||||
}
|
||||
book_id = book.BookId
|
||||
}else{
|
||||
bookResult, err := models.NewBookResult().FindByIdentify(identify, c.Member.MemberId)
|
||||
|
||||
bookResult,err := models.NewBookResult().FindByIdentify(identify,c.Member.MemberId)
|
||||
|
||||
if err != nil || bookResult.RoleId == conf.BookObserver {
|
||||
beego.Error("FindByIdentify => ",err)
|
||||
c.JsonResult(6002,"项目不存在或权限不足")
|
||||
if err != nil || bookResult.RoleId == conf.BookObserver {
|
||||
beego.Error("FindByIdentify => ", err)
|
||||
c.JsonResult(6002, "项目不存在或权限不足")
|
||||
}
|
||||
book_id = bookResult.BookId
|
||||
}
|
||||
if parent_id > 0 {
|
||||
doc,err := models.NewDocument().Find(parent_id)
|
||||
if err != nil || doc.BookId != bookResult.BookId{
|
||||
if err != nil || doc.BookId != book_id {
|
||||
c.JsonResult(6003,"父分类不存在")
|
||||
}
|
||||
}
|
||||
@ -277,7 +304,7 @@ func (c *DocumentController) Create() {
|
||||
document,_ := models.NewDocument().Find(doc_id)
|
||||
|
||||
document.MemberId = c.Member.MemberId
|
||||
document.BookId = bookResult.BookId
|
||||
document.BookId = book_id
|
||||
if doc_identify != ""{
|
||||
document.Identify = doc_identify
|
||||
}
|
||||
@ -330,26 +357,39 @@ func (c *DocumentController) Upload() {
|
||||
if !conf.IsAllowUploadFileExt(ext) {
|
||||
c.JsonResult(6004,"不允许的文件类型")
|
||||
}
|
||||
book_id := 0
|
||||
//如果是超级管理员,则不判断权限
|
||||
if c.Member.Role == conf.MemberSuperRole {
|
||||
book,err := models.NewBook().FindByFieldFirst("identify",identify)
|
||||
|
||||
book,err := models.NewBookResult().FindByIdentify(identify,c.Member.MemberId)
|
||||
|
||||
if err != nil {
|
||||
beego.Error("DocumentController.Edit => ",err)
|
||||
if err == orm.ErrNoRows {
|
||||
c.JsonResult(6006,"权限不足")
|
||||
if err != nil {
|
||||
c.JsonResult(6006, "文档不存在或权限不足")
|
||||
}
|
||||
c.JsonResult(6001,err.Error())
|
||||
}
|
||||
//如果没有编辑权限
|
||||
if book.RoleId != conf.BookEditor && book.RoleId != conf.BookAdmin && book.RoleId != conf.BookFounder {
|
||||
c.JsonResult(6006,"权限不足")
|
||||
book_id = book.BookId
|
||||
|
||||
}else{
|
||||
book, err := models.NewBookResult().FindByIdentify(identify, c.Member.MemberId)
|
||||
|
||||
if err != nil {
|
||||
beego.Error("DocumentController.Edit => ", err)
|
||||
if err == orm.ErrNoRows {
|
||||
c.JsonResult(6006, "权限不足")
|
||||
}
|
||||
c.JsonResult(6001, err.Error())
|
||||
}
|
||||
//如果没有编辑权限
|
||||
if book.RoleId != conf.BookEditor && book.RoleId != conf.BookAdmin && book.RoleId != conf.BookFounder {
|
||||
c.JsonResult(6006, "权限不足")
|
||||
}
|
||||
book_id = book.BookId
|
||||
}
|
||||
|
||||
if doc_id > 0 {
|
||||
doc,err := models.NewDocument().Find(doc_id);
|
||||
if err != nil {
|
||||
c.JsonResult(6007,"文档不存在")
|
||||
}
|
||||
if doc.BookId != book.BookId {
|
||||
if doc.BookId != book_id {
|
||||
c.JsonResult(6008,"文档不属于指定的项目")
|
||||
}
|
||||
}
|
||||
@ -369,7 +409,7 @@ func (c *DocumentController) Upload() {
|
||||
c.JsonResult(6005,"保存文件失败")
|
||||
}
|
||||
attachment := models.NewAttachment()
|
||||
attachment.BookId = book.BookId
|
||||
attachment.BookId = book_id
|
||||
attachment.FileName = moreFile.Filename
|
||||
attachment.CreateAt = c.Member.MemberId
|
||||
attachment.FileExt = ext
|
||||
@ -431,19 +471,23 @@ func (c *DocumentController) DownloadAttachment() {
|
||||
|
||||
if err != nil {
|
||||
//判断项目公开状态
|
||||
book,err := models.NewBook().FindByFieldFirst("identify",identify)
|
||||
book, err := models.NewBook().FindByFieldFirst("identify", identify)
|
||||
if err != nil {
|
||||
c.Abort("404")
|
||||
}
|
||||
//如果项目是私有的,并且token不正确
|
||||
if (book.PrivatelyOwned == 1 && token == "" ) || ( book.PrivatelyOwned == 1 && book.PrivateToken != token ){
|
||||
c.Abort("403")
|
||||
//如果不是超级管理员则判断权限
|
||||
if c.Member == nil || c.Member.Role != conf.MemberSuperRole {
|
||||
//如果项目是私有的,并且token不正确
|
||||
if (book.PrivatelyOwned == 1 && token == "" ) || ( book.PrivatelyOwned == 1 && book.PrivateToken != token ) {
|
||||
c.Abort("403")
|
||||
}
|
||||
}
|
||||
|
||||
book_id = book.BookId
|
||||
}else{
|
||||
book_id = bookResult.BookId
|
||||
}
|
||||
|
||||
//查找附件
|
||||
attachment,err := models.NewAttachment().Find(attach_id)
|
||||
|
||||
if err != nil {
|
||||
@ -469,11 +513,23 @@ func (c *DocumentController) Delete() {
|
||||
identify := c.GetString("identify")
|
||||
doc_id,err := c.GetInt("doc_id",0)
|
||||
|
||||
bookResult,err := models.NewBookResult().FindByIdentify(identify,c.Member.MemberId)
|
||||
book_id := 0
|
||||
//如果是超级管理员则忽略权限判断
|
||||
if c.Member.Role == conf.MemberSuperRole {
|
||||
book,err := models.NewBook().FindByFieldFirst("identify",identify)
|
||||
if err != nil {
|
||||
beego.Error("FindByIdentify => ", err)
|
||||
c.JsonResult(6002, "项目不存在或权限不足")
|
||||
}
|
||||
book_id = book.BookId
|
||||
}else {
|
||||
bookResult, err := models.NewBookResult().FindByIdentify(identify, c.Member.MemberId)
|
||||
|
||||
if err != nil || bookResult.RoleId == conf.BookObserver {
|
||||
beego.Error("FindByIdentify => ",err)
|
||||
c.JsonResult(6002,"项目不存在或权限不足")
|
||||
if err != nil || bookResult.RoleId == conf.BookObserver {
|
||||
beego.Error("FindByIdentify => ", err)
|
||||
c.JsonResult(6002, "项目不存在或权限不足")
|
||||
}
|
||||
book_id = bookResult.BookId
|
||||
}
|
||||
|
||||
if doc_id <= 0 {
|
||||
@ -486,9 +542,11 @@ func (c *DocumentController) Delete() {
|
||||
beego.Error("Delete => ",err)
|
||||
c.JsonResult(6003,"删除失败")
|
||||
}
|
||||
if doc.BookId != bookResult.BookId {
|
||||
//如果文档所属项目错误
|
||||
if doc.BookId != book_id {
|
||||
c.JsonResult(6004,"参数错误")
|
||||
}
|
||||
//递归删除项目下的文档以及子文档
|
||||
err = doc.RecursiveDocument(doc.DocumentId)
|
||||
if err != nil {
|
||||
c.JsonResult(6005,"删除失败")
|
||||
@ -508,12 +566,22 @@ func (c *DocumentController) Content() {
|
||||
if err != nil {
|
||||
doc_id,_ = strconv.Atoi(c.Ctx.Input.Param(":id"))
|
||||
}
|
||||
book_id := 0
|
||||
//如果是超级管理员,则忽略权限
|
||||
if c.Member.Role == conf.MemberSuperRole {
|
||||
book ,err := models.NewBook().FindByFieldFirst("identify",identify)
|
||||
if err != nil {
|
||||
c.JsonResult(6002, "项目不存在或权限不足")
|
||||
}
|
||||
book_id = book.BookId
|
||||
}else {
|
||||
bookResult, err := models.NewBookResult().FindByIdentify(identify, c.Member.MemberId)
|
||||
|
||||
bookResult,err := models.NewBookResult().FindByIdentify(identify,c.Member.MemberId)
|
||||
|
||||
if err != nil || bookResult.RoleId == conf.BookObserver {
|
||||
beego.Error("FindByIdentify => ",err)
|
||||
c.JsonResult(6002,"项目不存在或权限不足")
|
||||
if err != nil || bookResult.RoleId == conf.BookObserver {
|
||||
beego.Error("FindByIdentify => ", err)
|
||||
c.JsonResult(6002, "项目不存在或权限不足")
|
||||
}
|
||||
book_id = bookResult.BookId
|
||||
}
|
||||
|
||||
if doc_id <= 0 {
|
||||
@ -531,7 +599,7 @@ func (c *DocumentController) Content() {
|
||||
if err != nil {
|
||||
c.JsonResult(6003,"读取文档错误")
|
||||
}
|
||||
if doc.BookId != bookResult.BookId {
|
||||
if doc.BookId != book_id {
|
||||
c.JsonResult(6004,"保存的文档不属于指定项目")
|
||||
}
|
||||
if doc.Version != version && !strings.EqualFold(is_cover,"yes"){
|
||||
@ -581,10 +649,6 @@ func (c *DocumentController) Export() {
|
||||
}
|
||||
book := isReadable(identify,token,c)
|
||||
|
||||
if book.PrivatelyOwned == 1 {
|
||||
|
||||
}
|
||||
|
||||
docs, err := models.NewDocument().FindListByBookId(book.BookId)
|
||||
|
||||
if err != nil {
|
||||
|
@ -134,6 +134,14 @@ func (m *Book) FindByFieldFirst(field string,value interface{})(*Book,error) {
|
||||
|
||||
}
|
||||
|
||||
func (m *Book) FindByIdentify(identify string) (*Book,error) {
|
||||
o := orm.NewOrm()
|
||||
|
||||
err := o.QueryTable(m.TableNameWithPrefix()).Filter("identify",identify).One(m)
|
||||
|
||||
return m,err
|
||||
}
|
||||
|
||||
//分页查询指定用户的项目
|
||||
func (m *Book) FindToPager(pageIndex, pageSize ,memberId int) (books []*BookResult,totalCount int,err error){
|
||||
|
||||
|
@ -340,7 +340,11 @@ h6 {
|
||||
margin-left: auto!important;
|
||||
margin-right: auto!important
|
||||
}
|
||||
|
||||
@media screen and (max-width: 840px) {
|
||||
.manual-article .article-content{
|
||||
min-width: inherit;
|
||||
}
|
||||
}
|
||||
.manual-article .article-content .article-body{
|
||||
min-height: 90px;
|
||||
padding: 5px;
|
||||
|
5
utils/template_fun.go
Normal file
5
utils/template_fun.go
Normal file
@ -0,0 +1,5 @@
|
||||
package utils
|
||||
|
||||
func Asset(p string,cdn string) string {
|
||||
return cdn + p;
|
||||
}
|
@ -5,13 +5,13 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<title>我的文档 - Powered by MinDoc</title>
|
||||
<title>我的项目 - Powered by MinDoc</title>
|
||||
|
||||
<!-- Bootstrap -->
|
||||
<link href="/static/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="/static/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="{{cdncss "/static/bootstrap/css/bootstrap.min.css"}}" rel="stylesheet" type="text/css">
|
||||
<link href="{{cdncss "/static/font-awesome/css/font-awesome.min.css"}}" rel="stylesheet" type="text/css">
|
||||
|
||||
<link href="/static/css/main.css" rel="stylesheet">
|
||||
<link href="{{cdncss "/static/css/main.css"}}" rel="stylesheet">
|
||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
@ -70,7 +70,7 @@
|
||||
|
||||
</template>
|
||||
<template v-else="">
|
||||
<a :href="'/book/' + item.identify + '/dashboard'" title="项目概要" style="font-size: 12px;" target="_blank">
|
||||
<a :href="'/book/' + item.identify + '/dashboard'" title="项目概要" style="font-size: 12px;">
|
||||
${item.description}
|
||||
</a>
|
||||
</template>
|
||||
@ -177,11 +177,11 @@
|
||||
</div>
|
||||
</div><!--END Modal-->
|
||||
|
||||
<script src="/static/jquery/1.12.4/jquery.min.js"></script>
|
||||
<script src="/static/bootstrap/js/bootstrap.min.js"></script>
|
||||
<script src="/static/vuejs/vue.min.js" type="text/javascript"></script>
|
||||
<script src="/static/js/jquery.form.js" type="text/javascript"></script>
|
||||
<script src="/static/js/main.js" type="text/javascript"></script>
|
||||
<script src="{{cdnjs "/static/jquery/1.12.4/jquery.min.js"}}" type="text/javascript"></script>
|
||||
<script src="{{cdnjs "/static/bootstrap/js/bootstrap.min.js"}}" type="text/javascript"></script>
|
||||
<script src="{{cdnjs "/static/vuejs/vue.min.js"}}" type="text/javascript"></script>
|
||||
<script src="{{cdnjs "/static/js/jquery.form.js"}}" type="text/javascript"></script>
|
||||
<script src="{{cdnjs "/static/js/main.js"}}" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$("#addBookDialogForm").ajaxForm({
|
||||
|
@ -8,10 +8,10 @@
|
||||
<title>编辑文档 - Powered by MinDoc</title>
|
||||
|
||||
<!-- Bootstrap -->
|
||||
<link href="/static/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="/static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
|
||||
<link href="/static/jstree/3.3.4/themes/default/style.min.css" rel="stylesheet">
|
||||
<link href="/static/css/kancloud.css" rel="stylesheet">
|
||||
<link href="{{cdncss "/static/bootstrap/css/bootstrap.min.css"}}" rel="stylesheet">
|
||||
<link href="{{cdncss "/static/font-awesome/css/font-awesome.min.css"}}" rel="stylesheet">
|
||||
<link href="{{cdncss "/static/jstree/3.3.4/themes/default/style.min.css"}}" rel="stylesheet">
|
||||
<link href="{{cdncss "/static/css/kancloud.css"}}" rel="stylesheet">
|
||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
@ -168,9 +168,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/static/jquery/1.12.4/jquery.min.js"></script>
|
||||
<script src="/static/bootstrap/js/bootstrap.min.js"></script>
|
||||
<script src="/static/jstree/3.3.4/jstree.min.js" type="text/javascript"></script>
|
||||
<script src="{{cdnjs "/static/jquery/1.12.4/jquery.min.js"}}"></script>
|
||||
<script src="{{cdnjs "/static/bootstrap/js/bootstrap.min.js"}}"></script>
|
||||
<script src="{{cdnjs "/static/jstree/3.3.4/jstree.min.js"}}" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$("#sidebar").jstree({
|
||||
|
@ -5,18 +5,18 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<title>我的文档 - Powered by MinDoc</title>
|
||||
<title>文档管理 - Powered by MinDoc</title>
|
||||
|
||||
<!-- Bootstrap -->
|
||||
<link href="/static/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="/static/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="{{cdncss "/static/bootstrap/css/bootstrap.min.css"}}" rel="stylesheet" type="text/css">
|
||||
<link href="{{cdncss "/static/font-awesome/css/font-awesome.min.css"}}" rel="stylesheet" type="text/css">
|
||||
|
||||
<link href="/static/css/main.css" rel="stylesheet">
|
||||
<link href="{{cdncss "/static/css/main.css"}}" rel="stylesheet">
|
||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="/static/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="/static/respond.js/1.4.2/respond.min.js"></script>
|
||||
<script src="{{cdnjs "/static/html5shiv/3.7.3/html5shiv.min.js"}}"></script>
|
||||
<script src="{{cdnjs "/static/respond.js/1.4.2/respond.min.js" }}"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
@ -57,7 +57,8 @@
|
||||
</a>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a href="{{urlfor "DocumentController.Index" ":key" $item.Identify}}" title="查看文档" data-toggle="tooltip"><i class="fa fa-eye"></i> 查看文档</a>
|
||||
<a href="{{urlfor "DocumentController.Index" ":key" $item.Identify}}" title="查看文档" data-toggle="tooltip" target="_blank"><i class="fa fa-eye"></i> 查看文档</a>
|
||||
<a href="{{urlfor "DocumentController.Edit" ":key" $item.Identify ":id" ""}}" title="编辑文档" data-toggle="tooltip" target="_blank"><i class="fa fa-edit" aria-hidden="true"></i> 编辑文档</a>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
@ -99,11 +100,11 @@
|
||||
{{template "widgets/footer.tpl" .}}
|
||||
</div>
|
||||
|
||||
<script src="/static/jquery/1.12.4/jquery.min.js"></script>
|
||||
<script src="/static/bootstrap/js/bootstrap.min.js"></script>
|
||||
<script src="/static/vuejs/vue.min.js" type="text/javascript"></script>
|
||||
<script src="/static/js/jquery.form.js" type="text/javascript"></script>
|
||||
<script src="/static/js/main.js" type="text/javascript"></script>
|
||||
<script src="{{cdnjs "/static/jquery/1.12.4/jquery.min.js"}}"></script>
|
||||
<script src="{{cdnjs "/static/bootstrap/js/bootstrap.min.js"}}"></script>
|
||||
<script src="{{cdnjs "/static/vuejs/vue.min.js"}}" type="text/javascript"></script>
|
||||
<script src="{{cdnjs "/static/js/jquery.form.js"}}" type="text/javascript"></script>
|
||||
<script src="{{cdnjs "/static/js/main.js"}}" type="text/javascript"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user