Improve release approval section appearance

This commit is contained in:
rubenwardy 2020-09-16 21:52:40 +01:00
parent dd1288dc3c
commit 380c88b5a3
3 changed files with 22 additions and 19 deletions

@ -8,7 +8,7 @@
{% for state in package.getNextStates(current_user) %} {% for state in package.getNextStates(current_user) %}
<form class="col-auto" method="post" action="{{ package.getSetStateURL(state) }}"> <form class="col-auto" method="post" action="{{ package.getSetStateURL(state) }}">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" /> <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<input class="btn btn-sm btn-secondary" type="submit" value="{{ state.verb() }}" /> <input class="btn btn-sm btn-primary" type="submit" value="{{ state.verb() }}" />
</form> </form>
{% endfor %} {% endfor %}
</div> </div>

@ -26,6 +26,7 @@
{% endif %} {% endif %}
{% set release = package.getDownloadRelease() %} {% set release = package.getDownloadRelease() %}
<main>
<header class="jumbotron pb-3" <header class="jumbotron pb-3"
style="background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.7)), url('{{ package.getMainScreenshotURL() }}'); style="background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.7)), url('{{ package.getMainScreenshotURL() }}');
background-size: cover; background-size: cover;
@ -135,7 +136,8 @@
</header> </header>
{% if not package.approved %} {% if not package.approved %}
<aside class="container mt-4"> <section class="my-4 pb-3" style="border-bottom: 1px solid rgba(0,0,0,0.5);">
<div class="container">
{% from "macros/package_approval.html" import render_banners %} {% from "macros/package_approval.html" import render_banners %}
{{ render_banners(package, current_user, topic_error, topic_error_lvl, similar_topics) }} {{ render_banners(package, current_user, topic_error, topic_error_lvl, similar_topics) }}
@ -151,10 +153,11 @@
{% from "macros/threads.html" import render_thread %} {% from "macros/threads.html" import render_thread %}
{{ render_thread(review_thread, current_user) }} {{ render_thread(review_thread, current_user) }}
{% endif %} {% endif %}
</aside> </div>
</section>
{% endif %} {% endif %}
<main class="container mt-4"> <section class="container mt-4">
<aside class="float-right ml-4" style="width: 18rem;"> <aside class="float-right ml-4" style="width: 18rem;">
<div class="card mb-4"> <div class="card mb-4">
<div class="card-header"> <div class="card-header">
@ -481,5 +484,6 @@
<pre><code>{{ package.makeShield("downloads") }}</code></pre> <pre><code>{{ package.makeShield("downloads") }}</code></pre>
</p> </p>
{% endif %} {% endif %}
</main> </section>
</main>
{% endblock %} {% endblock %}

@ -24,7 +24,6 @@ def upgrade():
op.execute("UPDATE package SET state='APPROVED' WHERE approved=true") op.execute("UPDATE package SET state='APPROVED' WHERE approved=true")
op.execute("UPDATE package SET state='DELETED' WHERE soft_deleted=true") op.execute("UPDATE package SET state='DELETED' WHERE soft_deleted=true")
op.drop_column('package', 'approved') op.drop_column('package', 'approved')
op.drop_column('package', 'updated_at')
op.drop_column('package', 'soft_deleted') op.drop_column('package', 'soft_deleted')
# ### end Alembic commands ### # ### end Alembic commands ###