From 43bc6e0104470ab110affa59dfb7fdcc2f8940a9 Mon Sep 17 00:00:00 2001 From: Patrick Seeger Date: Fri, 27 Jun 2014 14:54:33 +0200 Subject: Google WebmasterTools verifizieren --- themes/astaf/views/layouts/main.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/themes/astaf/views/layouts/main.php b/themes/astaf/views/layouts/main.php index 60311e7..cc6e277 100644 --- a/themes/astaf/views/layouts/main.php +++ b/themes/astaf/views/layouts/main.php @@ -2,6 +2,7 @@ + <?php echo CHtml::encode($this->pageTitle); ?> @@ -17,7 +18,7 @@ - + @@ -32,7 +33,8 @@ })(); --> - +*/?> + + + -
+

name);?>

-- cgit v1.0-28-g1787 From b0bb0b981ebaa1b260e48a6a7c05e7b18407b32d Mon Sep 17 00:00:00 2001 From: Patrick Seeger Date: Fri, 27 Jun 2014 17:45:49 +0200 Subject: =?UTF-8?q?Anzeige=20der=20Pager=20versch=C3=B6nert(mobil)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/astaf/layout.css | 6 +++--- protected/views/search/results.php | 1 + protected/views/standort/_buehne.php | 1 + protected/views/standort/_standort.php | 1 + protected/views/veranstaltung/_list_veranstaltungen.php | 1 + protected/views/veranstaltung/now.php | 16 +++++++++++++++- protected/views/veranstaltung/stage.php | 17 ----------------- protected/views/verein/index.php | 3 ++- 8 files changed, 24 insertions(+), 22 deletions(-) diff --git a/css/astaf/layout.css b/css/astaf/layout.css index 36075a6..60cae20 100644 --- a/css/astaf/layout.css +++ b/css/astaf/layout.css @@ -164,17 +164,17 @@ text-align: center; } .pager ul li { - line-height: 4em; + line-height: 2.5em; font-size: 2em; } ul.yiiPager li.page { display: none; } - ul.yiiPager li.page.selected + /*ul.yiiPager li.page.selected { display: inline; - } + }*/ } \ No newline at end of file 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:: 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..0565ce1 100644 --- a/protected/views/veranstaltung/_list_veranstaltungen.php +++ b/protected/views/veranstaltung/_list_veranstaltungen.php @@ -35,6 +35,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 @@ -8,13 +8,27 @@ $this->menu=array( array('label'=>'Alle Veranstaltungen', 'url'=>array('index')), 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); +*/?>

Veranstaltungen heute um

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); ?>

Bühnenprogramm name?>

-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", - ), -));*/ -?>
Freitag
menu=array(

Vereine

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', -- cgit v1.0-28-g1787 From c647025290d4280945098ad95732e6fb2308cffb Mon Sep 17 00:00:00 2001 From: Patrick Seeger Date: Fri, 27 Jun 2014 18:24:42 +0200 Subject: Vereinsname bei Veranstaltungen ausblenden wenn mobiler Browser --- css/astaf/layout.css | 1 + protected/config/main.php | 16 ++++----- .../views/veranstaltung/_list_veranstaltungen.php | 41 ++++++++++++++++++++++ 3 files changed, 50 insertions(+), 8 deletions(-) diff --git a/css/astaf/layout.css b/css/astaf/layout.css index 60cae20..361421b 100644 --- a/css/astaf/layout.css +++ b/css/astaf/layout.css @@ -171,6 +171,7 @@ { display: none; } + /*ul.yiiPager li.page.selected { display: inline; diff --git a/protected/config/main.php b/protected/config/main.php index afab916..5730be4 100644 --- a/protected/config/main.php +++ b/protected/config/main.php @@ -7,7 +7,7 @@ // CWebApplication properties can be configured here. return array( 'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..', - 'name'=>'Waiblinger Altstadtfest 2014', + 'name'=>'TEST - Waiblinger Altstadtfest 2014', 'theme' => 'astaf', 'sourceLanguage' => 'en', 'language' =>'de', @@ -71,10 +71,10 @@ return array( // uncomment the following to use a MySQL database 'db'=>array( - 'connectionString' => 'mysql:host=database;dbname=astaf_2012', + 'connectionString' => 'mysql:host=localhost;dbname=astaf', 'emulatePrepare' => true, - 'username' => 'astaf', - 'password' => 'AsTaF4', + 'username' => 'root', + 'password' => '', 'charset' => 'utf8', 'tablePrefix' => 'tbl_' ), @@ -88,17 +88,17 @@ return array( 'routes'=>array( 'file'=>array( 'class'=>'CFileLogRoute', - 'levels'=>'error, warning', - // 'categories'=>'system.db.*', + 'levels'=>'error, warning, debug, trace', + 'categories'=>'system.db.*', ), // uncomment the following to show log messages on web pages - /* 'web'=>array( + 'web'=>array( 'class'=>'CWebLogRoute', 'levels'=>'trace, info, error, warning', 'categories'=>'system.db.*', - ),*/ + ), ), ), diff --git a/protected/views/veranstaltung/_list_veranstaltungen.php b/protected/views/veranstaltung/_list_veranstaltungen.php index 0565ce1..e4d4d55 100644 --- a/protected/views/veranstaltung/_list_veranstaltungen.php +++ b/protected/views/veranstaltung/_list_veranstaltungen.php @@ -1,4 +1,44 @@ 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', -- cgit v1.0-28-g1787