From f75f7e2ac49cc11b25931e8cf122f4b72ba108b5 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Thu, 3 Feb 2011 20:17:44 -0400 Subject: [PATCH] Added development requirements file --- apps/web_theme/media | 1 - apps/web_theme/media/LICENSE | 21 + apps/web_theme/media/README.md | 159 ++++++ apps/web_theme/media/Rakefile | 25 + apps/web_theme/media/VERSION | 1 + apps/web_theme/media/config/locales/de_de.yml | 15 + apps/web_theme/media/config/locales/pt_br.yml | 12 + .../features/step_definitions/layout_steps.rb | 59 +++ .../features/step_definitions/themed_steps.rb | 19 + apps/web_theme/media/features/support/env.rb | 86 ++++ .../media/features/theme_generator.feature | 55 ++ .../media/features/themed_generator.feature | 52 ++ apps/web_theme/media/images/avatar.png | Bin 0 -> 3214 bytes .../media/images/icons/application_edit.png | Bin 0 -> 703 bytes apps/web_theme/media/images/icons/cross.png | Bin 0 -> 655 bytes apps/web_theme/media/images/icons/key.png | Bin 0 -> 612 bytes apps/web_theme/media/images/icons/tick.png | Bin 0 -> 537 bytes apps/web_theme/media/index.html | 474 ++++++++++++++++++ .../media/javascripts/jquery-1.3.min.js | 19 + .../media/javascripts/jquery.localscroll.js | 104 ++++ .../media/javascripts/jquery.scrollTo.js | 150 ++++++ .../theme/templates/layout_admin.html.erb | 46 ++ .../theme/templates/layout_sign.html.erb | 15 + .../web_app_theme/theme/theme_generator.rb | 61 +++ .../themed/templates/view_edit.html.erb | 19 + .../themed/templates/view_form.html.erb | 14 + .../themed/templates/view_new.html.erb | 18 + .../themed/templates/view_show.html.erb | 25 + .../themed/templates/view_sidebar.html.erb | 13 + .../themed/templates/view_signin.html.erb | 36 ++ .../themed/templates/view_signup.html.erb | 52 ++ .../themed/templates/view_tables.html.erb | 54 ++ .../themed/templates/view_text.html.erb | 18 + .../web_app_theme/themed/themed_generator.rb | 137 +++++ apps/web_theme/media/lib/web_app_theme.rb | 2 + apps/web_theme/media/stylesheets/base.css | 410 +++++++++++++++ apps/web_theme/media/stylesheets/override.css | 1 + .../media/stylesheets/themes/amro/style.css | 357 +++++++++++++ .../stylesheets/themes/bec-green/style.css | 290 +++++++++++ .../media/stylesheets/themes/bec/style.css | 301 +++++++++++ .../media/stylesheets/themes/blue/style.css | 280 +++++++++++ .../themes/default/images/arrow.png | Bin 0 -> 2846 bytes .../default/images/boxbar-background.png | Bin 0 -> 2745 bytes .../images/button-background-active.png | Bin 0 -> 2766 bytes .../default/images/button-background.png | Bin 0 -> 2765 bytes .../default/images/menubar-background.png | Bin 0 -> 2750 bytes .../stylesheets/themes/default/style.css | 462 +++++++++++++++++ .../themes/djime-cerulean/style.css | 298 +++++++++++ .../stylesheets/themes/drastic-dark/style.css | 373 ++++++++++++++ .../stylesheets/themes/kathleene/style.css | 272 ++++++++++ .../media/stylesheets/themes/olive/style.css | 338 +++++++++++++ .../media/stylesheets/themes/orange/style.css | 263 ++++++++++ .../media/stylesheets/themes/red/style.css | 274 ++++++++++ .../themes/reidb-greenish/style.css | 301 +++++++++++ .../stylesheets/themes/warehouse/style.css | 391 +++++++++++++++ apps/web_theme/media/test/spec_helper.rb | 5 + .../media/test/themed_generator_spec.rb | 115 +++++ apps/web_theme/media/web-app-theme.gemspec | 97 ++++ requirements/development.txt | 7 + 59 files changed, 6596 insertions(+), 1 deletion(-) delete mode 160000 apps/web_theme/media create mode 100644 apps/web_theme/media/LICENSE create mode 100644 apps/web_theme/media/README.md create mode 100644 apps/web_theme/media/Rakefile create mode 100644 apps/web_theme/media/VERSION create mode 100644 apps/web_theme/media/config/locales/de_de.yml create mode 100644 apps/web_theme/media/config/locales/pt_br.yml create mode 100644 apps/web_theme/media/features/step_definitions/layout_steps.rb create mode 100644 apps/web_theme/media/features/step_definitions/themed_steps.rb create mode 100644 apps/web_theme/media/features/support/env.rb create mode 100644 apps/web_theme/media/features/theme_generator.feature create mode 100644 apps/web_theme/media/features/themed_generator.feature create mode 100644 apps/web_theme/media/images/avatar.png create mode 100755 apps/web_theme/media/images/icons/application_edit.png create mode 100755 apps/web_theme/media/images/icons/cross.png create mode 100755 apps/web_theme/media/images/icons/key.png create mode 100755 apps/web_theme/media/images/icons/tick.png create mode 100644 apps/web_theme/media/index.html create mode 100644 apps/web_theme/media/javascripts/jquery-1.3.min.js create mode 100755 apps/web_theme/media/javascripts/jquery.localscroll.js create mode 100755 apps/web_theme/media/javascripts/jquery.scrollTo.js create mode 100644 apps/web_theme/media/lib/generators/web_app_theme/theme/templates/layout_admin.html.erb create mode 100644 apps/web_theme/media/lib/generators/web_app_theme/theme/templates/layout_sign.html.erb create mode 100644 apps/web_theme/media/lib/generators/web_app_theme/theme/theme_generator.rb create mode 100644 apps/web_theme/media/lib/generators/web_app_theme/themed/templates/view_edit.html.erb create mode 100644 apps/web_theme/media/lib/generators/web_app_theme/themed/templates/view_form.html.erb create mode 100644 apps/web_theme/media/lib/generators/web_app_theme/themed/templates/view_new.html.erb create mode 100644 apps/web_theme/media/lib/generators/web_app_theme/themed/templates/view_show.html.erb create mode 100644 apps/web_theme/media/lib/generators/web_app_theme/themed/templates/view_sidebar.html.erb create mode 100644 apps/web_theme/media/lib/generators/web_app_theme/themed/templates/view_signin.html.erb create mode 100644 apps/web_theme/media/lib/generators/web_app_theme/themed/templates/view_signup.html.erb create mode 100644 apps/web_theme/media/lib/generators/web_app_theme/themed/templates/view_tables.html.erb create mode 100644 apps/web_theme/media/lib/generators/web_app_theme/themed/templates/view_text.html.erb create mode 100644 apps/web_theme/media/lib/generators/web_app_theme/themed/themed_generator.rb create mode 100644 apps/web_theme/media/lib/web_app_theme.rb create mode 100644 apps/web_theme/media/stylesheets/base.css create mode 100644 apps/web_theme/media/stylesheets/override.css create mode 100644 apps/web_theme/media/stylesheets/themes/amro/style.css create mode 100644 apps/web_theme/media/stylesheets/themes/bec-green/style.css create mode 100644 apps/web_theme/media/stylesheets/themes/bec/style.css create mode 100644 apps/web_theme/media/stylesheets/themes/blue/style.css create mode 100644 apps/web_theme/media/stylesheets/themes/default/images/arrow.png create mode 100644 apps/web_theme/media/stylesheets/themes/default/images/boxbar-background.png create mode 100644 apps/web_theme/media/stylesheets/themes/default/images/button-background-active.png create mode 100644 apps/web_theme/media/stylesheets/themes/default/images/button-background.png create mode 100644 apps/web_theme/media/stylesheets/themes/default/images/menubar-background.png create mode 100644 apps/web_theme/media/stylesheets/themes/default/style.css create mode 100644 apps/web_theme/media/stylesheets/themes/djime-cerulean/style.css create mode 100644 apps/web_theme/media/stylesheets/themes/drastic-dark/style.css create mode 100644 apps/web_theme/media/stylesheets/themes/kathleene/style.css create mode 100644 apps/web_theme/media/stylesheets/themes/olive/style.css create mode 100644 apps/web_theme/media/stylesheets/themes/orange/style.css create mode 100644 apps/web_theme/media/stylesheets/themes/red/style.css create mode 100644 apps/web_theme/media/stylesheets/themes/reidb-greenish/style.css create mode 100644 apps/web_theme/media/stylesheets/themes/warehouse/style.css create mode 100644 apps/web_theme/media/test/spec_helper.rb create mode 100644 apps/web_theme/media/test/themed_generator_spec.rb create mode 100644 apps/web_theme/media/web-app-theme.gemspec create mode 100644 requirements/development.txt diff --git a/apps/web_theme/media b/apps/web_theme/media deleted file mode 160000 index c4159791f9..0000000000 --- a/apps/web_theme/media +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c4159791f935311e800303a80e7deef0e7b99d21 diff --git a/apps/web_theme/media/LICENSE b/apps/web_theme/media/LICENSE new file mode 100644 index 0000000000..886955c85a --- /dev/null +++ b/apps/web_theme/media/LICENSE @@ -0,0 +1,21 @@ +== MIT License + +Copyright (c) 2009, Andrea Franz - (http://gravityblast.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/apps/web_theme/media/README.md b/apps/web_theme/media/README.md new file mode 100644 index 0000000000..0946094ea9 --- /dev/null +++ b/apps/web_theme/media/README.md @@ -0,0 +1,159 @@ +Web App Theme +============= + +Web App Theme is a rails generator by [Andrea Franz](http://gravityblast.com) that you can use to generate admin panels quickly. +Inspired by cool themes like [Lighthouse](http://lighthouseapp.com/), [Basecamp](http://basecamphq.com/), [RadiantCMS](http://radiantcms.org/) and others, +it wants to be an idea to start developing a complete web application layout. + +Installation +------------ + +You can use web-app-theme >= 0.6.2 with Rails 3. If you want to use it with rails 2, use web-app-theme 0.5.3 +Specify the web-app-theme gem in your Gemfile, only for :development and :test + + group :development, :test do + gem 'web-app-theme', '>= 0.6.2' + end + +Usage +----- + +### Theme Generator + +Used without parameters, it generates the layout inside the application.html.erb file using the default theme. + + rails g web_app_theme:theme + +You can specify the layout file name in the first parameter: + + rails g web_app_theme:theme admin # it will generate a layout called `admin.html.erb` + +If you want to use another theme, instead of the default, you can use the `--theme` option: + + rails g web_app_theme:theme admin --theme="drastic-dark" + +You can specify the template engine with `--engine=name` option, where name can be erb (default) or haml: + + rails g web_app_theme:theme --engine=haml # you must specify haml in your Gemfile + +If you want to generate the stylesheets of a specific theme without changing the previously generated layout you can pass the `--no-layout` option: + + rails g web_app_theme:theme --theme=bec --no-layout + + +You can specify the text used in the header with the `--app-name` option: + + rails g web_app_theme:theme --app-name="My New Application" + +If you need a layout for login and signup pages, you can use the `--type` option with `sign` as value. Ìf not specified, the default value is `administration` + + rails g web_app_theme:theme sign --layout-type=sign + +### Themed Generator + +Start creating your controllers manually or with a scaffold, and then use the `themed generator` to overwrite the previously generated views. + +If you have a controller named like the plural of the used model you can specify just the first parameter: + + rails g web_app_theme:themed posts # you have a model named Post and a controller named PostsController + + rails g web_app_theme:themed admin/gallery_pictures # you have a model named GalleryPicture and a controller named Admin::GalleryPicturesController + +Use the `--layout` option specifying the previously generated layout to add a link to the controller you are working on: + + rails g web_app_theme:themed posts --layout=admin # you will see the `Posts` link in the navigation + +If the controller has a name different to the model used, specify the controller path in the first parameter and the model name in the second one: + + rails g web_app_theme:themed items post + + rails g web_app_theme:themed admin/items post + +If you use `will_paginate` for pagination use the `--will-paginate`: + + rails g web_app_theme:themed items post --will-paginate + +You can specify the template engine with `--engine=name` option, where name can be erb (default) or haml: + + rails g web_app_theme:themed posts --engine=haml + +If you have something like `map.resource :dashboard` in your `routes.rb` file, you can use the `--type=text` to generate a view with just text: + + rails g web_app_theme:themed dashboards --themed-type=text + +If you want to show form error messages inside the generated forms, use the following code inside your `environment.rb` + + ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| + if html_tag =~ /