fix labels and text editors for Quest creation
This commit is contained in:
commit
476c18b6a9
4278 changed files with 1196345 additions and 0 deletions
1
views/ajax/ajax.tpl
Normal file
1
views/ajax/ajax.tpl
Normal file
|
|
@ -0,0 +1 @@
|
|||
<?=$intermediate?>
|
||||
25
views/ajax/characters/index.tpl
Normal file
25
views/ajax/characters/index.tpl
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
foreach($characters as &$character)
|
||||
{
|
||||
// Role translation
|
||||
foreach($character['characterroles'] as &$role)
|
||||
{
|
||||
switch($role)
|
||||
{
|
||||
case 'admin': $role = _('Admin');
|
||||
break;
|
||||
case 'moderator': $role = _('Moderator');
|
||||
break;
|
||||
case 'user': $role = _('User');
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<?=json_encode(array(
|
||||
'seminary' => $seminary,
|
||||
'characters' => $characters,
|
||||
'more' => (($page*$limit) < $charactersCount)
|
||||
))?>
|
||||
37
views/ajax/quests/index.tpl
Normal file
37
views/ajax/quests/index.tpl
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
foreach($quests as &$quest)
|
||||
{
|
||||
// Questtype translation
|
||||
$questtype = $quest['questtype']['title'];
|
||||
switch($quest['questtype']['classname'])
|
||||
{
|
||||
case null: $questtype = _('Questtype Empty');
|
||||
break;
|
||||
case 'bossfight': $questtype = _('Questtype bossfight');
|
||||
break;
|
||||
case 'choiceinput': $questtype = _('Questtype choiceinput');
|
||||
break;
|
||||
case 'crossword': $questtype = _('Questtype crossword');
|
||||
break;
|
||||
case 'dragndrop': $questtype = _('Questtype dragndrop');
|
||||
break;
|
||||
case 'multiplechoice': $questtype = _('Questtype multiplechoice');
|
||||
break;
|
||||
case 'submit': $questtype = _('Questtype submit');
|
||||
break;
|
||||
case 'textinput': $questtype = _('Questtype textinput');
|
||||
break;
|
||||
}
|
||||
$quest['questtype']['title'] = $questtype;
|
||||
|
||||
// XPs translation
|
||||
$quest['xps'] = sprintf(_('%d XPs'), $quest['xps']);
|
||||
}
|
||||
|
||||
?>
|
||||
<?=json_encode(array(
|
||||
'seminary' => $seminary,
|
||||
'quests' => $quests,
|
||||
'more' => (($page*$limit) < $questsCount)
|
||||
))?>
|
||||
27
views/ajax/users/index.tpl
Normal file
27
views/ajax/users/index.tpl
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
foreach($users as &$user)
|
||||
{
|
||||
// Role translation
|
||||
foreach($user['roles'] as &$role)
|
||||
{
|
||||
switch($role)
|
||||
{
|
||||
case 'admin': $role = _('Admin');
|
||||
break;
|
||||
case 'moderator': $role = _('Moderator');
|
||||
break;
|
||||
case 'user': $role = _('User');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Date formattieng
|
||||
$user['created'] = sprintf(_('registered on %s'), $dateFormatter->format(new \DateTime($user['created'])));
|
||||
}
|
||||
|
||||
?>
|
||||
<?=json_encode(array(
|
||||
'users' => $users,
|
||||
'more' => (($page*$limit) < $usersCount)
|
||||
))?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue