1
0
Fork 0
mirror of https://gitlab.com/SIGBUS/nyaa.git synced 2024-12-22 13:49:59 +00:00

Update upload/edit buttons.

This commit is contained in:
snowfag 2017-05-23 21:11:58 -04:00
parent 0770822824
commit 4a7d8646b6
4 changed files with 22 additions and 5 deletions

View file

@ -265,9 +265,15 @@ a.text-purple:hover, a.text-purple:active, a.text-purple:focus { color: #a760e0;
.btn-grey:hover, .btn-grey:focus, .btn-grey:active, .btn-grey.active, .open > .dropdown-toggle.btn-grey {
background-color: #aaaaaa;
}
.btn span.glyphicon {
opacity: 0;
.btn span.glyphicon-ok {
display: none;
}
.btn.active span.glyphicon {
opacity: 1;
.btn.active span.glyphicon-ok {
display: inline;
}
.btn span.glyphicon-remove {
display: inline;
}
.btn.active span.glyphicon-remove {
display: none;
}

View file

@ -36,28 +36,33 @@
<label class="btn btn-default {% if torrent.anonymous %}active{% endif %}" title="Upload torrent anonymously (don't display your username)">
{{ form.is_anonymous }}
<span class="glyphicon glyphicon-ok"></span>
<span class="glyphicon glyphicon-remove"></span>
Anonymous
</label>
{% endif %}
<label class="btn btn-grey {% if torrent.hidden %}active{% endif %}" title="Hide torrent from listing">
{{ form.is_hidden }}
<span class="glyphicon glyphicon-ok"></span>
<span class="glyphicon glyphicon-remove"></span>
Hidden
</label>
<label class="btn btn-danger {% if torrent.remake %}active{% endif %}" title="This torrent is derived from another release">
{{ form.is_remake }}
<span class="glyphicon glyphicon-ok"></span>
<span class="glyphicon glyphicon-remove"></span>
Remake
</label>
<label class="btn btn-warning {% if torrent.complete %}active{% endif %}" title="This torrent is a complete batch (eg. season)">
{{ form.is_complete }}
<span class="glyphicon glyphicon-ok"></span>
<span class="glyphicon glyphicon-remove"></span>
Complete
</label>
{% if g.user.is_trusted %}
<label class="btn btn-success {% if torrent.trusted %}active{% endif %}" title="Mark torrent trusted">
{{ form.is_trusted }}
<span class="glyphicon glyphicon-ok"></span>
<span class="glyphicon glyphicon-remove"></span>
Trusted
</label>
{% endif %}
@ -68,6 +73,7 @@
<label class="btn btn-primary {% if torrent.deleted %}active{% endif %}">
{{ form.is_deleted }}
<span class="glyphicon glyphicon-ok"></span>
<span class="glyphicon glyphicon-remove"></span>
Deleted
</label>
{% endif %}

View file

@ -27,7 +27,7 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<!-- Custom styles for this template -->
<link href="/static/css/main.css?v=4" rel="stylesheet">
<link href="/static/css/main.css?v=5" rel="stylesheet">
<!-- Core JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>

View file

@ -43,27 +43,32 @@
<label class="btn btn-default" title="Upload torrent anonymously (don't display your username)">
{{ upload_form.is_anonymous(disabled=(False if g.user else ""), checked=(False if g.user else "")) }}
<span class="glyphicon glyphicon-ok"></span>
<span class="glyphicon glyphicon-remove"></span>
Anonymous
</label>
<label class="btn btn-grey" title="Hide torrent from listing">
{{ upload_form.is_hidden }}
<span class="glyphicon glyphicon-ok"></span>
<span class="glyphicon glyphicon-remove"></span>
Hidden
</label>
<label class="btn btn-danger" title="This torrent is derived from another release">
{{ upload_form.is_remake }}
<span class="glyphicon glyphicon-ok"></span>
<span class="glyphicon glyphicon-remove"></span>
Remake
</label>
<label class="btn btn-warning" title="This torrent is a complete batch (eg. season)">
{{ upload_form.is_complete }}
<span class="glyphicon glyphicon-ok"></span>
<span class="glyphicon glyphicon-remove"></span>
Complete
</label>
{% if g.user.is_trusted %}
<label class="btn btn-success active" title="Mark torrent trusted">
{{ upload_form.is_trusted(checked="") }}
<span class="glyphicon glyphicon-ok"></span>
<span class="glyphicon glyphicon-remove"></span>
Trusted
</label>
{% endif %}