Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

refactored theme layout

  • Loading branch information...
commit 9e8e8fd830f6d4b08fae20fff674f72e94a19d65 1 parent 6f378e9
@michel authored
Showing with 33 additions and 65 deletions.
  1. BIN  .DS_Store
  2. +1 −36 interfacelift.gemspec
  3. BIN  lib/.DS_Store
  4. +4 −4 lib/installer.rb
  5. BIN  lib/templates/.DS_Store
  6. BIN  lib/templates/bright_admin/.DS_Store
  7. BIN  lib/templates/bright_admin/app/.DS_Store
  8. +12 −0 lib/templates/bright_admin/app/helpers/application_helper.rb
  9. +12 −21 lib/templates/bright_admin/{ → app/views}/layouts/application.html.haml
  10. BIN  lib/templates/bright_admin/public/.DS_Store
  11. 0  lib/templates/bright_admin/{ → public}/images/.DS_Store
  12. 0  lib/templates/bright_admin/{ → public}/images/add_icon.png
  13. 0  lib/templates/bright_admin/{ → public}/images/arrow_left.png
  14. 0  lib/templates/bright_admin/{ → public}/images/bg_btn.gif
  15. 0  lib/templates/bright_admin/{ → public}/images/edit_icon.png
  16. 0  lib/templates/bright_admin/{ → public}/images/file.gif
  17. 0  lib/templates/bright_admin/{ → public}/images/folder-closed.gif
  18. 0  lib/templates/bright_admin/{ → public}/images/folder.gif
  19. 0  lib/templates/bright_admin/{ → public}/images/hint.png
  20. 0  lib/templates/bright_admin/{ → public}/images/invert.png
  21. 0  lib/templates/bright_admin/{ → public}/images/loadingAnimation.gif
  22. 0  lib/templates/bright_admin/{ → public}/images/logout.png
  23. 0  lib/templates/bright_admin/{ → public}/images/minus.gif
  24. 0  lib/templates/bright_admin/{ → public}/images/plus.gif
  25. 0  lib/templates/bright_admin/{ → public}/images/rails.png
  26. 0  lib/templates/bright_admin/{ → public}/images/remove_icon.png
  27. 0  lib/templates/bright_admin/{ → public}/images/select_all.png
  28. 0  lib/templates/bright_admin/{ → public}/images/spinner.gif
  29. 0  lib/templates/bright_admin/{ → public}/images/tick.png
  30. 0  lib/templates/bright_admin/{ → public}/images/warning.png
  31. 0  lib/templates/bright_admin/{ → public}/javascripts/.DS_Store
  32. 0  lib/templates/bright_admin/{ → public}/javascripts/application.js
  33. 0  lib/templates/bright_admin/{ → public}/javascripts/controls.js
  34. 0  lib/templates/bright_admin/{ → public}/javascripts/dragdrop.js
  35. 0  lib/templates/bright_admin/{ → public}/javascripts/effects.js
  36. 0  lib/templates/bright_admin/{ → public}/javascripts/formfocus.js
  37. 0  lib/templates/bright_admin/{ → public}/javascripts/jquery-1.3.2.min.js
  38. 0  lib/templates/bright_admin/{ → public}/javascripts/jquery.form.js
  39. 0  lib/templates/bright_admin/{ → public}/javascripts/jquery.livequery.js
  40. 0  lib/templates/bright_admin/{ → public}/javascripts/prototype.js
  41. 0  lib/templates/bright_admin/{ → public}/stylesheets/bright_admin.css
  42. 0  lib/templates/bright_admin/{ → public}/stylesheets/formtastic.css
  43. 0  lib/templates/bright_admin/{ → public}/stylesheets/formtastic_changes.css
  44. 0  lib/templates/bright_admin/{ → public}/stylesheets/reset.css
  45. BIN  pkg/interfacelift-0.0.0.gem
  46. +4 −4 spec/installer_spec.rb
View
BIN  .DS_Store
Binary file not shown
View
37 interfacelift.gemspec
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Michel de Graaf"]
- s.date = %q{2009-10-23}
+ s.date = %q{2009-10-27}
s.default_executable = %q{interfacelift}
s.description = %q{Collection of cool layouts to use in your rails apps.}
s.email = %q{michel@re-invention.nl}
@@ -31,41 +31,6 @@ Gem::Specification.new do |s|
"lib/interfacelift.rb",
"lib/templates/.DS_Store",
"lib/templates/bright_admin/.DS_Store",
- "lib/templates/bright_admin/images/.DS_Store",
- "lib/templates/bright_admin/images/add_icon.png",
- "lib/templates/bright_admin/images/arrow_left.png",
- "lib/templates/bright_admin/images/bg_btn.gif",
- "lib/templates/bright_admin/images/edit_icon.png",
- "lib/templates/bright_admin/images/file.gif",
- "lib/templates/bright_admin/images/folder-closed.gif",
- "lib/templates/bright_admin/images/folder.gif",
- "lib/templates/bright_admin/images/hint.png",
- "lib/templates/bright_admin/images/invert.png",
- "lib/templates/bright_admin/images/loadingAnimation.gif",
- "lib/templates/bright_admin/images/logout.png",
- "lib/templates/bright_admin/images/minus.gif",
- "lib/templates/bright_admin/images/plus.gif",
- "lib/templates/bright_admin/images/rails.png",
- "lib/templates/bright_admin/images/remove_icon.png",
- "lib/templates/bright_admin/images/select_all.png",
- "lib/templates/bright_admin/images/spinner.gif",
- "lib/templates/bright_admin/images/tick.png",
- "lib/templates/bright_admin/images/warning.png",
- "lib/templates/bright_admin/javascripts/.DS_Store",
- "lib/templates/bright_admin/javascripts/application.js",
- "lib/templates/bright_admin/javascripts/controls.js",
- "lib/templates/bright_admin/javascripts/dragdrop.js",
- "lib/templates/bright_admin/javascripts/effects.js",
- "lib/templates/bright_admin/javascripts/formfocus.js",
- "lib/templates/bright_admin/javascripts/jquery-1.3.2.min.js",
- "lib/templates/bright_admin/javascripts/jquery.form.js",
- "lib/templates/bright_admin/javascripts/jquery.livequery.js",
- "lib/templates/bright_admin/javascripts/prototype.js",
- "lib/templates/bright_admin/layouts/application.html.haml",
- "lib/templates/bright_admin/stylesheets/bright_admin.css",
- "lib/templates/bright_admin/stylesheets/formtastic.css",
- "lib/templates/bright_admin/stylesheets/formtastic_changes.css",
- "lib/templates/bright_admin/stylesheets/reset.css",
"lib/templates/shared/.DS_Store",
"lib/templates/shared/icons/.DS_Store",
"lib/templates/shared/icons/diagona/.DS_Store",
View
BIN  lib/.DS_Store
Binary file not shown
View
8 lib/installer.rb
@@ -24,19 +24,19 @@ def install!
private
def install_images
- FileUtils.cp_r "#{@theme_path}/images","#{path}/public" if File.directory? "#{@theme_path}/images"
+ FileUtils.cp_r "#{@theme_path}/public/images","#{path}/public" if File.directory? "#{@theme_path}/public/images"
end
def install_stylesheets
- FileUtils.cp_r "#{@theme_path}/stylesheets","#{path}/public" if File.directory? "#{@theme_path}/stylesheets"
+ FileUtils.cp_r "#{@theme_path}/public/stylesheets","#{path}/public" if File.directory? "#{@theme_path}/public/stylesheets"
end
def install_layouts
- FileUtils.cp_r "#{@theme_path}/layouts","#{path}/app/views" if File.directory? "#{@theme_path}/layouts"
+ FileUtils.cp_r "#{@theme_path}/app/views/layouts","#{path}/app/views" if File.directory? "#{@theme_path}/views/layouts"
end
def install_javascript
- FileUtils.cp_r "#{@theme_path}/javascripts","#{path}/public" if File.directory? "#{@theme_path}/javascripts"
+ FileUtils.cp_r "#{@theme_path}/public/javascripts","#{path}/public" if File.directory? "#{@theme_path}/public/javascripts"
end
def install_shared
View
BIN  lib/templates/.DS_Store
Binary file not shown
View
BIN  lib/templates/bright_admin/.DS_Store
Binary file not shown
View
BIN  lib/templates/bright_admin/app/.DS_Store
Binary file not shown
View
12 lib/templates/bright_admin/app/helpers/application_helper.rb
@@ -0,0 +1,12 @@
+# Methods added to this helper will be available to all templates in the application.
+module ApplicationHelper
+
+ def dasboard_tab?
+ "current"
+ end
+
+ def on_tab_for?(controller)
+ params[:controller] == controller ? "current" : ""
+ end
+
+end
View
33 ...plates/bright_admin/layouts/application.html.haml → ...ght_admin/app/views/layouts/application.html.haml
@@ -2,7 +2,7 @@
%html{html_attrs}
%head
%meta{"http-equiv" => 'Content-Type', :content => 'text/html;charset=utf-8'}
- %title= h(@site_name || "Kabisa Admin")
+ %title= h(Settings.sitename || "Kabisa Admin")
%meta{ :name => "author", :content => "Michel de Graaf" }
%meta{ :name => "keywords", :content => "rails rumble" }
%meta{ :name => "description", :content => "rails rumble" }
@@ -21,36 +21,27 @@
#container
#header
#panel-top
- %h1#logo= link_to h(@site_name || "Kabisa Admin") , "/", :title => "Home"
+ %h1#logo= link_to h(Settings.sitename || "Kabisa Admin") , "/", :title => "Home"
#nav
%ul
- %li.current= link_to "Dashboard", "/"
- %li= link_to "pages", "#"
- %li= link_to "posts", "#"
- %li= link_to "comments", "#"
- %li= link_to "users", "#"
- %li= link_to "settings", "#"
-
+ %li{:class => dasboard_tab?}= link_to "Dashboard", "/"
#session
- %ul
- %li
- Logged in as
- %span.user= "Admin"
- %li.logout= "( #{link_to "Logout", "/logout"} )"
+ - if current_user
+ Logged in as
+ = link_to current_user.login, edit_user_path(current_user)
+ |
+ = link_to "Logout" , logout_path
+ - else
+ = link_to "login", login_path
.clear
#panel-middle
#subnav
%ul
- %li.current= link_to "Users", "/"
- %li= link_to "Customers", "/"
-
-
-
+ %li{:class => on_tab_for?("users") }= link_to "Users", users_path
#panel-bottom
#headline
- %h3= @page_title || params[:controller].capitalize
-
+ %h3= @page_title || params[:controller].humanize
#application
#flash
View
BIN  lib/templates/bright_admin/public/.DS_Store
Binary file not shown
View
0  lib/templates/bright_admin/images/.DS_Store → lib/templates/bright_admin/public/images/.DS_Store
File renamed without changes
View
0  lib/templates/bright_admin/images/add_icon.png → ...templates/bright_admin/public/images/add_icon.png
File renamed without changes
View
0  lib/templates/bright_admin/images/arrow_left.png → ...mplates/bright_admin/public/images/arrow_left.png
File renamed without changes
View
0  lib/templates/bright_admin/images/bg_btn.gif → lib/templates/bright_admin/public/images/bg_btn.gif
File renamed without changes
View
0  lib/templates/bright_admin/images/edit_icon.png → ...emplates/bright_admin/public/images/edit_icon.png
File renamed without changes
View
0  lib/templates/bright_admin/images/file.gif → lib/templates/bright_admin/public/images/file.gif
File renamed without changes
View
0  lib/templates/bright_admin/images/folder-closed.gif → ...ates/bright_admin/public/images/folder-closed.gif
File renamed without changes
View
0  lib/templates/bright_admin/images/folder.gif → lib/templates/bright_admin/public/images/folder.gif
File renamed without changes
View
0  lib/templates/bright_admin/images/hint.png → lib/templates/bright_admin/public/images/hint.png
File renamed without changes
View
0  lib/templates/bright_admin/images/invert.png → lib/templates/bright_admin/public/images/invert.png
File renamed without changes
View
0  ...emplates/bright_admin/images/loadingAnimation.gif → ...s/bright_admin/public/images/loadingAnimation.gif
File renamed without changes
View
0  lib/templates/bright_admin/images/logout.png → lib/templates/bright_admin/public/images/logout.png
File renamed without changes
View
0  lib/templates/bright_admin/images/minus.gif → lib/templates/bright_admin/public/images/minus.gif
File renamed without changes
View
0  lib/templates/bright_admin/images/plus.gif → lib/templates/bright_admin/public/images/plus.gif
File renamed without changes
View
0  lib/templates/bright_admin/images/rails.png → lib/templates/bright_admin/public/images/rails.png
File renamed without changes
View
0  lib/templates/bright_admin/images/remove_icon.png → ...plates/bright_admin/public/images/remove_icon.png
File renamed without changes
View
0  lib/templates/bright_admin/images/select_all.png → ...mplates/bright_admin/public/images/select_all.png
File renamed without changes
View
0  lib/templates/bright_admin/images/spinner.gif → lib/templates/bright_admin/public/images/spinner.gif
File renamed without changes
View
0  lib/templates/bright_admin/images/tick.png → lib/templates/bright_admin/public/images/tick.png
File renamed without changes
View
0  lib/templates/bright_admin/images/warning.png → lib/templates/bright_admin/public/images/warning.png
File renamed without changes
View
0  lib/templates/bright_admin/javascripts/.DS_Store → ...mplates/bright_admin/public/javascripts/.DS_Store
File renamed without changes
View
0  ...templates/bright_admin/javascripts/application.js → ...es/bright_admin/public/javascripts/application.js
File renamed without changes
View
0  lib/templates/bright_admin/javascripts/controls.js → ...lates/bright_admin/public/javascripts/controls.js
File renamed without changes
View
0  lib/templates/bright_admin/javascripts/dragdrop.js → ...lates/bright_admin/public/javascripts/dragdrop.js
File renamed without changes
View
0  lib/templates/bright_admin/javascripts/effects.js → ...plates/bright_admin/public/javascripts/effects.js
File renamed without changes
View
0  lib/templates/bright_admin/javascripts/formfocus.js → ...ates/bright_admin/public/javascripts/formfocus.js
File renamed without changes
View
0  ...ates/bright_admin/javascripts/jquery-1.3.2.min.js → ...ight_admin/public/javascripts/jquery-1.3.2.min.js
File renamed without changes
View
0  ...templates/bright_admin/javascripts/jquery.form.js → ...es/bright_admin/public/javascripts/jquery.form.js
File renamed without changes
View
0  ...ates/bright_admin/javascripts/jquery.livequery.js → ...ight_admin/public/javascripts/jquery.livequery.js
File renamed without changes
View
0  lib/templates/bright_admin/javascripts/prototype.js → ...ates/bright_admin/public/javascripts/prototype.js
File renamed without changes
View
0  ...mplates/bright_admin/stylesheets/bright_admin.css → .../bright_admin/public/stylesheets/bright_admin.css
File renamed without changes
View
0  ...templates/bright_admin/stylesheets/formtastic.css → ...es/bright_admin/public/stylesheets/formtastic.css
File renamed without changes
View
0  ...s/bright_admin/stylesheets/formtastic_changes.css → ...t_admin/public/stylesheets/formtastic_changes.css
File renamed without changes
View
0  lib/templates/bright_admin/stylesheets/reset.css → ...mplates/bright_admin/public/stylesheets/reset.css
File renamed without changes
View
BIN  pkg/interfacelift-0.0.0.gem
Binary file not shown
View
8 spec/installer_spec.rb
@@ -49,19 +49,19 @@ def valid_arguments
end
it "Should copy over existing images to the RAILS_ROOT/public folder" do
- FileUtils.should_receive(:cp_r).with("#{@theme_path}/images","#{@path}/public")
+ FileUtils.should_receive(:cp_r).with("#{@theme_path}/public/images","#{@path}/public")
end
it "Should copy over existing stylesheets to the RAILS_ROOT/public folder" do
- FileUtils.should_receive(:cp_r).with("#{@theme_path}/stylesheets","#{@path}/public")
+ FileUtils.should_receive(:cp_r).with("#{@theme_path}/public/stylesheets","#{@path}/public")
end
it "Should copy over templates to the RAILS_ROOT/app/views/layout folder" do
- FileUtils.should_receive(:cp_r).with("#{@theme_path}/layouts","#{@path}/app/views")
+ FileUtils.should_receive(:cp_r).with("#{@theme_path}/app/views/layouts","#{@path}/app/views")
end
it "Should copy over javascripts to the RAILS_ROOT/public folder" do
- FileUtils.should_receive(:cp_r).with("#{@theme_path}/javascripts","#{@path}/public")
+ FileUtils.should_receive(:cp_r).with("#{@theme_path}/public/javascripts","#{@path}/public")
end
it "Should copy over shared resources to the RAILS_ROOT/public folder" do
Please sign in to comment.
Something went wrong with that request. Please try again.