puffer 0.0.19 → 0.0.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. data/.rvmrc +1 -0
  2. data/Gemfile +11 -8
  3. data/Gemfile.lock +117 -103
  4. data/Guardfile +20 -0
  5. data/VERSION +1 -1
  6. data/app/assets/javascripts/puffer/application.js +5 -0
  7. data/{lib/generators/puffer/install/templates/puffer/javascripts → app/assets/javascripts/puffer}/puffer.js +0 -0
  8. data/{lib/generators/puffer/install/templates/puffer/javascripts → app/assets/javascripts/puffer}/rails.js +0 -0
  9. data/{lib/generators/puffer/install/templates/puffer/javascripts → app/assets/javascripts/puffer}/right-autocompleter.js +0 -0
  10. data/{lib/generators/puffer/install/templates/puffer/javascripts → app/assets/javascripts/puffer}/right-calendar.js +0 -0
  11. data/{lib/generators/puffer/install/templates/puffer/javascripts → app/assets/javascripts/puffer}/right.js +0 -0
  12. data/app/assets/stylesheets/puffer/application.css +4 -0
  13. data/{lib/generators/puffer/install/templates/puffer/stylesheets → app/assets/stylesheets/puffer}/puffer.css +2 -1
  14. data/{lib/generators/puffer/install/templates/puffer/stylesheets → app/assets/stylesheets/puffer}/reset.css +0 -0
  15. data/app/controllers/puffer/dashboard.rb +12 -0
  16. data/app/controllers/puffer/{sessions_base.rb → sessions.rb} +1 -2
  17. data/app/helpers/puffer_helper.rb +2 -10
  18. data/app/views/layouts/puffer.html.erb +24 -5
  19. data/app/views/layouts/puffer_dashboard.html.erb +3 -3
  20. data/app/views/layouts/puffer_sessions.html.erb +3 -3
  21. data/app/views/puffer/{_form.html.erb → base/_form.html.erb} +2 -2
  22. data/app/views/puffer/{associated → base/associated}/_many.html.erb +1 -1
  23. data/app/views/puffer/{associated → base/associated}/many.rjs +0 -0
  24. data/app/views/puffer/{associated → base/associated}/one.js.erb +1 -1
  25. data/app/views/puffer/{association → base/association}/_many.html.erb +0 -0
  26. data/app/views/puffer/{edit.html.erb → base/edit.html.erb} +1 -1
  27. data/app/views/puffer/{index.html.erb → base/index.html.erb} +2 -2
  28. data/app/views/puffer/{new.html.erb → base/new.html.erb} +1 -1
  29. data/app/views/puffer/{show.html.erb → base/show.html.erb} +1 -1
  30. data/app/views/{puffer_dashboard → puffer/dashboard}/index.html.erb +0 -0
  31. data/app/views/{puffer_sessions → puffer/sessions}/new.html.erb +0 -0
  32. data/config/locales/puffer.yml +5 -0
  33. data/lib/generators/puffer/install/install_generator.rb +0 -8
  34. data/lib/generators/puffer/install/templates/dashboard_controller.rb +1 -1
  35. data/lib/generators/puffer/install/templates/sessions_controller.rb +1 -1
  36. data/lib/puffer.rb +0 -16
  37. data/lib/puffer/base.rb +8 -3
  38. data/lib/puffer/controller/config.rb +2 -0
  39. data/lib/puffer/controller/dsl.rb +2 -2
  40. data/lib/puffer/controller/generated.rb +4 -4
  41. data/lib/puffer/controller/helpers.rb +1 -1
  42. data/lib/puffer/controller/mutate.rb +0 -14
  43. data/lib/puffer/customs.rb +1 -0
  44. data/lib/puffer/engine.rb +0 -4
  45. data/lib/puffer/extensions/mapper.rb +5 -1
  46. data/lib/puffer/fields.rb +2 -2
  47. data/lib/puffer/fields/field.rb +16 -17
  48. data/lib/puffer/inputs/association.rb +3 -2
  49. data/lib/puffer/resource.rb +13 -12
  50. data/lib/puffer/resource/routing.rb +1 -1
  51. data/lib/puffer/resource/scoping.rb +2 -2
  52. data/puffer.gemspec +63 -126
  53. data/spec/dummy/.rvmrc +1 -0
  54. data/spec/dummy/Rakefile +1 -1
  55. data/spec/dummy/app/assets/images/rails.png +0 -0
  56. data/spec/dummy/app/assets/javascripts/application.js +9 -0
  57. data/spec/dummy/app/assets/stylesheets/application.css +7 -0
  58. data/spec/dummy/app/controllers/admin/posts_controller.rb +3 -1
  59. data/spec/dummy/app/controllers/admin/profiles_controller.rb +4 -1
  60. data/spec/dummy/app/controllers/puffer/dashboard_controller.rb +1 -1
  61. data/spec/dummy/app/controllers/puffer/sessions_controller.rb +1 -1
  62. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  63. data/spec/dummy/config/application.rb +5 -9
  64. data/spec/dummy/config/boot.rb +5 -7
  65. data/spec/dummy/config/database.yml +4 -1
  66. data/spec/dummy/config/environments/development.rb +4 -3
  67. data/spec/dummy/config/environments/production.rb +17 -12
  68. data/spec/dummy/config/environments/test.rb +5 -1
  69. data/spec/dummy/config/initializers/secret_token.rb +1 -1
  70. data/spec/dummy/config/initializers/session_store.rb +1 -1
  71. data/spec/dummy/config/initializers/wrap_parameters.rb +12 -0
  72. data/spec/dummy/config/locales/en.yml +1 -1
  73. data/spec/dummy/db/seeds.rb +7 -0
  74. data/spec/dummy/public/robots.txt +5 -0
  75. data/spec/fabricators/posts_fabricator.rb +1 -1
  76. data/spec/fabricators/profiles_fabricator.rb +1 -1
  77. data/spec/fabricators/users_fabricator.rb +1 -1
  78. data/spec/lib/resource/routing_spec.rb +5 -5
  79. data/spec/lib/resource_spec.rb +37 -88
  80. data/spec/spec_helper.rb +15 -0
  81. metadata +171 -272
  82. data/app/cells/puffer/base/additional.html.erb +0 -25
  83. data/app/cells/puffer/base_cell.rb +0 -25
  84. data/app/controllers/puffer/dashboard_base.rb +0 -13
  85. data/autotest/discover.rb +0 -2
  86. data/lib/generators/puffer/install/templates/puffer.rb +0 -12
  87. data/lib/puffer/path_set.rb +0 -24
  88. data/spec/dummy/app/views/admin/users/index.html.erb +0 -3
  89. data/spec/dummy/config/initializers/puffer.rb +0 -12
  90. data/spec/dummy/db/schema.rb +0 -83
  91. data/spec/dummy/public/javascripts/application.js +0 -2
  92. data/spec/dummy/public/javascripts/controls.js +0 -965
  93. data/spec/dummy/public/javascripts/dragdrop.js +0 -974
  94. data/spec/dummy/public/javascripts/effects.js +0 -1123
  95. data/spec/dummy/public/javascripts/prototype.js +0 -6001
  96. data/spec/dummy/public/javascripts/rails.js +0 -175
  97. data/spec/dummy/public/puffer/javascripts/puffer.js +0 -10
  98. data/spec/dummy/public/puffer/javascripts/rails.js +0 -57
  99. data/spec/dummy/public/puffer/javascripts/right-autocompleter.js +0 -621
  100. data/spec/dummy/public/puffer/javascripts/right-calendar.js +0 -1461
  101. data/spec/dummy/public/puffer/javascripts/right.js +0 -5892
  102. data/spec/dummy/public/puffer/stylesheets/puffer.css +0 -469
  103. data/spec/dummy/public/puffer/stylesheets/reset.css +0 -60
  104. data/spec/dummy/public/stylesheets/.gitkeep +0 -0
  105. data/spec/lib/render_fallback_spec.rb +0 -17
data/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm use --create 1.9.2@puffer
data/Gemfile CHANGED
@@ -1,18 +1,21 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem 'rails', '~> 3.0.4'
4
- gem 'will_paginate', '~> 3.0.pre2'
5
- gem 'cells', '~> 3.4.4'
3
+ gem 'rails', '>= 3.1.0.rc4'
4
+ gem 'kaminari'
5
+ gem 'apotomo'
6
6
 
7
7
  group :development, :test do
8
- gem "capybara", ">= 0.4.0"
9
- gem "sqlite3-ruby", :require => "sqlite3"
8
+ gem "sqlite3"
10
9
 
11
10
  gem "rspec-rails"
12
- gem "autotest"
11
+ gem "capybara"
12
+ gem 'database_cleaner'
13
+
14
+ gem 'guard'
15
+ gem 'libnotify'
16
+ gem 'guard-rspec'
17
+
13
18
  gem 'forgery'
14
19
  gem 'fabrication'
15
20
  gem "jeweler"
16
- gem "mongrel"
17
21
  end
18
-
data/Gemfile.lock CHANGED
@@ -1,145 +1,159 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- ZenTest (4.4.2)
5
- abstract (1.0.0)
6
- actionmailer (3.0.4)
7
- actionpack (= 3.0.4)
8
- mail (~> 2.2.15)
9
- actionpack (3.0.4)
10
- activemodel (= 3.0.4)
11
- activesupport (= 3.0.4)
12
- builder (~> 2.1.2)
13
- erubis (~> 2.6.6)
14
- i18n (~> 0.4)
15
- rack (~> 1.2.1)
16
- rack-mount (~> 0.6.13)
17
- rack-test (~> 0.5.7)
18
- tzinfo (~> 0.3.23)
19
- activemodel (3.0.4)
20
- activesupport (= 3.0.4)
21
- builder (~> 2.1.2)
22
- i18n (~> 0.4)
23
- activerecord (3.0.4)
24
- activemodel (= 3.0.4)
25
- activesupport (= 3.0.4)
26
- arel (~> 2.0.2)
27
- tzinfo (~> 0.3.23)
28
- activeresource (3.0.4)
29
- activemodel (= 3.0.4)
30
- activesupport (= 3.0.4)
31
- activesupport (3.0.4)
32
- arel (2.0.8)
33
- autotest (4.4.6)
34
- ZenTest (>= 4.4.1)
35
- builder (2.1.2)
36
- capybara (0.4.1.2)
37
- celerity (>= 0.7.9)
38
- culerity (>= 0.2.4)
4
+ actionmailer (3.1.0.rc4)
5
+ actionpack (= 3.1.0.rc4)
6
+ mail (~> 2.3.0)
7
+ actionpack (3.1.0.rc4)
8
+ activemodel (= 3.1.0.rc4)
9
+ activesupport (= 3.1.0.rc4)
10
+ builder (~> 3.0.0)
11
+ erubis (~> 2.7.0)
12
+ i18n (~> 0.6)
13
+ rack (~> 1.3.0)
14
+ rack-cache (~> 1.0.1)
15
+ rack-mount (~> 0.8.1)
16
+ rack-test (~> 0.6.0)
17
+ sprockets (~> 2.0.0.beta.10)
18
+ tzinfo (~> 0.3.27)
19
+ activemodel (3.1.0.rc4)
20
+ activesupport (= 3.1.0.rc4)
21
+ bcrypt-ruby (~> 2.1.4)
22
+ builder (~> 3.0.0)
23
+ i18n (~> 0.6)
24
+ activerecord (3.1.0.rc4)
25
+ activemodel (= 3.1.0.rc4)
26
+ activesupport (= 3.1.0.rc4)
27
+ arel (~> 2.1.1)
28
+ tzinfo (~> 0.3.27)
29
+ activeresource (3.1.0.rc4)
30
+ activemodel (= 3.1.0.rc4)
31
+ activesupport (= 3.1.0.rc4)
32
+ activesupport (3.1.0.rc4)
33
+ multi_json (~> 1.0)
34
+ apotomo (1.1.2)
35
+ cells (>= 3.5.6)
36
+ hooks (~> 0.1.3)
37
+ onfire (~> 0.2.0)
38
+ arel (2.1.3)
39
+ bcrypt-ruby (2.1.4)
40
+ builder (3.0.0)
41
+ capybara (1.0.0)
39
42
  mime-types (>= 1.16)
40
43
  nokogiri (>= 1.3.3)
41
44
  rack (>= 1.0.0)
42
45
  rack-test (>= 0.5.4)
43
- selenium-webdriver (>= 0.0.27)
44
- xpath (~> 0.1.3)
45
- celerity (0.8.8)
46
- cells (3.4.4)
47
- cgi_multipart_eof_fix (2.5.0)
48
- childprocess (0.1.7)
49
- ffi (~> 0.6.3)
50
- culerity (0.2.15)
51
- daemons (1.1.0)
46
+ selenium-webdriver (~> 0.2.0)
47
+ xpath (~> 0.1.4)
48
+ cells (3.6.4)
49
+ actionpack (~> 3.0)
50
+ railties (~> 3.0)
51
+ childprocess (0.2.0)
52
+ ffi (~> 1.0.6)
53
+ database_cleaner (0.6.7)
52
54
  diff-lcs (1.1.2)
53
- erubis (2.6.6)
54
- abstract (>= 1.0.0)
55
- fabrication (0.9.5)
56
- fastthread (1.0.7)
57
- ffi (0.6.3)
58
- rake (>= 0.8.7)
59
- forgery (0.3.7)
55
+ erubis (2.7.0)
56
+ fabrication (1.0.1)
57
+ ffi (1.0.9)
58
+ forgery (0.3.12)
60
59
  nokogiri (~> 1.4)
61
- gem_plugin (0.2.3)
62
60
  git (1.2.5)
63
- i18n (0.5.0)
64
- jeweler (1.5.2)
65
- bundler (~> 1.0.0)
61
+ guard (0.5.1)
62
+ thor (~> 0.14.6)
63
+ guard-rspec (0.4.0)
64
+ guard (>= 0.4.0)
65
+ hike (1.2.0)
66
+ hooks (0.1.4)
67
+ i18n (0.6.0)
68
+ jeweler (1.6.4)
69
+ bundler (~> 1.0)
66
70
  git (>= 1.2.5)
67
71
  rake
68
- json_pure (1.5.1)
69
- mail (2.2.15)
70
- activesupport (>= 2.3.6)
72
+ json_pure (1.5.3)
73
+ kaminari (0.12.4)
74
+ rails (>= 3.0.0)
75
+ libnotify (0.5.7)
76
+ mail (2.3.0)
71
77
  i18n (>= 0.4.0)
72
78
  mime-types (~> 1.16)
73
79
  treetop (~> 1.4.8)
74
80
  mime-types (1.16)
75
- mongrel (1.1.5)
76
- cgi_multipart_eof_fix (>= 2.4)
77
- daemons (>= 1.0.3)
78
- fastthread (>= 1.0.1)
79
- gem_plugin (>= 0.2.3)
80
- nokogiri (1.4.4)
81
+ multi_json (1.0.3)
82
+ nokogiri (1.5.0)
83
+ onfire (0.2.0)
81
84
  polyglot (0.3.1)
82
- rack (1.2.1)
83
- rack-mount (0.6.13)
85
+ rack (1.3.1)
86
+ rack-cache (1.0.2)
87
+ rack (>= 0.4)
88
+ rack-mount (0.8.1)
84
89
  rack (>= 1.0.0)
85
- rack-test (0.5.7)
90
+ rack-ssl (1.3.2)
91
+ rack
92
+ rack-test (0.6.0)
86
93
  rack (>= 1.0)
87
- rails (3.0.4)
88
- actionmailer (= 3.0.4)
89
- actionpack (= 3.0.4)
90
- activerecord (= 3.0.4)
91
- activeresource (= 3.0.4)
92
- activesupport (= 3.0.4)
94
+ rails (3.1.0.rc4)
95
+ actionmailer (= 3.1.0.rc4)
96
+ actionpack (= 3.1.0.rc4)
97
+ activerecord (= 3.1.0.rc4)
98
+ activeresource (= 3.1.0.rc4)
99
+ activesupport (= 3.1.0.rc4)
93
100
  bundler (~> 1.0)
94
- railties (= 3.0.4)
95
- railties (3.0.4)
96
- actionpack (= 3.0.4)
97
- activesupport (= 3.0.4)
101
+ railties (= 3.1.0.rc4)
102
+ railties (3.1.0.rc4)
103
+ actionpack (= 3.1.0.rc4)
104
+ activesupport (= 3.1.0.rc4)
105
+ rack-ssl (~> 1.3.2)
98
106
  rake (>= 0.8.7)
99
- thor (~> 0.14.4)
100
- rake (0.8.7)
101
- rspec (2.5.0)
102
- rspec-core (~> 2.5.0)
103
- rspec-expectations (~> 2.5.0)
104
- rspec-mocks (~> 2.5.0)
105
- rspec-core (2.5.1)
106
- rspec-expectations (2.5.0)
107
+ rdoc (~> 3.4)
108
+ thor (~> 0.14.6)
109
+ rake (0.9.2)
110
+ rdoc (3.8)
111
+ rspec (2.6.0)
112
+ rspec-core (~> 2.6.0)
113
+ rspec-expectations (~> 2.6.0)
114
+ rspec-mocks (~> 2.6.0)
115
+ rspec-core (2.6.4)
116
+ rspec-expectations (2.6.0)
107
117
  diff-lcs (~> 1.1.2)
108
- rspec-mocks (2.5.0)
109
- rspec-rails (2.5.0)
118
+ rspec-mocks (2.6.0)
119
+ rspec-rails (2.6.1)
110
120
  actionpack (~> 3.0)
111
121
  activesupport (~> 3.0)
112
122
  railties (~> 3.0)
113
- rspec (~> 2.5.0)
123
+ rspec (~> 2.6.0)
114
124
  rubyzip (0.9.4)
115
- selenium-webdriver (0.1.3)
116
- childprocess (~> 0.1.5)
117
- ffi (~> 0.6.3)
125
+ selenium-webdriver (0.2.2)
126
+ childprocess (>= 0.1.9)
127
+ ffi (>= 1.0.7)
118
128
  json_pure
119
129
  rubyzip
130
+ sprockets (2.0.0.beta.10)
131
+ hike (~> 1.0)
132
+ rack (~> 1.0)
133
+ tilt (!= 1.3.0, ~> 1.1)
120
134
  sqlite3 (1.3.3)
121
- sqlite3-ruby (1.3.3)
122
- sqlite3 (>= 1.3.3)
123
135
  thor (0.14.6)
136
+ tilt (1.3.2)
124
137
  treetop (1.4.9)
125
138
  polyglot (>= 0.3.1)
126
- tzinfo (0.3.24)
127
- will_paginate (3.0.pre2)
128
- xpath (0.1.3)
139
+ tzinfo (0.3.29)
140
+ xpath (0.1.4)
129
141
  nokogiri (~> 1.3)
130
142
 
131
143
  PLATFORMS
132
144
  ruby
133
145
 
134
146
  DEPENDENCIES
135
- autotest
136
- capybara (>= 0.4.0)
137
- cells (~> 3.4.4)
147
+ apotomo
148
+ capybara
149
+ database_cleaner
138
150
  fabrication
139
151
  forgery
152
+ guard
153
+ guard-rspec
140
154
  jeweler
141
- mongrel
142
- rails (~> 3.0.4)
155
+ kaminari
156
+ libnotify
157
+ rails (>= 3.1.0.rc4)
143
158
  rspec-rails
144
- sqlite3-ruby
145
- will_paginate (~> 3.0.pre2)
159
+ sqlite3
data/Guardfile ADDED
@@ -0,0 +1,20 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+
4
+ guard 'rspec', :version => 2 do
5
+ watch(%r{^spec/.+_spec\.rb$})
6
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
7
+ watch('spec/spec_helper.rb') { "spec" }
8
+
9
+ # Rails example
10
+ watch(%r{^spec/.+_spec\.rb$})
11
+ watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
12
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
13
+ watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
14
+ watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
15
+ watch('spec/spec_helper.rb') { "spec" }
16
+ watch('config/routes.rb') { "spec/routing" }
17
+ watch('app/controllers/application_controller.rb') { "spec/controllers" }
18
+ # Capybara request specs
19
+ watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" }
20
+ end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.19
1
+ 0.0.20
@@ -0,0 +1,5 @@
1
+ //= require puffer/right
2
+ //= require puffer/right-calendar
3
+ //= require puffer/right-autocompleter
4
+ //= require puffer/rails
5
+ //= require puffer/puffer
@@ -0,0 +1,4 @@
1
+ /*
2
+ *= require puffer/reset
3
+ *= require puffer/puffer
4
+ */
@@ -434,8 +434,9 @@ select
434
434
  .association .association_clear
435
435
  {
436
436
  position: absolute;
437
- top: 4px;
437
+ top: 0;
438
438
  left: 9px;
439
+ line-height: 22pt;
439
440
  cursor: pointer;
440
441
  display: none;
441
442
  }
@@ -0,0 +1,12 @@
1
+ class Puffer::Dashboard < ApplicationController
2
+ unloadable
3
+
4
+ pufferize!
5
+
6
+ layout 'puffer_dashboard'
7
+
8
+ def index
9
+
10
+ end
11
+
12
+ end
@@ -1,8 +1,7 @@
1
- class Puffer::SessionsBase < ApplicationController
1
+ class Puffer::Sessions < ApplicationController
2
2
  unloadable
3
3
 
4
4
  pufferize!
5
- view_paths_fallbacks :puffer_sessions
6
5
  define_fields :create
7
6
 
8
7
  layout 'puffer_sessions'
@@ -28,16 +28,8 @@ module PufferHelper
28
28
  end
29
29
  end
30
30
 
31
- def puffer_stylesheets
32
- stylesheet_link_tag *Puffer.stylesheets.map {|path| "/puffer/stylesheets/#{path}"}.uniq.compact
33
- end
34
-
35
- def puffer_javascripts
36
- javascript_include_tag *Puffer.javascripts.map {|path| "/puffer/javascripts/#{path}"}.uniq.compact
37
- end
38
-
39
31
  def render_head field
40
- field.label
32
+ field.human
41
33
  end
42
34
 
43
35
  def render_field field, record
@@ -50,7 +42,7 @@ module PufferHelper
50
42
  else ''
51
43
  end
52
44
  else
53
- res = record.call_chain(field.field)
45
+ res = record.call_chain(field.to_s)
54
46
  end
55
47
  unless field.native?
56
48
  url = edit_polymorphic_path [resource.namespace, record.call_chain(field.path)] rescue nil
@@ -4,16 +4,16 @@
4
4
  <title><%= [@title, 'Puffer'].compact.join(' - ') %></title>
5
5
  <meta http-equiv="content-type" content="text/html;charset=utf-8" />
6
6
  <%= csrf_meta_tag %>
7
- <%= puffer_stylesheets %>
7
+ <%= stylesheet_link_tag "puffer/application" %>
8
+ <%= javascript_include_tag "puffer/application" %>
8
9
  <%= yield :stylesheets %>
9
- <%= puffer_javascripts %>
10
10
  <%= yield :javascripts %>
11
11
  </head>
12
12
  <body>
13
13
  <div class="body">
14
14
  <div class="header">
15
15
  <div class="logo">
16
- <%= link_to Puffer.logo, puffer_root_path %>
16
+ <%= link_to t('puffer.logo'), puffer_root_path %>
17
17
  </div>
18
18
  <ul class="namespaces">
19
19
  <% puffer_namespaces do |title, path, current| %>
@@ -36,9 +36,28 @@
36
36
  <% sidebar_puffer_navigation do |title, path, current| %>
37
37
  <li<%= raw(current ? ' class="selected"' : '') %>>
38
38
  <%= link_to title, path %>
39
- <% if current && (additional = render_cell('puffer/base', 'additional')).present? %>
39
+ <% if current %>
40
40
  <div class="additional">
41
- <%= additional %>
41
+ <dl>
42
+ <dt>Links</dt>
43
+ <dd>
44
+ <%= link_to t(:list, :target => resource.human), resource.collection_path %>
45
+ <%= link_to t(:add, :target => resource.human), resource.new_path %>
46
+ </dd>
47
+ <dt>Search</dt>
48
+ <dd>
49
+ <%= form_tag resource.collection_path, {:method => :get} do %>
50
+ <%= text_field_tag :search, params[:search] %>
51
+ <%= submit_tag 'Search' %>
52
+
53
+ <% if false %>
54
+ <% if resource_session[:search].present? %>
55
+ <%= link_to 'clear', resource.collection_path(:search => '') %>
56
+ <% end %>
57
+ <% end %>
58
+ <% end %>
59
+ </dd>
60
+ </dl>
42
61
  </div>
43
62
  <% end %>
44
63
  </li>