Permalink
Browse files

Addming mobile/news page for the apps

  • Loading branch information...
1 parent ba2274e commit 68b03c0b355b767a4f508eaef3c6ada4880cada1 @ericduran ericduran committed Nov 27, 2011
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * Implementation of hook_views_api().
+ */
+function mobile_news_views_api() {
+ return array(
+ 'api' => '2',
+ );
+}
@@ -0,0 +1,7 @@
+core = "6.x"
+dependencies[] = "views"
+description = "Mobile news layout"
+features[views][] = "mobile_news"
+features[views_api][] = "api:2"
+name = "Mobile News"
+package = "Features"
@@ -0,0 +1,3 @@
+<?php
+
+include_once('mobile_news.features.inc');
@@ -0,0 +1,158 @@
+<?php
+
+/**
+ * Implementation of hook_views_default_views().
+ */
+function mobile_news_views_default_views() {
+ $views = array();
+
+ // Exported view: mobile_news
+ $view = new view;
+ $view->name = 'mobile_news';
+ $view->description = 'Mobile News Listing';
+ $view->tag = '';
+ $view->view_php = '';
+ $view->base_table = 'node';
+ $view->is_cacheable = FALSE;
+ $view->api_version = 2;
+ $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
+ $handler = $view->new_display('default', 'Defaults', 'default');
+ $handler->override_option('fields', array(
+ 'title' => array(
+ 'label' => '',
+ 'alter' => array(
+ 'alter_text' => 0,
+ 'text' => '',
+ 'make_link' => 0,
+ 'path' => '',
+ 'link_class' => '',
+ 'alt' => '',
+ 'prefix' => '',
+ 'suffix' => '',
+ 'target' => '',
+ 'help' => '',
+ 'trim' => 0,
+ 'max_length' => '',
+ 'word_boundary' => 1,
+ 'ellipsis' => 1,
+ 'html' => 0,
+ 'strip_tags' => 0,
+ ),
+ 'empty' => '',
+ 'hide_empty' => 0,
+ 'empty_zero' => 0,
+ 'link_to_node' => 1,
+ 'exclude' => 0,
+ 'id' => 'title',
+ 'table' => 'node',
+ 'field' => 'title',
+ 'override' => array(
+ 'button' => 'Override',
+ ),
+ 'relationship' => 'none',
+ ),
+ 'body' => array(
+ 'label' => '',
+ 'alter' => array(
+ 'alter_text' => 0,
+ 'text' => '',
+ 'make_link' => 0,
+ 'path' => '',
+ 'link_class' => '',
+ 'alt' => '',
+ 'prefix' => '',
+ 'suffix' => '',
+ 'target' => '',
+ 'help' => '',
+ 'trim' => 0,
+ 'max_length' => '',
+ 'word_boundary' => 1,
+ 'ellipsis' => 1,
+ 'html' => 0,
+ 'strip_tags' => 0,
+ ),
+ 'empty' => '',
+ 'hide_empty' => 0,
+ 'empty_zero' => 0,
+ 'exclude' => 0,
+ 'id' => 'body',
+ 'table' => 'node_revisions',
+ 'field' => 'body',
+ 'override' => array(
+ 'button' => 'Override',
+ ),
+ 'relationship' => 'none',
+ ),
+ ));
+ $handler->override_option('sorts', array(
+ 'sticky' => array(
+ 'order' => 'ASC',
+ 'id' => 'sticky',
+ 'table' => 'node',
+ 'field' => 'sticky',
+ 'override' => array(
+ 'button' => 'Override',
+ ),
+ 'relationship' => 'none',
+ ),
+ 'created' => array(
+ 'order' => 'DESC',
+ 'granularity' => 'second',
+ 'id' => 'created',
+ 'table' => 'node',
+ 'field' => 'created',
+ 'override' => array(
+ 'button' => 'Override',
+ ),
+ 'relationship' => 'none',
+ ),
+ ));
+ $handler->override_option('filters', array(
+ 'type' => array(
+ 'operator' => 'in',
+ 'value' => array(
+ 'news' => 'news',
+ ),
+ 'group' => '0',
+ 'exposed' => FALSE,
+ 'expose' => array(
+ 'operator' => FALSE,
+ 'label' => '',
+ ),
+ 'id' => 'type',
+ 'table' => 'node',
+ 'field' => 'type',
+ 'override' => array(
+ 'button' => 'Override',
+ ),
+ 'relationship' => 'none',
+ ),
+ ));
+ $handler->override_option('access', array(
+ 'type' => 'none',
+ ));
+ $handler->override_option('cache', array(
+ 'type' => 'none',
+ ));
+ $handler->override_option('items_per_page', 0);
+ $handler = $view->new_display('page', 'Page', 'page_1');
+ $handler->override_option('path', 'mobile/news');
+ $handler->override_option('menu', array(
+ 'type' => 'none',
+ 'title' => '',
+ 'description' => '',
+ 'weight' => 0,
+ 'name' => 'navigation',
+ ));
+ $handler->override_option('tab_options', array(
+ 'type' => 'none',
+ 'title' => '',
+ 'description' => '',
+ 'weight' => 0,
+ 'name' => 'navigation',
+ ));
+
+ $views[$view->name] = $view;
+
+ return $views;
+}
@@ -0,0 +1,70 @@
+<?php
+?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php print $language->language; ?>" xml:lang="<?php print $language->language; ?>">
+
+<head>
+ <title><?php print $head_title; ?></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=8">
+ <meta name="author" content="Google">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, target-densitydpi=240">
+ <script src="//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
+ <style>
+ * {
+ font-family: sans-serif;
+ margin: 0;
+ padding: 0;
+ font-size: 27px;
+ line-height: 36px;
+ }
+ span {
+ padding: 15px;
+ border-top: 1px solid #ccc;
+ border-bottom: 3px solid #ccc;
+ background: #eee;
+ display: block;
+ }
+ * + span {
+ margin-top: 60px;
+ }
+ p, .button-link, ul,
+ .vert-item {
+ margin: 15px;
+ }
+ li {
+ margin-left: 30px;
+ list-style: disc;
+ }
+ span a {
+ display: block;
+ text-decoration: none;
+ font-weight: bold;
+ text-align: center;
+ background-color: #29549f;
+ color: #fff;
+ padding: 15px;
+ border-radius: 9px;
+ }
+ a.active {
+ background-color: #132648;
+ outline: 0;
+ }
+ </style>
+</head>
+
+<body id="<?php print $body_id; ?>" class="<?php print $body_classes; ?>">
+ <?php if ($content): ?>
+ <?php print $content; ?>
+ <?php endif; ?>
+ </div><!-- /page -->
+ <script>
+ $('a')
+ .bind('touchstart', function(e) {
+ $(this).addClass('active');
+ })
+ .bind('touchend touchcancel', function(e) {
+ $(this).removeClass('active');
+ });
+ </script>
+</body>
+</html>
@@ -0,0 +1 @@
+<?php print $rows; ?>
@@ -0,0 +1,3 @@
+<?php foreach ($fields as $id => $field): ?>
+ <<?php print $field->element_type; ?>><?php print $field->content; ?></<?php print $field->element_type; ?>>
+<?php endforeach; ?>

0 comments on commit 68b03c0

Please sign in to comment.