]> git.lizzy.rs Git - cheatdb.git/commitdiff
Improve release approval section appearance package_states
authorrubenwardy <rw@rubenwardy.com>
Wed, 16 Sep 2020 20:52:40 +0000 (21:52 +0100)
committerrubenwardy <rw@rubenwardy.com>
Wed, 16 Sep 2020 20:55:52 +0000 (21:55 +0100)
app/templates/macros/package_approval.html
app/templates/packages/view.html
migrations/versions/b3c7ff6655af_.py

index acabe98e78e9a93d366fb4dd1ee969de4787430c..ffbb3de9bac41a877cd5b378cde55f615d463a57 100644 (file)
@@ -8,7 +8,7 @@
        {% for state in package.getNextStates(current_user) %}
                <form class="col-auto"  method="post" action="{{ package.getSetStateURL(state) }}">
                        <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>
        {% endfor %}
 </div>
index 45079e0ec1d84067897182453d894c8ca07e25a4..af54e071069594b25d62a79dd23dee8b24601dd8 100644 (file)
@@ -26,6 +26,7 @@
        {% endif %}
        {% set release = package.getDownloadRelease() %}
 
+<main>
        <header class="jumbotron pb-3"
                style="background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.7)), url('{{ package.getMainScreenshotURL() }}');
                        background-size: cover;
        </header>
 
        {% if not package.approved %}
-               <aside class="container mt-4">
-                       {% from "macros/package_approval.html" import render_banners %}
-                       {{ render_banners(package, current_user, topic_error, topic_error_lvl, similar_topics) }}
-
-                       {% if review_thread and review_thread.checkPerm(current_user, "SEE_THREAD") %}
-                               <h2>{% if review_thread.private %}&#x1f512;{% endif %} {{ review_thread.title }}</h2>
-                               {% if review_thread.private %}
-                                       <p><i>
-                                               This thread is only visible to the package owner and users of
-                                               Editor rank or above.
-                                       </i></p>
-                               {% endif %}
+               <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 %}
+                               {{ render_banners(package, current_user, topic_error, topic_error_lvl, similar_topics) }}
+
+                               {% if review_thread and review_thread.checkPerm(current_user, "SEE_THREAD") %}
+                                       <h2>{% if review_thread.private %}&#x1f512;{% endif %} {{ review_thread.title }}</h2>
+                                       {% if review_thread.private %}
+                                               <p><i>
+                                                       This thread is only visible to the package owner and users of
+                                                       Editor rank or above.
+                                               </i></p>
+                                       {% endif %}
 
-                               {% from "macros/threads.html" import render_thread %}
-                               {{ render_thread(review_thread, current_user) }}
-                       {% endif %}
-               </aside>
+                                       {% from "macros/threads.html" import render_thread %}
+                                       {{ render_thread(review_thread, current_user) }}
+                               {% endif %}
+                       </div>
+               </section>
        {% endif %}
 
-       <main class="container mt-4">
+       <section class="container mt-4">
                <aside class="float-right ml-4" style="width: 18rem;">
                        <div class="card mb-4">
                                <div class="card-header">
                                <pre><code>{{ package.makeShield("downloads") }}</code></pre>
                        </p>
                {% endif %}
-       </main>
+       </section>
+</main>
 {% endblock %}
index 3e49102794e518335fe65c17a89460717d91d7ed..ff9a3ae872f26c428e3df72009a2493363fc9fbb 100644 (file)
@@ -24,7 +24,6 @@ def upgrade():
        op.execute("UPDATE package SET state='APPROVED' WHERE approved=true")
        op.execute("UPDATE package SET state='DELETED' WHERE soft_deleted=true")
        op.drop_column('package', 'approved')
-       op.drop_column('package', 'updated_at')
        op.drop_column('package', 'soft_deleted')
        # ### end Alembic commands ###