From 514a24e2c41686e91df25970b2b624d767c94c18 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sat, 28 Jul 2018 17:26:28 +0100 Subject: Add license editor --- app/templates/admin/licenses/edit.html | 25 +++++++++++++++++++++++++ app/templates/admin/licenses/list.html | 16 ++++++++++++++++ app/templates/admin/list.html | 13 +++++++------ app/templates/admin/tags/edit.html | 27 +++++++++++++++++++++++++++ app/templates/admin/tags/list.html | 16 ++++++++++++++++ app/templates/base.html | 1 + app/templates/tags/edit.html | 27 --------------------------- app/templates/tags/list.html | 16 ---------------- 8 files changed, 92 insertions(+), 49 deletions(-) create mode 100644 app/templates/admin/licenses/edit.html create mode 100644 app/templates/admin/licenses/list.html create mode 100644 app/templates/admin/tags/edit.html create mode 100644 app/templates/admin/tags/list.html delete mode 100644 app/templates/tags/edit.html delete mode 100644 app/templates/tags/list.html (limited to 'app/templates') 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 %} +

+ Back to list | + New License +

+ + {% from "macros/forms.html" import render_field, render_submit_field %} +
+ {{ form.hidden_tag() }} + + {{ render_field(form.name) }} + {{ render_field(form.is_foss) }} + {{ render_submit_field(form.submit) }} +
+{% 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 %} +

+ New Tag +

+ +{% 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 @@ @@ -17,12 +18,12 @@
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 %} +

+ Back to list | + New Tag +

+ + {% from "macros/forms.html" import render_field, render_submit_field %} +
+ {{ form.hidden_tag() }} + + {{ render_field(form.title) }} + {% if tag %} + {{ render_field(form.name) }} + {% endif %} + {{ render_submit_field(form.submit) }} +
+{% 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 %} +

+ New Tag +

+ +{% endblock %} 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 %}
  • Tag Editor
  • +
  • License Editor
  • {% endif %}
  • Sign out
  • diff --git a/app/templates/tags/edit.html b/app/templates/tags/edit.html deleted file mode 100644 index ccffa7f..0000000 --- a/app/templates/tags/edit.html +++ /dev/null @@ -1,27 +0,0 @@ -{% extends "base.html" %} - -{% block title %} - {% if tag %} - Edit {{ tag.title }} - {% else %} - New tag - {% endif %} -{% endblock %} - -{% block content %} -

    - Back to list | - New Tag -

    - - {% from "macros/forms.html" import render_field, render_submit_field %} -
    - {{ form.hidden_tag() }} - - {{ render_field(form.title) }} - {% if tag %} - {{ render_field(form.name) }} - {% endif %} - {{ render_submit_field(form.submit) }} -
    -{% endblock %} diff --git a/app/templates/tags/list.html b/app/templates/tags/list.html deleted file mode 100644 index 355f62d..0000000 --- a/app/templates/tags/list.html +++ /dev/null @@ -1,16 +0,0 @@ -{% extends "base.html" %} - -{% block title %} -Tags -{% endblock %} - -{% block content %} -

    - New Tag -

    - -{% endblock %} -- cgit v1.2.3