Browse Source

home, dashboard

pull/1/head
Nicolae Claudius 13 years ago
parent
commit
ca72bc9458
  1. 22
      app/assets/stylesheets/application.css.erb
  2. 4
      app/controllers/dashboard_controller.rb
  3. 1
      app/controllers/domains_controller.rb
  4. 8
      app/controllers/home_controller.rb
  5. 1
      app/controllers/records_controller.rb
  6. 1
      app/controllers/supermasters_controller.rb
  7. 2
      app/helpers/dashboard_helper.rb
  8. 2
      app/helpers/home_helper.rb
  9. 1
      app/views/dashboard/index.html.erb
  10. 1
      app/views/fragments/_sidebar.html.erb
  11. 15
      app/views/home/index.html.erb
  12. 21
      app/views/layouts/home.html.erb
  13. 4
      config/routes.rb
  14. 5
      spec/controllers/dashboard_controller_spec.rb
  15. 5
      spec/controllers/home_controller_spec.rb
  16. 15
      spec/helpers/dashboard_helper_spec.rb
  17. 15
      spec/helpers/home_helper_spec.rb

22
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 {

4
app/controllers/dashboard_controller.rb

@ -0,0 +1,4 @@
class DashboardController < ApplicationController
def index
end
end

1
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

8
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

1
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

1
app/controllers/supermasters_controller.rb

@ -1,4 +1,5 @@
class SupermastersController < ApplicationController
active_scaffold :supermaster do |conf|
conf.columns = [:nameserver, :account]
end
end

2
app/helpers/dashboard_helper.rb

@ -0,0 +1,2 @@
module DashboardHelper
end

2
app/helpers/home_helper.rb

@ -0,0 +1,2 @@
module HomeHelper
end

1
app/views/dashboard/index.html.erb

@ -0,0 +1 @@
Some dashboard here

1
app/views/fragments/_sidebar.html.erb

@ -3,6 +3,7 @@
<div class="block">
<h3>Menu</h3>
<ul class="navigation">
<li><%= link_to 'Dashboard', dashboard_path, :data => {:pjax => '#main'} %></li>
<li><%= link_to 'Domains', domains_path, :data => {:pjax => '#main'} %></li>
<li><%= link_to 'Records', records_path, :data => {:pjax => '#main'} %></li>
<li><%= link_to 'Supermasters', supermasters_path, :data => {:pjax => '#main'} %></li>

15
app/views/home/index.html.erb

@ -0,0 +1,15 @@
<p>Marketing ...</p>
<p>
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?
</p>

21
app/views/layouts/home.html.erb

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<title>Simple DNS</title>
<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tag %>
</head>
<body>
<div id="container">
<%= render :partial => 'fragments/top' %>
<div id="wrapper" class="wat-cf">
<%= flash_display 'flash' %>
<%= yield %>
</div>
<%= render :partial => 'fragments/bottom' %>
</div>
</body>
</html>

4
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.

5
spec/controllers/dashboard_controller_spec.rb

@ -0,0 +1,5 @@
require 'spec_helper'
describe DashboardController do
end

5
spec/controllers/home_controller_spec.rb

@ -0,0 +1,5 @@
require 'spec_helper'
describe HomeController do
end

15
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

15
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
Loading…
Cancel
Save