-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve pagination and prepare for release
- Loading branch information
Showing
20 changed files
with
1,220 additions
and
1,180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,16 @@ | ||
# Nameless-Infractions | ||
Infractions module for Nameless 2 | ||
The Infractions module for Nameless v2 allows you to display a list of ingame punishments on your website. | ||
|
||
**This module is in development, and is not yet ready for use.** | ||
### Supported Plugins | ||
- LiteBans | ||
|
||
If you would like to request plugin support, please open an issue on [GitHub](https://github.com/samerton/Nameless-Infractions/issues). | ||
|
||
### Requirements | ||
- NamelessMC version 2 (from commit [6b6222c](https://github.com/NamelessMC/Nameless/commit/6b6222c020ddea84fe9e653b5715b6f8fda8c1b4) or pre-release 7 onwards) | ||
- One of the previously mentioned supported plugins installed and configured to use MySQL | ||
|
||
### Installation | ||
- Upload the contents of the **upload** directory straight into your NamelessMC installation's directory | ||
- Activate the module in the StaffCP -> Modules tab | ||
- Configure your Infractions plugin information in the StaffCP -> Infractions tab |
This file was deleted.
Oops, something went wrong.
Empty file.
File renamed without changes.
174 changes: 87 additions & 87 deletions
174
...lates/Default/infractions/infractions.tpl → ...lates/Default/infractions/infractions.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,88 +1,88 @@ | ||
{include file='header.tpl'} | ||
{include file='navbar.tpl'} | ||
|
||
<div class="container"> | ||
<div class="card card-default"> | ||
<div class="card-body"> | ||
<h2 style="display:inline;">{$INFRACTIONS}</h2> | ||
{if isset($INFRACTIONS_LIST)} | ||
<!-- | ||
<span class="pull-right"> | ||
<form class="form-horizontal" role="form" method="post" action="/forum/search/"> | ||
<div class="input-group"> | ||
<input type="text" class="form-control input-sm" name="search" placeholder="{$SEARCH}"> | ||
<input type="hidden" name="token" value="{$TOKEN}"> | ||
<span class="input-group-btn"> | ||
<button type="submit" class="btn btn-default"> | ||
<i class="fa fa-search"></i> | ||
</button> | ||
</span> | ||
</div> | ||
</form> | ||
</span> | ||
--> | ||
<br /><br /> | ||
<table class="table table-striped"> | ||
<colgroup> | ||
<col span="1" style="width: 20%;"> | ||
<col span="1" style="width: 15%;"> | ||
<col span="1" style="width: 15%"> | ||
<col span="1" style="width: 20%"> | ||
<col span="1" style="width: 30%"> | ||
<!--<col span="1" style="width: 10%">--> | ||
</colgroup> | ||
|
||
<thead> | ||
<tr> | ||
<th>{$USERNAME}</th> | ||
<th>{$STAFF_MEMBER}</th> | ||
<th>{$ISSUED}</th> | ||
<th>{$ACTION}</th> | ||
<th>{$REASON}</th> | ||
<!--<th></th>--> | ||
</tr> | ||
</thead> | ||
|
||
<tbody> | ||
{foreach from=$INFRACTIONS_LIST item=infraction} | ||
<tr> | ||
<td><img style="max-height:30px; max-width:30px;" class="rounded" src="{$infraction.avatar}"> <a href="{if !empty($infraction.profile)}{$infraction.profile}{else}#{/if}" style="{$infraction.username_style}">{$infraction.username}</a></td> | ||
<td><img style="max-height:30px; max-width:30px;" class="rounded" src="{$infraction.staff_member_avatar}"> <a href="{if !empty($infraction.staff_member_link)}{$infraction.staff_member_link}{else}#{/if}" style="{$infraction.staff_member_style}">{$infraction.staff_member}</a></td> | ||
<td><span data-toggle="tooltip" title="{$infraction.issued_full}">{$infraction.issued}</span></td> | ||
<td> | ||
{if $infraction.action_id == 1 || $infraction.action_id == 2} | ||
<span class="badge badge-danger">{$infraction.action}</span> | ||
{elseif $infraction.action_id == 3 || $infraction.action_id == 4} | ||
<span class="badge badge-warning">{$infraction.action}</span> | ||
{elseif $infraction.action_id == 5} | ||
<span class="badge badge-warning">{$infraction.action}</span> | ||
{elseif $infraction.action_id == 6} | ||
<span class="badge badge-secondary">{$infraction.action}</span> | ||
{else} | ||
<span class="ui label">{$infraction.action}</span> | ||
{/if} | ||
|
||
{if $infraction.action_id eq 1 OR $infraction.action_id eq 3} | ||
{if $infraction.revoked == 1} | ||
<span data-toggle="tooltip" title="{$infraction.expires_full}" class="badge badge-success">{$infraction.revoked_full}</span> | ||
{else} | ||
<span data-toggle="tooltip" title="{$infraction.expires_full}" class="badge badge-danger">{$infraction.revoked_full}</span> | ||
{/if} | ||
{/if} | ||
</td> | ||
<td>{$infraction.reason}</td> | ||
<!--<td><a href="{$infraction.view_link}" class="ui small blue button">{$VIEW} »</a></td>--> | ||
</tr> | ||
{/foreach} | ||
</tbody> | ||
</table> | ||
|
||
{$PAGINATION} | ||
{else} | ||
<br /><br /><div class="alert alert-info">{$NO_INFRACTIONS}</div> | ||
{/if} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
{include file='header.tpl'} | ||
{include file='navbar.tpl'} | ||
|
||
<div class="container"> | ||
<div class="card card-default"> | ||
<div class="card-body"> | ||
<h2 style="display:inline;">{$INFRACTIONS}</h2> | ||
{if isset($INFRACTIONS_LIST)} | ||
<!-- | ||
<span class="pull-right"> | ||
<form class="form-horizontal" role="form" method="post" action="/forum/search/"> | ||
<div class="input-group"> | ||
<input type="text" class="form-control input-sm" name="search" placeholder="{$SEARCH}"> | ||
<input type="hidden" name="token" value="{$TOKEN}"> | ||
<span class="input-group-btn"> | ||
<button type="submit" class="btn btn-default"> | ||
<i class="fa fa-search"></i> | ||
</button> | ||
</span> | ||
</div> | ||
</form> | ||
</span> | ||
--> | ||
<br /><br /> | ||
<table class="table table-striped"> | ||
<colgroup> | ||
<col span="1" style="width: 20%;"> | ||
<col span="1" style="width: 15%;"> | ||
<col span="1" style="width: 15%"> | ||
<col span="1" style="width: 20%"> | ||
<col span="1" style="width: 30%"> | ||
<!--<col span="1" style="width: 10%">--> | ||
</colgroup> | ||
|
||
<thead> | ||
<tr> | ||
<th>{$USERNAME}</th> | ||
<th>{$STAFF_MEMBER}</th> | ||
<th>{$ISSUED}</th> | ||
<th>{$ACTION}</th> | ||
<th>{$REASON}</th> | ||
<!--<th></th>--> | ||
</tr> | ||
</thead> | ||
|
||
<tbody> | ||
{foreach from=$INFRACTIONS_LIST item=infraction} | ||
<tr> | ||
<td><img style="max-height:30px; max-width:30px;" class="rounded" src="{$infraction.avatar}"> <a href="{if !empty($infraction.profile)}{$infraction.profile}{else}#{/if}" style="{$infraction.username_style}">{$infraction.username}</a></td> | ||
<td><img style="max-height:30px; max-width:30px;" class="rounded" src="{$infraction.staff_member_avatar}"> <a href="{if !empty($infraction.staff_member_link)}{$infraction.staff_member_link}{else}#{/if}" style="{$infraction.staff_member_style}">{$infraction.staff_member}</a></td> | ||
<td><span data-toggle="tooltip" title="{$infraction.issued_full}">{$infraction.issued}</span></td> | ||
<td> | ||
{if $infraction.action_id == 1 || $infraction.action_id == 2} | ||
<span class="badge badge-danger">{$infraction.action}</span> | ||
{elseif $infraction.action_id == 3 || $infraction.action_id == 4} | ||
<span class="badge badge-warning">{$infraction.action}</span> | ||
{elseif $infraction.action_id == 5} | ||
<span class="badge badge-warning">{$infraction.action}</span> | ||
{elseif $infraction.action_id == 6} | ||
<span class="badge badge-secondary">{$infraction.action}</span> | ||
{else} | ||
<span class="ui label">{$infraction.action}</span> | ||
{/if} | ||
|
||
{if $infraction.action_id eq 1 OR $infraction.action_id eq 3} | ||
{if $infraction.revoked == 1} | ||
<span data-toggle="tooltip" title="{$infraction.expires_full}" class="badge badge-success">{$infraction.revoked_full}</span> | ||
{else} | ||
<span data-toggle="tooltip" title="{$infraction.expires_full}" class="badge badge-danger">{$infraction.revoked_full}</span> | ||
{/if} | ||
{/if} | ||
</td> | ||
<td>{$infraction.reason}</td> | ||
<!--<td><a href="{$infraction.view_link}" class="ui small blue button">{$VIEW} »</a></td>--> | ||
</tr> | ||
{/foreach} | ||
</tbody> | ||
</table> | ||
|
||
{$PAGINATION} | ||
{else} | ||
<br /><br /><div class="alert alert-info">{$NO_INFRACTIONS}</div> | ||
{/if} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
{include file='footer.tpl'} |
File renamed without changes.
Oops, something went wrong.