From 68a6eae50b92f0e3809b09209d886bf7d8177fd8 Mon Sep 17 00:00:00 2001 From: Ben Mosley Date: Sun, 30 Nov 2025 22:23:48 -0600 Subject: [PATCH] this is bennys version bitch --- app.py | 14 ++++ templates/admin_ticket_edit.html | 44 +++++++++++ templates/admin_ticket_new.html | 38 ++++++++++ templates/base.html | 80 ++++++++++++++++++++ templates/join_form.html | 68 +++++++++++++++++ templates/join_thanks.html | 11 +++ templates/ticket_detail.html | 121 +++++++++++++++++++++++++++++++ templates/tickets.html | 57 +++++++++++++++ 8 files changed, 433 insertions(+) create mode 100644 app.py create mode 100644 templates/admin_ticket_edit.html create mode 100644 templates/admin_ticket_new.html create mode 100644 templates/base.html create mode 100644 templates/join_form.html create mode 100644 templates/join_thanks.html create mode 100644 templates/ticket_detail.html create mode 100644 templates/tickets.html diff --git a/app.py b/app.py new file mode 100644 index 0000000..a3f2e25 --- /dev/null +++ b/app.py @@ -0,0 +1,14 @@ +from __future__ import annotations +import os, json, time, requests +from datetime import datetime +from pathlib import Path +from typing import Optional + +from flask import ( + Flask, render_template, request, redirect, url_for, flash, session, jsonify, abort +) +from flask_sqlalchemy import SQLAlchemy +from sqlalchemy import case +from dotenv import load_dotenv + + diff --git a/templates/admin_ticket_edit.html b/templates/admin_ticket_edit.html new file mode 100644 index 0000000..f3d38ac --- /dev/null +++ b/templates/admin_ticket_edit.html @@ -0,0 +1,44 @@ +{% extends "base.html" %} +{% block title %}Edit Ticket — {{ brand }}{% endblock %} +{% block content %} +

Edit Ticket #{{ t.id }}

+
+
+ + +
+
+ + +
+
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+
+ + +
+
+
+{% endblock %} \ No newline at end of file diff --git a/templates/admin_ticket_new.html b/templates/admin_ticket_new.html new file mode 100644 index 0000000..61a9bba --- /dev/null +++ b/templates/admin_ticket_new.html @@ -0,0 +1,38 @@ +{% extends "base.html" %} +{% block title %}New Ticket — {{ brand }}{% endblock %} +{% block content %} +

Create Ticket

+
+
+ + +
+
+ + +
+
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+
+
+{% endblock %} diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..153c1e2 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,80 @@ + + + + + {% block title %}{{ brand }} · Hub{% endblock %} + + + + + {% set is_admin = (session.get('discord_user') and 'admin' in session.get('discord_user',{}).get('site_roles',[])) %} +
+
+
+ {{ brand }} + + + + + + +
+ + + +
+
+ +
+ {% block content %}{% endblock %} +
+ + + + \ No newline at end of file diff --git a/templates/join_form.html b/templates/join_form.html new file mode 100644 index 0000000..2b28ca6 --- /dev/null +++ b/templates/join_form.html @@ -0,0 +1,68 @@ +JOIN_FORM_HTML = r"""{% extends "base.html" %} +{% block title %}BuffTEKS VIP Server Access — {{ brand }}{% endblock %} +{% block content %} +
+

BuffTEKS VIP Server Access

+

+ Hi {{ user.username }}! The BuffTEKS VIP Server is our private collaboration space for active members. +

+

+ To gain access, you’ll: 1) join BuffTEKS, 2) perform the + Git Commit Ritual, and 3) commit to a project team. +

+ + {% with messages = get_flashed_messages(with_categories=true) %} + {% if messages %} +
+ {% for cat,msg in messages %} +
{{ msg }}
+ {% endfor %} +
+ {% endif %} + {% endwith %} + +
+ + +
+
+ + +
+
+ + +
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+ +
+$ git add me
+$ git commit -m "{{ commit_message or 'chore: joined BuffTEKS, ready to contribute' }}"
+$ git push origin greatness
+  
+
+{% endblock %} +""" \ No newline at end of file diff --git a/templates/join_thanks.html b/templates/join_thanks.html new file mode 100644 index 0000000..766d78a --- /dev/null +++ b/templates/join_thanks.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} +{% block title %}Thanks — {{ brand }}{% endblock %} +{% block content %} +
+

Thanks!

+

Your VIP request has been submitted. A BuffTEKS officer will contact you soon.

+ +
+{% endblock %} diff --git a/templates/ticket_detail.html b/templates/ticket_detail.html new file mode 100644 index 0000000..f8e1c27 --- /dev/null +++ b/templates/ticket_detail.html @@ -0,0 +1,121 @@ +TICKET_DETAIL_HTML = r"""{% extends "base.html" %} +{% block title %}#{{ t.id }} — {{ t.title }} · {{ brand }}{% endblock %} +{% block content %} +
+
+
+
+

#{{ t.id }} · {{ t.title }}

+
+ {{ t.status.replace('_',' ').title() }} + Priority: {{ t.priority }} + {% for label in t.label_list() %}{{ label }}{% endfor %} +
+
+ {% if can_manage %} + Edit + {% endif %} +
+ +
+

{{ t.description }}

+
+ +
+ +

Comments

+
+ {% for c in t.comments %} +
+
{{ c.author_name }} · {{ c.created_at.strftime('%Y-%m-%d %H:%M') }} UTC
+
{{ c.body }}
+
+ {% else %} +
No comments yet.
+ {% endfor %} +
+ + {% if user %} +
+ +
+
+ {% endif %} +
+ + +
+ + +{% endblock %} +""" \ No newline at end of file diff --git a/templates/tickets.html b/templates/tickets.html new file mode 100644 index 0000000..3df626e --- /dev/null +++ b/templates/tickets.html @@ -0,0 +1,57 @@ +{% extends "base.html" %} +{% block title %}Tickets — {{ brand }}{% endblock %} +{% block content %} +

Tickets

+

{{ tagline }}

+ +
+
+ + +
+
+ + +
+
+ + +
+ +
+ +
+ {% for t in tickets %} + +
+

#{{t.id}} · {{ t.title }}

+ {{ t.status.replace('_',' ').title() }} +
+ + +

+ {{ t.description }} +

+ +
+ Priority: {{ t.priority }} + {% for label in t.label_list() %}{{ label }}{% endfor %} +
+ + {% if t.assignee_name or t.assignee_id %} +
Assigned to: {{ t.assignee_name or ('<@' ~ t.assignee_id ~ '>') }}
+ {% endif %} + +
Updated {{ t.updated_at.strftime('%Y-%m-%d %H:%M') }} UTC
+
+ {% else %} +
No tickets found.
+ {% endfor %} +
+{% endblock %} +