Multilang Support for Admin Contest Menu
这个提交包含在:
父节点
096a4cde00
当前提交
f06e62ddfb
共有 3 个文件被更改,包括 20 次插入 和 20 次删除
|
|
@ -22,9 +22,9 @@
|
|||
<table style="width:100%" class="contesttable table table-sm table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">Adif mode</th>
|
||||
<th scope="col">Active</th>
|
||||
<th scope="col"><?php echo lang('admin_contest_menu_name'); ?></th>
|
||||
<th scope="col"><?php echo lang('admin_contest_menu_adif'); ?></th>
|
||||
<th scope="col"><?php echo lang('admin_contest_menu_active'); ?></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
|
|
@ -35,19 +35,19 @@
|
|||
<tr>
|
||||
<td><?php echo $row['name'];?></td>
|
||||
<td><?php echo $row['adifname'];?></td>
|
||||
<td class='contest_<?php echo $row['id'] ?>'><?php if ($row['active'] == 1) { echo "active";} else { echo "not active";};?></td>
|
||||
<td class='contest_<?php echo $row['id'] ?>'><?php if ($row['active'] == 1) { echo lang('admin_contest_menu_active');} else { echo lang('admin_contest_menu_n_active');};?></td>
|
||||
<td style="text-align: center">
|
||||
<?php if ($row['active'] == 1) {
|
||||
echo "<button onclick='javascript:deactivateContest(". $row['id'] . ")' class='btn_" . $row['id'] . " btn btn-secondary btn-sm'>Deactivate</button>";
|
||||
echo "<button onclick='javascript:deactivateContest(". $row['id'] . ")' class='btn_" . $row['id'] . " btn btn-secondary btn-sm'>" . lang('admin_contest_menu_deactivate') . "</button>";
|
||||
} else {
|
||||
echo "<button onclick='javascript:activateContest(". $row['id'] . ")' class='btn_" . $row['id'] . " btn btn-primary btn-sm'>Activate</button>";
|
||||
echo "<button onclick='javascript:activateContest(". $row['id'] . ")' class='btn_" . $row['id'] . " btn btn-secondary btn-sm'>" . lang('admin_contest_menu_activate') . "</button>";
|
||||
};?>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php echo site_url('contesting/edit')."/".$row['id']; ?>" class="btn btn-outline-primary btn-sm"><i class="fas fa-edit"></i> Edit</a>
|
||||
<a href="<?php echo site_url('contesting/edit')."/".$row['id']; ?>" class="btn btn-outline-primary btn-sm"><i class="fas fa-edit"></i> <?php echo lang('admin_edit'); ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="javascript:deleteContest('<?php echo $row['id']; ?>', '<?php echo $row['name']; ?>');" class="btn btn-danger btn-sm" ><i class="fas fa-trash-alt"></i> Delete</a>
|
||||
<a href="javascript:deleteContest('<?php echo $row['id']; ?>', '<?php echo $row['name']; ?>');" class="btn btn-danger btn-sm" ><i class="fas fa-trash-alt"></i> <?php echo lang('admin_delete'); ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
|
@ -57,9 +57,9 @@
|
|||
</div>
|
||||
<br/>
|
||||
<p>
|
||||
<button onclick="createContestDialog();" class="btn btn-primary btn-sm"><i class="fas fa-plus"></i> Add a Contest</button>
|
||||
<button onclick="activateAllContests();" class="btn btn-primary btn-sm">Activate All</button>
|
||||
<button onclick="deactivateAllContests();" class="btn btn-primary btn-sm">Deactivate All </button>
|
||||
<button onclick="createContestDialog();" class="btn btn-primary btn-sm"><i class="fas fa-plus"></i> <?php echo lang('admin_contest_add_contest'); ?></button>
|
||||
<button onclick="activateAllContests();" class="btn btn-primary btn-sm"><?php echo lang('admin_contest_all_active'); ?></button>
|
||||
<button onclick="deactivateAllContests();" class="btn btn-primary btn-sm"><?php echo lang('admin_contest_all_deactive'); ?></button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -21,18 +21,18 @@
|
|||
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label for="contestInput">Contest Name</label>
|
||||
<label for="contestInput"><?php echo lang('admin_contest_menu_name'); ?></label>
|
||||
<input type="text" class="form-control" name="contestname" id="contestInput" aria-describedby="contestInputHelp" required>
|
||||
<small id="contestInputHelp" class="form-text text-muted">Name of Contest</small>
|
||||
<small id="contestInputHelp" class="form-text text-muted"><?php echo lang('admin_contest_name_of_contest'); ?></small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="adifcontestInput">Contest ADIF Name</label>
|
||||
<label for="adifcontestInput"><?php echo lang('admin_contest_menu_adif'); ?></label>
|
||||
<input type="text" class="form-control" name="adifcontestname" id="adifcontestInput" aria-describedby="adifcontestInputHelp">
|
||||
<small id="adifcontestInputHelp" class="form-text text-muted">Name of Contest in ADIF-specification</small>
|
||||
<small id="adifcontestInputHelp" class="form-text text-muted"><?php echo lang('admin_contest_name_of_adif'); ?></small>
|
||||
</div>
|
||||
|
||||
<button type="button" onclick="createContest(this.form);" class="btn btn-primary btn-sm"><i class="fas fa-plus-square"></i> Create Contest</button>
|
||||
<button type="button" onclick="createContest(this.form);" class="btn btn-primary btn-sm"><i class="fas fa-plus-square"></i> <?php echo lang('admin_contest_create'); ?></button>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -68,8 +68,8 @@ function deactivateContest(contestid) {
|
|||
type: 'post',
|
||||
data: { 'id': contestid },
|
||||
success: function (html) {
|
||||
$(".contest_" + contestid).text('not active');
|
||||
$('.btn_' + contestid).html('Activate');
|
||||
$(`.contest_${contestid}`).text("<?php echo lang('admin_contest_menu_n_active'); ?>");
|
||||
$('.btn_' + contestid).html("<?php echo lang('admin_contest_menu_activate'); ?>");
|
||||
$('.btn_' + contestid).attr('onclick', 'activateContest(' + contestid + ')')
|
||||
}
|
||||
});
|
||||
|
|
@ -81,8 +81,8 @@ function activateContest(contestid) {
|
|||
type: 'post',
|
||||
data: { 'id': contestid },
|
||||
success: function (html) {
|
||||
$('.contest_' + contestid).text('active');
|
||||
$('.btn_' + contestid).html('Deactivate');
|
||||
$('.contest_' + contestid).text("<?php echo lang('admin_contest_menu_active'); ?>");
|
||||
$('.btn_' + contestid).html("<?php echo lang('admin_contest_menu_deactivate'); ?>");
|
||||
$('.btn_' + contestid).attr('onclick', 'deactivateContest(' + contestid + ')')
|
||||
}
|
||||
});
|
||||
|
|
|
|||
正在加载…
在新工单中引用