summaryrefslogtreecommitdiffstats
path: root/templates/issue
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-03-26 12:31:01 -0400
committerUnknown <joe2010xtmf@163.com>2014-03-26 12:31:01 -0400
commit4b9eef50c9bf91e6ca2d85d9e63dc69b0ffba737 (patch)
tree15c5fd6dd9b72ba61e306ec8b068b35d3bc19239 /templates/issue
parent8c2f751bbb22ebf06c7f7f9621614b6e46130210 (diff)
downloadgitea-4b9eef50c9bf91e6ca2d85d9e63dc69b0ffba737.tar.gz
gitea-4b9eef50c9bf91e6ca2d85d9e63dc69b0ffba737.zip
Add comment of issue
Diffstat (limited to 'templates/issue')
-rw-r--r--templates/issue/view.tmpl44
1 files changed, 16 insertions, 28 deletions
diff --git a/templates/issue/view.tmpl b/templates/issue/view.tmpl
index 381c79990c..6b282513aa 100644
--- a/templates/issue/view.tmpl
+++ b/templates/issue/view.tmpl
@@ -6,52 +6,39 @@
<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>
+ <div class="number pull-right">#{{.Issue.Index}}</div>
+ <a class="author pull-left" href="/user/{{.Issue.Poster.Name}}"><img class="avatar" src="{{.Issue.Poster.AvatarLink}}" alt="" width="30"/></a>
+ <h1 class="title pull-left">{{.Issue.Name}}</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
+ <span class="status label label-{{if .Issue.IsClosed}}danger{{else}}success{{end}}">{{if .Issue.IsClosed}}Closed{{else}}Open{{end}}</span>
+ <a href="/user/{{.Issue.Poster.Name}}" class="author"><strong>{{.Issue.Poster.Name}}</strong></a> opened this issue
+ <span class="time">{{TimeSince .Issue.Created}}</span> · {{.Issue.NumComments}} comments
</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>
+ <p>{{.Issue.Content}}</p>
</div>
</div>
+ {{range .Comments}}
<div class="issue-child">
- <a class="user pull-left" href="#"><img class="avatar" src="#" alt=""/></a>
+ <a class="user pull-left" href="/user/{{.Poster.Name}}"><img class="avatar" src="{{.Poster.AvatarLink}}" 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>
+ <a href="/user/{{.Poster.Name}}" class="user">{{.Poster.Name}}</a> commented <span class="time">{{TimeSince .Created}}</span>
</div>
<div class="panel-body markdown">
- <p>@slene 看来也只能这样了。最主要是数组与切片的用法,我感觉不科学。因为要知道个数,然后个数与问号个数要对应。不能像PHP YII框架那样,直接传入一个数组,自己在里面把参数组装成1,2,3,4这种格式。希望,Beego框架能加上。那就太完美了。谢谢。</p>
+ <p>{{.Content}}</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>
+ {{end}}
<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="">
+ <a class="user pull-left" href="/user/{{.SignedUser.Name}}"><img class="avatar" src="{{.SignedUser.AvatarLink}}" alt=""/></a>
+ <form class="panel panel-default issue-content" action="/{{.RepositoryLink}}/comment/new" method="post">
+ {{.CsrfTokenHtml}}
<div class="panel-body">
<div class="form-group">
<div class="md-help pull-right"><!-- todo help link -->
@@ -64,6 +51,7 @@
<div class="tab-content">
<div class="tab-pane" id="issue-textarea">
<div class="form-group">
+ <input type="hidden" value="{{.Issue.Index}}" name="issueIndex"/>
<textarea class="form-control" name="content" id="issue-content" rows="10" placeholder="Write some content">{{.content}}</textarea>
</div>
</div>