diff options
| author | Patrick Seeger <pseeger@ccwn.org> | 2014-06-27 18:29:42 +0200 |
|---|---|---|
| committer | Patrick Seeger <pseeger@ccwn.org> | 2014-06-27 18:29:42 +0200 |
| commit | 839a8e73b87dcdd5c19a3ef3039967b7b2800e6c (patch) | |
| tree | e87657e2e87619740adc9eb2d470393308e97277 /protected | |
| parent | 6d3f9e5765d64f6d8d6ec36d5dcf022c7e632ca4 (diff) | |
Fehler in config zurück
Diffstat (limited to 'protected')
| -rw-r--r-- | protected/views/search/results.php | 1 | ||||
| -rw-r--r-- | protected/views/standort/_buehne.php | 1 | ||||
| -rw-r--r-- | protected/views/standort/_standort.php | 1 | ||||
| -rw-r--r-- | protected/views/veranstaltung/_list_veranstaltungen.php | 42 | ||||
| -rw-r--r-- | protected/views/veranstaltung/now.php | 16 | ||||
| -rw-r--r-- | protected/views/veranstaltung/stage.php | 17 | ||||
| -rw-r--r-- | protected/views/verein/index.php | 3 |
7 files changed, 62 insertions, 19 deletions
diff --git a/protected/views/search/results.php b/protected/views/search/results.php index b2af731..fa28297 100644 --- a/protected/views/search/results.php +++ b/protected/views/search/results.php @@ -13,6 +13,7 @@ $this->pageTitle = 'Suchergebnisse für ' .CHtml::encode($search). ' - ' . Yii:: <?php $this->widget('zii.widgets.CListView', array( 'dataProvider'=>$dataProvider, + 'pager'=>array('footer'=>'', 'header'=>''), 'itemView'=>'/'.lcfirst($mod).'/_short', // refers to the partial view named '_post' ));?> diff --git a/protected/views/standort/_buehne.php b/protected/views/standort/_buehne.php index 0dc0870..f20e9a9 100644 --- a/protected/views/standort/_buehne.php +++ b/protected/views/standort/_buehne.php @@ -13,6 +13,7 @@ $this->widget('zii.widgets.CListView', array( //'dataProvider'=>$dataProvider, 'dataProvider'=>Veranstaltung::model('Veranstaltung')->published()->thisYear()->parentStage($data->id)->sorted()->search(), 'itemView'=>'/veranstaltung/_short', + 'pager'=>array('footer'=>'', 'header'=>''), 'sortableAttributes'=>array( 'name' ) diff --git a/protected/views/standort/_standort.php b/protected/views/standort/_standort.php index dd978dc..280a351 100644 --- a/protected/views/standort/_standort.php +++ b/protected/views/standort/_standort.php @@ -11,6 +11,7 @@ $dataProvider=new CActiveDataProvider('Verein', array( )); $this->widget('zii.widgets.CListView', array( 'dataProvider'=>$dataProvider, + 'pager'=>array('footer'=>'', 'header'=>''), 'itemView'=>'/verein/_short', 'sortableAttributes'=>array( 'name' diff --git a/protected/views/veranstaltung/_list_veranstaltungen.php b/protected/views/veranstaltung/_list_veranstaltungen.php index 95a7c51..e4d4d55 100644 --- a/protected/views/veranstaltung/_list_veranstaltungen.php +++ b/protected/views/veranstaltung/_list_veranstaltungen.php @@ -1,4 +1,44 @@ <?php +$tablet_browser = 0; +$mobile_browser = 0; + +if (preg_match('/(tablet|ipad|playbook)|(android(?!.*(mobi|opera mini)))/i', strtolower($_SERVER['HTTP_USER_AGENT']))) { + $tablet_browser++; +} + +if (preg_match('/(up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone|android|iemobile)/i', strtolower($_SERVER['HTTP_USER_AGENT']))) { + $mobile_browser++; +} + +if ((strpos(strtolower($_SERVER['HTTP_ACCEPT']),'application/vnd.wap.xhtml+xml') > 0) or ((isset($_SERVER['HTTP_X_WAP_PROFILE']) or isset($_SERVER['HTTP_PROFILE'])))) { + $mobile_browser++; +} + +$mobile_ua = strtolower(substr($_SERVER['HTTP_USER_AGENT'], 0, 4)); +$mobile_agents = array( + 'w3c ','acs-','alav','alca','amoi','audi','avan','benq','bird','blac', + 'blaz','brew','cell','cldc','cmd-','dang','doco','eric','hipt','inno', + 'ipaq','java','jigs','kddi','keji','leno','lg-c','lg-d','lg-g','lge-', + 'maui','maxo','midp','mits','mmef','mobi','mot-','moto','mwbp','nec-', + 'newt','noki','palm','pana','pant','phil','play','port','prox', + 'qwap','sage','sams','sany','sch-','sec-','send','seri','sgh-','shar', + 'sie-','siem','smal','smar','sony','sph-','symb','t-mo','teli','tim-', + 'tosh','tsm-','upg1','upsi','vk-v','voda','wap-','wapa','wapi','wapp', + 'wapr','webc','winw','winw','xda ','xda-'); + +if (in_array($mobile_ua,$mobile_agents)) { + $mobile_browser++; +} + +if (strpos(strtolower($_SERVER['HTTP_USER_AGENT']),'opera mini') > 0) { + $mobile_browser++; + //Check for tablets on opera mini alternative headers + $stock_ua = strtolower(isset($_SERVER['HTTP_X_OPERAMINI_PHONE_UA'])?$_SERVER['HTTP_X_OPERAMINI_PHONE_UA']:(isset($_SERVER['HTTP_DEVICE_STOCK_UA'])?$_SERVER['HTTP_DEVICE_STOCK_UA']:'')); + if (preg_match('/(tablet|ipad|playbook)|(android(?!.*mobile))/i', $stock_ua)) { + $tablet_browser++; + } +} + $this->widget('zii.widgets.grid.CGridView', array( 'dataProvider'=>$veranstaltungen->search(), @@ -27,6 +67,7 @@ $this->widget('zii.widgets.grid.CGridView', array( array( 'name' => "verein_id", + 'visible' => ($mobile_browser < 1), 'header' => "Verein", 'sortable' => true, 'type' => 'Raw', @@ -35,6 +76,7 @@ $this->widget('zii.widgets.grid.CGridView', array( ), 'blankDisplay' => "Heute keine Termine bekannt", 'enableSorting' => true, + 'pager'=>array('footer'=>'', 'header'=>''), 'enablePagination' => true, 'showTableOnEmpty' => false, 'hideHeader' => false, diff --git a/protected/views/veranstaltung/now.php b/protected/views/veranstaltung/now.php index c9cf1c3..3421a60 100644 --- a/protected/views/veranstaltung/now.php +++ b/protected/views/veranstaltung/now.php @@ -9,12 +9,26 @@ $this->menu=array( array('label'=>'Jetzt auf dem Fest', 'url'=>array('now')), //array('label'=>'Veranstaltung suchen', 'url'=>array('search')), -);?> +); +/* +$buehnen = new CActiveDataProvider('Standort', array( + 'criteria'=>array( + 'condition'=>"type='Bühne'", + + ), +)); +$mymenu = array(); +foreach ($buehnen->getData() as $buehne) { + $mymenu = array_merge( $mymenu , array(array('label' => 'Bühnenprogramm '.$buehne->name, 'url'=>array('stage','id'=>$buehne->id)))); +} +$this->menu = array_merge($this->menu, $mymenu); +*/?> <h3>Veranstaltungen heute um <?php echo date("H:i");?></h3> <?php $this->widget('zii.widgets.CListView', array( 'dataProvider'=>$model->now(), 'itemView'=>'_short_all', // refers to the partial view named '_post' + 'pager'=>array('footer'=>'', 'header'=>''), 'sortableAttributes'=>array( 'name', /*'create_time'=>'Post Time',*/ diff --git a/protected/views/veranstaltung/stage.php b/protected/views/veranstaltung/stage.php index 997823d..ca7d803 100644 --- a/protected/views/veranstaltung/stage.php +++ b/protected/views/veranstaltung/stage.php @@ -27,23 +27,6 @@ foreach ($buehnen->getData() as $buehne) { $this->menu = array_merge($this->menu, $mymenu); ?> <h3>Bühnenprogramm <?php echo $model->name?> </h3> -<?php /* -$freitag=new CActiveDataProvider('Veranstaltung', array( - 'criteria'=>array( - 'condition'=>'standort_id='.$model->id." and dayofweek(startzeit)=6", - ), -)); -$samstag=new CActiveDataProvider('Veranstaltung', array( - 'criteria'=>array( - 'condition'=>'standort_id='.$model->id." and published=1 and dayofweek(startzeit)=7", - ), -)); -$sonntag=new CActiveDataProvider('Veranstaltung', array( - 'criteria'=>array( - 'condition'=>'standort_id='.$model->id." and published=1 and dayofweek(startzeit)=1", - ), -));*/ -?> <h5>Freitag</h5> <?php diff --git a/protected/views/verein/index.php b/protected/views/verein/index.php index 3f3a807..54d31c4 100644 --- a/protected/views/verein/index.php +++ b/protected/views/verein/index.php @@ -13,7 +13,8 @@ $this->menu=array( <h2>Vereine</h2> <?php $this->widget('zii.widgets.CListView', array( 'dataProvider'=>$model->listPublic(), - 'itemView'=>'_short', // refers to the partial view named '_post' + 'itemView'=>'_short', + 'pager'=>array('footer'=>'', 'header'=>''), /*'sortableAttributes'=>array( 'name', /*'create_time'=>'Post Time', |
