Add per room info tab (HTML)

This commit is contained in:
derchris 2021-12-22 03:23:03 +01:00
parent 6f1f8dc6c0
commit 1183def6dd
4 changed files with 36 additions and 1 deletions

View file

@ -214,6 +214,14 @@ $CONFIG['TWITTER'] = array(
*/
$CONFIG['EMBED'] = true;
/**
* Globaler Schalter für die Raum Infos
*
* Wird diese Zeile auskommentiert oder auf False gesetzt, werden alle
* Raum Infos deaktiviert.
*/
$CONFIG['INFO'] = true;
/**
* Liste der Räume (= Audio & Video Produktionen, also auch DJ-Sets .)
@ -256,6 +264,7 @@ $CONFIG['ROOMS'] = array(
'DISPLAY' => '#rC3lounge @ mastodon/twitter',
'TEXT' => '#rC3lounge',
),
'INFO' => '',
),
'abchillgleis' => array(
'DISPLAY' => 'Abchillgleis',

View file

@ -173,7 +173,6 @@ class Room
);
}
public function hasChat() {
return $this->hasTwitter() || $this->hasIrc() || $this->hasWebchat();
}
@ -183,7 +182,14 @@ class Room
return $this->getConference()->get('ROOMS.'.$this->getSlug().'.EMBED') && $this->getConference()->get('EMBED');
}
public function hasInfo() {
return $this->getConference()->get('ROOMS.'.$this->getSlug().'.INFO') && $this->getConference()->get('EMBED');
}
public function getInfo() {
return $this->getConference()->get('ROOMS.'.$this->getSlug().'.INFO');
}
public function hasSdVideo() {
return $this->getConference()->get('ROOMS.'.$this->getSlug().'.SD_VIDEO');
}

View file

@ -0,0 +1,10 @@
<? if($room->hasInfo()): ?>
<div class="col-xs-12">
<h3>Info about <?=h($stream->getDisplay())?></h3>
</div>
<div class="col-sm-12">
<p>
<?=$room->getInfo()?>
</p>
</div>
<? endif ?>

View file

@ -47,6 +47,11 @@
<a href="#embed" role="tab" data-toggle="tab">Embed</a>
</li>
<? endif ?>
<? if($room->hasInfo()): ?>
<li>
<a href="#info" role="tab" data-toggle="tab">Info</a>
</li>
<? endif ?>
</ul>
<div class="functions-wrap tab-content">
@ -74,5 +79,10 @@
<? require("$assemblies/embed-form.phtml") ?>
</div>
<? endif ?>
<? if($room->hasInfo()): ?>
<div role="tabpanel" class="tab-pane" id="info">
<? require("$assemblies/info.phtml") ?>
</div>
<? endif ?>
</div>
</div>