diff options
| author | rubenwardy <rw@rubenwardy.com> | 2018-07-28 17:26:28 +0100 |
|---|---|---|
| committer | rubenwardy <rw@rubenwardy.com> | 2018-07-28 17:26:28 +0100 |
| commit | 514a24e2c41686e91df25970b2b624d767c94c18 (patch) | |
| tree | 65ce40f5653d7e518f4dbb697b6891d8023cfdd2 /app/templates/admin | |
| parent | 742a327cbbcd0f8cd19de337e51780f8478acbb1 (diff) | |
| download | cheatdb-514a24e2c41686e91df25970b2b624d767c94c18.tar.xz | |
Add license editor
Diffstat (limited to 'app/templates/admin')
| -rw-r--r-- | app/templates/admin/licenses/edit.html | 25 | ||||
| -rw-r--r-- | app/templates/admin/licenses/list.html | 16 | ||||
| -rw-r--r-- | app/templates/admin/list.html | 13 | ||||
| -rw-r--r-- | app/templates/admin/tags/edit.html | 27 | ||||
| -rw-r--r-- | app/templates/admin/tags/list.html | 16 |
5 files changed, 91 insertions, 6 deletions
diff --git a/app/templates/admin/licenses/edit.html b/app/templates/admin/licenses/edit.html new file mode 100644 index 0000000..c68b17f --- /dev/null +++ b/app/templates/admin/licenses/edit.html @@ -0,0 +1,25 @@ +{% extends "base.html" %} + +{% block title %} + {% if license %} + Edit {{ license.name }} + {% else %} + New license + {% endif %} +{% endblock %} + +{% block content %} + <p> + <a href="{{ url_for('license_list_page') }}">Back to list</a> | + <a href="{{ url_for('createedit_license_page') }}">New License</a> + </p> + + {% from "macros/forms.html" import render_field, render_submit_field %} + <form method="POST" action="" enctype="multipart/form-data"> + {{ form.hidden_tag() }} + + {{ render_field(form.name) }} + {{ render_field(form.is_foss) }} + {{ render_submit_field(form.submit) }} + </form> +{% endblock %} diff --git a/app/templates/admin/licenses/list.html b/app/templates/admin/licenses/list.html new file mode 100644 index 0000000..43856f5 --- /dev/null +++ b/app/templates/admin/licenses/list.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} + +{% block title %} +Licenses +{% endblock %} + +{% block content %} + <p> + <a href="{{ url_for('createedit_license_page') }}">New Tag</a> + </p> + <ul> + {% for l in licenses %} + <li><a href="{{ url_for('createedit_license_page', name=l.name) }}">{{ l.name }}</a> [{{ l.is_foss and "Free" or "Non-free"}}]</li> + {% endfor %} + </ul> +{% endblock %} diff --git a/app/templates/admin/list.html b/app/templates/admin/list.html index 4763bdc..a2ac6d5 100644 --- a/app/templates/admin/list.html +++ b/app/templates/admin/list.html @@ -8,6 +8,7 @@ <ul> <li><a href="{{ url_for('user_list_page') }}">User list</a></li> <li><a href="{{ url_for('tag_list_page') }}">Tag Editor</a></li> + <li><a href="{{ url_for('license_list_page') }}">License Editor</a></li> <li><a href="{{ url_for('switch_user_page') }}">Sign in as another user</a></li> </ul> @@ -17,12 +18,12 @@ <form method="post" action="" class="box-body"> <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" /> <select name="action"> - <option value="importmodlist">Import forum topics</option> - <option value="importscreenshots" selected>Import screenshots from VCS</option> - <option value="importdepends">Import dependencies from downloads</option> - <option value="modprovides">Set provides to mod name</option> - <option value="recalcscores">Recalc package scores</option> - <option value="vcsrelease">Create VCS releases</option> + <option value="importmodlist" selected>Import forum topics</option> + <option value="recalcscores">Recalculate package scores</option> + <!-- <option value="importscreenshots">Import screenshots from VCS</option> --> + <!-- <option value="importdepends">Import dependencies from downloads</option> --> + <!-- <option value="modprovides">Set provides to mod name</option> --> + <!-- <option value="vcsrelease">Create VCS releases</option> --> </select> <input type="submit" value="Perform" /> </form> diff --git a/app/templates/admin/tags/edit.html b/app/templates/admin/tags/edit.html new file mode 100644 index 0000000..ccffa7f --- /dev/null +++ b/app/templates/admin/tags/edit.html @@ -0,0 +1,27 @@ +{% extends "base.html" %} + +{% block title %} + {% if tag %} + Edit {{ tag.title }} + {% else %} + New tag + {% endif %} +{% endblock %} + +{% block content %} + <p> + <a href="{{ url_for('tag_list_page') }}">Back to list</a> | + <a href="{{ url_for('createedit_tag_page') }}">New Tag</a> + </p> + + {% from "macros/forms.html" import render_field, render_submit_field %} + <form method="POST" action="" enctype="multipart/form-data"> + {{ form.hidden_tag() }} + + {{ render_field(form.title) }} + {% if tag %} + {{ render_field(form.name) }} + {% endif %} + {{ render_submit_field(form.submit) }} + </form> +{% endblock %} diff --git a/app/templates/admin/tags/list.html b/app/templates/admin/tags/list.html new file mode 100644 index 0000000..355f62d --- /dev/null +++ b/app/templates/admin/tags/list.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} + +{% block title %} +Tags +{% endblock %} + +{% block content %} + <p> + <a href="{{ url_for('createedit_tag_page') }}">New Tag</a> + </p> + <ul> + {% for t in tags %} + <li><a href="{{ url_for('createedit_tag_page', name=t.name) }}">{{ t.title }}</a> [{{ t.packages | count }} packages]</li> + {% endfor %} + </ul> +{% endblock %} |
