add web
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
{% extends 'groups/admin_template.html' %}
|
||||
{% block page_content%}
|
||||
<style>
|
||||
h5 {
|
||||
font-size: 15px;
|
||||
margin-bottom: 5px !important;
|
||||
}
|
||||
</style>
|
||||
<h3>Create Role</h3>
|
||||
<form method="post">
|
||||
<div class="mt-3">
|
||||
<h5 class="mb-1">Role Name</h5>
|
||||
<input type="text" name="name" class="form-control" placeholder="Name" required>
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
<h5 class="mb-1">Role Description</h5>
|
||||
<textarea name="description" class="form-control" placeholder="Description" style="height: 100px" required></textarea>
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
<h5 class="mb-1">Rank ( 1 - 254 )</h5>
|
||||
<input type="number" name="rank" class="form-control" placeholder="Rank" max="254" min="1" required>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<div class="d-flex w-100 justify-content-end">
|
||||
<button type="submit" class="btn btn-light mt-3 ms-auto">Create R$25</button>
|
||||
</div>
|
||||
</form>
|
||||
{%endblock%}
|
||||
@@ -0,0 +1,42 @@
|
||||
{% extends 'groups/admin_template.html' %}
|
||||
{% block page_content%}
|
||||
<h3>
|
||||
Group Information
|
||||
</h3>
|
||||
<style>
|
||||
.upload-icon {
|
||||
font-size: 13px;
|
||||
}
|
||||
.upload-icon::file-selector-button {
|
||||
background-color: rgb(12, 12, 12);
|
||||
border-radius: 5px;
|
||||
padding: 5px;
|
||||
color: rgb(200,200,200);
|
||||
border: 1px solid rgb(50,50,50);
|
||||
}
|
||||
.upload-icon::file-selector-button:hover {
|
||||
background-color: rgb(50,50,50);
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<form enctype="multipart/form-data" method="post">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<img src="/Thumbs/GroupIcon.ashx?groupid={{group.id}}&x=420&y=420" width="100%" style="aspect-ratio: 1/1;" class="border rounded">
|
||||
<div class="mt-2">
|
||||
<input type="file" id="file" name="file" class="upload-icon">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="form-floating h-100 mt-2 mt-md-0">
|
||||
<textarea class="form-control" name="description" id="description" style="height: 100%;">{{group.description}}</textarea>
|
||||
<label for="description">Description</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<div class="w-100 mt-3">
|
||||
<button type="submit" class="btn btn-primary w-100 btn-sm" {% if group.owner_id != currentuser.id %}disabled{%endif%}>Save</button>
|
||||
</div>
|
||||
</form>
|
||||
{%endblock%}
|
||||
@@ -0,0 +1,52 @@
|
||||
{% extends 'groups/admin_template.html' %}
|
||||
{% block page_content%}
|
||||
<style>
|
||||
h5 {
|
||||
font-size: 15px;
|
||||
margin-bottom: 5px !important;
|
||||
}
|
||||
</style>
|
||||
<div class="d-flex align-items-center">
|
||||
<h3 class="m-0">Join Requests</h3>
|
||||
<div class="ms-auto d-flex align-items-center">
|
||||
<form action="/groups/admin/{{group.id}}/members/requests/deny_all" method="post">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<button type="submit" class="btn btn-sm btn-outline-danger">Deny All</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
{% for request in JoinRequests.items %}
|
||||
<div class="col-4">
|
||||
<div class="p-2" style="background-color: rgb(31, 31, 31);box-shadow: 0px 0px 10px 0px rgb(0,0,0,0.5);">
|
||||
<div class="d-flex">
|
||||
<img src="/Thumbs/Head.ashx?x=100&y=100&userId={{request.user.id}}" width="60px" style="aspect-ratio: 1/1;" class="rounded border">
|
||||
<a class="text-decoration-none text-white ms-2" href="/users/{{request.user.id}}/profile">{{request.user.username}}</a>
|
||||
</div>
|
||||
<div class="d-flex align-items-center mt-1">
|
||||
<div class="w-50 p-1">
|
||||
<form action="/groups/admin/{{group.id}}/members/requests/deny/{{request.user.id}}">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<button type="submit" class="btn btn-sm btn-outline-danger w-100">Decline</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="w-50 p-1">
|
||||
<form action="/groups/admin/{{group.id}}/members/requests/accept/{{request.user.id}}">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<button type="submit" class="btn btn-sm btn-light w-100">Accept</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if len(JoinRequests.items) == 0 %}
|
||||
<p class="mt-5 mb-5 w-100 text-center">No Results Found</p>
|
||||
{%endif%}
|
||||
<div class="d-flex w-100" style="font-size: 14px;">
|
||||
<a class="text-decoration-none ms-auto {% if not JoinRequests.has_prev: %}text-secondary{%endif%}" {% if JoinRequests.has_prev: %}href="/groups/admin/{{group.id}}/members/requests?page={{JoinRequests.prev_num}}"{%endif%}>Previous</a>
|
||||
<p class="m-0 ms-2 me-2 text-white">Page {{JoinRequests.page}} of {{JoinRequests.pages}}</p>
|
||||
<a class="text-decoration-none me-auto {% if not JoinRequests.has_next: %}text-secondary{%endif%}" {% if JoinRequests.has_next: %}href="/groups/admin/{{group.id}}/members/requests?page={{JoinRequests.next_num}}"{%endif%}>Next</a>
|
||||
</div>
|
||||
{%endblock%}
|
||||
@@ -0,0 +1,116 @@
|
||||
{% extends 'groups/admin_template.html' %}
|
||||
{% block page_content%}
|
||||
<div class="d-flex align-items-center mb-2">
|
||||
<h3 class="m-0">
|
||||
Members
|
||||
</h3>
|
||||
{% if group.settings.approval_required and permissions.invite_members %}
|
||||
<a href="/groups/admin/{{group.id}}/members/requests" class="m-0 ms-3 text-decoration-none">View Join Requests <span class="badge text-bg-primary">{{JoinRequestCount}}</span></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<form method="post" class="mb-3" style="font-size: 14px;">
|
||||
<div class="input-group">
|
||||
<div class="form-floating" style="width: 52%;">
|
||||
<input type="text" class="form-control" id="search-input" name="search-input" {%if searchByUsername != None: %}value="{{searchByUsername}}"{%endif%} placeholder="ROBLOX">
|
||||
<label for="search-input">Search</label>
|
||||
</div>
|
||||
<div class="form-floating" style="min-width: 160px;">
|
||||
<select class="form-select" id="search-by" name="search-by">
|
||||
<option value="0">All Roles</option>
|
||||
{% for roleObj in SortedRoles %}
|
||||
{% if roleObj.rank != 0 %}
|
||||
<option value="{{roleObj.id}}" {% if searchByRole.id == roleObj.id %}selected{%endif%}>{{roleObj.name}}</option>
|
||||
{%endif%}
|
||||
{%endfor%}
|
||||
</select>
|
||||
<label for="search-by">Search in</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-outline-primary fw-bold" style="min-width: 50px;"><i class="bi bi-search"></i></button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row">
|
||||
{% for groupMember in Members %}
|
||||
<div class="col-4 col-sm-2 mb-3">
|
||||
<div class="position-relative">
|
||||
<img src="/Thumbs/Avatar.ashx?x=100&y=100&userId={{groupMember.user.id}}" width="100%" style="aspect-ratio: 1/1;" class="rounded border rounded-bottom-0 border-bottom-0">
|
||||
{% if permissions.remove_members and groupMember.group_role.rank < role.rank %}
|
||||
<button class="position-absolute btn-sm btn-outline-danger btn kick-btn" data-userid="{{groupMember.user.id}}" data-groupid="{{group.id}}" style="right: 5px;top: 5px;padding: 2px;">
|
||||
<i class="bi bi-hammer"></i>
|
||||
</button>
|
||||
{%endif%}
|
||||
</div>
|
||||
{% if permissions.change_rank and groupMember.group_role.rank < role.rank: %}
|
||||
<select style="font-size: 12px;padding: 4px;" class="form-select rounded-top-0 change-rank-select" data-userid="{{groupMember.user.id}}" data-groupid="{{group.id}}" data-currentrole="{{groupMember.group_role.id}}">
|
||||
{% for roleObj in SortedRoles %}
|
||||
{% if roleObj.rank != 0 and roleObj.rank < role.rank %}
|
||||
<option value="{{roleObj.id}}" {% if groupMember.group_role.id == roleObj.id %}selected{%endif%}>{{roleObj.name}}</option>
|
||||
{%endif%}
|
||||
{%endfor%}
|
||||
</select>
|
||||
{%else%}
|
||||
<p style="font-size: 12px;padding: 4px;" class="rounded-top-0 m-0 border rounded">{{groupMember.group_role.name}}</p>
|
||||
{%endif%}
|
||||
<a href="/users/{{groupMember.user.id}}/profile" class="text-decoration-none w-100 text-center d-block" style="font-size: 13px;">{{groupMember.user.username}}</a>
|
||||
</div>
|
||||
{%endfor%}
|
||||
</div>
|
||||
{% if len(Members.items) == 0 %}
|
||||
<p class="mt-5 mb-5 w-100 text-center">No Results Found</p>
|
||||
{%endif%}
|
||||
<div class="d-flex w-100" style="font-size: 14px;">
|
||||
<a class="text-decoration-none ms-auto {% if not Members.has_prev: %}text-secondary{%endif%}" {% if Members.has_prev: %}href="/groups/admin/{{group.id}}/members?page={{Members.prev_num}}{% if searchByUsername != None %}&search={{searchByUsername}}{%endif%}{%if searchByRole != None %}&role={{searchByRole.id}}{%endif%}"{%endif%}>Previous</a>
|
||||
<p class="m-0 ms-2 me-2 text-white">Page {{pageNumber}} of {{Members.pages}}</p>
|
||||
<a class="text-decoration-none me-auto {% if not Members.has_next: %}text-secondary{%endif%}" {% if Members.has_next: %}href="/groups/admin/{{group.id}}/members?page={{Members.next_num}}{% if searchByUsername != None %}&search={{searchByUsername}}{%endif%}{%if searchByRole != None %}&role={{searchByRole.id}}{%endif%}"{%endif%}>Next</a>
|
||||
</div>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', async () => {
|
||||
const XCSRFTOKEN = "{{ csrf_token() }}";
|
||||
const backgroundOverlay = document.getElementById('transparent-background-top');
|
||||
const changeRankSelects = document.querySelectorAll('.change-rank-select');
|
||||
changeRankSelects.forEach(select => {
|
||||
select.addEventListener('change', async () => {
|
||||
const userId = select.dataset.userid;
|
||||
const groupId = select.dataset.groupid;
|
||||
const currentRole = select.dataset.currentrole;
|
||||
const newRole = select.value;
|
||||
|
||||
if (newRole == currentRole) return;
|
||||
|
||||
backgroundOverlay.style.display = 'block';
|
||||
try {
|
||||
const response = await fetch(`/groups/admin/${groupId}/change_role/${userId}/${newRole}`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': XCSRFTOKEN
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
} finally {
|
||||
location.reload();
|
||||
}
|
||||
})
|
||||
})
|
||||
const kickBtns = document.querySelectorAll('.kick-btn');
|
||||
kickBtns.forEach(btn => {
|
||||
btn.addEventListener('click', async () => {
|
||||
const userId = btn.dataset.userid;
|
||||
const groupId = btn.dataset.groupid;
|
||||
backgroundOverlay.style.display = 'block';
|
||||
try {
|
||||
const response = await fetch(`/groups/admin/${groupId}/kick/${userId}`, {
|
||||
method: 'DELETE',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': XCSRFTOKEN
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
} finally {
|
||||
location.reload();
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
</script>
|
||||
{%endblock%}
|
||||
@@ -0,0 +1,42 @@
|
||||
{% extends 'groups/admin_template.html' %}
|
||||
{% block page_content%}
|
||||
<style>
|
||||
h5 {
|
||||
font-size: 15px;
|
||||
margin-bottom: 5px !important;
|
||||
}
|
||||
</style>
|
||||
<div class="d-flex align-items-center mb-1">
|
||||
<h3 class="m-0">One-time Payout</h3>
|
||||
</div>
|
||||
<form method="post" action="/groups/admin/{{group.id}}/payouts/one-time">
|
||||
<div class="d-flex align-items-center">
|
||||
<div style="width: 20%;" class="p-1">
|
||||
<div class="form-floating">
|
||||
<select class="form-control" id="payout-currency" name="payout-currency" required>
|
||||
<option value="robux">Robux</option>
|
||||
<option value="tickets">Tickets</option>
|
||||
</select>
|
||||
<label for="payout-currency">Currency Type</label>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 80%;" class="p-1">
|
||||
<div class="form-floating">
|
||||
<input type="text" class="form-control" id="payout-amount" name="payout-amount" placeholder="0" required>
|
||||
<label for="payout-amount">Amount</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%;" class="p-1 mt-1">
|
||||
<div class="form-floating">
|
||||
<input type="text" class="form-control" id="payout-recipient" name="payout-recipient" placeholder="ROBLOX" required>
|
||||
<label for="payout-recipient">Recipient Username</label>
|
||||
</div>
|
||||
<p class="mt-1 m-0 text-secondary" style="font-size:12px;">Enter the username of the recipient you want to pay! This is CaSe SeNsItIvE and please double check before clicking payout, all payments are final and cannot be reversed</p>
|
||||
</div>
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<div class="mt-2 d-flex">
|
||||
<button type="submit" class="btn btn-light ms-auto" onclick="return confirm('Are you sure you want to pay this user?')">Payout</button>
|
||||
</div>
|
||||
</form>
|
||||
{%endblock%}
|
||||
@@ -0,0 +1,198 @@
|
||||
{% extends 'groups/admin_template.html' %}
|
||||
{% block page_content%}
|
||||
<style>
|
||||
.role-list {
|
||||
width: 140px;
|
||||
}
|
||||
.role-list a {
|
||||
display: block;
|
||||
color: rgb(220,220,220);
|
||||
text-decoration: none;
|
||||
margin-left: 10px;
|
||||
margin-right: 5px;
|
||||
margin-bottom: 6px;
|
||||
transition: 0.1s;
|
||||
}
|
||||
.role-list a.selected {
|
||||
color: rgb(255,255,255);
|
||||
}
|
||||
.role-list a:hover {
|
||||
color: rgb(255,255,255);
|
||||
transition: 0.1s;
|
||||
}
|
||||
.role-container h5 {
|
||||
font-size: 15px;
|
||||
margin-bottom: 5px !important;
|
||||
}
|
||||
.role-category {
|
||||
background-color: rgb(32, 32, 32);
|
||||
width: 100%;
|
||||
padding: 8px;
|
||||
box-shadow: 0px 0px 10px 0px rgb(0,0,0,0.5);
|
||||
}
|
||||
.role-permissions h5 {
|
||||
font-size: 25px;
|
||||
}
|
||||
.role-row p {
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: rgb(255,255,255);
|
||||
}
|
||||
.role-row {
|
||||
padding: 3px;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid rgb(18, 18, 18);
|
||||
}
|
||||
</style>
|
||||
<div class="d-flex">
|
||||
<div class="me-2">
|
||||
<div class="border-end p-2" style="border-color: rgb(50,50,50) !important;">
|
||||
<h5 class="m-0 mb-1">Roles</h5>
|
||||
<div class="role-list">
|
||||
{% for role in roles %}
|
||||
<a href="/groups/admin/{{group.id}}/roles/{{role.id}}/view" class="text-truncate">{{role.name}}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<a class="btn btn-sm btn-light p-1 ps-3 pe-3 mt-2 w-100 {% if group.owner_id != currentuser.id %}disabled{%endif%}" {% if group.owner_id == currentuser.id %}href="/groups/admin/{{group.id}}/roles/create"{%endif%}>Create Role</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-fill mt-2">
|
||||
<form method="post" action="/groups/admin/{{group.id}}/roles/{{selectedrole.id}}/update" class="role-container">
|
||||
<div class="">
|
||||
<h5 class="m-0">Name</h5>
|
||||
<input type="text" class="form-control" name="role-name" placeholder="Name" value="{{selectedrole.name}}" required {% if selectedrole.rank == 0 %}disabled{%endif%}>
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
<h5 class="m-0">Description</h5>
|
||||
<textarea class="form-control" placeholder="Description" name="role-description" style="height: 100px" required {% if selectedrole.rank == 0 %}disabled{%endif%}>{{selectedrole.description}}</textarea>
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
<h5 class="m-0">Rank ( 0-255 )</h5>
|
||||
<input type="number" class="form-control" name="role-rank" placeholder="Rank" value="{{selectedrole.rank}}" max="254" min="1" required {% if selectedrole.rank == 0 or selectedrole.rank == 255 %}disabled{%endif%}>
|
||||
</div>
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<div class="role-permissions mt-2">
|
||||
<h5>Posts</h5>
|
||||
<div class="role-category">
|
||||
<div class="role-row">
|
||||
<p>View group wall</p>
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="view_wall" {% if selectedrole.permissions.view_wall %}checked{%endif%}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="role-row">
|
||||
<p>Post on group wall</p>
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="post_to_wall" {% if selectedrole.permissions.post_to_wall %}checked{%endif%}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="role-row">
|
||||
<p>Delete group wall posts</p>
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="delete_from_wall" {% if selectedrole.permissions.delete_from_wall %}checked{%endif%}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="role-row">
|
||||
<p>View group shout</p>
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="view_status" {% if selectedrole.permissions.view_status %}checked{%endif%}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="role-row border-bottom-0">
|
||||
<p>Post group shout</p>
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="post_to_status" {% if selectedrole.permissions.post_to_status %}checked{%endif%}>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h5 class="mt-3">Members</h5>
|
||||
<div class="role-category">
|
||||
<div class="role-row">
|
||||
<p>Manage lower-ranked member ranks</p>
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="change_rank" {% if selectedrole.permissions.change_rank %}checked{%endif%}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="role-row">
|
||||
<p>Accept join requests</p>
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="invite_members" {% if selectedrole.permissions.invite_members %}checked{%endif%}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="role-row border-bottom-0">
|
||||
<p>Kick lower-ranked members</p>
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="remove_members" {% if selectedrole.permissions.remove_members %}checked{%endif%}>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h5 class="mt-3">Assets</h5>
|
||||
<div class="role-category">
|
||||
<div class="role-row">
|
||||
<p>Create Assets</p>
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="create_items" {% if selectedrole.permissions.create_items %}checked{%endif%}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="role-row">
|
||||
<p>Manage Assets</p>
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="manage_items" {% if selectedrole.permissions.manage_items %}checked{%endif%}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="role-row border-bottom-0">
|
||||
<p>Manage Group Games</p>
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="manage_group_games" {% if selectedrole.permissions.manage_group_games %}checked{%endif%}>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h5 class="mt-3">Miscellaneous</h5>
|
||||
<div class="role-category">
|
||||
<div class="role-row">
|
||||
<p>Manage allies and enemies</p>
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="manage_relationships" {% if selectedrole.permissions.manage_relationships %}checked{%endif%}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="role-row border-bottom-0">
|
||||
<p>View audit log</p>
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" name="view_audit_logs" {% if selectedrole.permissions.view_audit_logs %}checked{%endif%}>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex w-100 justify-content-end">
|
||||
<button type="submit" class="btn btn-light mt-3 ms-auto" {% if group.owner_id != currentuser.id %}disabled{%endif%}>Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% if selectedrole.rank == 255 or group.owner_id != currentuser.id %}
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const all_checkboxes = document.querySelectorAll('input[type="checkbox"]');
|
||||
all_checkboxes.forEach(checkbox => {
|
||||
checkbox.disabled = true;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{%endif%}
|
||||
{% if group.owner_id != currentuser.id %}
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const rank_input = document.querySelector('input[name="role-rank"]');
|
||||
const name_input = document.querySelector('input[name="role-name"]');
|
||||
const description_input = document.querySelector('textarea[name="role-description"]');
|
||||
rank_input.disabled = true;
|
||||
name_input.disabled = true;
|
||||
description_input.disabled = true;
|
||||
});
|
||||
</script>
|
||||
{%endif%}
|
||||
{%endblock%}
|
||||
@@ -0,0 +1,60 @@
|
||||
{% extends 'groups/admin_template.html' %}
|
||||
{% block page_content%}
|
||||
<h3>
|
||||
Settings
|
||||
</h3>
|
||||
<form enctype="multipart/form-data" method="post" class="ms-2">
|
||||
<div>
|
||||
<h5 class="mb-1">Requires Approval</h5>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="approval-required" id="approval-required1" value="off"{%if group.settings.approval_required == False %}checked{%endif%}>
|
||||
<label class="form-check-label" for="approval-required1">
|
||||
Anyone can join
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="approval-required" id="approval-required2" value="on"{%if group.settings.approval_required %}checked{%endif%}>
|
||||
<label class="form-check-label" for="approval-required2">
|
||||
Manual approval
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
<h5 class="mb-1">Entry Qualifications</h5>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="membership-required" id="membership-required"{%if group.settings.membership_required %}checked{%endif%}>
|
||||
<label class="form-check-label" for="membership-required">
|
||||
User must have Builders Club
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
<h5 class="mb-1">Miscellaneous</h5>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="declaration-allowed" id="declaration-allowed"{%if group.settings.enemies_allowed %}checked{%endif%}>
|
||||
<label class="form-check-label" for="declaration-allowed">
|
||||
Allow enemy declarations
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="funds-visible" id="funds-visible"{%if group.settings.funds_visible %}checked{%endif%}>
|
||||
<label class="form-check-label" for="funds-visible">
|
||||
Group funds are publicly visible
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="games-visible" id="games-visible"{%if group.settings.games_visible %}checked{%endif%}>
|
||||
<label class="form-check-label" for="games-visible">
|
||||
Group games are visible on the group home page
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<div class="mt-3">
|
||||
<button type="submit" class="btn btn-primary" {%if group.owner_id != user.id %}disabled{%endif%}>Save</button>
|
||||
{%if group.owner_id != user.id %}
|
||||
<p class="text-secondary m-0 mt-1">Only the owner of the group can modify the group settings</p>
|
||||
{%endif%}
|
||||
</div>
|
||||
</form>
|
||||
{%endblock%}
|
||||
@@ -0,0 +1,125 @@
|
||||
{% extends '__layout__.html' %}
|
||||
{% block title %}Group Admin{% endblock %}
|
||||
{% block head %}
|
||||
<style>
|
||||
.group-bg {
|
||||
background-color: rgb(30,30,30);
|
||||
}
|
||||
.text-secondary {
|
||||
color: rgb(200,200,200) !important;
|
||||
}
|
||||
.text-tickets {
|
||||
color: rgb(224, 224, 60) !important;
|
||||
font-weight: 600;
|
||||
}
|
||||
.text-robux {
|
||||
color: rgb(26, 212, 103) !important;
|
||||
font-weight: 600;
|
||||
}
|
||||
.bg-drop {
|
||||
box-shadow: 0px 0px 10px 0px rgb(0,0,0,0.5);
|
||||
}
|
||||
|
||||
.inner-sidenav {
|
||||
border-right: 1px solid rgb(50,50,50);
|
||||
}
|
||||
.sidenav {
|
||||
min-width: 200px;
|
||||
}
|
||||
.sidenav a {
|
||||
background-color: rgb(31, 31, 31);
|
||||
color: rgb(200,200,200);
|
||||
padding: 10px;
|
||||
transition: 0.2s;
|
||||
box-shadow: 0px 0px 10px 0px rgb(0,0,0,0.5);
|
||||
margin-top: 6px;
|
||||
margin-bottom: 6px;
|
||||
text-decoration: none;
|
||||
}
|
||||
.sidenav a:hover {
|
||||
background-color: rgb(50,50,50);
|
||||
cursor: pointer;
|
||||
transition: 0.2s;
|
||||
color: #fff;
|
||||
}
|
||||
.sidenav a.selected {
|
||||
background-color: rgb(50,50,50);
|
||||
color: #fff;
|
||||
cursor: default;
|
||||
}
|
||||
</style>
|
||||
<script src="/static/js/groupMembers.js"></script>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div id="main" class="position-relative">
|
||||
<div class="ms-auto me-auto ps-2 pe-2 mb-3" style="min-height: 100vh;margin-top: 120px;width: 1000px;">
|
||||
<h1 class="m-0">{{group.name}}</h1>
|
||||
<div class="d-flex">
|
||||
<p class="m-0">Owned By {% if group.owner_id != None: %}<a href="/users/{{group.owner.id}}/profile" class="text-decoration-none">{{group.owner.username}}</a>{%else%}<span class="text-white">No One!</span>{%endif%}</p>
|
||||
{% if permissions.spend_group_funds: %}
|
||||
<p class="m-0 ms-3">Group Funds <span class="text-robux">R${{group.economy.robux_balance}}</span><span class="text-tickets ms-2">T${{group.economy.tix_balance}}</span></p>
|
||||
{%endif%}
|
||||
<a class="ms-auto text-decoration-none" href="/groups/{{group.id}}/">Return to group page</a>
|
||||
</div>
|
||||
<div class="linebreak"></div>
|
||||
<div class="w-100 d-flex">
|
||||
<div class="sidenav">
|
||||
<div class="ps-2 pe-2 inner-sidenav">
|
||||
<a class="w-100 d-block p-2 {%if page == 'info'%}selected{%endif%}" href="/groups/admin/{{group.id}}/info">
|
||||
Group Info
|
||||
</a>
|
||||
<a class="w-100 d-block p-2 {%if page == 'members'%}selected{%endif%}" href="/groups/admin/{{group.id}}/members">
|
||||
Members
|
||||
</a>
|
||||
<a class="w-100 d-block p-2 {%if page == 'settings'%}selected{%endif%}" href="/groups/admin/{{group.id}}/settings">
|
||||
Settings
|
||||
</a>
|
||||
{%if permissions.manage_relationships: %}
|
||||
<a class="w-100 d-block p-2 ">
|
||||
Relationships
|
||||
</a>
|
||||
{%endif%}
|
||||
<a class="w-100 d-block p-2 {%if page == 'roles'%}selected{%endif%}" href="/groups/admin/{{group.id}}/roles">
|
||||
Roles
|
||||
</a>
|
||||
<a class="w-100 d-block p-2 ">
|
||||
Revenue
|
||||
</a>
|
||||
{%if permissions.spend_group_funds: %}
|
||||
<a class="w-100 d-block p-2 {%if page == 'payouts'%}selected{%endif%}" href="/groups/admin/{{group.id}}/payouts">
|
||||
Payouts
|
||||
</a>
|
||||
{%endif%}
|
||||
{% if permissions.view_audit_logs: %}
|
||||
<a class="w-100 d-block p-2 ">
|
||||
Audit Log
|
||||
</a>
|
||||
{%endif%}
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-fill ps-2 pe-2">
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
{% if messages %}
|
||||
<div>
|
||||
{% for category, message in messages %}
|
||||
{% if category == 'error': %}
|
||||
<div class="alert border p-2 text-center alert-danger border-danger">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if category == 'success': %}
|
||||
<div class="alert border p-2 text-center alert-success border-success">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% block page_content%}{%endblock%}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="position-absolute w-100 h-100 justify-content-center align-items-center" id="transparent-background-top" style="top: 0;left: 0;background-color: rgba(0,0,0,0.5);z-index: 100;display: none;"></div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,62 @@
|
||||
{% extends '__layout__.html' %}
|
||||
{% block title %}Create Group{% endblock %}
|
||||
{% block head %}
|
||||
<style>
|
||||
.group-bg {
|
||||
background-color: rgb(30,30,30);
|
||||
}
|
||||
.text-secondary {
|
||||
color: rgb(200,200,200) !important;
|
||||
}
|
||||
.bg-drop {
|
||||
box-shadow: 0px 0px 10px 0px rgb(0,0,0,0.5);
|
||||
}
|
||||
h5 {
|
||||
font-size: 15px;
|
||||
margin-bottom: 5px !important;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="ms-auto me-auto ps-2 pe-2 mb-3" style="width: 700px;min-height: 100vh;margin-top: 120px;">
|
||||
<h2>Create Group</h2>
|
||||
<div class="linebreak"></div>
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
{% if messages %}
|
||||
<div>
|
||||
{% for category, message in messages %}
|
||||
{% if category == 'error': %}
|
||||
<div class="alert border p-2 text-center alert-danger border-danger">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if category == 'success': %}
|
||||
<div class="alert border p-2 text-center alert-success border-success">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
<form method="post" action="/groups/create" enctype="multipart/form-data">
|
||||
<div class="mt-2">
|
||||
<h5 class="mb-1">Group Name</h5>
|
||||
<input type="text" name="name" class="form-control" placeholder="Name" required>
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
<h5 class="mb-1">Group Description</h5>
|
||||
<textarea name="description" class="form-control" placeholder="Description" style="height: 100px" required></textarea>
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
<h5 class="mb-1">Group Icon</h5>
|
||||
<input type="file" name="icon" class="form-control" required>
|
||||
<p class="text-secondary m-0 mt-1" style="font-size: 12px;">File must be less than 2MB, Has to be a PNG, Must have a 1:1 ratio and be between 128x128 to 1024x1024</p>
|
||||
</div>
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<div class="d-flex w-100 justify-content-end">
|
||||
<button type="submit" class="btn btn-light mt-3 ms-auto">Create R$100</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,61 @@
|
||||
{% extends '__layout__.html' %}
|
||||
{% block title %}Search Groups{% endblock %}
|
||||
{% block head %}
|
||||
<style>
|
||||
.group-bg {
|
||||
background-color: rgb(30,30,30);
|
||||
}
|
||||
.text-secondary {
|
||||
color: rgb(200,200,200) !important;
|
||||
}
|
||||
.bg-drop {
|
||||
box-shadow: 0px 0px 10px 0px rgb(0,0,0,0.5);
|
||||
}
|
||||
h5 {
|
||||
font-size: 15px;
|
||||
margin-bottom: 5px !important;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="ms-auto me-auto ps-2 pe-2 mb-3" style="width: 700px;min-height: 100vh;margin-top: 120px;">
|
||||
<h2>Search Groups</h2>
|
||||
<form method="post">
|
||||
<div class="input-group">
|
||||
<div class="form-floating" style="width: 52%;">
|
||||
<input type="text" class="form-control" id="search-input" name="query" {%if query != None: %}value="{{query}}"{%endif%} placeholder="Awesome Group">
|
||||
<label for="search-input">Search</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-outline-primary fw-bold" style="min-width: 50px;"><i class="bi bi-search"></i></button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row mt-2">
|
||||
{% for group in groups %}
|
||||
<div class="col-12 mt-2">
|
||||
<a href="/groups/{{group.id}}/" class="text-decoration-none m-0 p-0">
|
||||
<div style="background-color: rgb(31,31,31);box-shadow: 0px 0px 10px 0px rgb(0,0,0,0.5);overflow: hidden;" class="p-2">
|
||||
<div class="d-flex">
|
||||
<img src="/Thumbs/GroupIcon.ashx?x=100&y=100&groupid={{group.id}}" style="aspect-ratio: 1/1;height: 80px !important;" class="rounded border">
|
||||
<div class="ms-2 flex-fill" style="overflow: hidden;">
|
||||
<div class="d-flex w-100">
|
||||
<p class="text-white text-truncate m-0" style="font-size: 17px;">{{group.name}}</p>
|
||||
<p class="text-secondary m-0 ms-auto" style="font-size: 14px;"><i class="bi bi-people"></i> {{groupservice.GetGroupMemberCount(group.id)}} Members</p>
|
||||
</div>
|
||||
<p class="text-secondary m-0 w-100" style="font-size: 14px;">{{group.description}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{%endfor%}
|
||||
</div>
|
||||
{% if len(groups.items) == 0 %}
|
||||
<p class="mt-5 mb-5 w-100 text-center">No Results Found</p>
|
||||
{%endif%}
|
||||
<div class="d-flex w-100 mt-2" style="font-size: 14px;">
|
||||
<a class="text-decoration-none ms-auto {% if not groups.has_prev: %}text-secondary{%endif%}" {% if groups.has_prev: %}href="/groups/search?page={{groups.prev_num}}{%if query != None %}&query={{query}}{%endif%}"{%endif%}>Previous</a>
|
||||
<p class="m-0 ms-2 me-2 text-white">Page {{groups.page}} of {{groups.pages}}</p>
|
||||
<a class="text-decoration-none me-auto {% if not groups.has_next: %}text-secondary{%endif%}" {% if groups.has_next: %}href="/groups/search?page={{groups.next_num}}{%if query != None %}&query={{query}}{%endif%}"{%endif%}>Next</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,207 @@
|
||||
{% extends '__layout__.html' %}
|
||||
{% block title %}{{groupObj.name}}{% endblock %}
|
||||
{% block head %}
|
||||
<style>
|
||||
.group-bg {
|
||||
background-color: rgb(30,30,30);
|
||||
}
|
||||
.text-secondary {
|
||||
color: rgb(200,200,200) !important;
|
||||
}
|
||||
.bg-drop {
|
||||
box-shadow: 0px 0px 10px 0px rgb(0,0,0,0.5);
|
||||
}
|
||||
</style>
|
||||
<script src="/static/js/groupMembers.js"></script>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div id="main">
|
||||
<div class="ms-auto me-auto ps-2 pe-2 mb-3" style="width: 1200px;min-height: 100vh;margin-top: 120px;">
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
{% if messages %}
|
||||
<div>
|
||||
{% for category, message in messages %}
|
||||
{% if category == 'error': %}
|
||||
<div class="alert border p-2 text-center alert-danger border-danger">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if category == 'success': %}
|
||||
<div class="alert border p-2 text-center alert-success border-success">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
<div class="row">
|
||||
<div class="col-2" style="max-height: 400px;">
|
||||
<a class="btn btn-primary w-100 mb-0 rounded-bottom-0 bg-drop" href="/groups/create"><i class="bi bi-plus-circle"></i> Create Group</a>
|
||||
<a class="btn btn-success w-100 mb-0 rounded-0" href="/groups/search"><i class="bi bi-search"></i> Search Groups</a>
|
||||
<div class="rounded h-100 group-bg rounded-top-0 bg-drop" style="overflow-y: auto;">
|
||||
{% for userMember in UserGroups: %}
|
||||
<a href="/groups/{{userMember.group.id}}/" class="text-decoration-none p-2 d-flex align-items-center" {% if groupObj == userMember.group %}style="background-color: rgba(0,0,0,0.5);"{% endif %}>
|
||||
<img src="/Thumbs/GroupIcon.ashx?groupid={{userMember.group.id}}&x=48&y=48" class="rounded-2" width="48px" height="48px">
|
||||
<p class="text-truncate m-0 ms-2 flex-fill text-white" style="font-size: 12px;">{{userMember.group.name}}</p>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-10">
|
||||
<div class="rounded p-3 group-bg bg-drop">
|
||||
<div class="d-flex">
|
||||
<img src="/Thumbs/GroupIcon.ashx?groupid={{groupObj.id}}&x=150&y=150" class="rounded border me-3" width="130px" style="aspect-ratio: 1/1;">
|
||||
<div>
|
||||
<h1 class="m-0">{{groupObj.name}}</h1>
|
||||
<p class="m-0">Owned By {% if groupObj.owner_id != None: %}<a href="/users/{{groupObj.owner.id}}/profile" class="text-decoration-none">{{groupObj.owner.username}}</a>{%else%}<span class="text-white">No One!</span>{%endif%}</p>
|
||||
<div class="mt-3 d-flex">
|
||||
<p class="text-white fw-bold">{{groupservice.GetGroupMemberCount(groupObj)}} <span class="text-secondary fw-normal">Members</span></p>
|
||||
{% if UserCurrentRole.rank != 0: %}
|
||||
<p class="text-white fw-bold ms-4">{{UserCurrentRole.name}} <span class="text-secondary fw-normal">Rank</span></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ms-auto">
|
||||
<div class="dropdown d-flex justify-content-end">
|
||||
<button class="btn" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="bi bi-three-dots-vertical"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
{% if isGroupAdmin: %}
|
||||
<li><a class="dropdown-item" href="/groups/admin/{{groupObj.id}}">Group Admin</a></li>
|
||||
{%endif%}
|
||||
{% if UserCurrentRole.rank != 0: %}
|
||||
<li><form action="/groups/leave/{{groupObj.id}}" method="post"><input type="hidden" name="csrf_token" value="{{csrf_token()}}"><button class="dropdown-item" type="submit">Leave Group</button></form></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
{% if UserCurrentRole.rank == 0 and CurrentJoinRequest == None: %}
|
||||
<form action="/groups/join/{{groupObj.id}}" method="post">
|
||||
<button class="btn btn-outline-primary text-white w-100 mt-2 bg-drop">Join Group</button>
|
||||
<input type="hidden" name="csrf_token" value="{{csrf_token()}}">
|
||||
</form>
|
||||
{% endif %}
|
||||
{% if CurrentJoinRequest != None %}
|
||||
<form action="/groups/leave/{{groupObj.id}}" method="post">
|
||||
<button class="btn btn-outline-danger text-white w-100 mt-2 bg-drop">Cancel Join Request</button>
|
||||
<input type="hidden" name="csrf_token" value="{{csrf_token()}}">
|
||||
</form>
|
||||
{%endif%}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rounded p-2 group-bg mt-2 bg-drop">
|
||||
<h3 class="m-0">Description</h3>
|
||||
<div class="text-secondary mb-2 mt-2">
|
||||
{% for line in groupObj.description.split('\n'): %}
|
||||
{% if line.strip() != '' %}
|
||||
<p class=" m-0">{{line}}</p>
|
||||
{%else%}
|
||||
<br>
|
||||
{%endif%}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% if UserCurrentRole.permissions.view_status: %}
|
||||
{% if GroupStatus != None: %}
|
||||
<div class="rounded p-2 group-bg mt-2 bg-drop">
|
||||
<div class="d-flex">
|
||||
<a href="/users/{{GroupStatus.poster_id}}/profile"><img src="/Thumbs/Head.ashx?x=48&y=48&userId={{GroupStatus.poster_id}}" style="aspect-ratio: 1/1;" class="rounded-3 border"></a>
|
||||
<div class="flex-fill border bg-dark p-2 ms-2 rounded position-relative">
|
||||
<p class="m-0 mb-3 text-white">{{GroupStatus.content}}</p>
|
||||
<p class="m-0 mt-auto text-secondary position-absolute w-100" style="font-size: 13px;bottom: 5px;"><a class="text-decoration-none" href="/users/{{GroupStatus.poster_id}}/profile">{{GroupStatus.poster.username}}</a> Posted at {{GroupStatus.created_at.strftime("%b %d, %Y %I:%M %p")}} UTC</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{%endif%}
|
||||
{% endif %}
|
||||
{% if UserCurrentRole.permissions.post_to_status: %}
|
||||
<div class="rounded p-2 group-bg mt-2 bg-drop">
|
||||
<form method="post" action="/groups/update_status/{{groupObj.id}}">
|
||||
<input type="hidden" name="csrf_token" value="{{csrf_token()}}">
|
||||
<div class="d-flex">
|
||||
<input type="text" class="form-control" name="status" placeholder="Update Group Status ( Leave blank to remove )"></input>
|
||||
<button class="btn btn-primary ms-2">Post</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{%endif%}
|
||||
<div class="rounded p-2 group-bg mt-2 bg-drop group-member-list" data-groupid="{{groupObj.id}}">
|
||||
<div class="d-flex align-items-center">
|
||||
<h3 class="m-0">Members</h3>
|
||||
<div class="ms-auto">
|
||||
<select class="form-control members-select-role">
|
||||
{% for role in GroupRoles: %}
|
||||
{% if role.rank != 0: %}
|
||||
<option value="{{role.id}}">{{role.name}} ({{role.member_count}})</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="user-card-container mt-2" style="min-height: 100px;display: flex;flex-wrap: wrap;justify-content: flex-start;gap: 7px;">
|
||||
</div>
|
||||
<div class="align-items-center d-flex justify-content-center mt-2">
|
||||
<button class="btn btn-sm text-white btn-primary me-2 pagination-back-btn" disabled>Previous</button><p class="m-0 pagination-page-number">Page 1</p><button class="btn btn-sm text-white btn-primary ms-2 pagination-next-btn" disabled>Next</button>
|
||||
</div>
|
||||
</div>
|
||||
{% if UserCurrentRole.permissions.view_wall: %}
|
||||
<div class="rounded p-2 group-bg mt-2 bg-drop">
|
||||
<h5>Group Wall</h5>
|
||||
{% if UserCurrentRole.permissions.post_to_wall: %}
|
||||
<form method="post" action="/groups/wall_post/{{groupObj.id}}" class="d-flex">
|
||||
<div class="form-floating flex-fill">
|
||||
<textarea name="post_content" class="form-control" placeholder="Post a message" id="floatingTextarea2" style="max-height: 100px;min-height: 100px;" name="message"></textarea>
|
||||
<label for="floatingTextarea2">Message</label>
|
||||
</div>
|
||||
<div>
|
||||
<input type="hidden" name="csrf_token" value="{{csrf_token()}}">
|
||||
<button class="btn btn-primary ms-2 mt-auto" type="submit">Post</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
<div class="mt-3 border-bottom">
|
||||
{% for WallPost in GroupWall.items %}
|
||||
<div class="border-top p-2">
|
||||
<div class="d-flex" style="overflow: hidden;">
|
||||
<img class="rounded" src="/Thumbs/Avatar.ashx?userId={{WallPost.poster.id}}&x=150&y=150" width="150px" height="150px">
|
||||
<div class="h-100 position-relative flex-fill" style="min-height: 150px;">
|
||||
<a class="fw-bold text-white text-decoration-none" href="/users/{{WallPost.poster.id}}/profile" style="font-size: 20px;">{{WallPost.poster.username}}</a>
|
||||
<div class="text-secondary">
|
||||
{% for ContentLine in WallPost.content.split('\n'): %}
|
||||
<p class="m-0">{{ContentLine}}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<p class="m-0 mt-auto text-secondary position-absolute w-100" style="font-size: 13px;bottom: 0;">Posted at {{WallPost.created_at.strftime("%b %d, %Y %I:%M %p")}} UTC </p>
|
||||
{% if WallPost.poster.id == currentuser.id or UserCurrentRole.permissions.delete_from_wall: %}
|
||||
<div class="dropdown d-flex justify-content-end position-absolute" style="top: 0; right: 0;">
|
||||
<button class="btn" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="bi bi-three-dots-vertical"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li><form action="/groups/{{groupObj.id}}/delete_post/{{WallPost.id}}" method="post"><button class="dropdown-item" type="submit">Delete Post</button></form></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="align-items-center d-flex justify-content-center mt-2">
|
||||
<a class="btn btn-sm text-white btn-primary me-2 pagination-back-btn {% if not isTherePreviousPage: %}disabled {% endif %}" {% if isTherePreviousPage: %}href="/groups/{{groupObj.id}}/{{slug}}?page={{PageNumber-1}}"{%endif%}>Previous</a>
|
||||
<p class="m-0 pagination-page-number">Page {{PageNumber}}</p>
|
||||
<a class="btn btn-sm text-white btn-primary ms-2 pagination-next-btn {% if not isThereNextPage: %}disabled {% endif %}" {% if isThereNextPage: %}href="/groups/{{groupObj.id}}/{{slug}}?page={{PageNumber+1}}"{%endif%}>Next</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a class="text-decoration-none user-card-template" style="display: none;" href="/users/1/profile">
|
||||
<img width="90px" height="90px" class="border rounded avatar-img">
|
||||
<p class="m-0 text-center user-name text-truncate" style="font-size: 13px;width: 90px;"></p>
|
||||
</a>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user