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 | |
| parent | 742a327cbbcd0f8cd19de337e51780f8478acbb1 (diff) | |
| download | cheatdb-514a24e2c41686e91df25970b2b624d767c94c18.tar.xz | |
Add license editor
Diffstat (limited to 'app/templates')
| -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 (renamed from app/templates/tags/edit.html) | 0 | ||||
| -rw-r--r-- | app/templates/admin/tags/list.html (renamed from app/templates/tags/list.html) | 0 | ||||
| -rw-r--r-- | app/templates/base.html | 1 |
6 files changed, 49 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/tags/edit.html b/app/templates/admin/tags/edit.html index ccffa7f..ccffa7f 100644 --- a/app/templates/tags/edit.html +++ b/app/templates/admin/tags/edit.html diff --git a/app/templates/tags/list.html b/app/templates/admin/tags/list.html index 355f62d..355f62d 100644 --- a/app/templates/tags/list.html +++ b/app/templates/admin/tags/list.html diff --git a/app/templates/base.html b/app/templates/base.html index 126f56f..35a2ac6 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -65,6 +65,7 @@ {% endif %} {% if current_user.rank == current_user.rank.MODERATOR %} <li><a href="{{ url_for('tag_list_page') }}">Tag Editor</a></li> + <li><a href="{{ url_for('license_list_page') }}">License Editor</a></li> {% endif %} <li><a href="{{ url_for('user.logout') }}">Sign out</a></li> </ul> |
