mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Multilang Support for Admin Contest Menu
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user