diff options
Diffstat (limited to 'templates/repo/home.tmpl')
-rw-r--r-- | templates/repo/home.tmpl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index e544b7aab5..8de54611c3 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -37,7 +37,7 @@ <div class="ui form gt-hidden gt-df gt-mt-4" id="topic_edit"> <div class="field gt-f1 gt-mr-3"> <div class="ui fluid multiple search selection dropdown" data-text-count-prompt="{{.locale.Tr "repo.topic.count_prompt"}}" data-text-format-prompt="{{.locale.Tr "repo.topic.format_prompt"}}"> - <input type="hidden" name="topics" value="{{range $i, $v := .Topics}}{{.Name}}{{if lt (Add $i 1) (len $.Topics)}},{{end}}{{end}}"> + <input type="hidden" name="topics" value="{{range $i, $v := .Topics}}{{.Name}}{{if Eval $i "+" 1 "<" (len $.Topics)}},{{end}}{{end}}"> {{range .Topics}} {{/* keey the same layout as Fomantic UI generated labels */}} <a class="ui label transition visible gt-cursor-default" data-value="{{.Name}}" style="display: inline-block !important;">{{.Name}}{{svg "octicon-x" 16 "delete icon"}}</a> @@ -61,7 +61,7 @@ <div class="gt-df gt-ac gt-fw gt-gap-y-3"> {{template "repo/branch_dropdown" dict "root" .}} {{$n := len .TreeNames}} - {{$l := Subtract $n 1}} + {{$l := Eval $n "-" 1}} <!-- If home page, show new pr. If not, show breadcrumb --> {{if eq $n 0}} {{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}} |