Includes dashboard controller, route, helper, and views
---
 src/app/controllers/dashboard_controller.rb |   32 +++++++++++++++++++++++++++
 src/app/helpers/dashboard_helper.rb         |   22 ++++++++++++++++++
 src/app/views/dashboard/show.html.erb       |    1 +
 src/config/routes.rb                        |    3 +-
 4 files changed, 57 insertions(+), 1 deletions(-)
 create mode 100644 src/app/controllers/dashboard_controller.rb
 create mode 100644 src/app/helpers/dashboard_helper.rb
 create mode 100644 src/app/views/dashboard/show.html.erb

diff --git a/src/app/controllers/dashboard_controller.rb 
b/src/app/controllers/dashboard_controller.rb
new file mode 100644
index 0000000..aa6c67b
--- /dev/null
+++ b/src/app/controllers/dashboard_controller.rb
@@ -0,0 +1,32 @@
+#
+# Copyright (C) 2009 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA  02110-1301, USA.  A copy of the GNU General Public License is
+# also available at http://www.gnu.org/copyleft/gpl.html.
+
+# Filters added to this controller apply to all controllers in the application.
+# Likewise, all the methods added will be available for all controllers.
+
+class DashboardController < ApplicationController
+  before_filter :require_user
+
+  def index
+    redirect_to :action => 'show'
+  end
+
+  def show
+  end
+
+end
diff --git a/src/app/helpers/dashboard_helper.rb 
b/src/app/helpers/dashboard_helper.rb
new file mode 100644
index 0000000..a56bad4
--- /dev/null
+++ b/src/app/helpers/dashboard_helper.rb
@@ -0,0 +1,22 @@
+# Copyright (C) 2010 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA  02110-1301, USA.  A copy of the GNU General Public License is
+# also available at http://www.gnu.org/copyleft/gpl.html.
+
+# Filters added to this controller apply to all controllers in the application.
+# Likewise, all the methods added will be available for all controllers.
+
+module DashboardHelper
+end
diff --git a/src/app/views/dashboard/show.html.erb 
b/src/app/views/dashboard/show.html.erb
new file mode 100644
index 0000000..dcabf8f
--- /dev/null
+++ b/src/app/views/dashboard/show.html.erb
@@ -0,0 +1 @@
+Dashboard
diff --git a/src/config/routes.rb b/src/config/routes.rb
index 4a304ca..b51c1bc 100644
--- a/src/config/routes.rb
+++ b/src/config/routes.rb
@@ -43,6 +43,7 @@ ActionController::Routing::Routes.draw do |map|
   map.register 'register', :controller => 'users', :action => 'new'
   map.resource :account, :controller => "users"
   map.resources :users
+  map.resource :dashboard, :controller => 'dashboard'
   map.root  :login
 
   # Temporarily disable this route, provider stuff is not restful yet.
@@ -56,4 +57,4 @@ ActionController::Routing::Routes.draw do |map|
   # Install the default route as the lowest priority.
   map.connect ':controller/:action/:id.:format'
   map.connect ':controller/:action/:id'
-end
\ No newline at end of file
+end
-- 
1.6.2.5

_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to