summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-08-10 21:47:23 +0800
committerUnknwon <u@gogs.io>2015-08-10 21:47:23 +0800
commit75aff60c903c2c5ab92d75c9f067d6815f3daa2e (patch)
treee12104d0fbb25f15c41ee83c6c47acf9841df703 /templates
parent09a1b2a1f5ca4c510be2828635a790b2a775ac94 (diff)
downloadgitea-75aff60c903c2c5ab92d75c9f067d6815f3daa2e.tar.gz
gitea-75aff60c903c2c5ab92d75c9f067d6815f3daa2e.zip
finish create issue with milestone and assignee
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/issue/list.tmpl11
-rw-r--r--templates/repo/issue/new_form.tmpl20
-rw-r--r--templates/user/issues.tmpl2
3 files changed, 21 insertions, 12 deletions
diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl
index fa3f660fa8..640112e4a6 100644
--- a/templates/repo/issue/list.tmpl
+++ b/templates/repo/issue/list.tmpl
@@ -87,11 +87,14 @@
<p class="desc">
{{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.Name|Str2html}}
{{if .Milestone}}
- {{with .Milestone}}
- <a class="milestone" href="{{$.RepoLink}}/issues?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.ID}}">
- <span class="octicon octicon-milestone"></span> {{.Name}}
+ <a class="milestone" href="{{$.RepoLink}}/issues?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.Milestone.ID}}">
+ <span class="octicon octicon-milestone"></span> {{.Milestone.Name}}
+ </a>
+ {{end}}
+ {{if .Assignee}}
+ <a class="ui right assignee poping up" href="{{.Assignee.HomeLink}}" data-content="{{.Assignee.Name}}" data-variation="inverted" data-position="left center">
+ <img class="ui avatar image" src="{{.Assignee.AvatarLink}}">
</a>
- {{end}}
{{end}}
</p>
</li>
diff --git a/templates/repo/issue/new_form.tmpl b/templates/repo/issue/new_form.tmpl
index 6d31a01e60..2d7a3edee8 100644
--- a/templates/repo/issue/new_form.tmpl
+++ b/templates/repo/issue/new_form.tmpl
@@ -101,23 +101,29 @@
</div>
</div>
- <!-- <div class="ui divider"></div>
+ <div class="ui divider"></div>
- <div class="ui {{if not .Assignees}}disabled{{end}} dropdown jump item">
+ <input id="assignee_id" name="assignee_id" type="hidden" value="{{.assignee_id}}">
+ <div class="ui {{if not .Assignees}}disabled{{end}} jump select-assignee dropdown">
<span class="text">
<strong>{{.i18n.Tr "repo.issues.new.assignee"}}</strong>
<span class="octicon octicon-gear"></span>
</span>
<div class="menu">
- <div class="item">{{.i18n.Tr "repo.issues.new.clear_assignee"}}</a>
+ <div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_assignee"}}</div>
{{range .Assignees}}
- <a class="item" href="#"><span class="octicon {{if eq .ID $.AssigneeID}}octicon-check{{end}}"></span> {{.Name}}</a>
+ <div class="item" data-id="{{.Id}}" data-href="{{.HomeLink}}" data-avatar="{{.AvatarLink}}"><img src="{{.AvatarLink}}"> {{.Name}}</div>
{{end}}
</div>
</div>
- <div class="ui list">
- <span class="item">filter_label_no_select</span>
- </div> -->
+ <div class="ui select-assignee list">
+ <span class="no-select item {{if .Assignee}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_assignee"}}</span>
+ <div class="selected">
+ {{if .Assignee}}
+ <a class="item" href="{{.Assignee.HomeLink}}"><img class="ui avatar image" src="{{.Assignee.AvatarLink}}"> {{.Assignee.Name}}</a>
+ {{end}}
+ </div>
+ </div>
</div>
</div>
{{end}}
diff --git a/templates/user/issues.tmpl b/templates/user/issues.tmpl
index 2eb393ff5f..677f9d1410 100644
--- a/templates/user/issues.tmpl
+++ b/templates/user/issues.tmpl
@@ -12,7 +12,7 @@
<li><a href="{{AppSubUrl}}/issues?type=created_by&repoid={{.RepoId}}&state={{.State}}" class="radius{{if eq .ViewType "created_by"}} active{{end}}">Created by you <strong class="pull-right">{{.IssueStats.CreateCount}}</strong></a></li>
<li><hr/></li>
{{range .Repos}}
- <li><a href="{{AppSubUrl}}/issues?type={{$.ViewType}}{{if eq $.RepoId .Id}}{{else}}&repoid={{.Id}}{{end}}&state={{$.State}}" class="radius{{if eq $.RepoId .Id}} active{{end}}">{{$.SignedUser.Name}}/{{.Name}} <strong class="pull-right">{{if $.IsShowClosed}}{{.NumClosedIssues}}{{else}}{{.NumOpenIssues}}{{end}}</strong></a></li>
+ <li><a href="{{AppSubUrl}}/issues?type={{$.ViewType}}{{if eq $.RepoId .ID}}{{else}}&repoid={{.ID}}{{end}}&state={{$.State}}" class="radius{{if eq $.RepoId .ID}} active{{end}}">{{$.SignedUser.Name}}/{{.Name}} <strong class="pull-right">{{if $.IsShowClosed}}{{.NumClosedIssues}}{{else}}{{.NumOpenIssues}}{{end}}</strong></a></li>
{{end}}
</ul>
</div>