Permalink
Browse files

Added scaled image demonstration

  • Loading branch information...
weierophinney committed Oct 18, 2010
1 parent 31b4e26 commit 6a181219747953b1bf3e141d63772239d122a91f
View
@@ -30,6 +30,7 @@ mobile-app=/home/matthew/git/zf-examples/mobile-app CD=. filter="*.php *.phtml *
}
mobile=mobile {
details.phtml
+ image.phtml
index.phtml
}
}
@@ -15,6 +15,7 @@
<controllerFile controllerName="Mobile">
<actionMethod actionName="index"/>
<actionMethod actionName="details"/>
+ <actionMethod actionName="image"/>
</controllerFile>
</controllersDirectory>
<formsDirectory enabled="false"/>
@@ -35,6 +36,9 @@
<viewControllerScriptsDirectory forControllerName="Mobile">
<viewScriptFile forActionName="details"/>
</viewControllerScriptsDirectory>
+ <viewControllerScriptsDirectory forControllerName="Mobile">
+ <viewScriptFile forActionName="image"/>
+ </viewControllerScriptsDirectory>
</viewScriptsDirectory>
<viewHelpersDirectory/>
<viewFiltersDirectory enabled="false"/>
@@ -16,6 +16,15 @@ public function indexAction()
public function detailsAction()
{
$ua = $this->getInvokeArg('bootstrap')->getResource('useragent');
- $this->view->device = $ua->getDevice();
+ $this->view->device = $ua->getDevice();
}
+
+ public function imageAction()
+ {
+ // action body
+ }
+
+
}
+
+
@@ -13,4 +13,9 @@
'controller' => 'mobile',
'action' => 'details',
), 'default') ?>">List of mobile capabilities</a></li>
+
+ <li><a href="<?php echo $this->url(array(
+ 'controller' => 'mobile',
+ 'action' => 'image',
+ ), 'default') ?>">Scaled image</a></li>
<?php $this->placeholder('sidebar')->captureEnd() ?>
@@ -17,4 +17,9 @@
'controller' => 'index',
'action' => 'index',
), 'default') ?>">Home</a></li>
+
+ <li><a href="<?php echo $this->url(array(
+ 'controller' => 'mobile',
+ 'action' => 'image',
+ ), 'default') ?>">Scaled image</a></li>
<?php $this->placeholder('sidebar')->captureEnd() ?>
@@ -0,0 +1,17 @@
+<h2>Scaled Image</h2>
+
+<p>
+ <?php echo $this->tinySrc('/images/seascape.jpg') ?>
+</p>
+
+<?php $this->placeholder('sidebar')->captureStart() ?>
+ <li><a href="<?php echo $this->url(array(
+ 'controller' => 'index',
+ 'action' => 'index',
+ ), 'default') ?>">Home</a></li>
+
+ <li><a href="<?php echo $this->url(array(
+ 'controller' => 'mobile',
+ 'action' => 'details',
+ ), 'default') ?>">List of mobile capabilities</a></li>
+<?php $this->placeholder('sidebar')->captureEnd() ?>
Binary file not shown.

0 comments on commit 6a18121

Please sign in to comment.