1
0
Fork 0
mirror of https://gitlab.com/SIGBUS/nyaa.git synced 2024-12-23 00:39: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 { .btn-grey:hover, .btn-grey:focus, .btn-grey:active, .btn-grey.active, .open > .dropdown-toggle.btn-grey {
background-color: #aaaaaa; background-color: #aaaaaa;
} }
.btn span.glyphicon { .btn span.glyphicon-ok {
opacity: 0; display: none;
} }
.btn.active span.glyphicon { .btn.active span.glyphicon-ok {
opacity: 1; 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)"> <label class="btn btn-default {% if torrent.anonymous %}active{% endif %}" title="Upload torrent anonymously (don't display your username)">
{{ form.is_anonymous }} {{ form.is_anonymous }}
<span class="glyphicon glyphicon-ok"></span> <span class="glyphicon glyphicon-ok"></span>
<span class="glyphicon glyphicon-remove"></span>
Anonymous Anonymous
</label> </label>
{% endif %} {% endif %}
<label class="btn btn-grey {% if torrent.hidden %}active{% endif %}" title="Hide torrent from listing"> <label class="btn btn-grey {% if torrent.hidden %}active{% endif %}" title="Hide torrent from listing">
{{ form.is_hidden }} {{ form.is_hidden }}
<span class="glyphicon glyphicon-ok"></span> <span class="glyphicon glyphicon-ok"></span>
<span class="glyphicon glyphicon-remove"></span>
Hidden Hidden
</label> </label>
<label class="btn btn-danger {% if torrent.remake %}active{% endif %}" title="This torrent is derived from another release"> <label class="btn btn-danger {% if torrent.remake %}active{% endif %}" title="This torrent is derived from another release">
{{ form.is_remake }} {{ form.is_remake }}
<span class="glyphicon glyphicon-ok"></span> <span class="glyphicon glyphicon-ok"></span>
<span class="glyphicon glyphicon-remove"></span>
Remake Remake
</label> </label>
<label class="btn btn-warning {% if torrent.complete %}active{% endif %}" title="This torrent is a complete batch (eg. season)"> <label class="btn btn-warning {% if torrent.complete %}active{% endif %}" title="This torrent is a complete batch (eg. season)">
{{ form.is_complete }} {{ form.is_complete }}
<span class="glyphicon glyphicon-ok"></span> <span class="glyphicon glyphicon-ok"></span>
<span class="glyphicon glyphicon-remove"></span>
Complete Complete
</label> </label>
{% if g.user.is_trusted %} {% if g.user.is_trusted %}
<label class="btn btn-success {% if torrent.trusted %}active{% endif %}" title="Mark torrent trusted"> <label class="btn btn-success {% if torrent.trusted %}active{% endif %}" title="Mark torrent trusted">
{{ form.is_trusted }} {{ form.is_trusted }}
<span class="glyphicon glyphicon-ok"></span> <span class="glyphicon glyphicon-ok"></span>
<span class="glyphicon glyphicon-remove"></span>
Trusted Trusted
</label> </label>
{% endif %} {% endif %}
@ -68,6 +73,7 @@
<label class="btn btn-primary {% if torrent.deleted %}active{% endif %}"> <label class="btn btn-primary {% if torrent.deleted %}active{% endif %}">
{{ form.is_deleted }} {{ form.is_deleted }}
<span class="glyphicon glyphicon-ok"></span> <span class="glyphicon glyphicon-ok"></span>
<span class="glyphicon glyphicon-remove"></span>
Deleted Deleted
</label> </label>
{% endif %} {% 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" /> <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 --> <!-- 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 --> <!-- Core JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script> <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)"> <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 "")) }} {{ 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-ok"></span>
<span class="glyphicon glyphicon-remove"></span>
Anonymous Anonymous
</label> </label>
<label class="btn btn-grey" title="Hide torrent from listing"> <label class="btn btn-grey" title="Hide torrent from listing">
{{ upload_form.is_hidden }} {{ upload_form.is_hidden }}
<span class="glyphicon glyphicon-ok"></span> <span class="glyphicon glyphicon-ok"></span>
<span class="glyphicon glyphicon-remove"></span>
Hidden Hidden
</label> </label>
<label class="btn btn-danger" title="This torrent is derived from another release"> <label class="btn btn-danger" title="This torrent is derived from another release">
{{ upload_form.is_remake }} {{ upload_form.is_remake }}
<span class="glyphicon glyphicon-ok"></span> <span class="glyphicon glyphicon-ok"></span>
<span class="glyphicon glyphicon-remove"></span>
Remake Remake
</label> </label>
<label class="btn btn-warning" title="This torrent is a complete batch (eg. season)"> <label class="btn btn-warning" title="This torrent is a complete batch (eg. season)">
{{ upload_form.is_complete }} {{ upload_form.is_complete }}
<span class="glyphicon glyphicon-ok"></span> <span class="glyphicon glyphicon-ok"></span>
<span class="glyphicon glyphicon-remove"></span>
Complete Complete
</label> </label>
{% if g.user.is_trusted %} {% if g.user.is_trusted %}
<label class="btn btn-success active" title="Mark torrent trusted"> <label class="btn btn-success active" title="Mark torrent trusted">
{{ upload_form.is_trusted(checked="") }} {{ upload_form.is_trusted(checked="") }}
<span class="glyphicon glyphicon-ok"></span> <span class="glyphicon glyphicon-ok"></span>
<span class="glyphicon glyphicon-remove"></span>
Trusted Trusted
</label> </label>
{% endif %} {% endif %}