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/admin/paneltorrentedit.html
akuma06 2773fe200d Golint friendly (#747)
* Making the code Golint friendly

* No exported variables when not needed
* Same for functions
* Simplifying Templates variables with a form basic template variable
and a modelList basic template variable

* Adapted templates to new template variables

* use of .Models instead of model list
* use of .Form instead of modelform

* Small fix

* Small fix 2

Forgot $.Form

* Reverting templateDir as a var
2017-05-25 21:54:58 +02:00

48 lignes
2,7 Kio
HTML
Brut Annotations Historique

Ce fichier contient des caractères Unicode ambigus.

Ce fichier contient des caractères Unicode qui peuvent être confondus avec d'autres caractères. Si vous pensez que c'est intentionnel, vous pouvez ignorer cet avertissement. Utilisez le bouton Échappe pour les dévoiler.

{{define "title"}}Torrent Edit Panel{{end}}
{{define "content"}}
{{with .Form}}
<form enctype="multipart/form-data" role="upload" method="POST">
{{ range (index $.FormInfos "infos")}}
<div class="alert alert-info"><a class="panel-close close" data-dismiss="alert">×</a><i class="glyphicon glyphicon-info-sign"></i> {{ . }}</div>
{{end}}
{{ range (index $.FormErrors "errors")}}
<div class="alert alert-danger"><a class="panel-close close" data-dismiss="alert">×</a><i class="glyphicon glyphicon-exclamation-sign"></i> {{ . }}</div>
{{end}}
<div class="form-group">
<label for="name">{{call $.T "name"}}</label>
<input type="text" name="name" class="form-control" placeholder="{{call $.T "file_name"}}" value="{{.Name}}" required>
</div>
<div class="form-group">
<label for="c">{{call $.T "category"}}</label>
<select name="c" class="form-control input-sm">
<option value="">{{call $.T "select_a_torrent_category"}}</option>
{{ range $name_cat, $id_cat := (GetCategories false) }}
<option value="{{ $id_cat }}" {{if eq $.Form.Category $id_cat }}selected{{end}}>{{call $.T $name_cat }}</option>
{{ end }}
</select>
</div>
<div class="form-group">
<label for="Status">{{call $.T "torrent_status"}}</label>
<select name="status" class="form-control input-sm">
<option value="5" {{if eq .Status 5}}selected{{end}}>{{ call $.T "torrent_status_blocked" }}</option>
<option value="0" {{if eq .Status 0}}selected{{end}}>{{call $.T "torrent_status_hidden"}}</option>
<option value="1" {{if eq .Status 1}}selected{{end}}>{{call $.T "torrent_status_normal"}}</option>
<option value="2" {{if eq .Status 2}}selected{{end}}>{{call $.T "torrent_status_remake"}}</option>
<option value="3" {{if eq .Status 3}}selected{{end}}>{{call $.T "trusted"}}</option>
<option value="4" {{if eq .Status 4}}selected{{end}}>A+</option>
</select>
</div>
<div class="form-group">
<label for="website_link">{{call $.T "website_link"}}</label>
<input name="website_link" id="website_link" class="form-control" type="text" value="{{.WebsiteLink}}">
</div>
<div class="form-group">
<label for="desc">{{call $.T "torrent_description"}}</label>
<p class="help-block">{{call $.T "description_markdown_notice"}}</p>
<textarea name="desc" class="form-control" rows="10">{{.Description}}</textarea>
</div>
<button type="submit" class="btn btn-success">{{call $.T "save_changes"}}</button>
</form>
{{end}}
{{end}}