dashboard: fix RSTS/RSTR table header in mobile mode

pull/1229/head
ShadowMov 2021-10-14 23:45:51 +08:00
rodzic d541aea76f
commit e21639277d
1 zmienionych plików z 19 dodań i 52 usunięć

Wyświetl plik

@ -1,3 +1,18 @@
<?php
function echo_table_header_col($ctx, $name) {
switch($name) {
case 'Mode': echo '<th>'.$ctx->lang->line('gen_hamradio_mode').'</th>'; break;
case 'RSTS': echo '<th class="d-none d-sm-table-cell">'.$ctx->lang->line('gen_hamradio_rsts').'</th>'; break;
case 'RSTR': echo '<th class="d-none d-sm-table-cell">'.$ctx->lang->line('gen_hamradio_rstr').'</th>'; break;
case 'Country': echo '<th>'.$ctx->lang->line('general_word_country').'</th>'; break;
case 'IOTA': echo '<th>'.$ctx->lang->line('gen_hamradio_iota').'</th>'; break;
case 'SOTA': echo '<th>'.$ctx->lang->line('gen_hamradio_sota').'</th>'; break;
case 'State': echo '<th>'.$ctx->lang->line('gen_hamradio_state').'</th>'; break;
case 'Grid': echo '<th>'.$ctx->lang->line('gen_hamradio_gridsquare').'</th>'; break;
case 'Band': echo '<th>'.$ctx->lang->line('gen_hamradio_band').'</th>'; break;
}
}
?>
<div class="container dashboard">
<?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE) { ?>
@ -41,58 +56,10 @@
<?php } ?>
<th><?php echo $this->lang->line('gen_hamradio_call'); ?></th>
<?php
echo '<th>';
switch($this->session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1')) {
case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break;
case 'RSTS': echo $this->lang->line('gen_hamradio_rsts'); break;
case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break;
case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break;
case 'State': echo $this->lang->line('gen_hamradio_state'); break;
case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
}
echo '</th>' .
'<th>';
switch($this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2')) {
case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break;
case 'RSTS': echo $this->lang->line('gen_hamradio_rsts'); break;
case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break;
case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break;
case 'State': echo $this->lang->line('gen_hamradio_state'); break;
case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
}
echo '</th>' .
'<th>';
switch($this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3')) {
case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break;
case 'RSTS': echo $this->lang->line('gen_hamradio_rsts'); break;
case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break;
case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break;
case 'State': echo $this->lang->line('gen_hamradio_state'); break;
case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
}
echo '</th>' .
'<th>';
switch($this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4')) {
case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break;
case 'RSTS': echo $this->lang->line('gen_hamradio_rsts'); break;
case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break;
case 'Country': echo $this->lang->line('general_word_country'); break;
case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break;
case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break;
case 'State': echo $this->lang->line('gen_hamradio_state'); break;
case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break;
case 'Band': echo $this->lang->line('gen_hamradio_band'); break;
}
echo '</th>';
echo_table_header_col($this, $this->session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1'));
echo_table_header_col($this, $this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2'));
echo_table_header_col($this, $this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3'));
echo_table_header_col($this, $this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4'));
?>
</tr>
</thead>