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
Cette révision appartient à :
Parent
d4c7bf4a64
révision
4e361ccce0
|
@ -427,7 +427,7 @@ select.form-input {
|
|||
.box.refine .refine-container-2 {
|
||||
width: 48%;
|
||||
position: relative;
|
||||
padding-top: 67px;
|
||||
padding-top: 67px;
|
||||
}
|
||||
|
||||
.refine-container-2 span.form-refine {
|
||||
|
@ -435,7 +435,7 @@ select.form-input {
|
|||
max-width: 426px;
|
||||
}
|
||||
.refine-container-2 span.spacing {
|
||||
width: 75px;
|
||||
width: 69px;
|
||||
}
|
||||
.refine-container-2 input[type="number"],.refine-container-2 input[type="text"] {
|
||||
margin-right: 4px;
|
||||
|
@ -1867,6 +1867,31 @@ span.tag {
|
|||
border-left: 1px solid #d8d8d8;
|
||||
}
|
||||
|
||||
.upload-tag-form h3 {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.upload-tag-form .form-group {
|
||||
width: 167px;
|
||||
display:inline-block;
|
||||
margin-bottom: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.upload-tag-form label {
|
||||
display:inline-block;
|
||||
width: 100%;
|
||||
font-size: unset;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
|
||||
.upload-tag-form input,.upload-tag-form select {
|
||||
height: 25px;
|
||||
padding: 3px 3px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
.show-xs {
|
||||
display: none;
|
||||
}
|
||||
|
|
|
@ -49,15 +49,17 @@
|
|||
<p class="help-block">{{ T("description_markdown_notice")}}</p>
|
||||
<textarea name="desc" id="desc" class="form-input up-input" rows="10">{{Form.Description}}</textarea>
|
||||
</div>
|
||||
<div class="upload-tag-form" style="margin-bottom: 10px;">
|
||||
<h3>{{ T("torrent_tags")}}</h3>
|
||||
{{ range Config.Torrents.Tags.Types }}
|
||||
{{ yield tagForm(tagType=., acceptedTag=Form.Tags.Get(.Name)) }}
|
||||
{{ end }}
|
||||
<div class="form-group">
|
||||
<label class="input-label" for="tag_{{Config.Torrents.Tags.Default}}">{{ T("tagtype_tags") }}</label>
|
||||
<input type="text" name="tag_{{Config.Torrents.Tags.Default}}" id="tag_{{Config.Torrents.Tags.Default}}" value="{{ Form.Tags.Get(Config.Torrents.Tags.Default).Tag }}" />
|
||||
<input type="text" name="tag_{{Config.Torrents.Tags.Default}}" class="form-input" id="tag_{{Config.Torrents.Tags.Default}}" value="{{ Form.Tags.Get(Config.Torrents.Tags.Default).Tag }}" />
|
||||
</div>
|
||||
{{ yield errors(name="tags")}}
|
||||
</div>
|
||||
<button type="submit" class="form-input up-input btn-green">{{ T("save_changes")}}</button>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
{{ block tag(tag=nil,accepted=false,torrent=nil,user=nil) }}
|
||||
{{ if isset(user) && isset(tag) }}
|
||||
{{if accepted || user.ID > 0 }}
|
||||
<span class="tag{{ if !accepted }} pending{{else}} accepted{{end}}" title="Tag: {{ tag.Type }} ({{ if !accepted }}{{ tag.Total }}{{else}}{{ T("accepted") }}{{end}})"{{ if !accepted }} data-weight="{{ tag.Total }}"{{end}}>
|
||||
<span class="tag-text{{ if user.ID > 0 }} votable{{end}}">
|
||||
{{ if tag.Type != Config.Torrents.Tags.Default }}{{ T("tagtype_" + tag.Type) }}: {{end}}{{ T(tag.GetName()) }}
|
||||
</span>
|
||||
{{ if !accepted }}
|
||||
<a href="/torrent/tag/{{ if user.Tags.Contains(tag) }}remove?id={{torrent.ID}}&tag={{ tag.Tag }}&type={{ tag.Type }}{{else}}add?id={{torrent.ID}}&tag_{{ tag.Type }}={{ tag.Tag }}{{end}}" class="tag-form {{ if user.Tags.Contains(tag) }}minus{{else}}plus{{end}}{{if accepted}} accepted{{end}}"></a>
|
||||
{{ else }}
|
||||
<a href="/search?tags={{ tag.Tag }}" title="{{ T("filter") }}"><i style="padding: 0px 0px 2px;" class="icon-search"></i></a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ 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 }}
|
||||
|
|
|
@ -53,15 +53,17 @@
|
|||
<p class="help-block">{{ T("description_markdown_notice")}}</p>
|
||||
<textarea style="height: 10rem;" id="desc" name="desc" class="form-input up-input" rows="10">{{Form.Description}}</textarea>
|
||||
</div>
|
||||
<h3>{{ T("torrent_tags")}}</h3>
|
||||
{{ range Config.Torrents.Tags.Types }}
|
||||
{{ yield tagForm(tagType=., acceptedTag=Form.Tags.Get(.Name)) }}
|
||||
{{ end }}
|
||||
<div class="form-group">
|
||||
<label class="input-label" for="tag_{{Config.Torrents.Tags.Default}}">{{ T("tagtype_tags") }}</label>
|
||||
<input type="text" name="tag_{{Config.Torrents.Tags.Default}}" id="tag_{{Config.Torrents.Tags.Default}}" value="{{ Form.Tags.Get(Config.Torrents.Tags.Default).Tag }}" />
|
||||
</div>
|
||||
{{ yield errors(name="tags")}}
|
||||
<div class="upload-tag-form" style="margin-bottom: 10px;">
|
||||
<h3 id="tag-h3">{{ T("torrent_tags")}}</h3>
|
||||
{{ range Config.Torrents.Tags.Types }}
|
||||
{{ yield tagForm(tagType=., acceptedTag=Form.Tags.Get(.Name)) }}
|
||||
{{ end }}
|
||||
<div class="form-group">
|
||||
<label class="input-label" for="tag_{{Config.Torrents.Tags.Default}}">{{ T("tagtype_tags") }}</label>
|
||||
<input type="text" name="tag_{{Config.Torrents.Tags.Default}}" class="form-input" id="tag_{{Config.Torrents.Tags.Default}}" value="{{ Form.Tags.Get(Config.Torrents.Tags.Default).Tag }}" />
|
||||
</div>
|
||||
{{ yield errors(name="tags")}}
|
||||
</div>
|
||||
<button type="submit" class="form-input up-input">{{ T("save_changes")}}</button>
|
||||
<br/>
|
||||
<br/>
|
||||
|
|
|
@ -162,15 +162,17 @@
|
|||
<p>{{ T("description_markdown_notice")}}</p>
|
||||
<textarea name="desc" id="desc" class="form-input up-input" style="height: 10rem;">{{Form.Description}}</textarea>
|
||||
|
||||
<h3 id="tag-h3" style="display:none;">{{ T("torrent_tags")}}</h3>
|
||||
<div class="upload-tag-form">
|
||||
<h3 id="tag-h3">{{ T("torrent_tags")}}</h3>
|
||||
{{ range Config.Torrents.Tags.Types }}
|
||||
{{ yield tagForm(tagType=., acceptedTag=Form.Tags.Get(.Name)) }}
|
||||
{{ end }}
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<label class="input-label" for="tag_{{Config.Torrents.Tags.Default}}">{{ T("tagtype_tags") }}</label>
|
||||
<input type="text" name="tag_{{Config.Torrents.Tags.Default}}" id="tag_{{Config.Torrents.Tags.Default}}" value="{{ Form.Tags.Get(Config.Torrents.Tags.Default).Tag }}" />
|
||||
</div>
|
||||
<input type="text" name="tag_{{Config.Torrents.Tags.Default}}" class="form-input" id="tag_{{Config.Torrents.Tags.Default}}" value="{{ Form.Tags.Get(Config.Torrents.Tags.Default).Tag }}" />
|
||||
</div>
|
||||
{{ yield errors(name="tags")}}
|
||||
</div>
|
||||
<div style="width: 240px">
|
||||
{{yield captcha(captchaid=Form.CaptchaID)}}
|
||||
</div>
|
||||
|
|
Référencer dans un nouveau ticket