File tree Expand file tree Collapse file tree 5 files changed +17
-1
lines changed Expand file tree Collapse file tree 5 files changed +17
-1
lines changed Original file line number Diff line number Diff line change
1
+ <!-- Disable (optional) - if search button has to be disabled -->
2
+ <!-- Tooltip (optional) - a tooltip to be displayed on hover -->
1
3
<button class="ui small primary icon button" aria-label="{{ctx.Locale.Tr "search.search"}}" {{with .Tooltip}}data-tooltip-content="{{.}}"{{end}}{{if .Disabled}} disabled{{end}}>{{svg "octicon-search"}}</button>
Original file line number Diff line number Diff line change
1
+ <!-- Value - value of the search field (for search results page) -->
2
+ <!-- Disabled (optional) - if search field/button has to be disabled -->
3
+ <!-- Placeholder (optional) - placeholder text to be used -->
4
+ <!-- Tooltip (optional) - a tooltip to be displayed on button hover -->
1
5
<div class="ui fluid action input">
2
6
{{template "shared/search/input" dict "Value" .Value "Disabled" .Disabled "Placeholder" .Placeholder}}
3
7
{{template "shared/search/button" dict "Disabled" .Disabled "Tooltip" .Tooltip}}
Original file line number Diff line number Diff line change
1
+ <!-- Value - value of the search field (for search results page) -->
2
+ <!-- Disabled (optional) - if search field/button has to be disabled -->
3
+ <!-- Placeholder (optional) - placeholder text to be used -->
4
+ <!-- IsFuzzy - state of the fuzzy search toggle -->
5
+ <!-- Tooltip (optional) - a tooltip to be displayed on button hover -->
1
6
<div class="ui fluid action input">
2
7
{{template "shared/search/input" dict "Value" .Value "Disabled" .Disabled "Placeholder" .Placeholder}}
3
8
{{template "shared/search/fuzzy" dict "Disabled" .Disabled "IsFuzzy" .IsFuzzy}}
Original file line number Diff line number Diff line change
1
+ <!-- Disabled (optional) - if dropdown has to be disabled -->
2
+ <!-- IsFuzzy - state of the fuzzy search toggle -->
1
3
<div class="ui small dropdown selection {{if .Disabled}} disabled{{end}}" data-tooltip-content="{{ctx.Locale.Tr "search.type_tooltip"}}">
2
4
<input name="fuzzy" type="hidden"{{if .Disabled}} disabled{{end}} value="{{.IsFuzzy}}">{{svg "octicon-triangle-down" 14 "dropdown icon"}}
3
5
<div class="text">{{if .IsFuzzy}}{{ctx.Locale.Tr "search.fuzzy"}}{{else}}{{ctx.Locale.Tr "search.match"}}{{end}}</div>
Original file line number Diff line number Diff line change 1
- <input type="search" spellcheck="false" name="q" maxlength="255" placeholder="{{if .Placeholder}}{{.Placeholder}}{{else}}{{ctx.Locale.Tr "search.search"}}…{{end}}"{{if .Value}} value="{{.Value}}"{{end}}{{if .Disabled}} disabled{{end}} {{if .Autofocus}}autofocus{{end}}>
1
+ <!-- Value - value of the search field (for search results page) -->
2
+ <!-- Disabled (optional) - if search field has to be disabled -->
3
+ <!-- Placeholder (optional) - placeholder text to be used -->
4
+ <input type="search" spellcheck="false" name="q" maxlength="255" placeholder="{{if .Placeholder}}{{.Placeholder}}{{else}}{{ctx.Locale.Tr "search.search"}}…{{end}}"{{if .Value}} value="{{.Value}}"{{end}}{{if .Disabled}} disabled{{end}} autofocus>
You can’t perform that action at this time.
0 commit comments