Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
Ce dépôt a été archivé le 2022-05-07. Vous pouvez voir ses fichiers ou le cloner, mais pas ouvrir de ticket ou de demandes d'ajout, ni soumettre de changements.
nyaa-pantsu/templates/layouts/partials/helpers/tags.jet.html
kilo 4e361ccce0 Prettier tags on upload (#1420)
* HTML changes to have tags in one div

* Add form-input class to tags inputs in upload

to have them look like regular inputs

* CSS changes to make tags inline

* Add changes to torrent edit

* Add changes to admin torrent edit

* attempt at fixing travis

* rollback admin edit in an attempt to fix travis

* Fix tags being visually broken in one very specific resolution

* fuck this shit
2017-08-28 11:42:38 +10:00

17 lignes
900 o
HTML

{{ block tagForm(tagType=nil,acceptedTag=nil) }}
{{ if isset(tagType) }}
<div class="form-group">
<label class="input-label" for="tag_{{ tagType.Name }}">{{T("tagtype_" + tagType.Name) }}</label>
{{ if len(tagType.Defaults) > 0 && tagType.Defaults[0] != "db" }}
<select id="tag_{{ tagType.Name }}" class="tagtype form-input" name="tag_{{ tagType.Name }}">
<option value="">{{ T("tagvalue_select") }}</option>
{{ range _, option := tagType.Defaults }}
<option value="{{ option }}"{{ if isset(acceptedTag) && acceptedTag.Tag == option }} selected{{end}}>{{ T("tagvalue_" + option) }}</option>
{{ end }}
</select>
{{ else }}
<input id="tag_{{ tagType.Name }}" class="tagtype form-input" name="tag_{{ tagType.Name }}"{{ if isset(acceptedTag) }} value="{{ acceptedTag.Tag }}"{{ end }}>
{{ end }}
</div>
{{ end }}
{{ end }}