From 221c7ff3a705c0dd642480686074270a62094ec1 Mon Sep 17 00:00:00 2001 From: dedeibel Date: Sun, 30 Dec 2018 15:46:21 +0100 Subject: Added short display name feature for longer rooms / schedule and mobile view --- assets/css/_overview.less | 14 ++++++++++++++ configs/conferences/35c3/config.php | 10 ++++++++++ model/Room.php | 10 ++++++++++ template/assemblies/schedule.phtml | 2 +- template/overview.phtml | 5 +++-- 5 files changed, 38 insertions(+), 3 deletions(-) diff --git a/assets/css/_overview.less b/assets/css/_overview.less index 91b29f1..778457d 100644 --- a/assets/css/_overview.less +++ b/assets/css/_overview.less @@ -1,4 +1,18 @@ body.overview { + .panel-title { + .roomtitle.short { + display: none; + } + @media (max-width: @screen-xs-max) { + .roomtitle.regular { + display: none; + } + .roomtitle.short { + display: inline; + } + } + } + .panel-body { min-height: 10px; } diff --git a/configs/conferences/35c3/config.php b/configs/conferences/35c3/config.php index 27f44ef..e9e16cf 100644 --- a/configs/conferences/35c3/config.php +++ b/configs/conferences/35c3/config.php @@ -158,6 +158,13 @@ $CONFIG['ROOMS'] = array( */ 'DISPLAY' => 'Adams', + /** + * Anzeigename abgekürzt - wird im Schedule angezeigt. + * Auf dem Overview im Mobile view. + * + * DISPLAY_SHORT' => 'Shorter', + */ + 'WIDE' => true, /** @@ -528,6 +535,7 @@ $CONFIG['ROOMS'] = array( 'chaoswest' => array( 'DISPLAY' => 'Chaos West Bühne', + 'DISPLAY_SHORT' => 'Chaos West', 'STREAM' => 's150', 'PREVIEW' => true, 'TRANSLATION' => [ @@ -560,6 +568,7 @@ $CONFIG['ROOMS'] = array( 'wikipakawg' => array( 'DISPLAY' => 'WikiPakaWG Esszimmer', + 'DISPLAY_SHORT' => 'WikiPakaWG', 'STREAM' => 's151', 'PREVIEW' => true, 'TRANSLATION' => [ @@ -587,6 +596,7 @@ $CONFIG['ROOMS'] = array( 'oio' => array( 'DISPLAY' => 'Open Infrastructure Orbit Vortrags-Arena', + 'DISPLAY_SHORT' => 'OIO', 'STREAM' => 'soio', 'PREVIEW' => true, 'TRANSLATION' => [ diff --git a/model/Room.php b/model/Room.php index 21a05a9..cfc14c1 100644 --- a/model/Room.php +++ b/model/Room.php @@ -67,6 +67,16 @@ class Room return $this->getConference()->get('ROOMS.'.$this->getSlug().'.DISPLAY', $this->getSlug()); } + public function getDisplayShort() { + $display_short = $this->getConference()->get('ROOMS.'.$this->getSlug().'.DISPLAY_SHORT', $this->getSlug()); + if (empty($display_short)) { + return $this->getDisplay(); + } + else { + return $display_short; + } + } + public function hasStereo() { diff --git a/template/assemblies/schedule.phtml b/template/assemblies/schedule.phtml index f160721..a519c23 100644 --- a/template/assemblies/schedule.phtml +++ b/template/assemblies/schedule.phtml @@ -46,7 +46,7 @@ –  in  - getDisplay() : $roomname) ?> + getDisplayShort() : $roomname) ?>

(no stream) diff --git a/template/overview.phtml b/template/overview.phtml index e441112..d2f3c20 100644 --- a/template/overview.phtml +++ b/template/overview.phtml @@ -56,7 +56,8 @@
- getDisplay())?> + getDisplay())?> + getDisplayShort())?>
@@ -72,7 +73,7 @@ -

getDisplay())?>

+

getDisplay())?>

-- cgit v1.2.3