add issue view ui
This commit is contained in:
parent
0b22d90b7c
commit
08405a4fea
|
@ -1014,11 +1014,11 @@ html, body {
|
|||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
#issue-create-form .nav-tabs {
|
||||
#issue-create-form .nav-tabs, #issue .issue-reply .nav-tabs {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#issue-create-form .md-help {
|
||||
#issue .md-help {
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
|
@ -1095,6 +1095,75 @@ html, body {
|
|||
vertical-align: top;
|
||||
}
|
||||
|
||||
#issue .issue-whole .title {
|
||||
margin-top: 0;
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
#issue .issue-whole .number {
|
||||
font-size: 26px;
|
||||
color: #AAA;
|
||||
}
|
||||
|
||||
#issue .issue-head .author .avatar {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
#issue .issue-head .info {
|
||||
width: 99%;
|
||||
margin-top: 10px;
|
||||
padding-left: 64px;
|
||||
margin-bottom: 16px;
|
||||
padding-bottom: 20px;
|
||||
border-bottom: 1px solid #CCC;
|
||||
}
|
||||
|
||||
#issue .issue-head .status {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
padding: 6px 18px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
#issue .issue-head a.author {
|
||||
margin-left: .6em;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
#issue .issue-main {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
#issue .issue-content {
|
||||
border-bottom-width: 1px;
|
||||
}
|
||||
|
||||
#issue .issue-child .user .avatar {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
#issue .issue-child .issue-content {
|
||||
margin-left: 56px;
|
||||
}
|
||||
|
||||
#issue .issue-child .panel-heading {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
#issue .issue-child .panel-heading .user {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#issue .issue-line {
|
||||
border-color: #CCC;
|
||||
}
|
||||
|
||||
/* wrapper and footer */
|
||||
|
||||
#wrapper {
|
||||
|
|
|
@ -20,6 +20,7 @@ import (
|
|||
func Issues(ctx *middleware.Context, params martini.Params) {
|
||||
ctx.Data["Title"] = "Issues"
|
||||
ctx.Data["IsRepoToolbarIssues"] = true
|
||||
ctx.Data["IsRepoToolbarIssuesList"] = true
|
||||
|
||||
milestoneId, _ := base.StrTo(params["milestone"]).Int()
|
||||
page, _ := base.StrTo(params["page"]).Int()
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
</div>
|
||||
<div class="issues list-group">
|
||||
{{range .Issues}}
|
||||
<div class="list-group-item issue-item" id="{{.Id}}">
|
||||
<div class="list-group-item issue-item" id="issue-{{.Id}}">
|
||||
<span class="number pull-right">#{{.Index}}</span>
|
||||
<h5 class="title"><a href="/{{$.RepositoryLink}}/issues/{{.Index}}">{{.Name}}</a></h5>
|
||||
<p class="info">
|
||||
|
|
89
templates/issue/view.tmpl
Normal file
89
templates/issue/view.tmpl
Normal file
|
@ -0,0 +1,89 @@
|
|||
{{template "base/head" .}}
|
||||
{{template "base/navbar" .}}
|
||||
{{template "repo/nav" .}}
|
||||
{{template "repo/toolbar" .}}
|
||||
<div id="body" class="container">
|
||||
<div id="issue">
|
||||
<div id="issue-id" class="issue-whole">
|
||||
<div class="issue-head clearfix">
|
||||
<div class="number pull-right">#448</div>
|
||||
<span class="author pull-left"><img class="avatar" src="#" alt="" width="30"/></span>
|
||||
<h1 class="title pull-left">[Request]关于context中的Download方法</h1>
|
||||
<p class="info pull-left">
|
||||
<span class="status label label-success">Open</span>
|
||||
<a href="#" class="author"><strong>linbaozhong</strong></a> opened this issue
|
||||
<span class="time">2 months ago</span> · 1 comment
|
||||
</p>
|
||||
</div>
|
||||
<div class="issue-main">
|
||||
<div class="panel panel-default issue-content">
|
||||
<div class="panel-body markdown">
|
||||
<p>context中的Download方法:</p>
|
||||
<p>func (output *BeegoOutput) Download(file string)</p>
|
||||
<p>建议在file参数后面增加一个可选参数filename.</p>
|
||||
<p>如果filename不存在或为空,output.Header("Content-Disposition", "attachment; filename="+filepath.Base(file))</p>
|
||||
<p>如果filename不为空,output.Header("Content-Disposition", "attachment; filename="+filename)</p>
|
||||
<p>因为有时候,多数情况下,要下载的真实的文件名与显示和保存的本地的文件名是不一样的,希望显示的文件名更友好些</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="issue-child">
|
||||
<a class="user pull-left" href="#"><img class="avatar" src="#" alt=""/></a>
|
||||
<div class="issue-content panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<a href="#" class="user">phpqinsir</a> commented <span class="time">3 days ago</span>
|
||||
</div>
|
||||
<div class="panel-body markdown">
|
||||
<p>@slene 看来也只能这样了。最主要是数组与切片的用法,我感觉不科学。因为要知道个数,然后个数与问号个数要对应。不能像PHP YII框架那样,直接传入一个数组,自己在里面把参数组装成1,2,3,4这种格式。希望,Beego框架能加上。那就太完美了。谢谢。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="issue-child">
|
||||
<a class="user pull-left" href="#"><img class="avatar" src="#" alt=""/></a>
|
||||
<div class="issue-content panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<a href="#" class="user">phpqinsir</a> commented <span class="time">3 days ago</span>
|
||||
</div>
|
||||
<div class="panel-body markdown">
|
||||
<p>@slene 看来也只能这样了。最主要是数组与切片的用法,我感觉不科学。因为要知道个数,然后个数与问号个数要对应。不能像PHP YII框架那样,直接传入一个数组,自己在里面把参数组装成1,2,3,4这种格式。希望,Beego框架能加上。那就太完美了。谢谢。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="issue-line"/>
|
||||
<div class="issue-child issue-reply">
|
||||
<a class="user pull-left" href="#"><img class="avatar" src="#" alt=""/></a>
|
||||
<form class="panel panel-default issue-content" action="">
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<div class="md-help pull-right"><!-- todo help link -->
|
||||
Content with <a href="#">Markdown</a>
|
||||
</div>
|
||||
<ul class="nav nav-tabs" data-init="tabs">
|
||||
<li class="active"><a href="#issue-textarea" data-toggle="tab">Write</a></li>
|
||||
<li><a href="#issue-preview" data-toggle="tab">Preview</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane" id="issue-textarea">
|
||||
<div class="form-group">
|
||||
<textarea class="form-control" name="content" id="issue-content" rows="10" placeholder="Write some content">{{.content}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="issue-preview">preview</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<div class="form-group">
|
||||
<input type="hidden" value="id" name="repo-id"/>
|
||||
<button class="btn-success btn">Comment</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div><!--
|
||||
<div class="col-md-3">
|
||||
label assignment milestone dashboard
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
|
@ -10,9 +10,11 @@
|
|||
<!-- <li class="{{if .IsRepoToolbarPulls}}active{{end}}"><a href="/{{.RepositoryLink}}/pulls">Pull Requests</a></li> -->
|
||||
<li class="{{if .IsRepoToolbarIssues}}active{{end}}"><a href="/{{.RepositoryLink}}/issues">Issues <!--<span class="badge">42</span>--></a></li>
|
||||
{{if .IsRepoToolbarIssues}}
|
||||
<li class="tmp"><a href="/{{.RepositoryLink}}/issues/new">
|
||||
<li class="tmp">{{if .IsRepoToolbarIssuesList}}<a href="/{{.RepositoryLink}}/issues/new">
|
||||
<button class="btn btn-primary btn-sm">New Issue</button>
|
||||
</a></li>
|
||||
</a>{{else}}<a href="/{{.RepositoryLink}}/issues">
|
||||
<button class="btn btn-primary btn-sm">Issues List</button>
|
||||
</a>{{end}}</li>
|
||||
{{end}}
|
||||
<!-- <li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">More <b class="caret"></b></a>
|
||||
|
|
Loading…
Reference in a new issue