administer 0.2.2 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. data/README.rdoc +3 -4
  2. data/app/controllers/administer/application_controller.rb +12 -0
  3. data/app/controllers/administer/entities_controller.rb +76 -0
  4. data/app/helpers/administer/dashboard_helper.rb +1 -1
  5. data/app/helpers/administer/entities_helper.rb +2 -0
  6. data/app/views/administer/dashboard/index.html.haml +1 -1
  7. data/app/views/administer/entities/_form.haml +9 -0
  8. data/app/views/administer/entities/edit.html.haml +9 -0
  9. data/app/views/administer/entities/index.html.haml +21 -0
  10. data/app/views/administer/entities/new.haml +9 -0
  11. data/app/views/administer/fields/_belongs_to.html.haml +2 -0
  12. data/app/views/administer/fields/_date_select.html.haml +2 -0
  13. data/app/views/administer/fields/_has_many.html.haml +4 -0
  14. data/app/views/administer/fields/_has_one.html.haml +2 -0
  15. data/app/views/administer/fields/_text_area.html.haml +2 -0
  16. data/app/views/administer/fields/_text_field.html.haml +2 -0
  17. data/app/views/administer/shared/_errors.html.haml +6 -0
  18. data/app/views/layouts/administer.html.haml +21 -0
  19. data/config/routes.rb +4 -4
  20. data/lib/administer.rb +1 -0
  21. data/lib/administer/active_record.rb +22 -0
  22. data/lib/administer/config.rb +37 -0
  23. data/lib/administer/config/controller_config.rb +24 -0
  24. data/lib/administer/config/model_config.rb +23 -0
  25. data/lib/administer/engine.rb +5 -0
  26. data/lib/administer/fields.rb +34 -0
  27. data/lib/administer/fields/association.rb +21 -0
  28. data/lib/administer/fields/base.rb +15 -0
  29. data/lib/administer/fields/belongs_to.rb +12 -0
  30. data/lib/administer/fields/date_select.rb +6 -0
  31. data/lib/administer/fields/field_builder.rb +25 -0
  32. data/lib/administer/fields/has_many.rb +22 -0
  33. data/lib/administer/fields/has_one.rb +24 -0
  34. data/lib/administer/fields/text_area.rb +6 -0
  35. data/lib/administer/fields/text_field.rb +6 -0
  36. data/lib/administer/model.rb +40 -13
  37. data/spec/controllers/administer/entities_controller_spec.rb +23 -0
  38. data/spec/{rails_root/spec/controllers → controllers}/posts_controller_spec.rb +1 -1
  39. data/spec/factories/categories.rb +3 -0
  40. data/spec/factories/comments.rb +3 -0
  41. data/spec/{rails_root/spec/factories → factories}/posts.rb +0 -0
  42. data/spec/lib/config/model_config_spec.rb +35 -0
  43. data/spec/lib/config_spec.rb +29 -0
  44. data/spec/lib/fields/field_builder_spec.rb +10 -0
  45. data/spec/{rails_root/spec/models/administer → lib}/model_spec.rb +5 -4
  46. data/spec/models/comment_spec.rb +5 -0
  47. data/spec/rails_root/Gemfile +2 -0
  48. data/spec/rails_root/Gemfile.lock +150 -0
  49. data/spec/rails_root/README +256 -0
  50. data/spec/rails_root/Rakefile +7 -0
  51. data/spec/rails_root/app/controllers/application_controller.rb +4 -0
  52. data/spec/rails_root/app/models/attachment.rb +3 -0
  53. data/spec/rails_root/app/models/category.rb +1 -0
  54. data/spec/rails_root/app/models/comment.rb +3 -0
  55. data/spec/rails_root/app/models/post.rb +8 -0
  56. data/spec/rails_root/app/views/layouts/application.html.erb +14 -0
  57. data/spec/rails_root/app/views/posts/_form.html.haml +19 -0
  58. data/spec/rails_root/app/views/posts/edit.html.haml +5 -0
  59. data/spec/rails_root/app/views/posts/index.html.haml +10 -0
  60. data/spec/rails_root/app/views/posts/new.html.haml +3 -0
  61. data/spec/rails_root/app/views/posts/show.html.haml +10 -0
  62. data/spec/rails_root/config.ru +4 -0
  63. data/spec/rails_root/config/cucumber.yml +8 -0
  64. data/spec/rails_root/config/database.yml +25 -0
  65. data/spec/rails_root/config/initializers/administer.rb +23 -0
  66. data/spec/rails_root/config/locales/en.yml +5 -0
  67. data/spec/rails_root/db/development.sqlite3 +0 -0
  68. data/spec/rails_root/db/migrate/20110104100347_add_publish_on_to_post.rb +9 -0
  69. data/spec/rails_root/db/migrate/20110214190645_add_category_to_post.rb +9 -0
  70. data/spec/rails_root/db/migrate/20110609184125_create_comments.rb +13 -0
  71. data/spec/rails_root/db/migrate/20110628215407_create_attachments.rb +13 -0
  72. data/spec/rails_root/db/schema.rb +44 -0
  73. data/spec/rails_root/db/test.sqlite3 +0 -0
  74. data/spec/rails_root/features/administer/dashboard.feature +15 -0
  75. data/spec/rails_root/features/administer/posts.feature +72 -0
  76. data/spec/rails_root/features/listing_posts.feature +15 -0
  77. data/spec/rails_root/features/managing_posts.feature +70 -0
  78. data/spec/rails_root/features/step_definitions/categories_steps.rb +6 -0
  79. data/spec/rails_root/features/step_definitions/comments_steps.rb +6 -0
  80. data/spec/rails_root/features/step_definitions/post_steps.rb +21 -0
  81. data/spec/rails_root/features/step_definitions/web_steps.rb +5 -2
  82. data/spec/rails_root/features/support/env.rb +32 -46
  83. data/spec/rails_root/features/support/factory_girl.rb +2 -0
  84. data/spec/rails_root/features/support/matchers.rb +55 -0
  85. data/spec/rails_root/features/support/paths.rb +2 -0
  86. data/spec/rails_root/features/support/selectors.rb +39 -0
  87. data/spec/rails_root/lib/tasks/cucumber.rake +65 -0
  88. data/spec/rails_root/log/development.log +19507 -0
  89. data/spec/rails_root/log/test.log +45042 -0
  90. data/spec/rails_root/public/404.html +26 -0
  91. data/spec/rails_root/public/422.html +26 -0
  92. data/spec/rails_root/public/500.html +26 -0
  93. data/spec/rails_root/public/favicon.ico +0 -0
  94. data/spec/rails_root/public/images/rails.png +0 -0
  95. data/spec/rails_root/public/javascripts/application.js +2 -0
  96. data/spec/rails_root/public/javascripts/controls.js +965 -0
  97. data/spec/rails_root/public/javascripts/dragdrop.js +974 -0
  98. data/spec/rails_root/public/javascripts/effects.js +1123 -0
  99. data/spec/rails_root/public/javascripts/prototype.js +6001 -0
  100. data/spec/rails_root/public/javascripts/rails.js +175 -0
  101. data/spec/rails_root/public/robots.txt +5 -0
  102. data/spec/rails_root/public/stylesheets/scaffold.css +60 -0
  103. data/spec/rails_root/script/cucumber +10 -0
  104. data/spec/rails_root/script/rails +6 -0
  105. data/spec/rails_root/spec/models/attachment_spec.rb +5 -0
  106. data/spec/rails_root/tmp/capybara/capybara-20101221001337.html +43 -0
  107. data/spec/rails_root/tmp/capybara/capybara-20101221001509.html +47 -0
  108. data/spec/rails_root/tmp/capybara/capybara-20110104162405.html +110 -0
  109. data/spec/rails_root/tmp/capybara/capybara-20110214224604.html +51 -0
  110. data/spec/rails_root/tmp/capybara/capybara-20110214225336.html +51 -0
  111. data/spec/rails_root/tmp/capybara/capybara-20110214225545.html +51 -0
  112. data/spec/{rails_root/spec/routing → routing}/posts_routing_spec.rb +1 -1
  113. data/spec/{rails_root/spec/spec_helper.rb → spec_helper.rb} +6 -4
  114. data/spec/{rails_root/spec/views → views}/posts/edit.html.haml_spec.rb +1 -1
  115. data/spec/{rails_root/spec/views → views}/posts/new.html.haml_spec.rb +1 -1
  116. data/spec/{rails_root/spec/views → views}/posts/show.html.haml_spec.rb +1 -1
  117. metadata +306 -46
  118. data/app/controllers/administer/models_controller.rb +0 -16
  119. data/app/views/administer/models/index.html.haml +0 -14
  120. data/spec/rails_root/spec/controllers/administer/models_controller_spec.rb +0 -19
@@ -0,0 +1,175 @@
1
+ (function() {
2
+ // Technique from Juriy Zaytsev
3
+ // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
4
+ function isEventSupported(eventName) {
5
+ var el = document.createElement('div');
6
+ eventName = 'on' + eventName;
7
+ var isSupported = (eventName in el);
8
+ if (!isSupported) {
9
+ el.setAttribute(eventName, 'return;');
10
+ isSupported = typeof el[eventName] == 'function';
11
+ }
12
+ el = null;
13
+ return isSupported;
14
+ }
15
+
16
+ function isForm(element) {
17
+ return Object.isElement(element) && element.nodeName.toUpperCase() == 'FORM'
18
+ }
19
+
20
+ function isInput(element) {
21
+ if (Object.isElement(element)) {
22
+ var name = element.nodeName.toUpperCase()
23
+ return name == 'INPUT' || name == 'SELECT' || name == 'TEXTAREA'
24
+ }
25
+ else return false
26
+ }
27
+
28
+ var submitBubbles = isEventSupported('submit'),
29
+ changeBubbles = isEventSupported('change')
30
+
31
+ if (!submitBubbles || !changeBubbles) {
32
+ // augment the Event.Handler class to observe custom events when needed
33
+ Event.Handler.prototype.initialize = Event.Handler.prototype.initialize.wrap(
34
+ function(init, element, eventName, selector, callback) {
35
+ init(element, eventName, selector, callback)
36
+ // is the handler being attached to an element that doesn't support this event?
37
+ if ( (!submitBubbles && this.eventName == 'submit' && !isForm(this.element)) ||
38
+ (!changeBubbles && this.eventName == 'change' && !isInput(this.element)) ) {
39
+ // "submit" => "emulated:submit"
40
+ this.eventName = 'emulated:' + this.eventName
41
+ }
42
+ }
43
+ )
44
+ }
45
+
46
+ if (!submitBubbles) {
47
+ // discover forms on the page by observing focus events which always bubble
48
+ document.on('focusin', 'form', function(focusEvent, form) {
49
+ // special handler for the real "submit" event (one-time operation)
50
+ if (!form.retrieve('emulated:submit')) {
51
+ form.on('submit', function(submitEvent) {
52
+ var emulated = form.fire('emulated:submit', submitEvent, true)
53
+ // if custom event received preventDefault, cancel the real one too
54
+ if (emulated.returnValue === false) submitEvent.preventDefault()
55
+ })
56
+ form.store('emulated:submit', true)
57
+ }
58
+ })
59
+ }
60
+
61
+ if (!changeBubbles) {
62
+ // discover form inputs on the page
63
+ document.on('focusin', 'input, select, texarea', function(focusEvent, input) {
64
+ // special handler for real "change" events
65
+ if (!input.retrieve('emulated:change')) {
66
+ input.on('change', function(changeEvent) {
67
+ input.fire('emulated:change', changeEvent, true)
68
+ })
69
+ input.store('emulated:change', true)
70
+ }
71
+ })
72
+ }
73
+
74
+ function handleRemote(element) {
75
+ var method, url, params;
76
+
77
+ var event = element.fire("ajax:before");
78
+ if (event.stopped) return false;
79
+
80
+ if (element.tagName.toLowerCase() === 'form') {
81
+ method = element.readAttribute('method') || 'post';
82
+ url = element.readAttribute('action');
83
+ params = element.serialize();
84
+ } else {
85
+ method = element.readAttribute('data-method') || 'get';
86
+ url = element.readAttribute('href');
87
+ params = {};
88
+ }
89
+
90
+ new Ajax.Request(url, {
91
+ method: method,
92
+ parameters: params,
93
+ evalScripts: true,
94
+
95
+ onComplete: function(request) { element.fire("ajax:complete", request); },
96
+ onSuccess: function(request) { element.fire("ajax:success", request); },
97
+ onFailure: function(request) { element.fire("ajax:failure", request); }
98
+ });
99
+
100
+ element.fire("ajax:after");
101
+ }
102
+
103
+ function handleMethod(element) {
104
+ var method = element.readAttribute('data-method'),
105
+ url = element.readAttribute('href'),
106
+ csrf_param = $$('meta[name=csrf-param]')[0],
107
+ csrf_token = $$('meta[name=csrf-token]')[0];
108
+
109
+ var form = new Element('form', { method: "POST", action: url, style: "display: none;" });
110
+ element.parentNode.insert(form);
111
+
112
+ if (method !== 'post') {
113
+ var field = new Element('input', { type: 'hidden', name: '_method', value: method });
114
+ form.insert(field);
115
+ }
116
+
117
+ if (csrf_param) {
118
+ var param = csrf_param.readAttribute('content'),
119
+ token = csrf_token.readAttribute('content'),
120
+ field = new Element('input', { type: 'hidden', name: param, value: token });
121
+ form.insert(field);
122
+ }
123
+
124
+ form.submit();
125
+ }
126
+
127
+
128
+ document.on("click", "*[data-confirm]", function(event, element) {
129
+ var message = element.readAttribute('data-confirm');
130
+ if (!confirm(message)) event.stop();
131
+ });
132
+
133
+ document.on("click", "a[data-remote]", function(event, element) {
134
+ if (event.stopped) return;
135
+ handleRemote(element);
136
+ event.stop();
137
+ });
138
+
139
+ document.on("click", "a[data-method]", function(event, element) {
140
+ if (event.stopped) return;
141
+ handleMethod(element);
142
+ event.stop();
143
+ });
144
+
145
+ document.on("submit", function(event) {
146
+ var element = event.findElement(),
147
+ message = element.readAttribute('data-confirm');
148
+ if (message && !confirm(message)) {
149
+ event.stop();
150
+ return false;
151
+ }
152
+
153
+ var inputs = element.select("input[type=submit][data-disable-with]");
154
+ inputs.each(function(input) {
155
+ input.disabled = true;
156
+ input.writeAttribute('data-original-value', input.value);
157
+ input.value = input.readAttribute('data-disable-with');
158
+ });
159
+
160
+ var element = event.findElement("form[data-remote]");
161
+ if (element) {
162
+ handleRemote(element);
163
+ event.stop();
164
+ }
165
+ });
166
+
167
+ document.on("ajax:after", "form", function(event, element) {
168
+ var inputs = element.select("input[type=submit][disabled=true][data-disable-with]");
169
+ inputs.each(function(input) {
170
+ input.value = input.readAttribute('data-original-value');
171
+ input.removeAttribute('data-original-value');
172
+ input.disabled = false;
173
+ });
174
+ });
175
+ })();
@@ -0,0 +1,5 @@
1
+ # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
2
+ #
3
+ # To ban all spiders from the entire site uncomment the next two lines:
4
+ # User-Agent: *
5
+ # Disallow: /
@@ -0,0 +1,60 @@
1
+ body { background-color: #fff; color: #333; }
2
+
3
+ body, p, ol, ul, td {
4
+ font-family: verdana, arial, helvetica, sans-serif;
5
+ font-size: 13px;
6
+ line-height: 18px;
7
+ }
8
+
9
+ pre {
10
+ background-color: #eee;
11
+ padding: 10px;
12
+ font-size: 11px;
13
+ }
14
+
15
+ a { color: #000; }
16
+ a:visited { color: #666; }
17
+ a:hover { color: #fff; background-color:#000; }
18
+
19
+ div.field, div.actions {
20
+ margin-bottom: 10px;
21
+ }
22
+
23
+ #notice {
24
+ color: green;
25
+ }
26
+
27
+ .field_with_errors {
28
+ padding: 2px;
29
+ background-color: red;
30
+ display: table;
31
+ }
32
+
33
+ #error_explanation {
34
+ width: 450px;
35
+ border: 2px solid red;
36
+ padding: 7px;
37
+ padding-bottom: 0;
38
+ margin-bottom: 20px;
39
+ background-color: #f0f0f0;
40
+ }
41
+
42
+ #error_explanation h2 {
43
+ text-align: left;
44
+ font-weight: bold;
45
+ padding: 5px 5px 5px 15px;
46
+ font-size: 12px;
47
+ margin: -7px;
48
+ margin-bottom: 0px;
49
+ background-color: #c00;
50
+ color: #fff;
51
+ }
52
+
53
+ #error_explanation ul li {
54
+ font-size: 12px;
55
+ list-style: square;
56
+ }
57
+
58
+ .errors {
59
+ color: red;
60
+ }
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ vendored_cucumber_bin = Dir["#{File.dirname(__FILE__)}/../vendor/{gems,plugins}/cucumber*/bin/cucumber"].first
4
+ if vendored_cucumber_bin
5
+ load File.expand_path(vendored_cucumber_bin)
6
+ else
7
+ require 'rubygems' unless ENV['NO_RUBYGEMS']
8
+ require 'cucumber'
9
+ load Cucumber::BINARY
10
+ end
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,5 @@
1
+ require 'spec_helper'
2
+
3
+ describe Attachment do
4
+ pending "add some examples to (or delete) #{__FILE__}"
5
+ end
@@ -0,0 +1,43 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Administer</title>
5
+ <link href="/Users/piotrj/Projects/administer/spec/rails_root/public/stylesheets/scaffold.css?1291658540" media="screen" rel="stylesheet" type="text/css" />
6
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/prototype.js?1291658540" type="text/javascript"></script>
7
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/effects.js?1291658540" type="text/javascript"></script>
8
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/dragdrop.js?1291658540" type="text/javascript"></script>
9
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/controls.js?1291658540" type="text/javascript"></script>
10
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/rails.js?1291658540" type="text/javascript"></script>
11
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/application.js?1291658540" type="text/javascript"></script>
12
+
13
+ </head>
14
+ <body>
15
+ <div class='header'>
16
+ <ul class='navigation'>
17
+ <li>
18
+ <a href="/Users/piotrj/Projects/administer/spec/rails_root/public/">Go to application</a>
19
+ </li>
20
+ </ul>
21
+ </div>
22
+ <ul class='actions'>
23
+ <li><a href="/Users/piotrj/Projects/administer/spec/rails_root/public/administer/entities?model_name=Post">back</a></li>
24
+ </ul>
25
+ <h1>
26
+ New
27
+ Post
28
+ </h1>
29
+ <form accept-charset="UTF-8" action="/Users/piotrj/Projects/administer/spec/rails_root/public/administer/entities?model_name=Post" class="new_post" id="new_post" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /></div>
30
+ <p>
31
+ <label for="post_title">Title</label>
32
+ <input id="post_title" name="post[title]" size="30" type="text" />
33
+ </p>
34
+ <p>
35
+ <label for="post_body">Body</label>
36
+ <input id="post_body" name="post[body]" size="30" type="text" />
37
+ </p>
38
+
39
+ <input id="post_submit" name="commit" type="submit" value="Create Post" />
40
+ </form>
41
+
42
+ </body>
43
+ </html>
@@ -0,0 +1,47 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Administer</title>
5
+ <link href="/Users/piotrj/Projects/administer/spec/rails_root/public/stylesheets/scaffold.css?1291658540" media="screen" rel="stylesheet" type="text/css" />
6
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/prototype.js?1291658540" type="text/javascript"></script>
7
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/effects.js?1291658540" type="text/javascript"></script>
8
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/dragdrop.js?1291658540" type="text/javascript"></script>
9
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/controls.js?1291658540" type="text/javascript"></script>
10
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/rails.js?1291658540" type="text/javascript"></script>
11
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/application.js?1291658540" type="text/javascript"></script>
12
+
13
+ </head>
14
+ <body>
15
+ <div class='header'>
16
+ <ul class='navigation'>
17
+ <li>
18
+ <a href="/Users/piotrj/Projects/administer/spec/rails_root/public/">Go to application</a>
19
+ </li>
20
+ </ul>
21
+ </div>
22
+ <ul class='actions'>
23
+ <li><a href="/Users/piotrj/Projects/administer/spec/rails_root/public/administer/dashboard">back</a></li>
24
+ <li><a href="/Users/piotrj/Projects/administer/spec/rails_root/public/administer/entities/new?model_name=Post">New Post</a></li>
25
+ </ul>
26
+ <h1>Posts</h1>
27
+ <table class='items_list'>
28
+ <thead>
29
+ <tr></tr>
30
+ <th>id</th>
31
+ <th>title</th>
32
+ <th>body</th>
33
+ <th>created_at</th>
34
+ <th>updated_at</th>
35
+ </thead>
36
+ <tbody>
37
+ <tr class='odd'></tr>
38
+ <td>3</td>
39
+ <td>How to disassemble atomic bomb?</td>
40
+ <td>You should avoid using fork for that.</td>
41
+ <td>2010-12-20 23:15:09 UTC</td>
42
+ <td>2010-12-20 23:15:09 UTC</td>
43
+ </tbody>
44
+ </table>
45
+
46
+ </body>
47
+ </html>
@@ -0,0 +1,110 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Administer</title>
5
+ <link href="/Users/piotrj/Projects/administer/spec/rails_root/public/stylesheets/scaffold.css?1291658540" media="screen" rel="stylesheet" type="text/css" />
6
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/prototype.js?1291658540" type="text/javascript"></script>
7
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/effects.js?1291658540" type="text/javascript"></script>
8
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/dragdrop.js?1291658540" type="text/javascript"></script>
9
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/controls.js?1291658540" type="text/javascript"></script>
10
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/rails.js?1291658540" type="text/javascript"></script>
11
+ <script src="/Users/piotrj/Projects/administer/spec/rails_root/public/javascripts/application.js?1291658540" type="text/javascript"></script>
12
+
13
+ </head>
14
+ <body>
15
+ <div class='header'>
16
+ <ul class='navigation'>
17
+ <li>
18
+ <a href="/Users/piotrj/Projects/administer/spec/rails_root/public/">Go to application</a>
19
+ </li>
20
+ </ul>
21
+ </div>
22
+ <ul class='actions'>
23
+ <li><a href="/Users/piotrj/Projects/administer/spec/rails_root/public/administer/entities?model_name=Post">back</a></li>
24
+ </ul>
25
+ <h1>
26
+ New
27
+ Post
28
+ </h1>
29
+ <form accept-charset="UTF-8" action="/Users/piotrj/Projects/administer/spec/rails_root/public/administer/entities?model_name=Post" class="new_post" id="new_post" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /></div>
30
+ <p>
31
+ <label for="post_title">Title</label>
32
+ <input id="post_title" name="post[title]" size="30" type="text" />
33
+
34
+ </p>
35
+ <p>
36
+ <label for="post_body">Body</label>
37
+ <textarea cols="40" id="post_body" name="post[body]" rows="20"></textarea>
38
+
39
+ </p>
40
+ <p>
41
+ <label for="post_publish_on">Publish on</label>
42
+ <select id="post_publish_on_1i" name="post[publish_on(1i)]">
43
+ <option value="2006">2006</option>
44
+ <option value="2007">2007</option>
45
+ <option value="2008">2008</option>
46
+ <option value="2009">2009</option>
47
+ <option value="2010">2010</option>
48
+ <option selected="selected" value="2011">2011</option>
49
+ <option value="2012">2012</option>
50
+ <option value="2013">2013</option>
51
+ <option value="2014">2014</option>
52
+ <option value="2015">2015</option>
53
+ <option value="2016">2016</option>
54
+ </select>
55
+ <select id="post_publish_on_2i" name="post[publish_on(2i)]">
56
+ <option selected="selected" value="1">January</option>
57
+ <option value="2">February</option>
58
+ <option value="3">March</option>
59
+ <option value="4">April</option>
60
+ <option value="5">May</option>
61
+ <option value="6">June</option>
62
+ <option value="7">July</option>
63
+ <option value="8">August</option>
64
+ <option value="9">September</option>
65
+ <option value="10">October</option>
66
+ <option value="11">November</option>
67
+ <option value="12">December</option>
68
+ </select>
69
+ <select id="post_publish_on_3i" name="post[publish_on(3i)]">
70
+ <option value="1">1</option>
71
+ <option value="2">2</option>
72
+ <option value="3">3</option>
73
+ <option selected="selected" value="4">4</option>
74
+ <option value="5">5</option>
75
+ <option value="6">6</option>
76
+ <option value="7">7</option>
77
+ <option value="8">8</option>
78
+ <option value="9">9</option>
79
+ <option value="10">10</option>
80
+ <option value="11">11</option>
81
+ <option value="12">12</option>
82
+ <option value="13">13</option>
83
+ <option value="14">14</option>
84
+ <option value="15">15</option>
85
+ <option value="16">16</option>
86
+ <option value="17">17</option>
87
+ <option value="18">18</option>
88
+ <option value="19">19</option>
89
+ <option value="20">20</option>
90
+ <option value="21">21</option>
91
+ <option value="22">22</option>
92
+ <option value="23">23</option>
93
+ <option value="24">24</option>
94
+ <option value="25">25</option>
95
+ <option value="26">26</option>
96
+ <option value="27">27</option>
97
+ <option value="28">28</option>
98
+ <option value="29">29</option>
99
+ <option value="30">30</option>
100
+ <option value="31">31</option>
101
+ </select>
102
+
103
+
104
+ </p>
105
+
106
+ <input id="post_submit" name="commit" type="submit" value="Create Post" />
107
+ </form>
108
+
109
+ </body>
110
+ </html>