Fixing call to flag method
Cette révision appartient à :
Parent
e1d6e7df20
révision
21767877b1
11 fichiers modifiés avec 13 ajouts et 12 suppressions
|
@ -56,7 +56,7 @@ func walkDirTest(dir string, t *testing.T) {
|
|||
},
|
||||
"edit.jet.html": func(vars jet.VarMap) jet.VarMap {
|
||||
vars.Set("Form", &torrentValidator.TorrentRequest{})
|
||||
vars.Set("Languages", publicSettings.Languages{{"", ""}})
|
||||
vars.Set("Languages", publicSettings.Languages{{"", "", ""}})
|
||||
return vars
|
||||
},
|
||||
"upload.jet.html": func(vars jet.VarMap) jet.VarMap {
|
||||
|
@ -69,7 +69,7 @@ func walkDirTest(dir string, t *testing.T) {
|
|||
return vars
|
||||
},
|
||||
"settings.jet.html": func(vars jet.VarMap) jet.VarMap {
|
||||
vars.Set("Form", &LanguagesJSONResponse{"", publicSettings.Languages{{"", ""}}})
|
||||
vars.Set("Form", &LanguagesJSONResponse{"", publicSettings.Languages{{"", "", ""}}})
|
||||
return vars
|
||||
},
|
||||
"login.jet.html": func(vars jet.VarMap) jet.VarMap {
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
<div name="language" class="form-input language">
|
||||
{{ range _, language := GetTorrentLanguages() }}
|
||||
<span class="input-group">
|
||||
<input type="checkbox" name="languages" id="lang-{{ language.Code }}" value="{{language.Code}}"{{if contains(Form.Languages, language) }} checked{{end}}>
|
||||
<label for="lang-{{ language.Code }}" class="flag flag-{{ language.Flag() }}" title="{{LanguageName(language, T)}}"></label>
|
||||
<input type="checkbox" name="languages" id="lang-{{ language.Code }}" value="{{language.Code}}"{{if contains(Form.Languages, language.Code) }} checked{{end}}>
|
||||
<label for="lang-{{ language.Code }}" class="flag flag-{{ language.Flag(false) }}" title="{{LanguageName(language, T)}}"></label>
|
||||
</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{* We extend the base template *}
|
||||
{{ extends "partials/base" }}
|
||||
{{import "partials/helpers/search"}}
|
||||
|
||||
{* We apply the menu in the base template *}
|
||||
{{ block menu()}}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{* We extend the base template *}
|
||||
{{ extends "partials/base" }}
|
||||
{{import "partials/helpers/search"}}
|
||||
|
||||
{* We apply the menu in the base template *}
|
||||
{{ block menu()}}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{{import "helpers/errors"}}
|
||||
{{import "helpers/infos"}}
|
||||
{{import "helpers/search"}}
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ T("language_code") }}">
|
||||
<head>
|
||||
|
|
|
@ -57,8 +57,8 @@
|
|||
<div name="language" class="form-refine form-input language">
|
||||
{{ range _, language := GetTorrentLanguages() }}
|
||||
<span class="input-group">
|
||||
<input type="checkbox" name="lang" id="lang-{{ language }}" value="{{language}}"{{ range _, v := Search.Languages}}{{ if v.Code == language }} checked{{end}}{{end}}>
|
||||
<label for="lang-{{ language.Code }}" class="flag flag-{{ language.Flag() }}" title="{{LanguageName(language, T)}}"></label>
|
||||
<input type="checkbox" name="lang" id="lang-{{ language.Code }}" value="{{language.Code}}"{{ range _, v := Search.Languages}}{{ if v.Code == language.Code }} checked{{end}}{{end}}>
|
||||
<label for="lang-{{ language.Code }}" class="flag flag-{{ language.Flag(false) }}" title="{{LanguageName(language, T)}}"></label>
|
||||
</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
{{ range _, language := GetTorrentLanguages() }}
|
||||
<span class="input-group">
|
||||
<input type="checkbox" name="languages" id="lang-{{ language.Code }}" value="{{language.Code}}"{{if contains(Form.Languages, language.Code) }} checked{{end}}>
|
||||
<label for="lang-{{ language.Code }}" class="flag flag-{{ language.Flag() }}" title="{{LanguageName(language, T)}}"></label>
|
||||
<label for="lang-{{ language.Code }}" class="flag flag-{{ language.Flag(false) }}" title="{{LanguageName(language, T)}}"></label>
|
||||
</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
<a href="{{ URL.Parse("/search?c="+.Category+"_"+ .SubCategory) }}" title="{{ T(CategoryName(.Category, .SubCategory)) }}" class="category">
|
||||
{{if .Languages[0] != "" }}
|
||||
<a href="{{ URL.Parse("/search?c="+.Category+"_"+ .SubCategory +"&lang=") }}{{ range key, language := .Languages }}{{ language }}{{ if len(.Languages) > 1 && (key+1) < len(.Languages) }},{{ end }}{{ end }}">
|
||||
<img src="/img/blank.gif" alt="{{ LanguageName(.Languages[0], T) }}" class="flag flag-{{ (len(.Languages) == 1) ? .Languages[0].Flag() : "multiple" }}" title=" {{ range key, language := .Languages }}{{ LanguageName(language, T) }}{{ if len(.Languages) > 1 && (key+1) < len(.Languages) }},{{ end }}{{ end }}">
|
||||
<img src="/img/blank.gif" alt="{{ LanguageName(.Languages[0], T) }}" class="flag flag-{{ (len(.Languages) == 1) ? .Languages[0].Flag(false) : "multiple" }}" title=" {{ range key, language := .Languages }}{{ LanguageName(language, T) }}{{ if len(.Languages) > 1 && (key+1) < len(.Languages) }},{{ end }}{{ end }}">
|
||||
</a>
|
||||
{{end}}
|
||||
</a>
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
{{ range _, language := GetTorrentLanguages() }}
|
||||
<span class="input-group">
|
||||
<input type="checkbox" name="languages" id="lang-{{ language.Code }}" value="{{language.Code}}">
|
||||
<label for="lang-{{ language.Code }}" class="flag flag-{{ language.Flag() }}" title="{{LanguageName(language, T)}}"></label>
|
||||
<label for="lang-{{ language.Code }}" class="flag flag-{{ language.Flag(false) }}" title="{{LanguageName(language, T)}}"></label>
|
||||
</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<td class="tr-flag torrent-view-td torrent-info-data">
|
||||
{{ range _, language := Torrent.Languages}}
|
||||
{{ if language != "" }}
|
||||
<span><img src="/img/blank.gif" alt="{{ LanguageName(language, T) }}" class="flag flag-{{ language.Flag() }}" title="{{ LanguageName(language, T) }}"></img> {{ LanguageName(language, T) }}</span>
|
||||
<span><img src="/img/blank.gif" alt="{{ LanguageName(language, T) }}" class="flag flag-{{ language.Flag(false) }}" title="{{ LanguageName(language, T) }}"></img> {{ LanguageName(language, T) }}</span>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</td>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<a href="{{URL.Parse ("/search?c="+ torrent.Category + "_" +torrent.SubCategory) }}" title="{{T(CategoryName(torrent.Category, torrent.SubCategory))}}" class="category">
|
||||
{{ if torrent.Languages[0] != "" }}
|
||||
<a href="{{ URL.Parse("/search?c="+torrent.Category+"_"+ torrent.SubCategory +"&lang=") }}{{ range key, language := torrent.Languages }}{{ language }}{{ if len(torrent.Languages) > 1 && (key+1) < len(torrent.Languages) }},{{ end }}{{ end }}">
|
||||
<img src="/img/blank.gif" alt="{{ LanguageName(torrent.Languages[0], T) }}" class="flag flag-{{ (len(torrent.Languages) == 1) ? torrent.Languages[0].Flag() : "multiple" }}" title=" {{ range key, language := torrent.Languages }}{{ LanguageName(language, T) }}{{ if len(torrent.Languages) > 1 && (key+1) < len(torrent.Languages) }},{{ end }}{{ end }}">
|
||||
<img src="/img/blank.gif" alt="{{ LanguageName(torrent.Languages[0], T) }}" class="flag flag-{{ (len(torrent.Languages) == 1) ? torrent.Languages[0].Flag(false) : "multiple" }}" title=" {{ range key, language := torrent.Languages }}{{ LanguageName(language, T) }}{{ if len(torrent.Languages) > 1 && (key+1) < len(torrent.Languages) }},{{ end }}{{ end }}">
|
||||
</a>
|
||||
{{end}}
|
||||
</a>
|
||||
|
|
Référencer dans un nouveau ticket