initial wireframe for ansel mobile view
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 25 Dec 2010 05:45:33 +0000 (00:45 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sun, 26 Dec 2010 05:41:21 +0000 (00:41 -0500)
No real functionality here, just wireframe

ansel/index.php
ansel/mobile.php [new file with mode: 0644]
ansel/templates/mobile/galleries.html.php [new file with mode: 0644]
ansel/templates/mobile/head.html.php [new file with mode: 0644]
ansel/templates/mobile/notice.html.php [new file with mode: 0644]

index 2674cfc..48c975d 100644 (file)
 
 require_once dirname(__FILE__) . '/lib/Application.php';
 Horde_Registry::appInit('ansel');
+
+/* Load mobile? */
+if ($browser->isMobile()) {
+    include ANSEL_BASE . '/mobile.php';
+    exit;
+}
+
 Ansel::getUrlFor('default_view', array())->redirect();
diff --git a/ansel/mobile.php b/ansel/mobile.php
new file mode 100644 (file)
index 0000000..8ff8f6f
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+/**
+ * Ansel Mobile View
+ *
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (LGPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
+ *
+ * @author Michael J. Rubinsky <mrubinsk@horde.org>
+ * @category Horde
+ * @license  http://www.fsf.org/copyleft/gpl.html GPL
+ * @package Ansel
+ */
+require_once dirname(__FILE__) . '/lib/Application.php';
+Horde_Registry::appInit('ansel');
+
+$title = _("Photo Galleries");
+
+$view = new Horde_View(array('templatePath' => ANSEL_TEMPLATES . '/mobile'));
+$view->registry = $registry;
+$view->portal = Horde::getServiceLink('portal', 'horde')->setRaw(false);
+$view->logout = Horde::getServiceLink('logout')->setRaw(false);
+
+require $registry->get('templates', 'horde') . '/common-header-mobile.inc';
+
+echo $view->render('head');
+echo $view->render('galleries');
+//echo $view->render('gallery');
+//echo $view->render('photo');
+echo $view->render('notice');
+$registry->get('templates', 'horde') . '/common-footer-mobile.inc';
diff --git a/ansel/templates/mobile/galleries.html.php b/ansel/templates/mobile/galleries.html.php
new file mode 100644 (file)
index 0000000..bd91641
--- /dev/null
@@ -0,0 +1,34 @@
+<div data-role="page" id="gallerylist">
+  <div data-role="header">
+    <h1><?php echo _("My Galleries")?></h1>
+    <a rel="external" href="<?php echo $this->portal ?>"><?php echo _("Portal")?></a>
+    <?php if ($this->logout): ?>
+      <a href="<?php echo $this->logout ?>" rel="external" data-theme="e" data-icon="delete"><?php echo _("Log out") ?></a>
+    <?php endif ?>
+    <div data-role="navbar" class="ui-bar-a">
+      <ul>
+        <li><a href="#">User Galleries</a></li>
+        <li><a href="#">My Galleries</a></li>
+      </ul>
+    </div>
+  </div>
+  <div data-role="content" class="ui-body">
+      <ul data-role="listview">
+          <li>
+           <?php echo Horde::img('thumb-error.png')?>
+              <h3><a href="#">Gallery One</a></h3>
+              <p>Gallery Description</p>
+          </li>
+          <li>
+           <?php echo Horde::img('thumb-error.png')?>
+              <h3><a href="#">Gallery Two</a></h3>
+              <p>Gallery Description</p>
+          </li>
+          <li>
+           <?php echo Horde::img('thumb-error.png')?>
+              <h3><a href="#">Gallery Three</a></h3>
+              <p>Gallery Description</p>
+          </li>
+      </ul>
+  </div>
+</div>
\ No newline at end of file
diff --git a/ansel/templates/mobile/head.html.php b/ansel/templates/mobile/head.html.php
new file mode 100644 (file)
index 0000000..55e5548
--- /dev/null
@@ -0,0 +1,2 @@
+</head>
+<body>
diff --git a/ansel/templates/mobile/notice.html.php b/ansel/templates/mobile/notice.html.php
new file mode 100644 (file)
index 0000000..9711346
--- /dev/null
@@ -0,0 +1,9 @@
+<div id="notification" data-role="dialog">
+  <div data-role="header">
+    <h1><?php echo _("Notice")?></h1>
+  </div>
+  <div data-role="content" class="ui-body">
+    <ul id="horde-notification" data-role="listview">
+    </ul>
+  </div>
+</div>
\ No newline at end of file