Browse Source

fix-1821

tags/v1.22.4.2^2
wangjr 3 years ago
parent
commit
fb5da398ea
2 changed files with 45 additions and 2 deletions
  1. +1
    -1
      templates/repo/issue/branch_selector_field.tmpl
  2. +44
    -1
      templates/repo/issue/view_content/sidebar.tmpl

+ 1
- 1
templates/repo/issue/branch_selector_field.tmpl View File

@@ -1,6 +1,6 @@
{{if and (not .Issue.IsPull) (not .PageIsComparePull)}}
<input id="ref_selector" name="ref" type="hidden" value="{{.Issue.Ref}}">
<div class="ui floating filter select-branch dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
<div class="ui {{if .ReadOnly}}disabled{{end}} floating filter select-branch dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
<div class="ui basic small button">
<span class="text branch-name">{{if .Issue.Ref}}{{$.RefEndName}}{{else}}{{.i18n.Tr "repo.issues.no_ref"}}{{end}}</span>
<i class="dropdown icon"></i>


+ 44
- 1
templates/repo/issue/view_content/sidebar.tmpl View File

@@ -1,6 +1,49 @@
<div class="four wide column">
<div class="ui segment metas">
{{template "repo/issue/branch_selector_field" .}}
<!-- {{template "repo/issue/branch_selector_field" .}} -->
{{if and (not .Issue.IsPull) (not .PageIsComparePull)}}
<input id="ref_selector" name="ref" type="hidden" value="{{.Issue.Ref}}">
<div class="ui floating filter select-branch dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
<div class="ui basic small button">
<span class="text branch-name">{{if .Issue.Ref}}{{$.RefEndName}}{{else}}{{.i18n.Tr "repo.issues.no_ref"}}{{end}}</span>
<i class="dropdown icon"></i>
</div>
<div class="menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/branch">
<div class="ui icon search input">
<i class="filter icon"></i>
<input name="search" placeholder="{{.i18n.Tr "repo.filter_branch_and_tag"}}...">
</div>
<div class="header">
<div class="ui grid">
<div class="two column row">
<a class="reference column" href="#" data-target="#branch-list">
<span class="text black">
{{svg "octicon-git-branch" 16}} {{.i18n.Tr "repo.branches"}}
</span>
</a>
<a class="reference column" href="#" data-target="#tag-list">
<span class="text">
<i class="reference tags icon"></i> {{.i18n.Tr "repo.tags"}}
</span>
</a>
</div>
</div>
</div>
<div id="branch-list" class="scrolling menu reference-list-menu">
{{range .Branches}}
<div class="item" data-id="refs/heads/{{.}}" data-name="{{.}}" data-id-selector="#ref_selector" data-href="{{$.RepoLink}}/issues?branch={{.}}">{{.}}</div>
{{end}}
</div>
<div id="tag-list" class="scrolling menu reference-list-menu" style="display: none">
{{range .Tags}}
<div class="item" data-id="refs/tags/{{.}}" data-name="tags/{{.}}" data-id-selector="#ref_selector" data-href="{{$.RepoLink}}/issues?branch={{.}}">{{.}}</div>
{{end}}
</div>
</div>
</div>
<div class="ui divider"></div>
{{end}}

{{if .Issue.IsPull }}



Loading…
Cancel
Save