mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
* added "Edit" option for admins in characters page
This commit is contained in:
parent
544375378f
commit
9c281511fa
1
TODO
1
TODO
@ -16,7 +16,6 @@
|
||||
* hooks
|
||||
* fieldExist and tableExist functions
|
||||
* Menus in templates
|
||||
* characters: edit in admin panel option
|
||||
* move highscores to twig
|
||||
* $db->hasTable(table) + $db->hasColumn(table, column)
|
||||
* migrations: option to downgrade the database
|
||||
|
@ -46,6 +46,7 @@ define('FLAG_CONTENT_GALLERY', 512);
|
||||
define('FLAG_CONTENT_VIDEOS', 1024);
|
||||
define('FLAG_CONTENT_FAQ', 2048);
|
||||
define('FLAG_CONTENT_MENUS', 4096);
|
||||
define('FLAG_CONTENT_PLAYERS', 8192);
|
||||
|
||||
// news
|
||||
define('NEWS', 1);
|
||||
|
@ -403,7 +403,8 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
|
||||
'bannedUntil' => isset($bannedUntil) ? $bannedUntil : null,
|
||||
'characters_link' => getLink('characters'),
|
||||
'account_players' => isset($account_players) ? $account_players : null,
|
||||
'search_form' => generate_search_form()
|
||||
'search_form' => generate_search_form(),
|
||||
'canEdit' => hasFlag(FLAG_CONTENT_PLAYERS) || superAdmin()
|
||||
));
|
||||
}
|
||||
else
|
||||
|
@ -10,6 +10,11 @@
|
||||
<td><img src="<{{ template_path }}/images/general/blank.gif" width="10" height="1" border="0"></td>
|
||||
<td>
|
||||
{{ hook(constant('HOOK_CHARACTERS_BEFORE_INFORMATIONS')) }}
|
||||
{% if canEdit %}
|
||||
<a href="admin/?p=players&id={{ player.getId() }}" title="Edit in Admin Panel" target="_blank">
|
||||
<img src="images/edit.png"/>Edit
|
||||
</a>
|
||||
{% endif %}
|
||||
<table border="0" cellspacing="1" cellpadding="4" width="100%">
|
||||
{% if config.characters.outfit %}
|
||||
<div style="width:64px;height:64px;border:2px solid #F1E0C6; border-radius:50px; padding:13px; margin-top:38px;margin-left:376px;position:absolute;"><img style="margin-left:{% if player.getLookType() in [75, 266, 302] %}-0px;margin-top:-0px;width:64px;height:64px;{% else %}-60px;margin-top:-60px;width:128px;height:128px;{% endif %}" src="{{ outfit }}" alt="player outfit"/></div>
|
||||
@ -406,6 +411,11 @@
|
||||
<!-- CHARACTERS_LIST_END -->
|
||||
{% endif %}
|
||||
{{ hook(constant('HOOK_CHARACTERS_AFTER_CHARACTERS')) }}
|
||||
{% if canEdit %}
|
||||
<a href="admin/?p=players&id={{ player.getId() }}" title="Edit in Admin Panel" target="_blank">
|
||||
<img src="images/edit.png"/>Edit
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<img src="{{ template_path }}/images/general/blank.gif" width="10" height="1" border="0">
|
||||
|
Loading…
x
Reference in New Issue
Block a user