From 8d739b386f2b555292fd8082c9de2199228737c9 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 6 Sep 2025 01:30:31 +0900 Subject: feat(backend): add admin pages for testcases --- backend/admin/templates/problem_edit.html | 6 +++++ backend/admin/templates/testcase_edit.html | 36 ++++++++++++++++++++++++++++++ backend/admin/templates/testcase_new.html | 27 ++++++++++++++++++++++ backend/admin/templates/testcases.html | 26 +++++++++++++++++++++ 4 files changed, 95 insertions(+) create mode 100644 backend/admin/templates/testcase_edit.html create mode 100644 backend/admin/templates/testcase_new.html create mode 100644 backend/admin/templates/testcases.html (limited to 'backend/admin/templates') diff --git a/backend/admin/templates/problem_edit.html b/backend/admin/templates/problem_edit.html index cc700f4..722473b 100644 --- a/backend/admin/templates/problem_edit.html +++ b/backend/admin/templates/problem_edit.html @@ -33,4 +33,10 @@ +
+ View Testcases +
+
+ Add New Testcase +
{{ end }} diff --git a/backend/admin/templates/testcase_edit.html b/backend/admin/templates/testcase_edit.html new file mode 100644 index 0000000..65e181e --- /dev/null +++ b/backend/admin/templates/testcase_edit.html @@ -0,0 +1,36 @@ +{{ template "base.html" . }} + +{{ define "breadcrumb" }} +Dashboard | Problems | {{ .Problem.Title }} | Testcases +{{ end }} + +{{ define "content" }} +

Edit Testcase for {{ .Problem.Title }}

+
+
+ + +
+
+ + + +
+
+ + +
+
+ + +
+
+ +
+
+
+
+ +
+
+{{ end }} diff --git a/backend/admin/templates/testcase_new.html b/backend/admin/templates/testcase_new.html new file mode 100644 index 0000000..828406a --- /dev/null +++ b/backend/admin/templates/testcase_new.html @@ -0,0 +1,27 @@ +{{ template "base.html" . }} + +{{ define "breadcrumb" }} +Dashboard | Problems | {{ .Problem.Title }} | Testcases +{{ end }} + +{{ define "content" }} +

New Testcase for {{ .Problem.Title }}

+
+
+ + + +
+
+ + +
+
+ + +
+
+ +
+
+{{ end }} diff --git a/backend/admin/templates/testcases.html b/backend/admin/templates/testcases.html new file mode 100644 index 0000000..c27a45f --- /dev/null +++ b/backend/admin/templates/testcases.html @@ -0,0 +1,26 @@ +{{ template "base.html" . }} + +{{ define "breadcrumb" }} +Dashboard | Problems | {{ .Problem.Title }} +{{ end }} + +{{ define "content" }} +

Testcases for {{ .Problem.Title }}

+
+ Create New Testcase +
+{{ range .Testcases }} +

{{ .TestcaseID }}

+
+ Edit +
+

Stdin

+
+
{{ .Stdin }}
+
+

Stdout

+
+
{{ .Stdout }}
+
+{{ end }} +{{ end }} -- cgit v1.2.3-70-g09d2