diff --git a/app/assets/stylesheets/application.css.erb b/app/assets/stylesheets/application.css.erb
index 89b95e5..5742cf7 100644
--- a/app/assets/stylesheets/application.css.erb
+++ b/app/assets/stylesheets/application.css.erb
@@ -1,19 +1,23 @@
/*
- * This is a manifest file that'll automatically include all the stylesheets available in this directory
- * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
- * the top of the compiled file, but it's generally better to create a new file per style scope.
- *= require web-app-theme/base
- *= require web-app-theme/themes/default/style.css
- *= require active_scaffold
- *= require_self
+* This is a manifest file that'll automatically include all the stylesheets available in this directory
+* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
+* the top of the compiled file, but it's generally better to create a new file per style scope.
+*= require web-app-theme/base
+*= require web-app-theme/themes/default/style.css
+*= require active_scaffold
+*= require_self
*/
#main .block .content h2 {
- margin-left: 0;
+ margin-left: 0;
}
#main .block .content .active-scaffold-header h2 {
- font-size: 200%;
+ font-size: 200%;
+}
+
+#main .active-scaffold th a {
+ text-shadow: none;
}
.flash .alert {
diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb
new file mode 100644
index 0000000..391fa2e
--- /dev/null
+++ b/app/controllers/dashboard_controller.rb
@@ -0,0 +1,4 @@
+class DashboardController < ApplicationController
+ def index
+ end
+end
diff --git a/app/controllers/domains_controller.rb b/app/controllers/domains_controller.rb
index fdbb737..578d937 100644
--- a/app/controllers/domains_controller.rb
+++ b/app/controllers/domains_controller.rb
@@ -1,4 +1,5 @@
class DomainsController < ApplicationController
active_scaffold :domain do |conf|
+ conf.columns = [:name, :master, :last_check, :type, :notified_serial, :account]
end
end
diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb
new file mode 100644
index 0000000..813c214
--- /dev/null
+++ b/app/controllers/home_controller.rb
@@ -0,0 +1,8 @@
+class HomeController < ApplicationController
+ skip_before_filter :authenticate_user!
+ layout 'home'
+
+ def index
+ redirect_to dashboard_path if user_signed_in?
+ end
+end
diff --git a/app/controllers/records_controller.rb b/app/controllers/records_controller.rb
index e670c17..8aa611a 100644
--- a/app/controllers/records_controller.rb
+++ b/app/controllers/records_controller.rb
@@ -1,4 +1,5 @@
class RecordsController < ApplicationController
active_scaffold :record do |conf|
+ conf.columns = [:name, :type, :content, :ttl, :prio, :change_date]
end
end
diff --git a/app/controllers/supermasters_controller.rb b/app/controllers/supermasters_controller.rb
index 156bc03..47930e3 100644
--- a/app/controllers/supermasters_controller.rb
+++ b/app/controllers/supermasters_controller.rb
@@ -1,4 +1,5 @@
class SupermastersController < ApplicationController
active_scaffold :supermaster do |conf|
+ conf.columns = [:nameserver, :account]
end
end
diff --git a/app/helpers/dashboard_helper.rb b/app/helpers/dashboard_helper.rb
new file mode 100644
index 0000000..a94ddfc
--- /dev/null
+++ b/app/helpers/dashboard_helper.rb
@@ -0,0 +1,2 @@
+module DashboardHelper
+end
diff --git a/app/helpers/home_helper.rb b/app/helpers/home_helper.rb
new file mode 100644
index 0000000..23de56a
--- /dev/null
+++ b/app/helpers/home_helper.rb
@@ -0,0 +1,2 @@
+module HomeHelper
+end
diff --git a/app/views/dashboard/index.html.erb b/app/views/dashboard/index.html.erb
new file mode 100644
index 0000000..61c6e44
--- /dev/null
+++ b/app/views/dashboard/index.html.erb
@@ -0,0 +1 @@
+Some dashboard here
\ No newline at end of file
diff --git a/app/views/fragments/_sidebar.html.erb b/app/views/fragments/_sidebar.html.erb
index 14c97d3..984ab5c 100644
--- a/app/views/fragments/_sidebar.html.erb
+++ b/app/views/fragments/_sidebar.html.erb
@@ -3,6 +3,7 @@
Menu
+ - <%= link_to 'Dashboard', dashboard_path, :data => {:pjax => '#main'} %>
- <%= link_to 'Domains', domains_path, :data => {:pjax => '#main'} %>
- <%= link_to 'Records', records_path, :data => {:pjax => '#main'} %>
- <%= link_to 'Supermasters', supermasters_path, :data => {:pjax => '#main'} %>
diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb
new file mode 100644
index 0000000..e4ab5f3
--- /dev/null
+++ b/app/views/home/index.html.erb
@@ -0,0 +1,15 @@
+Marketing ...
+
+
+ Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium
+ doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore
+ veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam
+ voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur
+ magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam
+ est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed
+ quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam
+ quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam
+ corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis
+ autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil
+ molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?
+
\ No newline at end of file
diff --git a/app/views/layouts/home.html.erb b/app/views/layouts/home.html.erb
new file mode 100644
index 0000000..16a2907
--- /dev/null
+++ b/app/views/layouts/home.html.erb
@@ -0,0 +1,21 @@
+
+
+
+ Simple DNS
+ <%= stylesheet_link_tag "application" %>
+ <%= javascript_include_tag "application" %>
+ <%= csrf_meta_tag %>
+
+
+
+
+ <%= render :partial => 'fragments/top' %>
+
+ <%= flash_display 'flash' %>
+ <%= yield %>
+
+ <%= render :partial => 'fragments/bottom' %>
+
+
+
+
diff --git a/config/routes.rb b/config/routes.rb
index 5ce3ff6..52be5e4 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -12,7 +12,9 @@ Simpledns::Application.routes.draw do
as_routes
end
- root :to => lambda { |env| [200, {'Content-Type' => 'text/plain'}, ["Hello world!"]] }
+ get '/dashboard', :to => 'dashboard#index', :as => :dashboard
+
+ root :to => 'home#index'
# The priority is based upon order of creation:
# first created -> highest priority.
diff --git a/spec/controllers/dashboard_controller_spec.rb b/spec/controllers/dashboard_controller_spec.rb
new file mode 100644
index 0000000..4afb3a6
--- /dev/null
+++ b/spec/controllers/dashboard_controller_spec.rb
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe DashboardController do
+
+end
diff --git a/spec/controllers/home_controller_spec.rb b/spec/controllers/home_controller_spec.rb
new file mode 100644
index 0000000..9d48b6a
--- /dev/null
+++ b/spec/controllers/home_controller_spec.rb
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe HomeController do
+
+end
diff --git a/spec/helpers/dashboard_helper_spec.rb b/spec/helpers/dashboard_helper_spec.rb
new file mode 100644
index 0000000..fe34307
--- /dev/null
+++ b/spec/helpers/dashboard_helper_spec.rb
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the DashboardHelper. For example:
+#
+# describe DashboardHelper do
+# describe "string concat" do
+# it "concats two strings with spaces" do
+# helper.concat_strings("this","that").should == "this that"
+# end
+# end
+# end
+describe DashboardHelper do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/helpers/home_helper_spec.rb b/spec/helpers/home_helper_spec.rb
new file mode 100644
index 0000000..4a37633
--- /dev/null
+++ b/spec/helpers/home_helper_spec.rb
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the HomeHelper. For example:
+#
+# describe HomeHelper do
+# describe "string concat" do
+# it "concats two strings with spaces" do
+# helper.concat_strings("this","that").should == "this that"
+# end
+# end
+# end
+describe HomeHelper do
+ pending "add some examples to (or delete) #{__FILE__}"
+end