rules_view 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +53 -26
- data/VERSION +1 -1
- data/app/views/layouts/rules_view.html.erb +15 -22
- data/generators/install_generator.rb +18 -2
- data/generators/layout_generator.rb +2 -2
- data/generators/manifests/rules_view_install.rb +50 -0
- data/generators/manifests/{application.yml → rules_view_install.yml} +0 -0
- data/generators/manifests/{layout.rb → rules_view_layout.rb} +1 -1
- data/generators/manifests/{layout.yml → rules_view_layout.yml} +0 -0
- data/generators/manifests/templates/app/views/layouts/rules_view_layout.html.erb +19 -27
- data/generators/manifests/templates/doc/README.rules_view +30 -0
- data/generators/manifests/templates/public/javascripts/rules_view/{re_view.js → rules_view.js} +0 -0
- data/lib/rules_view/defer.rb +7 -0
- data/spec/lib/rules_view/defer_spec.rb +19 -0
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/Gemfile +3 -2
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/README +0 -0
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/Rakefile +1 -1
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/app/controllers/application_controller.rb +0 -0
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/app/helpers/application_helper.rb +0 -0
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/app/views/layouts/application.html.erb +1 -1
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/autotest/discover.rb +0 -0
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/config/application.rb +1 -1
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/config/boot.rb +0 -0
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/config/database.yml +0 -0
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/config/environment.rb +1 -1
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/config/environments/development.rb +1 -1
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/config/environments/production.rb +1 -1
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/config/environments/test.rb +1 -1
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/config/initializers/backtrace_silencers.rb +0 -0
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/config/initializers/inflections.rb +0 -0
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/config/initializers/mime_types.rb +0 -0
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/config/initializers/secret_token.rb +1 -1
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/config/initializers/session_store.rb +2 -2
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/config/locales/en.yml +0 -0
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/config/routes.rb +1 -1
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/config.ru +1 -1
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/db/seeds.rb +0 -0
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/doc/README_FOR_APP +0 -0
- data/spec/{rails_3_0_0_root/lib/tasks/.gitkeep → rails_3_0_1_root/log/development.log} +0 -0
- data/spec/{rails_3_0_0_root/public/favicon.ico → rails_3_0_1_root/log/production.log} +0 -0
- data/spec/{rails_3_0_0_root/public/stylesheets/.gitkeep → rails_3_0_1_root/log/server.log} +0 -0
- data/spec/rails_3_0_1_root/log/test.log +145 -0
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/public/404.html +0 -0
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/public/422.html +0 -0
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/public/500.html +0 -0
- data/spec/{rails_3_0_0_root/vendor/plugins/.gitkeep → rails_3_0_1_root/public/favicon.ico} +0 -0
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/public/images/rails.png +0 -0
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/public/index.html +0 -0
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/public/javascripts/application.js +0 -0
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/public/javascripts/controls.js +0 -0
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/public/javascripts/dragdrop.js +0 -0
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/public/javascripts/effects.js +0 -0
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/public/javascripts/prototype.js +0 -0
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/public/javascripts/rails.js +0 -0
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/public/robots.txt +0 -0
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/script/rails +0 -0
- data/spec/{rails_3_0_0_root → rails_3_0_1_root}/spec/spec_helper.rb +0 -0
- data/spec/spec_helper.rb +1 -1
- data/tasks/rspec.rake +10 -10
- metadata +116 -135
- data/.document +0 -5
- data/.gitignore +0 -21
- data/Rakefile +0 -47
- data/generators/manifests/application.rb +0 -116
- data/generators/manifests/templates/public/javascripts/rules_view/jquery-1.4.2.min.js +0 -154
- data/generators/manifests/templates/public/javascripts/rules_view/jquery.autocomplete.pack.js +0 -13
- data/generators/manifests/templates/public/javascripts/rules_view/jquery.blockUI.js +0 -486
- data/generators/manifests/templates/public/javascripts/rules_view/jquery.fancybox-1.3.1.js +0 -1077
- data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/ie.css +0 -35
- data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/buttons/icons/cross.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/buttons/icons/key.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/buttons/icons/tick.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/buttons/readme.txt +0 -32
- data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/buttons/screen.css +0 -97
- data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/fancy-type/readme.txt +0 -14
- data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/fancy-type/screen.css +0 -71
- data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/doc.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/email.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/external.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/feed.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/im.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/pdf.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/visited.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/xls.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/readme.txt +0 -18
- data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/screen.css +0 -40
- data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/rtl/readme.txt +0 -10
- data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/rtl/screen.css +0 -110
- data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/print.css +0 -29
- data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/screen.css +0 -258
- data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/src/forms.css +0 -65
- data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/src/grid.css +0 -280
- data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/src/grid.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/src/ie.css +0 -76
- data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/src/print.css +0 -85
- data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/src/reset.css +0 -45
- data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/src/typography.css +0 -106
- data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/blank.gif +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_close.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_loading.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_nav_left.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_nav_right.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_e.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_n.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_ne.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_nw.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_s.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_se.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_sw.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_w.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_title_left.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_title_main.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_title_over.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_title_right.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancybox-x.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancybox-y.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancybox.png +0 -0
- data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/jquery.fancybox-1.3.1.css +0 -363
- data/generators/manifests/templates/public/stylesheets/rules_view/jquery.autocomplete.css +0 -53
- data/rules_view.gemspec +0 -239
- data/spec/rails_3_0_0_root/.gitignore +0 -4
- data/spec/rails_3_0_0_root/.rspec +0 -1
- data/spec/rails_3_0_0_root/Gemfile.lock +0 -101
data/README.textile
CHANGED
@@ -1,31 +1,53 @@
|
|
1
|
-
|
1
|
+
h1. rules_view
|
2
2
|
|
3
3
|
To add the rules view to you application
|
4
|
+
|
5
|
+
<pre>
|
4
6
|
> script/rails generate rules_view:install
|
5
7
|
|
8
|
+
> mkdir public/javascripts/jquery
|
9
|
+
> curl http://github.com/rails/jquery-ujs/raw/master/src/rails.js > public/javascripts/rails.js
|
10
|
+
> curl http://code.jquery.com/jquery-1.4.3.min.js > public/javascripts/jquery/jquery-1.4.3.min.js
|
11
|
+
> curl http://github.com/malsup/blockui/raw/master/jquery.blockUI.js?v2.31 > public/javascripts/jquery/jquery.blockUI.js
|
12
|
+
> curl http://fancybox.googlecode.com/files/jquery.fancybox-1.3.1.zip > public/javascripts/jquery/jquery.fancybox-1.3.1.zip
|
13
|
+
> unzip public/javascripts/jquery/jquery.fancybox-1.3.1.zip -d public/javascripts/jquery
|
14
|
+
> rm public/javascripts/jquery/jquery.fancybox-1.3.1.zip
|
15
|
+
|
16
|
+
> mkdir public/stylesheets/blueprint
|
17
|
+
> mkdir public/stylesheets/blueprint/src
|
18
|
+
> curl http://github.com/joshuaclayton/blueprint-css/raw/master/blueprint/ie.css > public/stylesheets/blueprint/ie.css
|
19
|
+
> curl http://github.com/joshuaclayton/blueprint-css/raw/master/blueprint/print.css > public/stylesheets/blueprint/print.css
|
20
|
+
> curl http://github.com/joshuaclayton/blueprint-css/raw/master/blueprint/screen.css > public/stylesheets/blueprint/screen.css
|
21
|
+
> curl http://github.com/joshuaclayton/blueprint-css/raw/master/blueprint/src/grid.png > public/stylesheets/blueprint/src/grid.png
|
22
|
+
</pre>
|
23
|
+
|
6
24
|
Then set the layout to use in the controller
|
25
|
+
|
26
|
+
<pre>
|
7
27
|
class MyCoolController < ApplicationController
|
8
28
|
layout 'rules_view'
|
9
29
|
...
|
30
|
+
</pre>
|
10
31
|
|
11
32
|
To install and modify the rules_view layout
|
12
|
-
> script/rails generate rules_view:layout [layout_name]
|
13
33
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
34
|
+
<pre>
|
35
|
+
> script/rails generate rules_view:layout [layout_name]
|
36
|
+
</pre>
|
37
|
+
|
38
|
+
See doc/README.rules_view for usage and instructions
|
18
39
|
|
19
|
-
|
20
|
-
= form_styles
|
40
|
+
h2. form_styles
|
21
41
|
|
42
|
+
<pre>
|
22
43
|
- re_build_form_field (value options) # options :class, :id, :disabled, :span
|
23
44
|
- re_build_form_label (value options) # options :class, :id, :disabled, :span, :error, :required
|
24
45
|
- re_build_form_data (value options) # options :class, :id, :disabled, :span, :error, :required, :hint, :text
|
46
|
+
</pre>
|
25
47
|
|
26
|
-
|
27
|
-
= form_builder
|
48
|
+
h2. form_builder
|
28
49
|
|
50
|
+
<pre>
|
29
51
|
- re_form_for (record_or_name_or_array, *args, &proc)
|
30
52
|
- re_fields_for (record_or_name_or_array, *args, &proc)
|
31
53
|
- re_form_remote_for (record_or_name_or_array, *args, &proc)
|
@@ -41,10 +63,11 @@ class MyCoolController < ApplicationController
|
|
41
63
|
- time_select (name, value, *args)
|
42
64
|
- time_zone_select (name, value, *args)
|
43
65
|
- check_box (name, value = "1", checked = false, options = {})
|
66
|
+
</pre>
|
44
67
|
|
45
|
-
|
46
|
-
= form_fields
|
68
|
+
h2. form_fields
|
47
69
|
|
70
|
+
<pre>
|
48
71
|
- re_text_field (label, name, value, *args)
|
49
72
|
- re_password_field (label, name, value, *args)
|
50
73
|
- re_file_field (label, name, value, *args)
|
@@ -57,22 +80,25 @@ class MyCoolController < ApplicationController
|
|
57
80
|
- re_check_box (label, name, value = "1", checked = false, options = {})
|
58
81
|
- re_form_text (label, text = "", options = {})
|
59
82
|
- re_form_blank (options = {})
|
83
|
+
</pre>
|
60
84
|
|
61
|
-
|
62
|
-
= alert
|
85
|
+
h2. alert
|
63
86
|
|
87
|
+
<pre>
|
64
88
|
- re_alert
|
65
89
|
- re_alert_js
|
90
|
+
</pre>
|
66
91
|
|
67
|
-
|
68
|
-
= boxes
|
92
|
+
h2. boxes
|
69
93
|
|
94
|
+
<pre>
|
70
95
|
- re_whitebox(&block)
|
71
96
|
- re_shadowbox(&block)
|
97
|
+
</pre>
|
72
98
|
|
73
|
-
|
74
|
-
= buttons
|
99
|
+
h2. buttons
|
75
100
|
|
101
|
+
<pre>
|
76
102
|
- re_button_submit(title, color, options ={})
|
77
103
|
|
78
104
|
- re_button_submit_gray(title, options = {})
|
@@ -98,23 +124,24 @@ class MyCoolController < ApplicationController
|
|
98
124
|
- re_button_select(url, options = {})
|
99
125
|
- re_button_checked(url, options = {})
|
100
126
|
- re_button_unchecked(url, options = {})
|
127
|
+
</pre>
|
101
128
|
|
129
|
+
h2. navigate
|
102
130
|
|
103
|
-
|
104
|
-
= navigate
|
105
|
-
|
131
|
+
<pre>
|
106
132
|
- re_breadcrumbs (*links)
|
107
133
|
- re_breadcrumbs_right (*links)
|
134
|
+
</pre>
|
108
135
|
|
109
|
-
|
110
|
-
= defer
|
136
|
+
h2. defer
|
111
137
|
|
138
|
+
<pre>
|
112
139
|
- set_re_javascript_include (javascript_include_or_array)
|
113
140
|
- set_re_breadcrumbs (*links)
|
114
141
|
- set_re_breadcrumbs_right (*links)
|
142
|
+
</pre>
|
115
143
|
|
116
|
-
|
117
|
-
== Note on Patches/Pull Requests
|
144
|
+
h2. Note on Patches/Pull Requests
|
118
145
|
|
119
146
|
* Fork the project.
|
120
147
|
* Make your feature addition or bug fix.
|
@@ -124,6 +151,6 @@ class MyCoolController < ApplicationController
|
|
124
151
|
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
125
152
|
* Send me a pull request. Bonus points for topic branches.
|
126
153
|
|
127
|
-
|
154
|
+
h2. Copyright
|
128
155
|
|
129
156
|
Copyright (c) 2010 Chris Douglas. See LICENSE for details.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
@@ -1,34 +1,26 @@
|
|
1
|
-
<!DOCTYPE html
|
2
|
-
<html
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
3
|
<head>
|
4
|
-
|
5
|
-
<title> <%%= (page_title = yield :defer_page_title) ? page_title : controller.controller_name.humanize %> </title>
|
4
|
+
<title> <%= (page_title = yield :defer_re_title) ? page_title : controller.controller_name.humanize %> </title>
|
6
5
|
|
7
|
-
<link rel="stylesheet" href="/stylesheets/
|
8
|
-
<link rel="stylesheet" href="/stylesheets/
|
6
|
+
<link rel="stylesheet" href="/stylesheets/blueprint/screen.css" type="text/css" media="screen, projection">
|
7
|
+
<link rel="stylesheet" href="/stylesheets/blueprint/print.css" type="text/css" media="print">
|
9
8
|
<!--[if lt IE 8]>
|
10
|
-
<link rel="stylesheet" href="/stylesheets/
|
9
|
+
<link rel="stylesheet" href="/stylesheets/blueprint/ie.css" type="text/css" media="screen, projection">
|
11
10
|
<![endif]-->
|
12
11
|
|
13
|
-
<%= javascript_include_tag '
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
'application',
|
19
|
-
:cache => true %>
|
20
|
-
|
21
|
-
<%= stylesheet_link_tag 'rules_view/rules_view',
|
22
|
-
'rules_view/jquery.autocomplete',
|
23
|
-
'rules_view/fancybox/jquery.fancybox-1.3.1',
|
24
|
-
# 'application',
|
25
|
-
:cache => true %>
|
26
|
-
|
27
|
-
<%= yield :defer_re_javascript_include %>
|
12
|
+
<%= javascript_include_tag 'jquery/jquery-1.4.3.min.js' %>
|
13
|
+
<%= javascript_include_tag 'jquery/jquery.blockUI.js' %>
|
14
|
+
<%= javascript_include_tag 'jquery/jquery.fancybox-1.3.1/fancybox/jquery.fancybox-1.3.1.js' %>
|
15
|
+
<%= stylesheet_link_tag '/javascripts/jquery/jquery.fancybox-1.3.1/fancybox/jquery.fancybox-1.3.1.css' %>
|
16
|
+
<%= stylesheet_link_tag 'rules_view/rules_view' %>
|
28
17
|
|
18
|
+
<%= stylesheet_link_tag :all %>
|
19
|
+
<%= javascript_include_tag :defaults %>
|
29
20
|
<%= csrf_meta_tag %>
|
30
21
|
</head>
|
31
22
|
<body>
|
23
|
+
|
32
24
|
<div class="container re_container">
|
33
25
|
<%#= render '/layouts/header' %>
|
34
26
|
|
@@ -39,5 +31,6 @@
|
|
39
31
|
<div class="clear top-10"></div>
|
40
32
|
<%#= render '/layouts/footer' %>
|
41
33
|
</div>
|
34
|
+
|
42
35
|
</body>
|
43
36
|
</html>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require "#{File.dirname(__FILE__)}/manifests/
|
1
|
+
require "#{File.dirname(__FILE__)}/manifests/rules_view_install.rb"
|
2
2
|
|
3
3
|
module RulesView
|
4
4
|
module Generators
|
@@ -11,7 +11,7 @@ module RulesView
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def install
|
14
|
-
|
14
|
+
RulesViewInstallManifest.populate_record(self, "rules_view")
|
15
15
|
puts InstallGenerator.description_all
|
16
16
|
end
|
17
17
|
|
@@ -21,6 +21,22 @@ module RulesView
|
|
21
21
|
To add the rules view to you application
|
22
22
|
> script/rails generate rules_view:install
|
23
23
|
|
24
|
+
> mkdir public/javascripts/jquery
|
25
|
+
> curl http://github.com/rails/jquery-ujs/raw/master/src/rails.js > public/javascripts/rails.js
|
26
|
+
> curl http://code.jquery.com/jquery-1.4.3.min.js > public/javascripts/jquery/jquery-1.4.3.min.js
|
27
|
+
> curl http://github.com/malsup/blockui/raw/master/jquery.blockUI.js?v2.31 > public/javascripts/jquery/jquery.blockUI.js
|
28
|
+
> curl http://fancybox.googlecode.com/files/jquery.fancybox-1.3.1.zip > public/javascripts/jquery/jquery.fancybox-1.3.1.zip
|
29
|
+
> unzip public/javascripts/jquery/jquery.fancybox-1.3.1.zip -d public/javascripts/jquery
|
30
|
+
> rm public/javascripts/jquery/jquery.fancybox-1.3.1.zip
|
31
|
+
|
32
|
+
|
33
|
+
> mkdir public/stylesheets/blueprint
|
34
|
+
> mkdir public/stylesheets/blueprint/src
|
35
|
+
> curl http://github.com/joshuaclayton/blueprint-css/raw/master/blueprint/ie.css > public/stylesheets/blueprint/ie.css
|
36
|
+
> curl http://github.com/joshuaclayton/blueprint-css/raw/master/blueprint/print.css > public/stylesheets/blueprint/print.css
|
37
|
+
> curl http://github.com/joshuaclayton/blueprint-css/raw/master/blueprint/screen.css > public/stylesheets/blueprint/screen.css
|
38
|
+
> curl http://github.com/joshuaclayton/blueprint-css/raw/master/blueprint/src/grid.png > public/stylesheets/blueprint/src/grid.png
|
39
|
+
|
24
40
|
Then set the layout to use in the controller
|
25
41
|
class MyCoolController < ApplicationController
|
26
42
|
layout 'rules_view'
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require "#{File.dirname(__FILE__)}/manifests/
|
1
|
+
require "#{File.dirname(__FILE__)}/manifests/rules_view_layout.rb"
|
2
2
|
|
3
3
|
module RulesView
|
4
4
|
module Generators
|
@@ -15,7 +15,7 @@ module RulesView
|
|
15
15
|
if @layout_name.blank?
|
16
16
|
puts " ***************** layout_name required ***************** "
|
17
17
|
else
|
18
|
-
|
18
|
+
RulesViewLayoutManifest.populate_record(self, @layout_name)
|
19
19
|
end
|
20
20
|
puts LayoutGenerator.description
|
21
21
|
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
class RulesViewInstallManifest
|
2
|
+
def self.populate_record(m, rule_name)
|
3
|
+
|
4
|
+
%W(
|
5
|
+
config/initializers
|
6
|
+
doc
|
7
|
+
public/javascripts/rules_view
|
8
|
+
public/stylesheets/rules_view
|
9
|
+
public/stylesheets/rules_view/images
|
10
|
+
public/stylesheets/rules_view/images/re_view_box
|
11
|
+
public/stylesheets/rules_view/images/re_view_button
|
12
|
+
public/stylesheets/rules_view/images/re_view_error
|
13
|
+
public/stylesheets/rules_view/images/re_view_navigate
|
14
|
+
).each do |dirname|
|
15
|
+
m.empty_directory dirname
|
16
|
+
end
|
17
|
+
|
18
|
+
%W(
|
19
|
+
config/initializers/rules_view.rb
|
20
|
+
doc/README.rules_view
|
21
|
+
public/javascripts/rules_view/rules_view.js
|
22
|
+
public/stylesheets/rules_view/images/re_view_box/shadowbox.png
|
23
|
+
public/stylesheets/rules_view/images/re_view_box/whitebox.jpg
|
24
|
+
public/stylesheets/rules_view/images/re_view_button/checked-off.gif
|
25
|
+
public/stylesheets/rules_view/images/re_view_button/checked-on.gif
|
26
|
+
public/stylesheets/rules_view/images/re_view_button/icon-add.png
|
27
|
+
public/stylesheets/rules_view/images/re_view_button/icon-delete.png
|
28
|
+
public/stylesheets/rules_view/images/re_view_button/list-add.png
|
29
|
+
public/stylesheets/rules_view/images/re_view_button/list-remove.png
|
30
|
+
public/stylesheets/rules_view/images/re_view_button/list-select.png
|
31
|
+
public/stylesheets/rules_view/images/re_view_button/oval-blue-left.gif
|
32
|
+
public/stylesheets/rules_view/images/re_view_button/oval-blue-right.gif
|
33
|
+
public/stylesheets/rules_view/images/re_view_button/oval-gray-left.gif
|
34
|
+
public/stylesheets/rules_view/images/re_view_button/oval-gray-right.gif
|
35
|
+
public/stylesheets/rules_view/images/re_view_button/oval-green-left.gif
|
36
|
+
public/stylesheets/rules_view/images/re_view_button/oval-green-right.gif
|
37
|
+
public/stylesheets/rules_view/images/re_view_button/oval-orange-left.gif
|
38
|
+
public/stylesheets/rules_view/images/re_view_button/oval-orange-right.gif
|
39
|
+
public/stylesheets/rules_view/images/re_view_button/oval-red-left.gif
|
40
|
+
public/stylesheets/rules_view/images/re_view_button/oval-red-right.gif
|
41
|
+
public/stylesheets/rules_view/images/re_view_error/re-alert-close.png
|
42
|
+
public/stylesheets/rules_view/images/re_view_navigate/breadcrumb.png
|
43
|
+
public/stylesheets/rules_view/rules_view.css
|
44
|
+
).each do |filename|
|
45
|
+
m.copy_file filename, filename
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
end
|
50
|
+
end
|
File without changes
|
File without changes
|
@@ -1,37 +1,29 @@
|
|
1
|
-
<!DOCTYPE html
|
2
|
-
<html
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
3
|
<head>
|
4
|
-
|
5
|
-
<title> <%%= (page_title = yield :defer_page_title) ? page_title : controller.controller_name.humanize %> </title>
|
4
|
+
<title> <%%= (page_title = yield :defer_re_title) ? page_title : controller.controller_name.humanize %> </title>
|
6
5
|
|
7
|
-
<link rel="stylesheet" href="/stylesheets/
|
8
|
-
<link rel="stylesheet" href="/stylesheets/
|
6
|
+
<link rel="stylesheet" href="/stylesheets/blueprint/screen.css" type="text/css" media="screen, projection">
|
7
|
+
<link rel="stylesheet" href="/stylesheets/blueprint/print.css" type="text/css" media="print">
|
9
8
|
<!--[if lt IE 8]>
|
10
|
-
<link rel="stylesheet" href="/stylesheets/
|
9
|
+
<link rel="stylesheet" href="/stylesheets/blueprint/ie.css" type="text/css" media="screen, projection">
|
11
10
|
<![endif]-->
|
12
11
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
<%%= javascript_include_tag 'rules_view/jquery-1.4.2.min',
|
20
|
-
'rules_view/jquery.blockUI',
|
21
|
-
'rules_view/jquery.autocomplete.pack',
|
22
|
-
'rules_view/jquery.fancybox-1.3.1',
|
23
|
-
'rules_view/rules_view',
|
24
|
-
:cache => true %%>
|
12
|
+
<%%= javascript_include_tag 'jquery/jquery-1.4.3.min.js' %>
|
13
|
+
<%%= javascript_include_tag 'jquery/jquery.blockUI.js' %>
|
14
|
+
<%%= javascript_include_tag 'jquery/jquery.fancybox-1.3.1/fancybox/jquery.fancybox-1.3.1.js' %>
|
15
|
+
<%%= stylesheet_link_tag '/javascripts/jquery/jquery.fancybox-1.3.1/fancybox/jquery.fancybox-1.3.1.css' %>
|
16
|
+
<%%= stylesheet_link_tag 'rules_view/rules_view' %>
|
25
17
|
|
26
|
-
<%%= stylesheet_link_tag
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
<%%= csrf_meta_tag
|
32
|
-
<%%= yield :defer_re_javascript_include %%>
|
18
|
+
<%%= stylesheet_link_tag :all %>
|
19
|
+
<%%= javascript_include_tag :defaults %>
|
20
|
+
|
21
|
+
<%%= yield :defer_re_javascript_include %>
|
22
|
+
|
23
|
+
<%%= csrf_meta_tag %>
|
33
24
|
</head>
|
34
25
|
<body>
|
26
|
+
|
35
27
|
<div class="container re_container">
|
36
28
|
<%%#= render '/layouts/header' %>
|
37
29
|
|
@@ -39,9 +31,9 @@
|
|
39
31
|
<%%= re_alert %>
|
40
32
|
|
41
33
|
<%%= yield %>
|
42
|
-
|
43
34
|
<div class="clear top-10"></div>
|
44
35
|
<%%#= render '/layouts/footer' %>
|
45
36
|
</div>
|
37
|
+
|
46
38
|
</body>
|
47
39
|
</html>
|
@@ -1,3 +1,33 @@
|
|
1
|
+
##########################################################
|
2
|
+
= rules_view
|
3
|
+
|
4
|
+
To add the rules view to you application
|
5
|
+
> script/rails generate rules_view:install
|
6
|
+
|
7
|
+
> mkdir public/javascripts/jquery
|
8
|
+
> curl http://github.com/rails/jquery-ujs/raw/master/src/rails.js > public/javascripts/rails.js
|
9
|
+
> curl http://code.jquery.com/jquery-1.4.3.min.js > public/javascripts/jquery/jquery-1.4.3.min.js
|
10
|
+
> curl http://github.com/malsup/blockui/raw/master/jquery.blockUI.js?v2.31 > public/javascripts/jquery/jquery.blockUI.js
|
11
|
+
> curl http://fancybox.googlecode.com/files/jquery.fancybox-1.3.1.zip > public/javascripts/jquery/jquery.fancybox-1.3.1.zip
|
12
|
+
> unzip public/javascripts/jquery/jquery.fancybox-1.3.1.zip -d public/javascripts/jquery
|
13
|
+
> rm public/javascripts/jquery/jquery.fancybox-1.3.1.zip
|
14
|
+
|
15
|
+
> mkdir public/stylesheets/blueprint
|
16
|
+
> mkdir public/stylesheets/blueprint/src
|
17
|
+
> curl http://github.com/joshuaclayton/blueprint-css/raw/master/blueprint/ie.css > public/stylesheets/blueprint/ie.css
|
18
|
+
> curl http://github.com/joshuaclayton/blueprint-css/raw/master/blueprint/print.css > public/stylesheets/blueprint/print.css
|
19
|
+
> curl http://github.com/joshuaclayton/blueprint-css/raw/master/blueprint/screen.css > public/stylesheets/blueprint/screen.css
|
20
|
+
> curl http://github.com/joshuaclayton/blueprint-css/raw/master/blueprint/src/grid.png > public/stylesheets/blueprint/src/grid.png
|
21
|
+
|
22
|
+
Then set the layout to use in the controller
|
23
|
+
|
24
|
+
class MyCoolController < ApplicationController
|
25
|
+
layout 'rules_view'
|
26
|
+
...
|
27
|
+
|
28
|
+
To install and modify the rules_view layout
|
29
|
+
> script/rails generate rules_view:layout [layout_name]
|
30
|
+
|
1
31
|
##########################################################
|
2
32
|
= form_styles
|
3
33
|
|
data/generators/manifests/templates/public/javascripts/rules_view/{re_view.js → rules_view.js}
RENAMED
File without changes
|
data/lib/rules_view/defer.rb
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
|
2
2
|
|
3
|
+
describe "set_re_title" do
|
4
|
+
include RSpec::Rails::HelperExampleGroup
|
5
|
+
|
6
|
+
it "should be accessible to rails apps by default" do
|
7
|
+
ActionView::Base.new.methods.should include("set_re_title")
|
8
|
+
end
|
9
|
+
|
10
|
+
it "should set defer_re_title" do
|
11
|
+
helper.should_receive(:content_for).with(:defer_re_title)
|
12
|
+
helper.set_re_title('me')
|
13
|
+
end
|
14
|
+
|
15
|
+
it "should set defer_re_title variable " do
|
16
|
+
helper.set_re_title('me')
|
17
|
+
helper.instance_variable_get(:@_content_for)[:defer_re_title].should == 'me'
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
|
3
22
|
describe "set_re_javascript_include" do
|
4
23
|
include RSpec::Rails::HelperExampleGroup
|
5
24
|
|
@@ -1,6 +1,7 @@
|
|
1
1
|
source 'http://rubygems.org'
|
2
2
|
|
3
|
-
gem 'rails', '3.0.
|
3
|
+
gem 'rails', '3.0.1'
|
4
|
+
|
4
5
|
gem 'rules_view', :path => '../../'
|
5
6
|
|
6
7
|
gem 'sqlite3-ruby', :require => 'sqlite3'
|
@@ -10,4 +11,4 @@ group :development, :test do
|
|
10
11
|
gem "webrat"
|
11
12
|
|
12
13
|
gem 'rcov'
|
13
|
-
end
|
14
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -6,7 +6,7 @@ require 'rails/all'
|
|
6
6
|
# you've limited to :test, :development, or :production.
|
7
7
|
Bundler.require(:default, Rails.env) if defined?(Bundler)
|
8
8
|
|
9
|
-
module
|
9
|
+
module Rails301Root
|
10
10
|
class Application < Rails::Application
|
11
11
|
# Settings in config/environments/* take precedence over those specified here.
|
12
12
|
# Application configuration should go into files in config/initializers
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -4,4 +4,4 @@
|
|
4
4
|
# If you change this key, all old signed cookies will become invalid!
|
5
5
|
# Make sure the secret is at least 30 characters and all random,
|
6
6
|
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
-
|
7
|
+
Rails301Root::Application.config.secret_token = '4d0200b2f94bd85b2de5c558fccb334e1d5ede9b1611a3eba2afddf868a8cb20b0a4da795e483ba51f9ddcaa2c27880ac955e0274541a3890a82879c050d6f41'
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# Be sure to restart your server when you modify this file.
|
2
2
|
|
3
|
-
|
3
|
+
Rails301Root::Application.config.session_store :cookie_store, :key => '_rails_3_0_1_root_session'
|
4
4
|
|
5
5
|
# Use the database for sessions instead of the cookie-based default,
|
6
6
|
# which shouldn't be used to store highly confidential information
|
7
7
|
# (create the session table with "rake db:sessions:create")
|
8
|
-
#
|
8
|
+
# Rails301Root::Application.config.session_store :active_record_store
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|