mindoc/views/search/index.tpl

74 lines
3.9 KiB
Smarty
Raw Normal View History

2017-05-02 18:09:46 +08:00
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>搜索 - Powered by MinDoc</title>
<meta name="keywords" content="MinDoc,文档在线管理系统,WIKI,wiki,wiki在线,文档在线管理,接口文档在线管理,接口文档管理,{{.Keyword}}">
<meta name="description" content="MinDoc文档在线管理系统 {{.site_description}}">
2017-05-02 18:09:46 +08:00
<!-- Bootstrap -->
2017-05-12 14:21:29 +08:00
<link href="{{cdncss "/static/bootstrap/css/bootstrap.min.css"}}" rel="stylesheet">
<link href="{{cdncss "/static/font-awesome/css/font-awesome.min.css"}}" rel="stylesheet">
2017-05-02 18:09:46 +08:00
<link href="{{cdncss "/static/css/main.css" "version"}}" rel="stylesheet">
2017-05-02 18:09:46 +08:00
</head>
<body>
<div class="manual-reader manual-container manual-search-reader">
{{template "widgets/header.tpl" .}}
<div class="container manual-body">
<div class="search-head">
<strong class="search-title">显示"{{.Keyword}}"的搜索结果</strong>
</div>
<div class="row">
<div class="manual-list">
{{range $index,$item := .Lists}}
<div class="search-item">
2018-11-29 14:53:14 +08:00
<div class="title">
{{if eq $item.SearchType "document"}}
<span class="label mark-doc">文档</span>
2018-11-29 14:53:14 +08:00
<a href="{{urlfor "DocumentController.Read" ":key" $item.BookIdentify ":id" $item.Identify}}" title="{{$item.DocumentName}}" target="_blank">{{str2html $item.DocumentName}}</a>
{{else if eq $item.SearchType "book"}}
<span class="label mark-book">项目</span>
<a href="{{urlfor "DocumentController.Index" ":key" $item.Identify}}" title="{{$item.BookName}}" target="_blank"> {{str2html $item.DocumentName}}</a>
{{else}}
<span class="label mark-blog">文章</span>
<a href="{{urlfor "BlogController.Index" ":id" $item.DocumentId}}" title="{{$item.DocumentName}}" target="_blank"> {{str2html $item.DocumentName}}</a>
2018-11-29 14:53:14 +08:00
{{end}}
</div>
2017-05-02 18:09:46 +08:00
<div class="description">
{{str2html $item.Description}}
</div>
<div class="source">
2018-11-29 14:53:14 +08:00
{{if eq $item.SearchType "document"}}
<span class="item">来自项目:<a href="{{urlfor "DocumentController.Index" ":key" $item.BookIdentify}}" target="_blank">{{$item.BookName}}</a></span>
{{else if eq $item.SearchType "book"}}
<span class="item">项目:<a href="{{urlfor "DocumentController.Index" ":key" $item.Identify}}" target="_blank">{{$item.BookName}}</a></span>
2018-11-29 14:53:14 +08:00
{{else}}
<span class="item">来自文章:<a href="{{urlfor "BlogController.Index" ":id" $item.DocumentId}}" target="_blank">{{$item.BookName}}</a></span>
{{end}}
2017-05-02 18:09:46 +08:00
<span class="item">作者:{{$item.Author}}</span>
<span class="item">更新时间:{{date_format $item.ModifyTime "2006-01-02 15:04:05"}}</span>
2017-05-02 18:09:46 +08:00
</div>
</div>
{{else}}
<div class="search-empty">
<img src="{{cdnimg "/static/images/search_empty.png"}}" class="empty-image">
2017-05-02 20:42:49 +08:00
<span class="empty-text">暂无相关搜索结果</span>
2017-05-02 18:09:46 +08:00
</div>
{{end}}
2017-07-10 16:25:38 +08:00
<nav class="pagination-container">
{{.PageHtml}}
</nav>
2017-05-02 18:09:46 +08:00
<div class="clearfix"></div>
</div>
</div>
</div>
{{template "widgets/footer.tpl" .}}
</div>
2017-05-12 14:21:29 +08:00
<script src="{{cdnjs "/static/jquery/1.12.4/jquery.min.js"}}"></script>
<script src="{{cdnjs "/static/bootstrap/js/bootstrap.min.js"}}"></script>
{{.Scripts}}
2017-05-02 18:09:46 +08:00
</body>
</html>