From 2795c51284b20a7704a0ffffee252435534505ba Mon Sep 17 00:00:00 2001 From: lenforiee Date: Sun, 25 Dec 2022 22:53:36 +0100 Subject: [PATCH] feat: run formatter on html files, create pagination component --- .gitignore | 3 + .prettierrc | 10 + package-lock.json | 52 ++ package.json | 6 + panel/functions.py | 47 +- panel/init_app.py | 4 +- templates/badges.html | 76 +-- templates/ban_logs.html | 86 ++- templates/banchosettings.html | 76 +-- templates/base.html | 489 ++++++++++------- templates/beatrank.html | 340 +++++++----- templates/changepass.html | 34 +- templates/clansview.html | 111 ++-- templates/components/countryselect.html | 252 +++++++++ templates/components/pagination.html | 79 +++ templates/confirm.html | 31 +- templates/countryselect.html | 252 --------- templates/dash.html | 378 +++++++------ templates/donoraward.html | 42 +- templates/editbadge.html | 72 ++- templates/editclan.html | 210 +++++--- templates/editprivilege.html | 543 +++++++++++++------ templates/edituser.html | 673 +++++++++++++++--------- templates/errors/403.html | 60 ++- templates/errors/404.html | 60 ++- templates/errors/500.html | 60 ++- templates/iplookup.html | 84 +-- templates/login.html | 55 +- templates/privileges.html | 78 +-- templates/rankform.html | 117 ++-- templates/rankreq.html | 150 +++--- templates/raplogs.html | 84 ++- templates/stats.html | 254 +++++---- templates/syssettings.html | 121 +++-- templates/userhwids.html | 231 ++++---- templates/users.html | 175 +++--- 36 files changed, 3119 insertions(+), 2276 deletions(-) create mode 100644 .prettierrc create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 templates/components/countryselect.html create mode 100644 templates/components/pagination.html delete mode 100644 templates/countryselect.html diff --git a/.gitignore b/.gitignore index 8b1d2afa..e5435ab9 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,6 @@ rpusers.json test.py static/servers.json config.json.save +venv/ +node_modules/ +.vscode/ \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..9ba67d50 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,10 @@ +{ + overrides: [ + { + files: ["*.html"], + options: { + parser: "jinja-template" + }, + }, + ], +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..51f1ca63 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,52 @@ +{ + "name": "RealistikPanel", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "devDependencies": { + "prettier": "^2.8.1", + "prettier-plugin-jinja-template": "^0.0.4" + } + }, + "node_modules/prettier": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.1.tgz", + "integrity": "sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-plugin-jinja-template": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/prettier-plugin-jinja-template/-/prettier-plugin-jinja-template-0.0.4.tgz", + "integrity": "sha512-26wupCFarh5tmtupZor8WsHCUI9oj3aJ9/U9a1SVEC9fREONLkuiZ5xoaBmFeKOrQyWVWD3cv+Ma9JtOUmuOzA==", + "dev": true, + "peerDependencies": { + "prettier": "^2.0.0" + } + } + }, + "dependencies": { + "prettier": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.1.tgz", + "integrity": "sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg==", + "dev": true + }, + "prettier-plugin-jinja-template": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/prettier-plugin-jinja-template/-/prettier-plugin-jinja-template-0.0.4.tgz", + "integrity": "sha512-26wupCFarh5tmtupZor8WsHCUI9oj3aJ9/U9a1SVEC9fREONLkuiZ5xoaBmFeKOrQyWVWD3cv+Ma9JtOUmuOzA==", + "dev": true, + "requires": {} + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 00000000..f128932d --- /dev/null +++ b/package.json @@ -0,0 +1,6 @@ +{ + "devDependencies": { + "prettier": "^2.8.1", + "prettier-plugin-jinja-template": "^0.0.4" + } +} diff --git a/panel/functions.py b/panel/functions.py index c23334ea..a3ec870f 100644 --- a/panel/functions.py +++ b/panel/functions.py @@ -2155,15 +2155,7 @@ def UserPageCount(): mycursor.execute("SELECT count(*) FROM users") TheNumber = mycursor.fetchone()[0] # working with page number (this is a mess...) - TheNumber /= 50 - # if not single digit, round up - if len(str(TheNumber)) != 0: - NewNumber = round(TheNumber) - # if number was rounded down - if NewNumber == round(int(str(TheNumber).split(".")[0])): - NewNumber += 1 - TheNumber = NewNumber - return TheNumber + return math.ceil(TheNumber / PAGE_SIZE) def RapLogCount(): @@ -2171,22 +2163,8 @@ def RapLogCount(): # i made it separate, fite me mycursor.execute("SELECT count(*) FROM rap_logs") TheNumber = mycursor.fetchone()[0] - # working with page number (this is a mess...) - TheNumber /= 50 - # if not single digit, round up - if len(str(TheNumber)) != 0: - NewNumber = round(TheNumber) - # if number was rounded down - if NewNumber == round(int(str(TheNumber).split(".")[0])): - NewNumber += 1 - TheNumber = NewNumber - # makign page dict - Pages = [] - while TheNumber != 0: - Pages.append(TheNumber) - TheNumber -= 1 - Pages.reverse() - return Pages + + return math.ceil(TheNumber / PAGE_SIZE) def GetClans(Page: int = 1): @@ -2630,6 +2608,19 @@ def ban_pages() -> int: return math.ceil(ban_count() / PAGE_SIZE) +def request_count() -> int: + """Returns the total number of requests.""" + + mycursor.execute("SELECT COUNT(*) FROM rank_requests WHERE blacklisted = 0") + return mycursor.fetchone()[0] + + +def request_pages() -> int: + """Returns the number of pages in the request.""" + + return math.ceil(request_count() / PAGE_SIZE) + + def fetch_user_banlogs(user_id: int) -> list[BanLog]: """Fetches all ban logs targetting a specific user. @@ -2819,6 +2810,12 @@ def get_hwid_count(user_id: int) -> int: return mycursor.fetchone()[0] +def hwid_pages(user_id: int) -> int: + """Returns the number of pages in the ban log.""" + + return math.ceil(get_hwid_count(user_id) / PAGE_SIZE) + + class HWIDResult(TypedDict): result: HWIDLog exact_matches: list[HWIDLog] diff --git a/panel/init_app.py b/panel/init_app.py index 82673c8b..14470c41 100644 --- a/panel/init_app.py +++ b/panel/init_app.py @@ -192,7 +192,7 @@ def panel_search_users(page_str: str = "1"): title="Search Users", UserData=user_data, page=page, - Pages=UserPageCount(), + pages=UserPageCount(), ) @app.route("/index.php") @@ -600,6 +600,7 @@ def panel_view_rank_requests(Page): config=config, RankRequests=GetRankRequests(int(Page)), page=int(Page), + pages=request_pages(), ) else: return no_permission_response(request.path) @@ -705,6 +706,7 @@ def view_user_hwid_route(user_id: int, page: int = 1): hwid_logs=page_info["results"], user=page_info["user"], page=page, + pages=hwid_pages(user_id), total_hwids=get_hwid_count(user_id), ) diff --git a/templates/badges.html b/templates/badges.html index eadb991e..42e97ff5 100644 --- a/templates/badges.html +++ b/templates/badges.html @@ -1,42 +1,48 @@ {% extends "base.html" %} {% block content %} -

Badges

-

Modify or edit profile badges!

-
-
- Badges -
+

Badges

+

Modify or edit profile badges!

+
+
Badges
- - - - - - - - - - - {% for badge in badges %} - - - - - - - {% endfor %} - -
IDNameIconActions
{{ badge["Id"] }}{{ badge["Name"] }} -
- Delete - Edit -
-
+ + + + + + + + + + + {% for badge in badges %} + + + + + + + {% endfor %} + +
IDNameIconActions
{{ badge["Id"] }}{{ badge["Name"] }} +
+ Delete + Edit +
+
-
+
{% endblock %} diff --git a/templates/ban_logs.html b/templates/ban_logs.html index 15646d43..841d496d 100644 --- a/templates/ban_logs.html +++ b/templates/ban_logs.html @@ -1,60 +1,36 @@ {% extends "base.html" %} +{% import "components/pagination.html" as pagination %} {% block content %} - -

Ban Logs

-

View detailed ban reasons for the entire server!

- -{% for log in ban_logs %} - -
-
- image -

{{ log["from_name"] }}

to - image -

{{ log["to_name"] }}

for {{ log["summary"] }} -
-
+

Ban Logs

+

View detailed ban reasons for the entire server!

+ + {{ pagination.pagination('/ban-logs', page, pages) }} + {% for log in ban_logs %} +
+
+ image +

{{ log["from_name"] }}

+ to + image +

{{ log["to_name"] }}

+ for {{ log["summary"] }} +
+
{{ log["detail"] }} +
+
- -
- -{% endfor %} - - - - + {% endfor %} + {{ pagination.pagination('/ban-logs', page, pages) }} + {{ pagination.paginationJs('/ban-logs', page, pages) }} {% endblock %} diff --git a/templates/banchosettings.html b/templates/banchosettings.html index 3666096e..2c6520e4 100644 --- a/templates/banchosettings.html +++ b/templates/banchosettings.html @@ -1,39 +1,51 @@ {% extends "base.html" %} - {% block content %} -

Bancho Settings

-

Change the settings of your osu! server. This includes things such as login messeges, menu icons and more!

-
+

Bancho Settings

+

+ Change the settings of your osu! server. This includes things such as login + messeges, menu icons and more! +

+
-

Settings

+

Settings

-
-
- - -
-
- - -
-
- - -
- -
+
+
+ + +
+
+ + +
+
+ + +
+ +
- -
+ +
{% endblock %} diff --git a/templates/base.html b/templates/base.html index 9a889562..9b2ebe32 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,256 +1,349 @@ - RealistikPanel! - {{ title }} - - - {% block head %}{% endblock %} - - - - - - - - {% if session["Theme"] == "dark" %} - - {% else %} + RealistikPanel! - {{ title }} + + + {% block head %}{% endblock %} + + + + + + + + {% if session["Theme"] == "dark" %} + + {% else %} - {% endif %} - - - - - - - - - + {% endif %} + + + + + + + + + -
- - -
-
- {% if data["Alert"] %} -
-
-
-
Alert!
- {{ data["Alert"]|safe }} -
-
- {% endif %} - {% if success %} -
-
- - {{ success|safe }} -
-
- {% endif %} - {% if error %} -
-
- - {{ error|safe }} -
-
- {% endif %} - {% if info %} -
-
- - {{ info|safe }} -
-
- {% endif %} - {% block content %}{% endblock %} -
+
+ + +
+
+ {% if data["Alert"] %} +
+
+
+
Alert!
+ {{ data["Alert"]|safe }} +
+
+ {% endif %} + {% if success %} +
+
+ + {{ success|safe }} +
+
+ {% endif %} + {% if error %} +
+
+ + {{ error|safe }} +
+
+ {% endif %} + {% if info %} +
+
+ + {{ info|safe }} +
+
+ {% endif %} + {% block content %}{% endblock %} +
+
- diff --git a/templates/beatrank.html b/templates/beatrank.html index 674f60e0..01bd72eb 100644 --- a/templates/beatrank.html +++ b/templates/beatrank.html @@ -1,154 +1,246 @@ {% extends "base.html" %} - {% block content %} -
+
-

Quick Actions

+

Quick Actions

-
- Download - View On Bancho - Play - Pause - -
- -
- -
-
+ +
+
- {% for beatmap in beatdata[0] %} + {% for beatmap in beatdata[0] %}
-
-
-
-
-

{{ beatmap["SongName"] }} {{ beatmap["Difficulty"] }}☆

-
-
-
-

Change the ranking status for this song!

-
- - - - - -

- -
- -
-
+
+
+
+

+ {{ beatmap["SongName"] }} {{ beatmap["Difficulty"] }}☆ +

+
+
+

Change the ranking status for this song!

+
+ + + + + +

+ + +
+ +
+
+
- {% endfor %} + {% endfor %}
- {% for beatmap in beatdata[1] %} + {% for beatmap in beatdata[1] %}
-
-
-
-
-

{{ beatmap["SongName"] }} {{ beatmap["Difficulty"] }}☆

-
-
-
-

Change the ranking status for this song!

-
- - - - - -

- -
- -
-
+
+
+
+

+ {{ beatmap["SongName"] }} {{ beatmap["Difficulty"] }}☆ +

+
+
+

Change the ranking status for this song!

+
+ + + + + +

+ + +
+ +
+
+
- {% endfor %} + {% endfor %}
-
- + {% endblock %} diff --git a/templates/changepass.html b/templates/changepass.html index 36fedf91..dfac0a3a 100644 --- a/templates/changepass.html +++ b/templates/changepass.html @@ -1,21 +1,27 @@ {% extends "base.html" %} {% block content %} -
+
- Change the password for {{ User["Username"] }} + Change the password for {{ User["Username"] }}
-
-
- - -
-
- - -
- -
+
+
+ + +
+
+ + +
+ +
-
+
{% endblock %} diff --git a/templates/clansview.html b/templates/clansview.html index 8fdc84b6..49bf8ba1 100644 --- a/templates/clansview.html +++ b/templates/clansview.html @@ -1,75 +1,50 @@ {% extends "base.html" %} - +{% import "components/pagination.html" as pagination %} {% block content %} -

Clans

-

View, edit and manage user-made clans!

+

Clans

+

View, edit and manage user-made clans!

-
-
- Badges -
+ {{ pagination.pagination('/clans', page, Pages) }} + +
+
Badges
- - - - - - - - - - - {% for Clan in Clans %} - - - - - - - {% endfor %} - -
IDNameDescriptionActions
{{ Clan["ID"] }}[{{ Clan["Tag"] }}] {{ Clan["Name"] }}{{ Clan["Description"] }} -
- Edit - Disband -
-
-
- -
+ +
- -
    - {% if page <= 1 %} -
  • - {% else %} -
  • - {% endif %} - - - Previous - -
  • - {% for Page in Pages %} - {% if page == Page %} -
  • - {% else %} -
  • - {% endif %} - {{ Page }} -
  • - {% endfor %} - {% if page == Pages[-1] %} -
  • - {% else %} -
  • - {% endif %} - - - Next - -
  • -
+ + {{ pagination.pagination('/clans', page, Pages) }} + {{ pagination.paginationJs('/clans', page, Pages) }} {% endblock %} diff --git a/templates/components/countryselect.html b/templates/components/countryselect.html new file mode 100644 index 00000000..9fce242c --- /dev/null +++ b/templates/components/countryselect.html @@ -0,0 +1,252 @@ + + diff --git a/templates/components/pagination.html b/templates/components/pagination.html new file mode 100644 index 00000000..b3c4192a --- /dev/null +++ b/templates/components/pagination.html @@ -0,0 +1,79 @@ +{%- macro pagination(pagination_url, page, pages) -%} + +{%- endmacro -%} +{%- macro paginationJs(pagination_url, page, pages) -%} + +{%- endmacro -%} diff --git a/templates/confirm.html b/templates/confirm.html index 7e5a78e9..8cd2d424 100644 --- a/templates/confirm.html +++ b/templates/confirm.html @@ -1,19 +1,22 @@ {% extends "base.html" %} {% block content %} -

Danger Area!

-
-
- Are you sure you want to {{ action }} -
+

Danger Area!

+
+
Are you sure you want to {{ action }}
- THIS ACTION CAN BE REALLY DANGEROUS! PROCEED ONLY IF YOU KNOW WHAT YOURE DOING!
- -
- -
+ +
{% endblock %} diff --git a/templates/countryselect.html b/templates/countryselect.html deleted file mode 100644 index 0bbf38a3..00000000 --- a/templates/countryselect.html +++ /dev/null @@ -1,252 +0,0 @@ - - diff --git a/templates/dash.html b/templates/dash.html index 187ad303..e29e73d8 100644 --- a/templates/dash.html +++ b/templates/dash.html @@ -1,209 +1,241 @@ {% extends "base.html" %} - {% block head %} - + {% endblock %} - {% block content %} -

Dashboard

-

This is the RealistikPanel dashboard! The home of RealistikPanel!

-
+

Dashboard

+

+ This is the RealistikPanel dashboard! The home of RealistikPanel! +

+
-
-

{{ data["RegisteredUsers"] }}

-
-
- Registered Users -
+
+

{{ data["RegisteredUsers"] }}

+
+
Registered Users
-
-

{{ data["OnlineUsers"] }}

-
-
- Online Users -
+
+

{{ data["OnlineUsers"] }}

+
+
Online Users
-
-

{{ data["TotalPP"] }}

-
-
- Total PP -
+
+

{{ data["TotalPP"] }}

+
+
Total PP
-
-

{{ data["TotalPlays"] }}

-
-
- Total Plays -
+
+

{{ data["TotalPlays"] }}

+
+
Total Plays
-
-

{{ data["TotalScores"] }}

-
-
- Total Scores -
+
+

{{ data["TotalScores"] }}

+
+
Total Scores
-
-

-
+
+

+
-
-
-

Online Users

-
-
- -
- +
+
+

Online Users

+
+
+
+ +
-
-
-
-
-
-

{{ MostPlayed["SongName"] }}

-
-
-
-

- The most played beatmap is {{ MostPlayed["SongName"] }}.
- This beatmap has a playcount of {{ MostPlayed["Playcount"] }} -

-
- View Map -
-
-
+
+
+
+
+

{{ MostPlayed["SongName"] }}

+
+
+
+

+ The most played beatmap is {{ MostPlayed["SongName"] }}. +
+ This beatmap has a playcount of {{ MostPlayed["Playcount"] }} +

+
+ View Map +
+
+
-
-
Recent Plays
- + +
Recent Plays
+
- - - - - - - + + + + + + + - {% for play in plays %} + {% for play in plays %} - - - - - + + + + + - {% endfor %} + {% endfor %} -
TimePlayerSongScorePP
TimePlayerSongScorePP
{{ play["Time"] }}{{ play["Player"] }}{{ play["SongName"] }} ({{ play["Accuracy"] }}%){{ play["Score"] }}{{ play["pp"] }}{{ play["Time"] }} + {{ play["Player"] }} + {{ play["SongName"] }} ({{ play["Accuracy"] }}%){{ play["Score"] }}{{ play["pp"] }}
- + fetch(LetsAPI) + .then((res) => res.json()) + .then((out) => { + if (out["server_status"] == 1) { + document.getElementById("statuses").innerHTML = + document.getElementById("statuses").innerHTML + + '

Online

LETS
'; + } else { + document.getElementById("statuses").innerHTML = + document.getElementById("statuses").innerHTML + + '

Offline

LETS
'; + } + }) + .catch((err) => { + document.getElementById("statuses").innerHTML = + document.getElementById("statuses").innerHTML + + '

Offline

Bancho
'; + }); + fetch(BanchoURL) + .then((res) => res.json()) + .then((out) => { + if (out["result"] == 1) { + document.getElementById("statuses").innerHTML = + document.getElementById("statuses").innerHTML + + '

Online

Bancho
'; + } else if (out["result"] == -1) { + document.getElementById("statuses").innerHTML = + document.getElementById("statuses").innerHTML + + '

Restarting

Bancho
'; + } else { + document.getElementById("statuses").innerHTML = + document.getElementById("statuses").innerHTML + + '

Offline

Bancho
'; + } + }) + .catch((err) => { + document.getElementById("statuses").innerHTML = + document.getElementById("statuses").innerHTML + + '

Offline

Bancho
'; + }); + fetch(API_URL) + .then((res) => res.json()) + .then((out) => { + if (out["code"] == 200) { + document.getElementById("statuses").innerHTML = + document.getElementById("statuses").innerHTML + + '

Online

API
'; + } else { + document.getElementById("statuses").innerHTML = + document.getElementById("statuses").innerHTML + + '

Offline

API
'; + } + }) + .catch((err) => { + document.getElementById("statuses").innerHTML = + document.getElementById("statuses").innerHTML + + '

Offline

API
'; + }); + {% endblock %} diff --git a/templates/donoraward.html b/templates/donoraward.html index d49c6c68..6a53fe5f 100644 --- a/templates/donoraward.html +++ b/templates/donoraward.html @@ -1,21 +1,31 @@ {% extends "base.html" %} {% block content %} -
-
- Award Donor to {{ User["Username"] }} -
+
+
Award Donor to {{ User["Username"] }}
-
-
- - -
-
- - -
- -
+
+
+ + +
+
+ + +
+ +
-
+
{% endblock %} diff --git a/templates/editbadge.html b/templates/editbadge.html index 4ef57caf..e2ab413c 100644 --- a/templates/editbadge.html +++ b/templates/editbadge.html @@ -1,33 +1,53 @@ {% extends "base.html" %} {% block content %} -

Edit Badge

-

Edit, change or remove the badge!

-
+

Edit Badge

+

Edit, change or remove the badge!

+
-

Edit {{ badge['Name'] }}

+

Edit {{ badge['Name'] }}

-
-
- - -
-
- - -
-
- - -
-
- - Delete -
-
+
+
+ + +
+
+ + +
+
+ + +
+
+ + Delete +
+
- -
+ +
{% endblock %} diff --git a/templates/editclan.html b/templates/editclan.html index 33a46fd2..3e85ac85 100644 --- a/templates/editclan.html +++ b/templates/editclan.html @@ -1,98 +1,156 @@ {% extends "base.html" %} {% block content %} -
+
- {% if Clan["Icon"] %} - image - {% endif %} -

[{{ Clan["Tag"] }}] {{ Clan["Name"] }}

+ {% if Clan["Icon"] %} + image + {% endif %} +

[{{ Clan["Tag"] }}] {{ Clan["Name"] }}

- {{ Clan["Description"] }}
- This clan currently has {{ Clan["MemberCount"] }}/{{ Clan["MemberLimit"] }} users. + {{ Clan["Description"] }}
+ This clan currently has + {{ Clan["MemberCount"] }}/{{ Clan["MemberLimit"] }} users.
-
-
-
- Clan Options + image + This clan is led by {{ ClanOwner["Username"] }}
+
+
+
Clan Options
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - Disband -
-
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + Disband +
+
-
-

Clan Members

-
+
+

Clan Members

+
- {% for Member in Members[0] %} + {% for Member in Members[0] %}
-
- image - [{{ Clan['Tag'] }}] {{ Member["Username"] }} -
-
- They registered on {{ config.srv_name }} {{ Member["RegisterAgo"] }} - +
+ image + [{{ Clan['Tag'] }}] {{ Member["Username"] }} +
+
+ They registered on {{ config.srv_name }} {{ Member["RegisterAgo"] }} + +
- {% endfor %} + {% endfor %}
- {% for Member in Members[1] %} + {% for Member in Members[1] %}
-
- image - [{{ Clan['Tag'] }}] {{ Member["Username"] }} -
-
- They registered on {{ config.srv_name }} {{ Member["RegisterAgo"] }} - +
+ image + [{{ Clan['Tag'] }}] {{ Member["Username"] }} +
+
+ They registered on {{ config.srv_name }} {{ Member["RegisterAgo"] }} + +
- {% endfor %} + {% endfor %}
-
-

Clan Invites

- -{% if not clan_invites %} -

This clan has no active invite links!

-{% else %} -{% endif %} +
+

Clan Invites

+ {% if not clan_invites %} +

This clan has no active invite links!

+ {% else %} + {% endif %} {% endblock %} diff --git a/templates/editprivilege.html b/templates/editprivilege.html index 849120a2..9b1d0199 100644 --- a/templates/editprivilege.html +++ b/templates/editprivilege.html @@ -1,170 +1,393 @@ {% extends "base.html" %} {% block content %} -

Edit Privilege

-

Edit, change or remove the privilege!

-
+

Edit Privilege

+

Edit, change or remove the privilege!

+
-

Edit {{ privileges['Name'] }}

+

Edit {{ privileges['Name'] }}

-
-
- - -
-
- - -
-
- -
-
- UserPublic
- UserNormal
- UserDonor
- AdminAccessRAP
- AdminManageUsers
- AdminBanUsers
- AdminSilenceUsers
- AdminWipeUsers
- AdminManageBeatmaps
- AdminManageServers
- AdminManageSettings
- AdminManageBetaKeys
- AdminManageReports
- AdminManageDocs
- AdminManageBadges
- AdminViewRAPLogs
- AdminManagePrivileges
- AdminSendAlerts
- AdminChatMod
- AdminKickUsers
- UserPendingVerification
- UserTournamentStaff
- AdminCaker
- AdminViewTopScores
- - RPErrorLogs
- RPManageClans
- RPViewIPs
- RealistikOsuBot
-
-
-
- - -
-
- - -
-
- - Delete -
-
+
+
+ + +
+
+ + +
+
+ +
+
+ + UserPublic
+ UserNormal
+ UserDonor
+ AdminAccessRAP
+ AdminManageUsers
+ AdminBanUsers
+ AdminSilenceUsers
+ AdminWipeUsers
+ AdminManageBeatmaps
+ AdminManageServers
+ AdminManageSettings
+ AdminManageBetaKeys
+ AdminManageReports
+ AdminManageDocs
+ AdminManageBadges
+ AdminViewRAPLogs
+ AdminManagePrivileges
+ AdminSendAlerts
+ AdminChatMod
+ AdminKickUsers
+ UserPendingVerification
+ UserTournamentStaff
+ AdminCaker
+ AdminViewTopScores
+ + RPErrorLogs
+ RPManageClans
+ RPViewIPs
+ RealistikOsuBot
+
+
+
+ + +
+
+ + +
+
+ + Delete +
+
- -
- + //porting HasPrivilege to JS + //uh oh i dont like this + if (PrivInt & 1) { + document.getElementById("1").checked = true; + } + if (PrivInt & 2) { + document.getElementById("2").checked = true; + } + if (PrivInt & 4) { + document.getElementById("3").checked = true; + } + if (PrivInt & 8) { + document.getElementById("4").checked = true; + } + if (PrivInt & 16) { + document.getElementById("5").checked = true; + } + if (PrivInt & 32) { + document.getElementById("6").checked = true; + } + if (PrivInt & 64) { + document.getElementById("7").checked = true; + } + if (PrivInt & 128) { + document.getElementById("8").checked = true; + } + if (PrivInt & 256) { + document.getElementById("9").checked = true; + } + if (PrivInt & 512) { + document.getElementById("10").checked = true; + } + if (PrivInt & 1024) { + document.getElementById("11").checked = true; + } + if (PrivInt & 2048) { + document.getElementById("12").checked = true; + } + if (PrivInt & 4096) { + document.getElementById("13").checked = true; + } + if (PrivInt & 8192) { + document.getElementById("14").checked = true; + } + if (PrivInt & 16384) { + document.getElementById("15").checked = true; + } + if (PrivInt & 32768) { + document.getElementById("16").checked = true; + } + if (PrivInt & 65536) { + document.getElementById("17").checked = true; + } + if (PrivInt & 131072) { + document.getElementById("18").checked = true; + } + if (PrivInt & 262144) { + document.getElementById("19").checked = true; + } + if (PrivInt & 524288) { + document.getElementById("20").checked = true; + } + if (PrivInt & 1048576) { + document.getElementById("21").checked = true; + } + if (PrivInt & 2097152) { + document.getElementById("22").checked = true; + } + if (PrivInt & 4194304) { + document.getElementById("23").checked = true; + } + if (PrivInt & 8388608) { + document.getElementById("24").checked = true; + } + if (PrivInt & 134217728) { + document.getElementById("25").checked = true; + } + if (PrivInt & 268435456) { + document.getElementById("26").checked = true; + } + if (PrivInt & 536870912) { + document.getElementById("27").checked = true; + } + {% endblock %} diff --git a/templates/edituser.html b/templates/edituser.html index de404aaf..f4e39826 100644 --- a/templates/edituser.html +++ b/templates/edituser.html @@ -1,284 +1,439 @@ {% extends "base.html" %} - {% block head %} - - - + + + - + {% endblock %} - {% block content %} -

Edit {{ UserData['Username'] }}

+

Edit {{ UserData['Username'] }}

-
+
- image -

{{ UserData['Username'] }} |

- {% if UserData["IsOnline"] %} + image +

{{ UserData['Username'] }} |

+ {% if UserData["IsOnline"] %} ● Online - {% else %} + {% else %} ● Offline - {% endif %} + {% endif %}
- {{ UserData['Username'] }} is a player from {{ UserData["CountryFull"] }} - {% if UserData['Country'] == "XX" %} -
- {% else %} -
- {% endif %} - Their status on {{ config.srv_name }} is - {% if UserData["Privileges"] >= 3 %} + {{ UserData['Username'] }} is a player from + {{ UserData["CountryFull"] }} + {% if UserData['Country'] == "XX" %} +
+ {% else %} +
+ {% endif %} + Their status on {{ config.srv_name }} is + {% if UserData["Privileges"] >= 3 %} {{ UserData["PrivName"] }} - {% else %} + {% else %} {{ UserData["PrivName"] }} - {% endif %} - {% if UserData["HasSupporter"] %} -
- Their Donor rank expires {{ UserData["DonorExpireStr"] }}. - {% endif %} - {% if UserData["IsSilenced"] %} -
- They are currently silenced for the reason: {{ UserData["SilenceReason"] }}. They will be unsilenced {{ UserData["SilenceEndAgo"] }}. - {% endif %} - {% if UserData["IsBanned"] %} -
- They were banned {{ UserData["BanedAgo"] }} - {% endif %} - {% if UserData["IsFrozen"] %} -
- They are currently frozen. They will be autorestricted {{ UserData["FreezeDate"] }} if they do not submit a liveplay. - {% endif %} + {% endif %} + {% if UserData["HasSupporter"] %} +
+ Their Donor rank expires + {{ UserData["DonorExpireStr"] }}. + {% endif %} + {% if UserData["IsSilenced"] %} +
+ They are currently silenced for the reason: + {{ UserData["SilenceReason"] }}. They will be unsilenced + {{ UserData["SilenceEndAgo"] }}. + {% endif %} + {% if UserData["IsBanned"] %} +
+ They were banned {{ UserData["BanedAgo"] }} + {% endif %} + {% if UserData["IsFrozen"] %} +
+ They are currently frozen. They will be autorestricted + {{ UserData["FreezeDate"] }} + if they do not submit a liveplay. + {% endif %}
- -
-
+ +
+
-

Edit

+

Edit

-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - {% include 'countryselect.html' %} -
-
- - -
-
- - -
-
- -
-
-
-
-
- -
-
- - -
-
- - -
- {% if ShowIPs %} -
- IP: {{ UserData['Ip'] }} -
+ +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + {% include 'components/countryselect.html' %} +
+
+ + +
+
+ + +
+
+ +
+
+
+
+
+ +
+
+ + +
+
+ + +
+ {% if ShowIPs %} +
+ IP: {{ UserData['Ip'] }} +
+ {% endif %} + +
-
- -{% endfor %} -{% else %} -
{{ UserData['Username'] }} has no ban logs associated with them.
-{% endif %} -

{{ UserData['Username'] }}'s Hardware Information

-
+
+

{{ UserData['Username'] }}'s Ban Logs

+ {% if ban_logs %} + {% for log in ban_logs %} +
+
+ image +

{{ log["from_name"] }}

+ to + image +

{{ log["to_name"] }}

+ for {{ log["summary"] }} +
+
+ {{ log["detail"] }} +
+ +
+ {% endfor %} + {% else %} +
{{ UserData['Username'] }} has no ban logs associated with them.
+ {% endif %} +

+ {{ UserData['Username'] }}'s + Hardware Information +

+
-

Hardware Log History

+

Hardware Log History

- {{ UserData['Username'] }} has a total of {{ hwid_count }} HWID logs. - + {{ UserData['Username'] }} + has a total of {{ hwid_count }} HWID logs. +
-
-

Admin Centre

-
+
+

Admin Centre

+
-

Community Management

+

Community Management

-
- - -
- +
+ + +
+ - {% if UserData["IsBanned"] %} - Banned Since: {{ UserData["BanedAgo"] }} - {% endif %} + {% if UserData["IsBanned"] %} + Banned Since: {{ UserData["BanedAgo"] }} + {% endif %}
-
-
+
+
-

Admin Actions

+

Admin Actions

- This is the danger zone! These actions could mess up someone's profile if done without reason. -

-
- IP Lookup - Change Password - Award Donor - {% if UserData["HasSupporter"] %} - Remove Donor - {% endif %} -
- -
- Freeze/Unfreeze - Clear HWID - Delete Account - Kick User - {% if config.srv_supports_relax or config.srv_supports_autopilot %} - Full Wipe - Wipe Vanilla - {% else %} - Wipe - {% endif %} - {% if config.srv_supports_relax %} - Wipe Relax - {% endif %} - {% if config.srv_supports_autopilot %} - Wipe Autopilot - {% endif %} -
-
- -
- + {% endblock %} diff --git a/templates/errors/403.html b/templates/errors/403.html index 20ca89b0..40171ac3 100644 --- a/templates/errors/403.html +++ b/templates/errors/403.html @@ -1,31 +1,37 @@ - - RealistikPanel! - Forbidden! - - - - - - - + + RealistikPanel! - Forbidden! + + + + + + + - -
-
-
-
-
-

403

-
- You shall not pass! -
-
-
- +
+
+ diff --git a/templates/errors/404.html b/templates/errors/404.html index ae525341..d52da51a 100644 --- a/templates/errors/404.html +++ b/templates/errors/404.html @@ -1,31 +1,39 @@ - - RealistikPanel! - Not found - - - - - - - + + RealistikPanel! - Not found + + + + + + + - -
-
-
-
-
-

404

-
- The page you were looking for could not be found. -
+ +
+
+
+
+
+

404

+
+ The page you were looking for could not be found.
-
-
-
- - + +
+
+
+ diff --git a/templates/errors/500.html b/templates/errors/500.html index d464a435..012fef8b 100644 --- a/templates/errors/500.html +++ b/templates/errors/500.html @@ -1,31 +1,39 @@ - - RealistikPanel! - Bad Code! - - - - - - - + + RealistikPanel! - Bad Code! + + + + + + + - -
-
-
-
-
-

500

-
- Uh oh... The code broke. That shouldn't have happened. -
+ +
+
+
+
+
+

500

+
+ Uh oh... The code broke. That shouldn't have happened.
-
-
-
- - + +
+
+
+ diff --git a/templates/iplookup.html b/templates/iplookup.html index bc34d87d..573e481d 100644 --- a/templates/iplookup.html +++ b/templates/iplookup.html @@ -1,47 +1,51 @@ {% extends "base.html" %} {% block content %} -

IP Lookup

-

Spot possible multiaccounters by searching users who have the same IP.

-
+

IP Lookup

+

+ Spot possible multiaccounters by searching users who have the same IP. +

+
-

Search Results for IP: {{ ip }}

+

Search Results for IP: {{ ip }}

- - - - - - - - - - - - {% for user in ipusers %} - - - - - - - - {% endfor %} - -
User IDUsernameIPPPEdit
{{ user["Id"] }}{{ user["Username"] }}{{ user["Ip"] }}{{ user["pp"] }}Edit
-

-

- {% if IPLen == 0 %} - Nothing Found! - {% elif IPLen == 1 %} - All Good! - {% elif IPLen > 1 %} - Possible Multiaccount! - {% endif %} -

+ + + + + + + + + + + + {% for user in ipusers %} + + + + + + + + {% endfor %} + +
User IDUsernameIPPPEdit
{{ user["Id"] }}{{ user["Username"] }}{{ user["Ip"] }}{{ user["pp"] }} + Edit +
+

+

+ {% if IPLen == 0 %} + Nothing Found! + {% elif IPLen == 1 %} + All Good! + {% elif IPLen > 1 %} + Possible Multiaccount! + {% endif %} +

- -
+ +
{% endblock %} diff --git a/templates/login.html b/templates/login.html index 7254f6ef..ae2cb61a 100644 --- a/templates/login.html +++ b/templates/login.html @@ -1,29 +1,30 @@ - - - - - - - RealistikPanel! - Login - - - {% if alert %} -
- × - {{ alert }} -
- {% endif %} -
-

RealistikPanel!

-
Log in comrade!
- - - -
- - - + + + + + + + RealistikPanel! - Login + + + {% if alert %} +
+ × + {{ alert }} +
+ {% endif %} +
+

RealistikPanel!

+
Log in comrade!
+ + + +
+ + diff --git a/templates/privileges.html b/templates/privileges.html index 5e08b855..add723ec 100644 --- a/templates/privileges.html +++ b/templates/privileges.html @@ -1,42 +1,50 @@ {% extends "base.html" %} {% block content %} -

Privileges

-

Modify or edit privilege groups!

-
-
- Privileges -
+

Privileges

+

Modify or edit privilege groups!

+
+
Privileges
- - - - - - - - - - - {% for priv in privileges %} - - - - - - - {% endfor %} - -
IDNamePrivilegesActions
{{ priv["Id"] }}{{ priv["Name"] }}{{ priv["Priv"] }} -
- Delete - Edit -
-
+ + + + + + + + + + + {% for priv in privileges %} + + + + + + + {% endfor %} + +
IDNamePrivilegesActions
{{ priv["Id"] }}{{ priv["Name"] }}{{ priv["Priv"] }} +
+ Delete + Edit +
+
-
+
{% endblock %} diff --git a/templates/rankform.html b/templates/rankform.html index 0bc8e50a..391ee744 100644 --- a/templates/rankform.html +++ b/templates/rankform.html @@ -1,68 +1,85 @@ {% extends "base.html" %} {% block content %} -

Beatmap Ranking

-

Change the ranking of a beatmap! This can be ranked, loved or qualified.

-
+

Beatmap Ranking

+

+ Change the ranking of a beatmap! This can be ranked, loved or qualified. +

+
-

Rank a beatmap!

+

Rank a beatmap!

-
-
- Make sure all the difficulties have been loaded at least once so they are added to the database!
- - -
- -
-
- -
+ +
-

Suggested Ranking

-

Here are the most popular unranked beatmaps.

-
+

Suggested Ranking

+

Here are the most popular unranked beatmaps.

+
- {% for Beatmap in SuggestedBmaps[0] %} + {% for Beatmap in SuggestedBmaps[0] %}
-
-
-
-

{{ Beatmap["SongName"] }}

-
-
-
- This map has been played {{ Beatmap["Playcount"] }} times on this server! -
-
-
- Manage Beatmap -
+
+
+
+

{{ Beatmap["SongName"] }}

+
+
+ This map has been played {{ Beatmap["Playcount"] }} times on + this server! +
+
+
+ Manage Beatmap +
+
- {% endfor %} + {% endfor %}
- {% for Beatmap in SuggestedBmaps[1] %} + {% for Beatmap in SuggestedBmaps[1] %}
-
-
-
-

{{ Beatmap["SongName"] }}

-
-
-
- This map has been played {{ Beatmap["Playcount"] }} times on this server! -
-
-
- Manage Beatmap -
+
+
+
+

{{ Beatmap["SongName"] }}

+
+
+ This map has been played {{ Beatmap["Playcount"] }} times on + this server! +
+
+
+ Manage Beatmap +
+
- {% endfor %} + {% endfor %}
-
+
{% endblock %} diff --git a/templates/rankreq.html b/templates/rankreq.html index 4f8e816b..26913f21 100644 --- a/templates/rankreq.html +++ b/templates/rankreq.html @@ -1,72 +1,92 @@ {% extends "base.html" %} +{% import "components/pagination.html" as pagination %} {% block content %} -

Rank Requests

-

View all beatmaps that were requested for ranking.

-
+

Rank Requests

+

View all beatmaps that were requested for ranking.

+ + {{ pagination.pagination('/rankreq', page, pages) }} + +
- {% for Request in RankRequests[0] %} - - {% endfor %} + {% for Request in RankRequests[0] %} + + {% endfor %}
- {% for Request in RankRequests[1] %} - - {% endfor %} + {% for Request in RankRequests[1] %} + + {% endfor %}
-
- -
- -
+
+ + {{ pagination.pagination('/rankreq', page, pages) }} + {{ pagination.paginationJs('/rankreq', page, pages) }} {% endblock %} diff --git a/templates/raplogs.html b/templates/raplogs.html index b4d52c3f..b96dbc46 100644 --- a/templates/raplogs.html +++ b/templates/raplogs.html @@ -1,64 +1,42 @@ {% extends "base.html" %} - +{% import "components/pagination.html" as pagination %} {% block content %} -

Logs

-

See all the actions moderators have taken! Catch any traitors or abusers.

-
+

Logs

+

+ See all the actions moderators have taken! Catch any traitors or abusers. +

+
-

Actions Log

+

Actions Log

- Here, you can view any administritive actions taken by administrators, as well as any Fokabot errors. This can be used to view any mistakes moderators have taken or catch any misbehaviour within the staff team. -
- -
-{% for log in Logs %} -
-
- image + +
+ + {{ pagination.pagination('/logs', page, Pages) }} + {% for log in Logs %} +
+
+ image

{{ log["AccountData"]["Username"] }}

-
-
+
+
{{ log["AccountData"]["Username"] }} {{ log['Text'] }} +
+
- -
-{% endfor %} + {% endfor %} - -
    - {% if page <= 1 %} -
  • - {% else %} -
  • - {% endif %} - - - Previous - -
  • - {% for Page in Pages %} - {% if page == Page %} -
  • - {% else %} -
  • - {% endif %} - {{ Page }} -
  • - {% endfor %} - {% if page == Pages[-1] %} -
  • - {% else %} -
  • - {% endif %} - - - Next - -
  • -
+ + {{ pagination.pagination('/logs', page, Pages) }} + {{ pagination.paginationJs('/logs', page, Pages) }} {% endblock %} diff --git a/templates/stats.html b/templates/stats.html index b904f49f..a9318bb4 100644 --- a/templates/stats.html +++ b/templates/stats.html @@ -1,143 +1,165 @@ {% extends "base.html" %} - {% block head %} - + {% endblock %} - {% block content %} -

Server Statistics

-

View and explore that data and statistcs side of your server.

-
+

Server Statistics

+

+ View and explore that data and statistcs side of your server. +

+
-
-

{{ StatData["ActiveToday"] }}

-
-
- Active Today -
+
+

{{ StatData["ActiveToday"] }}

+
+
Active Today
-
-

{{ StatData["DisallowedCount"] }}

-
-
- Banned Users -
+
+

{{ StatData["DisallowedCount"] }}

+
+
Banned Users
-
-

Activity Graphs

-
+
+

Activity Graphs

+
-
-
-

Registrations

-
-
- -
- +
+
+

Registrations

+
+ +
+ +
- +
-
-

Extended recent plays graph

-

Rather than viewing the usual 20 recent plays in the dash, this shows the 500 most recent plays.

-
+
+

Extended recent plays graph

+

+ Rather than viewing the usual 20 recent plays in the dash, this shows the + 500 most recent plays. +

+
-

Recent Plays

+

Recent Plays

-

Filters

- Choose the minimum PP value that plays are required to have to appear on the list. The current value is {{ MinPP }}. -
-
-
- -
-
- -
-
-
- - - - - - - - - - - - {% for play in StatData["RecentPlays"] %} - - - - - - - - {% endfor %} - -
TimePlayerSongScorePP
{{ play["Time"] }}{{ play["Player"] }}{{ play["SongName"] }} ({{ play["Accuracy"] }}%){{ play["Score"] }}{{ play["pp"] }}
-
- -
- + {% endblock %} diff --git a/templates/syssettings.html b/templates/syssettings.html index 346c243d..a85c6a84 100644 --- a/templates/syssettings.html +++ b/templates/syssettings.html @@ -1,63 +1,72 @@ {% extends "base.html" %} - {% block content %} -

System Settings

-

Change the settings of your osu! server stack.

-
+

System Settings

+

Change the settings of your osu! server stack.

+
-

Settings

+

Settings

-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
- -
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
- -
+ +
{% endblock %} diff --git a/templates/userhwids.html b/templates/userhwids.html index ef4f8057..37872ac1 100644 --- a/templates/userhwids.html +++ b/templates/userhwids.html @@ -1,155 +1,124 @@ {% extends "base.html" %} +{% import "components/pagination.html" as pagination %} {% block content %} -

{{ user["Username"] }}'s HWID History

+

{{ user["Username"] }}'s HWID History

-
+
- image -

{{ user['Username'] }}

+ image +

{{ user['Username'] }}

- They have a total of {{ total_hwids }} HWID logs. + They have a total of {{ total_hwids }} HWID logs.
- -
+ +
-
- -
+ {{ pagination.pagination("/user/hwid/" + user['Id']|string, + page, pages) }} - -{% for log in hwid_logs %} -
-
+ + {% for log in hwid_logs %} +
+
Hardware Log {{ log["result"]["id"] }} -
-
+
+
+ + + + + + + + + + + + + + + + + + + + +
IDUser IDMac HashUnique IDDisk HashOccurences
{{ log["result"]["id"] }}{{ log["result"]["user_id"] }}{{ log["result"]["mac"] }}{{ log["result"]["unique_id"] }}{{ log["result"]["disk_id"] }}{{ log["result"]["occurences"] }}
+
+

Exact Matches

+ These are usually a tell-tale sign of multiaccounting. + {% if not log["exact_matches"] %} + All Good! + {% else %} + - - - - - - - - + + + + + + + + + {% for exact_log in log["exact_matches"] %} - - - - - - + + + + + + + {% endfor %} -
IDUser IDMac HashUnique IDDisk HashOccurences
IDUser IDMac HashUnique IDDisk HashOccurences
{{ log["result"]["id"] }}{{ log["result"]["user_id"] }}{{ log["result"]["mac"] }}{{ log["result"]["unique_id"] }}{{ log["result"]["disk_id"] }}{{ log["result"]["occurences"] }}{{ exact_log["id"] }}{{ exact_log["user_id"] }}{{ exact_log["mac"] }}{{ exact_log["unique_id"] }}{{ exact_log["disk_id"] }}{{ exact_log["occurences"] }}
-
-

Exact Matches

- These are usually a tell-tale sign of multiaccounting. - {% if not log["exact_matches"] %} - All Good! - {% else %} - - - - - - - - - - - - - {% for exact_log in log["exact_matches"] %} - - - - - - - - {% endfor %} - - -
IDUser IDMac HashUnique IDDisk HashOccurences
{{ exact_log["id"] }}{{ exact_log["user_id"] }}{{ exact_log["mac"] }}{{ exact_log["unique_id"] }}{{ exact_log["disk_id"] }}{{ exact_log["occurences"] }}
+ {% endif %} -
+

Partial Matches

- These show whenever the person's HWID bears any resemblence to any other's, meaning they frequently lead to false positives. + These show whenever the person's HWID bears any resemblence to any + other's, meaning they frequently lead to false positives. {% if not log["partial_matches"] %} - All Good! + All Good! {% else %} - - - - - - - - - - - - - {% for partial_log in log["partial_matches"] %} - - - - - - - - {% endfor %} - - -
IDUser IDMac HashUnique IDDisk HashOccurences
{{ partial_log["id"] }}{{ partial_log["user_id"] }}{{ partial_log["mac"] }}{{ partial_log["unique_id"] }}{{ partial_log["disk_id"] }}{{ partial_log["occurences"] }}
+ + + + + + + + + + + + + {% for partial_log in log["partial_matches"] %} + + + + + + + + + {% endfor %} + +
IDUser IDMac HashUnique IDDisk HashOccurences
{{ partial_log["id"] }}{{ partial_log["user_id"] }}{{ partial_log["mac"] }}{{ partial_log["unique_id"] }}{{ partial_log["disk_id"] }}{{ partial_log["occurences"] }}
{% endif %} +
-
-{% endfor %} - -
- -
- + {% endfor %} + {{ pagination.pagination("/user/hwid/" + user['Id']|string, + page, pages) }} + {{ pagination.paginationJs("/user/hwid/" + user['Id']|string, + page, pages) }} {% endblock %} diff --git a/templates/users.html b/templates/users.html index 681067d9..093a9613 100644 --- a/templates/users.html +++ b/templates/users.html @@ -1,114 +1,95 @@ -{% extends "base.html" %} {% block content %} - -

Users

-

This is the users panel. It lists all registered users and provides links to actions that can be quickly done to the users.

-
-
- Search for users. -
+ +

Users

+

+ This is the users panel. It lists all registered users and provides links to + actions that can be quickly done to the users. +

+ +
+
Search for users.
-
-
- -
- -
+
+
+ +
+ +
- -
- + + + {{ pagination.pagination('/users', page, pages) }} +
- - - - - - - + + + + + + + - {% for user in UserData %} + {% for user in UserData %} - + + + + {% if user["Allowed"] %} - - {% if user["Allowed"] %} - - {% else %} + {% else %} - {% endif %} - + {% endif %} + - {% endfor %} + {% endfor %} -
IDNamePrivilegeAllowedActions
IDNamePrivilegeAllowedActions
{{ user["Id"] }}{{ user["Id"] }} + {% if not user['Country'] == "XX" %} + + {% else %} + + {% endif %} + {{ user["Name"] }} + + {{ user["Privilege"]["Name"] }} + - {% if not user['Country'] == "XX" %} - - {% else %} - - {% endif %} - {{ user["Name"] }} + Yes {{ user["Privilege"]["Name"] }}YesNoEdit + Edit +
+ - - + {{ pagination.pagination('/users', page, pages) }} + {{ pagination.paginationJs('/users', page, pages) }} {% endblock %}