-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Winton Welsh
committed
Jul 1, 2008
1 parent
f96d0b7
commit 43311cd
Showing
37 changed files
with
4,148 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
require 'admin' | ||
require 'admin' | ||
|
||
ActionView::Base.send :include, Admin::Helpers | ||
ActionController::Base.send :include, Admin::Actions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
Dir[File.expand_path('*/*.rb', File.dirname(__FILE__))].each do |f| | ||
require [ File.dirname(f), File.basename(f, '.rb') ].join('/') | ||
end | ||
|
||
module Admin | ||
class << self | ||
def routes | ||
ActionController::Routing::Routes.add_route '/admin/:action/:id', :controller => 'admin' | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,34 @@ | ||
module AdminActions | ||
module Admin | ||
module Actions | ||
|
||
def self.included(base) | ||
base.extend ClassMethods | ||
end | ||
|
||
module ClassMethods | ||
def acts_as_admin(*actions) | ||
self.class_eval do | ||
cattr_accessor :admin_sections | ||
helper_method :admin_sections | ||
self.admin_sections = actions | ||
|
||
actions.each do |action| | ||
define_method action do | ||
@title ||= [ 'Admin' ] | ||
@title << action.to_s.capitalize.gsub('_', '') | ||
render :layout => false | ||
end | ||
end | ||
end | ||
include Admin::Actions::InstanceMethods | ||
end | ||
end | ||
|
||
module InstanceMethods | ||
def index | ||
@title ||= [ 'Admin' ] | ||
render :layout => 'admin/system/layout' | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
module AdminHelpers | ||
module Admin | ||
module Helpers | ||
end | ||
end |
Binary file renamed
BIN
+2.77 KB
resources/images/icons/sort/up.png → resources/images/bg/dark_header.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file renamed
BIN
+2.78 KB
resources/images/bg/left_selected.png → resources/images/bg/nav_header.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file renamed
BIN
+2.77 KB
resources/images/icons/sort/down.png → resources/images/bg/table_header.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
body | ||
:font-family Helvetica, Arial, sans-serif | ||
:margin 0px | ||
:color #6F687A | ||
|
||
.row | ||
:overflow hidden | ||
.parent | ||
:float left | ||
:display block | ||
|
||
#top | ||
:height 150px | ||
:background-color #101D40 | ||
:background-image url('/images/admin/system/bg/top.jpg') | ||
:background-repeat no-repeat | ||
:background-position top center | ||
.content | ||
:width 970px | ||
:margin 0px auto | ||
:padding 112px 0px 0px | ||
|
||
#top2 | ||
:height 35px | ||
:border-top 1px solid #F5F6F9 | ||
:background #ACBCCF url('/images/admin/system/bg/top2.png') | ||
|
||
#top3 | ||
:height 100px | ||
:background #F5F6F9 url('/images/admin/system/bg/top3.png') | ||
.content | ||
:width 970px | ||
:margin 0px auto | ||
:padding-top 14px | ||
.system_status1 .cell | ||
:padding-top 15px | ||
:color #26416E | ||
:font-size 16px | ||
:font-weight bold | ||
.system_status2 .cell | ||
:padding 11px 0px 0px 15px | ||
:line-height 24px | ||
:font-size 14px | ||
|
||
#content | ||
.content | ||
:width 970px | ||
:margin 0px auto | ||
:padding-top 15px | ||
.box | ||
.blue, .light_blue, .grey, .orange, .table_rows_cell | ||
:font-size 12px | ||
:padding-left 10px | ||
.blue, .light_blue, .grey, .orange | ||
:height 25px | ||
:line-height 25px | ||
.blue, .light_blue, .orange | ||
:font-weight bold | ||
.blue | ||
:background #F5F6F9 url('/images/admin/system/bg/nav_header.png') | ||
:color #fff | ||
.light_blue | ||
:background #F5F6F9 url('/images/admin/system/bg/table_header_blue.png') | ||
:color #fff | ||
.grey | ||
:border-left 1px solid #CBCFD6 | ||
:border-right 1px solid #CBCFD6 | ||
.orange | ||
:background #F5F6F9 url('/images/admin/system/bg/table_header_orange.png') | ||
:color #fff | ||
.nav | ||
.blue | ||
:font-size 13px | ||
.grey, .light_blue, .orange | ||
:cursor pointer | ||
.grey | ||
:background #F5F6F9 url('/images/admin/system/bg/nav.png') | ||
.table | ||
.grey | ||
:background #F5F6F9 url('/images/admin/system/bg/table_header.png') | ||
:font-weight bold | ||
:font-size 13px | ||
.zebra .table_rows_cell | ||
:background #F1F4F9 | ||
.zebra_orange .table_rows_cell | ||
:background #F9F6F0 | ||
.table_rows | ||
.table_rows_cell | ||
:height 24px | ||
:line-height 24px | ||
:border-right 1px solid #CCCFD7 | ||
:border-bottom 1px solid #CCCFD7 | ||
.table_rows0 .cell | ||
:border-left 1px solid #CCCFD7 | ||
.indicator | ||
:float right | ||
:padding 4px 5px 0px 0px | ||
:line-height 0px | ||
:opacity 0 | ||
.body1 .body_cell | ||
:padding-left 15px |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
!!! Strict | ||
%html | ||
%head | ||
%title= @title.join(' - ') | ||
- stylesheets 'admin/system/base' | ||
= stylesheets | ||
%body | ||
#top | ||
.content= image_tag 'admin/system/title.png' | ||
#top2 | ||
#top3 | ||
.content | ||
- tbl :row, :system_status, :px, 75, 115, 780 do | ||
- tbl :cell, :system_status do | ||
= image_tag 'admin/system/system_status.png' | ||
- tbl :cell, :system_status do | ||
System status | ||
- tbl :cell, :system_status do | ||
You’ll be happy to know that your | ||
%b 3 mongrels (2 production, 1 staging) | ||
are running at | ||
%b 3% of capacity. | ||
%br/ | ||
You had | ||
%b 10 sign ups, 1234 unique hits, | ||
and | ||
%b 10 account cancellations | ||
in the past 24 hours. | ||
#content | ||
.content | ||
- tbl :row, :body, :px, 190, 780 do | ||
- tbl :cell, :body do | ||
= widget :admin, :nav | ||
- tbl :cell, :body do | ||
- widget :admin, :table, :dependencies_only => true | ||
= yield | ||
- javascripts 'admin/system/base' | ||
= javascripts |
Oops, something went wrong.