Skip to content

Commit

Permalink
Merge pull request #36 from london89/master
Browse files Browse the repository at this point in the history
Отображение вкладок
  • Loading branch information
directman66 authored Mar 17, 2021
2 parents ab0ca39 + ccf117c commit c9709bf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions modules/zigbee2mqtt/zigbee2mqtt.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1495,7 +1495,12 @@ function admin(&$out) {

$this->getConfig();

$slslist =(explode(',', $this->config['SLSIP']));
if (!empty($this->config['SLSIP'])) {
$slslist =(explode(',', $this->config['SLSIP']));
} else {
$slslist=array();
}

$total = count($slslist);
for ($i = 0; $i < $total; $i++) {
$out['slsdev'][$i]['IP']=trim($slslist[$i]);
Expand Down Expand Up @@ -2356,7 +2361,7 @@ function admin(&$out) {

// if ($this-tab=='map') {
//global $tab;
if (tab=='map') {
if ($tab=='map') {

$this->redirect("?tab=map");
}
Expand Down
4 changes: 2 additions & 2 deletions templates/zigbee2mqtt/action_admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<!-- table zwave_devices search -->
[#if VIEW_MODE=""||VIEW_MODE="update_log"#]
<ul class="nav nav-tabs">
<li [#if TAB=="" || TAB=="indata" #] class="active" [#endif#]><a href="?data_source=<#DATA_SOURCE#>&view_mode=&id=<#ID#>&tab=devices"><#LANG_DEVICES#></a> </li>
<li [#if TAB=="" || TAB=="devices" #] class="active" [#endif#]><a href="?data_source=<#DATA_SOURCE#>&view_mode=&id=<#ID#>&tab=devices"><#LANG_DEVICES#></a> </li>
<!-- <li [#if TAB=="table" #] class="active" [#endif#]><a href="?data_source=<#DATA_SOURCE#>&view_mode=&id=<#ID#>&tab=table">Devices table</a> </li>-->
<!--<li [#if TAB=="groups" #] class="active" [#endif#]><a href="?data_source=<#DATA_SOURCE#>&view_mode=&id=<#ID#>&tab=groups"><#LANG_GROUPS#></a> </li> -->
<li [#if TAB=="bind" #] class="active" [#endif#]><a href="?data_source=<#DATA_SOURCE#>&view_mode=&id=<#ID#>&tab=bind">Bind</a> </li>
Expand All @@ -22,7 +22,7 @@
[#endif#]

[#begin slsdev#]
<li [#if TAB=="slslog" #] class="active" [#endif#]><a href="?data_source=<#DATA_SOURCE#>&view_mode=&id=<#ID#>&tab=slslog&slsipp=[#IP#]">SLS ZGW Log ([#IP#])</a> </li>
<li [#if "<#TAB#>"=="slslog" && IP=="<#SLSIPP#>"#] class="active" [#endif#]><a href="?data_source=<#DATA_SOURCE#>&view_mode=&id=<#ID#>&tab=slslog&slsipp=[#IP#]">SLS ZGW Log ([#IP#])</a> </li>
[#end slsdev#]
<li [#if TAB=="log2" #] class="active" [#endif#]><a href="?data_source=<#DATA_SOURCE#>&view_mode=&id=<#ID#>&tab=log2">Majorodmo Log</a> </li>
<li [#if TAB=="service" #] class="active" [#endif#]><a href="?data_source=<#DATA_SOURCE#>&view_mode=&id=<#ID#>&tab=service"><#LANG_GENERAL_SERVICE#></a> </li>
Expand Down

0 comments on commit c9709bf

Please sign in to comment.