Redesign tags and license edit pages

This commit is contained in:
rubenwardy 2020-07-12 20:32:32 +01:00
parent ec087e4687
commit 8bcf12e1a7
4 changed files with 33 additions and 19 deletions

@ -9,10 +9,8 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<p> <a class="btn btn-primary float-right" href="{{ url_for('admin.create_edit_license') }}">New License</a>
<a href="{{ url_for('admin.license_list') }}">Back to list</a> | <a class="btn btn-secondary mb-4" href="{{ url_for('admin.license_list') }}">Back to list</a>
<a href="{{ url_for('admin.create_edit_license') }}">New License</a>
</p>
{% from "macros/forms.html" import render_field, render_submit_field %} {% from "macros/forms.html" import render_field, render_submit_field %}
<form method="POST" action="" enctype="multipart/form-data"> <form method="POST" action="" enctype="multipart/form-data">

@ -5,12 +5,19 @@ Licenses
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<p> <a class="btn btn-primary float-right" href="{{ url_for('admin.create_edit_license') }}">{{ _("New License") }}</a>
<a href="{{ url_for('admin.create_edit_license') }}">New License</a>
</p> <h1>{{ _("Licenses") }}</h1>
<ul>
<div class="list-group">
{% for l in licenses %} {% for l in licenses %}
<li><a href="{{ url_for('admin.create_edit_license', name=l.name) }}">{{ l.name }}</a> [{{ l.is_foss and "Free" or "Non-free"}}]</li> <a class="list-group-item list-group-item-action"
href="{{ url_for('admin.create_edit_license', name=l.name) }}">
<span class="float-right badge {% if l.is_foss %}badge-primary{% else %}badge-warning{% endif %} badge-pill">
{{ l.is_foss and "Free" or "Non-free"}}
</span>
{{ l.name }}
</a>
{% endfor %} {% endfor %}
</ul> </div>
{% endblock %} {% endblock %}

@ -9,10 +9,8 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<p> <a class="btn btn-primary float-right" href="{{ url_for('admin.create_edit_tag') }}">New Tag</a>
<a href="{{ url_for('admin.tag_list') }}">Back to list</a> | <a class="btn btn-secondary mb-4" href="{{ url_for('admin.tag_list') }}">Back to list</a>
<a href="{{ url_for('admin.create_edit_tag') }}">New Tag</a>
</p>
{% from "macros/forms.html" import render_field, render_submit_field %} {% from "macros/forms.html" import render_field, render_submit_field %}
<form method="POST" action="" enctype="multipart/form-data"> <form method="POST" action="" enctype="multipart/form-data">

@ -1,16 +1,27 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %} {% block title %}
Tags {{ _("Tags") }}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<a class="btn btn-primary float-right" href="{{ url_for('admin.create_edit_tag') }}">{{ _("New Tag") }}</a>
<h1>{{ _("Tags") }}</h1>
<p> <p>
<a href="{{ url_for('admin.create_edit_tag') }}">New Tag</a> Also see <a href="/help/package_tags/">Package Tags</a>.
</p> </p>
<ul>
<div class="list-group">
{% for t in tags %} {% for t in tags %}
<li><a href="{{ url_for('admin.create_edit_tag', name=t.name) }}">{{ t.title }}</a> [{{ t.packages | count }} packages]</li> <a class="list-group-item list-group-item-action"
href="{{ url_for('admin.create_edit_tag', name=t.name) }}">
<span class="float-right badge badge-primary badge-pill">
{{ t.packages | count }}
</span>
{{ t.title }}
</a>
{% endfor %} {% endfor %}
</ul> </div>
{% endblock %} {% endblock %}