Skip to content

Commit

Permalink
Improve pagination and prepare for release
Browse files Browse the repository at this point in the history
  • Loading branch information
samerton committed Jan 4, 2020
1 parent 74ddee3 commit 31a79d3
Show file tree
Hide file tree
Showing 20 changed files with 1,220 additions and 1,180 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 Sam
Copyright (c) 2020 Samerton

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
16 changes: 14 additions & 2 deletions README.md
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
177 changes: 0 additions & 177 deletions modules/Infractions/classes/LiteBans.php

This file was deleted.

Empty file.
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} &raquo;</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} &raquo;</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'}
Loading

0 comments on commit 31a79d3

Please sign in to comment.