hobo 0.7.5 → 0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (212) hide show
  1. data/{hobo_files/plugin/CHANGES.txt → CHANGES.txt} +391 -0
  2. data/Manifest +146 -0
  3. data/{hobo_files/plugin/README → README} +0 -0
  4. data/bin/hobo +13 -26
  5. data/dryml_generators/rapid/cards.dryml.erb +55 -0
  6. data/dryml_generators/rapid/forms.dryml.erb +43 -0
  7. data/dryml_generators/rapid/pages.dryml.erb +284 -0
  8. data/hobo.gemspec +168 -0
  9. data/init.rb +9 -0
  10. data/lib/action_view_extensions/helpers/tag_helper.rb +7 -0
  11. data/lib/active_record/association_collection.rb +54 -0
  12. data/{hobo_files/plugin/lib → lib}/active_record/association_proxy.rb +12 -4
  13. data/{hobo_files/plugin/lib → lib}/active_record/association_reflection.rb +7 -1
  14. data/{hobo_files/plugin/lib → lib}/extensions/test_case.rb +17 -17
  15. data/{hobo_files/plugin/lib → lib}/hobo.rb +193 -100
  16. data/{hobo_files/plugin/lib → lib}/hobo/authentication_support.rb +8 -8
  17. data/{hobo_files/plugin/lib → lib}/hobo/bundle.rb +90 -89
  18. data/{hobo_files/plugin/lib → lib}/hobo/composite_model.rb +21 -21
  19. data/{hobo_files/plugin/lib → lib}/hobo/controller.rb +38 -25
  20. data/{hobo_files/plugin/lib → lib}/hobo/dev_controller.rb +10 -6
  21. data/lib/hobo/dryml.rb +167 -0
  22. data/{hobo_files/plugin/lib → lib}/hobo/dryml/dryml_builder.rb +28 -25
  23. data/lib/hobo/dryml/dryml_generator.rb +210 -0
  24. data/{hobo_files/plugin/lib → lib}/hobo/dryml/dryml_support_controller.rb +1 -1
  25. data/lib/hobo/dryml/parser.rb +3 -0
  26. data/{hobo_files/plugin/lib → lib}/hobo/dryml/parser/attribute.rb +6 -6
  27. data/{hobo_files/plugin/lib → lib}/hobo/dryml/parser/base_parser.rb +16 -16
  28. data/lib/hobo/dryml/parser/document.rb +57 -0
  29. data/{hobo_files/plugin/lib → lib}/hobo/dryml/parser/element.rb +7 -7
  30. data/{hobo_files/plugin/lib → lib}/hobo/dryml/parser/elements.rb +9 -9
  31. data/{hobo_files/plugin/lib → lib}/hobo/dryml/parser/source.rb +3 -3
  32. data/{hobo_files/plugin/lib → lib}/hobo/dryml/parser/text.rb +3 -3
  33. data/{hobo_files/plugin/lib → lib}/hobo/dryml/parser/tree_parser.rb +3 -3
  34. data/{hobo_files/plugin/lib → lib}/hobo/dryml/part_context.rb +26 -26
  35. data/{hobo_files/plugin/lib → lib}/hobo/dryml/scoped_variables.rb +15 -15
  36. data/{hobo_files/plugin/lib → lib}/hobo/dryml/tag_parameters.rb +10 -10
  37. data/{hobo_files/plugin/lib → lib}/hobo/dryml/taglib.rb +43 -37
  38. data/{hobo_files/plugin/lib → lib}/hobo/dryml/template.rb +290 -208
  39. data/{hobo_files/plugin/lib → lib}/hobo/dryml/template_environment.rb +173 -115
  40. data/{hobo_files/plugin/lib → lib}/hobo/dryml/template_handler.rb +19 -24
  41. data/lib/hobo/find_for.rb +95 -0
  42. data/{hobo_files/plugin/lib → lib}/hobo/generator.rb +2 -1
  43. data/{hobo_files/plugin/lib → lib}/hobo/guest.rb +12 -4
  44. data/{hobo_files/plugin/lib → lib}/hobo/hobo_helper.rb +146 -117
  45. data/lib/hobo/include_in_save.rb +43 -0
  46. data/lib/hobo/lifecycles.rb +94 -0
  47. data/lib/hobo/lifecycles/actions.rb +73 -0
  48. data/lib/hobo/lifecycles/creator.rb +76 -0
  49. data/lib/hobo/lifecycles/lifecycle.rb +205 -0
  50. data/lib/hobo/lifecycles/state.rb +23 -0
  51. data/lib/hobo/lifecycles/transition.rb +66 -0
  52. data/{hobo_files/plugin/lib → lib}/hobo/model.rb +306 -217
  53. data/{hobo_files/plugin/lib → lib}/hobo/model_controller.rb +342 -213
  54. data/{hobo_files/plugin/lib → lib}/hobo/model_router.rb +151 -120
  55. data/{hobo_files/plugin/lib → lib}/hobo/model_support.rb +9 -9
  56. data/{hobo_files/plugin/lib → lib}/hobo/rapid_helper.rb +30 -23
  57. data/{hobo_files/plugin/lib → lib}/hobo/scopes.rb +22 -68
  58. data/{hobo_files/plugin/lib → lib}/hobo/scopes/apply_scopes.rb +5 -5
  59. data/lib/hobo/scopes/association_proxy_extensions.rb +47 -0
  60. data/{hobo_files/plugin/lib → lib}/hobo/scopes/automatic_scopes.rb +104 -79
  61. data/lib/hobo/scopes/named_scope_extensions.rb +27 -0
  62. data/{hobo_files/plugin/lib → lib}/hobo/static_tags +1 -11
  63. data/{hobo_files/plugin/lib → lib}/hobo/undefined.rb +1 -1
  64. data/{hobo_files/plugin/lib → lib}/hobo/undefined_access_error.rb +0 -0
  65. data/{hobo_files/plugin/lib → lib}/hobo/user.rb +27 -25
  66. data/{hobo_files/plugin/lib → lib}/hobo/user_controller.rb +80 -34
  67. data/{hobo_files/plugin/generators → rails_generators}/hobo/hobo_generator.rb +7 -7
  68. data/rails_generators/hobo/templates/application.css +0 -0
  69. data/{hobo_files/plugin/generators → rails_generators}/hobo/templates/application.dryml +0 -2
  70. data/{hobo_files/plugin/generators → rails_generators}/hobo/templates/dryml-support.js +0 -0
  71. data/{hobo_files/plugin/generators → rails_generators}/hobo/templates/guest.rb +0 -0
  72. data/rails_generators/hobo/templates/initializer.rb +9 -0
  73. data/{hobo_files/plugin/generators → rails_generators}/hobo_front_controller/USAGE +0 -0
  74. data/{hobo_files/plugin/generators → rails_generators}/hobo_front_controller/hobo_front_controller_generator.rb +1 -3
  75. data/{hobo_files/plugin/generators → rails_generators}/hobo_front_controller/templates/controller.rb +1 -1
  76. data/{hobo_files/plugin/generators → rails_generators}/hobo_front_controller/templates/functional_test.rb +0 -0
  77. data/{hobo_files/plugin/generators → rails_generators}/hobo_front_controller/templates/helper.rb +0 -0
  78. data/rails_generators/hobo_front_controller/templates/index.dryml +25 -0
  79. data/{hobo_files/plugin/generators → rails_generators}/hobo_model/USAGE +0 -0
  80. data/{hobo_files/plugin/generators → rails_generators}/hobo_model/hobo_model_generator.rb +0 -0
  81. data/{hobo_files/plugin/generators → rails_generators}/hobo_model/templates/fixtures.yml +0 -0
  82. data/{hobo_files/plugin/generators → rails_generators}/hobo_model/templates/model.rb +0 -0
  83. data/{hobo_files/plugin/generators → rails_generators}/hobo_model/templates/unit_test.rb +0 -0
  84. data/{hobo_files/plugin/generators → rails_generators}/hobo_model_controller/USAGE +0 -0
  85. data/{hobo_files/plugin/generators → rails_generators}/hobo_model_controller/hobo_model_controller_generator.rb +0 -7
  86. data/{hobo_files/plugin/generators → rails_generators}/hobo_model_controller/templates/controller.rb +0 -0
  87. data/{hobo_files/plugin/generators → rails_generators}/hobo_model_controller/templates/functional_test.rb +0 -0
  88. data/{hobo_files/plugin/generators → rails_generators}/hobo_model_controller/templates/helper.rb +0 -0
  89. data/{hobo_files/plugin/generators → rails_generators}/hobo_model_resource/hobo_model_resource_generator.rb +0 -0
  90. data/{hobo_files/plugin/generators → rails_generators}/hobo_model_resource/templates/controller.rb +0 -0
  91. data/{hobo_files/plugin/generators → rails_generators}/hobo_model_resource/templates/functional_test.rb +0 -0
  92. data/{hobo_files/plugin/generators → rails_generators}/hobo_model_resource/templates/helper.rb +0 -0
  93. data/{hobo_files/plugin/generators → rails_generators}/hobo_rapid/hobo_rapid_generator.rb +21 -11
  94. data/{hobo_files/plugin/generators → rails_generators}/hobo_rapid/templates/IE7.js +1 -1
  95. data/rails_generators/hobo_rapid/templates/blank.gif +0 -0
  96. data/{hobo_files/plugin/generators → rails_generators}/hobo_rapid/templates/hobo-rapid.css +0 -0
  97. data/{hobo_files/plugin/generators → rails_generators}/hobo_rapid/templates/hobo-rapid.js +175 -104
  98. data/{hobo_files/plugin/generators → rails_generators}/hobo_rapid/templates/lowpro.js +0 -0
  99. data/rails_generators/hobo_rapid/templates/nicEditorIcons.gif +0 -0
  100. data/rails_generators/hobo_rapid/templates/nicedit.js +91 -0
  101. data/{hobo_files/plugin/generators → rails_generators}/hobo_rapid/templates/reset.css +0 -0
  102. data/{hobo_files/plugin/generators → rails_generators}/hobo_rapid/templates/themes/clean/public/images/fieldbg.gif +0 -0
  103. data/{hobo_files/plugin/generators → rails_generators}/hobo_rapid/templates/themes/clean/public/images/pencil.png +0 -0
  104. data/{hobo_files/plugin/generators → rails_generators}/hobo_rapid/templates/themes/clean/public/images/small_close.png +0 -0
  105. data/{hobo_files/plugin/generators → rails_generators}/hobo_rapid/templates/themes/clean/public/images/spinner.gif +0 -0
  106. data/{hobo_files/plugin/generators → rails_generators}/hobo_rapid/templates/themes/clean/public/stylesheets/clean.css +80 -71
  107. data/{hobo_files/plugin/generators → rails_generators}/hobo_rapid/templates/themes/clean/public/stylesheets/rapid-ui.css +6 -1
  108. data/{hobo_files/plugin/generators → rails_generators}/hobo_rapid/templates/themes/clean/views/clean.dryml +4 -4
  109. data/rails_generators/hobo_subsite/hobo_subsite_generator.rb +73 -0
  110. data/rails_generators/hobo_subsite/templates/application.dryml +1 -0
  111. data/rails_generators/hobo_subsite/templates/controller.rb +5 -0
  112. data/rails_generators/hobo_subsite/templates/site_taglib.dryml +13 -0
  113. data/{hobo_files/plugin/generators → rails_generators}/hobo_user_controller/USAGE +0 -0
  114. data/{hobo_files/plugin/generators → rails_generators}/hobo_user_controller/hobo_user_controller_generator.rb +0 -0
  115. data/{hobo_files/plugin/generators → rails_generators}/hobo_user_controller/templates/controller.rb +0 -0
  116. data/{hobo_files/plugin/generators → rails_generators}/hobo_user_controller/templates/functional_test.rb +0 -0
  117. data/{hobo_files/plugin/generators → rails_generators}/hobo_user_controller/templates/helper.rb +0 -0
  118. data/{hobo_files/plugin/generators → rails_generators}/hobo_user_model/USAGE +0 -0
  119. data/rails_generators/hobo_user_model/hobo_user_model_generator.rb +30 -0
  120. data/{hobo_files/plugin/generators → rails_generators}/hobo_user_model/templates/fixtures.yml +0 -0
  121. data/rails_generators/hobo_user_model/templates/forgot_password.erb +10 -0
  122. data/rails_generators/hobo_user_model/templates/mailer.rb +14 -0
  123. data/rails_generators/hobo_user_model/templates/model.rb +55 -0
  124. data/{hobo_files/plugin/generators → rails_generators}/hobo_user_model/templates/unit_test.rb +0 -0
  125. data/script/destroy +14 -0
  126. data/script/generate +14 -0
  127. data/{hobo_files/plugin/taglibs → taglibs}/core.dryml +6 -7
  128. data/{hobo_files/plugin/taglibs → taglibs}/rapid.dryml +36 -67
  129. data/{hobo_files/plugin/taglibs → taglibs}/rapid_document_tags.dryml +7 -24
  130. data/{hobo_files/plugin/taglibs → taglibs}/rapid_editing.dryml +51 -50
  131. data/{hobo_files/plugin/taglibs → taglibs}/rapid_forms.dryml +62 -56
  132. data/taglibs/rapid_generics.dryml +33 -0
  133. data/taglibs/rapid_lifecycles.dryml +43 -0
  134. data/{hobo_files/plugin/taglibs → taglibs}/rapid_navigation.dryml +23 -23
  135. data/taglibs/rapid_pages.dryml +183 -0
  136. data/{hobo_files/plugin/taglibs → taglibs}/rapid_plus.dryml +30 -5
  137. data/{hobo_files/plugin/taglibs → taglibs}/rapid_support.dryml +3 -4
  138. data/taglibs/rapid_user_pages.dryml +179 -0
  139. data/{hobo_files/plugin/tasks → tasks}/environments.rake +0 -0
  140. data/{hobo_files/plugin/tasks → tasks}/fix_dryml.rake +0 -0
  141. data/{hobo_files/plugin/tasks → tasks}/generate_tag_reference.rb +21 -22
  142. data/tasks/hobo_tasks.rake +32 -0
  143. data/test/test_generator_helper.rb +29 -0
  144. data/test/test_helper.rb +1 -0
  145. data/test/test_hobo_model_controller_generator.rb +56 -0
  146. data/{hobo_files/plugin/uninstall.rb → uninstall.rb} +0 -0
  147. metadata +240 -225
  148. data/README.txt +0 -18
  149. data/hobo_files/plugin/LICENSE.txt +0 -22
  150. data/hobo_files/plugin/Rakefile +0 -96
  151. data/hobo_files/plugin/generators/hobo_front_controller/templates/index.dryml +0 -24
  152. data/hobo_files/plugin/generators/hobo_front_controller/templates/search.dryml +0 -19
  153. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/banner.gif +0 -0
  154. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/bkg-bodytop.gif +0 -0
  155. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/bkg-corner-01.gif +0 -0
  156. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/bkg-corner-02.gif +0 -0
  157. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/bkg-corner-03.gif +0 -0
  158. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/bkg-corner-04.gif +0 -0
  159. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/bkg-shadow-bottom.gif +0 -0
  160. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/bkg-shadow-left.gif +0 -0
  161. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/bkg-shadow-right.gif +0 -0
  162. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/bkg-shadow-top.gif +0 -0
  163. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/header-blue.gif +0 -0
  164. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/header-dblue.gif +0 -0
  165. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/header-green.gif +0 -0
  166. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/header-purple.gif +0 -0
  167. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/header-red.gif +0 -0
  168. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/logo.gif +0 -0
  169. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/plus.png +0 -0
  170. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/spinner.gif +0 -0
  171. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/txt-list-img-dblue.gif +0 -0
  172. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/txt-list-img-green.gif +0 -0
  173. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/txt-list-img-purple.gif +0 -0
  174. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/txt-list-img-red.gif +0 -0
  175. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/window-corner-01.gif +0 -0
  176. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/window-corner-02.gif +0 -0
  177. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/window-corner-03.gif +0 -0
  178. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/window-corner-04.gif +0 -0
  179. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/window-shadow-bottom.gif +0 -0
  180. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/window-shadow-left.gif +0 -0
  181. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/window-shadow-right.gif +0 -0
  182. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/window-shadow-top.gif +0 -0
  183. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/stylesheets/application.css +0 -400
  184. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/views/application.dryml +0 -96
  185. data/hobo_files/plugin/generators/hobo_user_model/hobo_user_model_generator.rb +0 -25
  186. data/hobo_files/plugin/generators/hobo_user_model/templates/model.rb +0 -56
  187. data/hobo_files/plugin/init.rb +0 -101
  188. data/hobo_files/plugin/lib/action_view_extensions/base.rb +0 -15
  189. data/hobo_files/plugin/lib/active_record/has_many_association.rb +0 -55
  190. data/hobo_files/plugin/lib/active_record/has_many_through_association.rb +0 -20
  191. data/hobo_files/plugin/lib/hobo/dryml.rb +0 -165
  192. data/hobo_files/plugin/lib/hobo/dryml/parser/document.rb +0 -53
  193. data/hobo_files/plugin/lib/hobo/scopes/association_proxy_extensions.rb +0 -33
  194. data/hobo_files/plugin/lib/hobo/scopes/defined_scope_proxy_extender.rb +0 -90
  195. data/hobo_files/plugin/lib/hobo/scopes/scope_reflection.rb +0 -18
  196. data/hobo_files/plugin/lib/hobo/scopes/scoped_proxy.rb +0 -55
  197. data/hobo_files/plugin/taglib-docs/core.markdown +0 -165
  198. data/hobo_files/plugin/taglib-docs/rapid.markdown +0 -677
  199. data/hobo_files/plugin/taglib-docs/rapid_document_tags.markdown +0 -240
  200. data/hobo_files/plugin/taglib-docs/rapid_editing.markdown +0 -418
  201. data/hobo_files/plugin/taglib-docs/rapid_forms.markdown +0 -562
  202. data/hobo_files/plugin/taglib-docs/rapid_generics.markdown +0 -187
  203. data/hobo_files/plugin/taglib-docs/rapid_navigation.markdown +0 -214
  204. data/hobo_files/plugin/taglib-docs/rapid_pages.markdown +0 -530
  205. data/hobo_files/plugin/taglib-docs/rapid_plus.markdown +0 -65
  206. data/hobo_files/plugin/taglib-docs/rapid_support.markdown +0 -50
  207. data/hobo_files/plugin/taglib-docs/rapid_user_pages.markdown +0 -129
  208. data/hobo_files/plugin/taglibs/rapid_generics.dryml +0 -117
  209. data/hobo_files/plugin/taglibs/rapid_pages.dryml +0 -359
  210. data/hobo_files/plugin/taglibs/rapid_user_pages.dryml +0 -104
  211. data/hobo_files/plugin/tasks/dump_fixtures.rake +0 -70
  212. data/hobo_files/plugin/tasks/hobo_tasks.rake +0 -17
@@ -1,65 +0,0 @@
1
- # Rapid Plus
2
-
3
- * [<table-plus>](#table-plus)
4
- * [<change-password-form>](#change-password-form)
5
-
6
-
7
- ---
8
-
9
- <a name="table-plus">&nbsp;</a>
10
- ## &lt;table-plus&gt;
11
-
12
-
13
-
14
- ### Attributes (merged with [&lt;div&gt;](#div))
15
-
16
- * sort-field
17
- * sort-direction
18
- * sort-columns
19
-
20
-
21
- ### Parameters (merged with [&lt;table&gt;](#table))
22
-
23
- <ul><li>&lt;header:&gt; (&lt;div&gt;)
24
- <ul><li>&lt;search-form:&gt; (&lt;form&gt;)
25
- <ul><li>&lt;search-submit:&gt; (&lt;submit&gt;)
26
- </li>
27
- </ul></li>
28
- </ul></li>
29
- <li>(dynamic parameter) (&lt;th&gt;)
30
- <ul><li>(dynamic parameter) (&lt;a&gt;)
31
- </li>
32
- <li>&lt;up-arrow:&gt; (&lt;do&gt;)
33
- </li>
34
- <li>&lt;down-arrow:&gt; (&lt;do&gt;)
35
- </li>
36
- </ul></li>
37
- <li>&lt;empty-message:&gt; (&lt;do&gt;)
38
- </li>
39
- <li>&lt;page-nav:&gt;
40
- </li>
41
- </ul>
42
-
43
-
44
- ---
45
-
46
- <a name="change-password-form">&nbsp;</a>
47
- ## &lt;change-password-form&gt;
48
-
49
-
50
-
51
- ### Attributes
52
-
53
- None
54
-
55
- ### Parameters
56
-
57
- <ul><li>&lt;form:&gt;
58
- <ul><li>&lt;field-list:&gt;
59
- </li>
60
- <li>&lt;actions:&gt; (&lt;div&gt;)
61
- <ul><li>&lt;submit:&gt;
62
- </li>
63
- </ul></li>
64
- </ul></li>
65
- </ul>
@@ -1,50 +0,0 @@
1
- # Rapid Support
2
-
3
- * [&lt;with-fields&gt;](#with-fields)
4
- * [&lt;with-field-names&gt;](#with-field-names)
5
-
6
-
7
- ---
8
-
9
- <a name="with-fields">&nbsp;</a>
10
- ## &lt;with-fields&gt;
11
-
12
-
13
-
14
- ### Attributes
15
-
16
- * fields
17
- * associations
18
- * skip
19
- * skip-associations
20
- * include-timestamps
21
- * force-all
22
-
23
-
24
- ### Parameters
25
-
26
- <ul><li>&lt;default:&gt; (&lt;do&gt;)
27
- </li>
28
- <li>&lt;default:&gt; (&lt;do&gt;)
29
- </li>
30
- </ul>
31
-
32
-
33
- ---
34
-
35
- <a name="with-field-names">&nbsp;</a>
36
- ## &lt;with-field-names&gt;
37
-
38
-
39
-
40
- ### Attributes
41
-
42
- * fields
43
- * skip
44
- * skip-associations
45
- * include-timestamps
46
-
47
-
48
- ### Parameters
49
-
50
- None
@@ -1,129 +0,0 @@
1
- # Rapid User Pages
2
-
3
- * [&lt;signup-page&gt;](#signup-page)
4
- * [&lt;login-page&gt;](#login-page)
5
- * [&lt;account-disabled-page&gt;](#account-disabled-page)
6
- * [&lt;account-page&gt;](#account-page)
7
-
8
-
9
- ---
10
-
11
- <a name="signup-page">&nbsp;</a>
12
- ## &lt;signup-page&gt;
13
-
14
-
15
-
16
- ### Attributes (merged with [&lt;page&gt;](#page))
17
-
18
- None
19
-
20
- ### Parameters (merged with [&lt;page&gt;](#page))
21
-
22
- <ul><li>&lt;body:&gt;
23
- </li>
24
- <li>&lt;content-header:&gt;
25
- <ul><li>&lt;heading:&gt;
26
- </li>
27
- </ul></li>
28
- <li>&lt;content-body:&gt;
29
- <ul><li>&lt;form:&gt;
30
- <ul><li>&lt;field-list:&gt;
31
- </li>
32
- <li>&lt;actions:&gt; (&lt;div&gt;)
33
- </li>
34
- </ul></li>
35
- </ul></li>
36
- </ul>
37
-
38
-
39
- ---
40
-
41
- <a name="login-page">&nbsp;</a>
42
- ## &lt;login-page&gt;
43
-
44
-
45
-
46
- ### Attributes (merged with [&lt;page&gt;](#page))
47
-
48
- * remember-me
49
-
50
-
51
- ### Parameters (merged with [&lt;page&gt;](#page))
52
-
53
- <ul><li>&lt;body:&gt;
54
- </li>
55
- <li>&lt;content-header:&gt;
56
- <ul><li>&lt;heading:&gt;
57
- </li>
58
- </ul></li>
59
- <li>&lt;content-body:&gt;
60
- <ul><li>&lt;form:&gt;
61
- <ul><li>&lt;labelled-item-list:&gt;
62
- <ul><li>&lt;login-label:&gt; (&lt;item-label&gt;)
63
- </li>
64
- <li>&lt;login-input:&gt; (&lt;input&gt;)
65
- </li>
66
- <li>&lt;password-label:&gt; (&lt;item-label&gt;)
67
- </li>
68
- <li>&lt;password-input:&gt; (&lt;input&gt;)
69
- </li>
70
- <li>&lt;remember-me-label:&gt; (&lt;item-label&gt;)
71
- </li>
72
- <li>&lt;remember-me-input:&gt; (&lt;input&gt;)
73
- </li>
74
- </ul></li>
75
- <li>&lt;actions:&gt; (&lt;div&gt;)
76
- <ul><li>&lt;submit:&gt;
77
- </li>
78
- </ul></li>
79
- </ul></li>
80
- </ul></li>
81
- </ul>
82
-
83
-
84
- ---
85
-
86
- <a name="account-disabled-page">&nbsp;</a>
87
- ## &lt;account-disabled-page&gt;
88
-
89
-
90
-
91
- ### Attributes (merged with [&lt;page&gt;](#page))
92
-
93
- None
94
-
95
- ### Parameters (merged with [&lt;page&gt;](#page))
96
-
97
- <ul><li>&lt;body:&gt;
98
- </li>
99
- <li>&lt;content-header:&gt;
100
- <ul><li>&lt;heading:&gt;
101
- </li>
102
- </ul></li>
103
- <li>&lt;content-body:&gt;
104
- </li>
105
- </ul>
106
-
107
-
108
- ---
109
-
110
- <a name="account-page">&nbsp;</a>
111
- ## &lt;account-page&gt;
112
-
113
-
114
-
115
- ### Attributes (merged with [&lt;page&gt;](#page))
116
-
117
- None
118
-
119
- ### Parameters (merged with [&lt;page&gt;](#page))
120
-
121
- <ul><li>&lt;body:&gt;
122
- </li>
123
- <li>&lt;content-header:&gt;
124
- </li>
125
- <li>&lt;content-body:&gt;
126
- <ul><li>&lt;error-messages:&gt;
127
- </li>
128
- </ul></li>
129
- </ul>
@@ -1,117 +0,0 @@
1
- <def tag="creation-details">
2
- <div class="creation-details">
3
- <if:get_creator><view class="creator" param="by"/></if:>
4
- <view:created_at class="created-at" if="&this.respond_to?(:created_at)" param="at"/>
5
- </div>
6
- </def>
7
-
8
- <def tag="primary-content">
9
- <view class="primary-content" field="&this.class.primary_content_attribute" if="&this.class.primary_content_attribute" merge/>
10
- </def>
11
-
12
- <def tag="association-count">
13
- <a class="association-count #{this_field.to_s.underscore}" href="##{this_field.to_s.underscore}" merge>
14
- <count/>
15
- </a>
16
- </def>
17
-
18
- <def tag="base-card">
19
- <if test="&can_view?">
20
- <set has-heading="&this.class.name_attribute || all_parameters[:heading]"/>
21
- <set has-link="&has_heading && linkable?"/>
22
- <div class="card #{has_link ? 'linkable' : 'content'} #{'with-owner' if this.class.creator_attribute} #{type_name :dasherize => true}"
23
- merge-attrs>
24
- <a action="edit" class="edit" if="&!has_link && linkable?(:edit)" param="edit-link">Edit</a>
25
- <delete-button label="X" unless="&linkable?(:edit)" param/>
26
-
27
- <h3 param="heading" if="&has_heading"><a><name/></a></h3>
28
- <div class="content" param="content" unless="&has_link">
29
- <primary-content/>
30
- </div>
31
- <creation-details param/>
32
- <do param="counter">
33
- <set primary-collection="&primary_collection_name"/>
34
- <if test="&primary_collection">
35
- <span class="dependents"><count field="&primary_collection"/></span>
36
- </if>
37
- </do>
38
- </div>
39
- </if>
40
- </def>
41
-
42
- <def tag="card">
43
- <if test="&can_view?">
44
- <%= poly = call_polymorphic_tag('card', attributes, parameters) %>
45
- <base-card unless="&poly" merge/>
46
- </if>
47
- </def>
48
-
49
- <def tag="search-card">
50
- <%= poly = call_polymorphic_tag('search-card', attributes, parameters) %>
51
- <card unless="&poly"/>
52
- </def>
53
-
54
- <def tag="collection">
55
- <set-scoped collection-contains-delete-button="&false">
56
- <%= poly = call_polymorphic_tag('collection', attributes, parameters) %>
57
- <base-collection if="&poly.nil?" merge/>
58
- <p class="empty-collection-message"
59
- if="&this.empty? || scope.collection_contains_delete_button"
60
- style="#{'display:none' if !this.empty?}"
61
- param="empty-message">
62
- There are no <name-for-collection lowercase/>
63
- </p>
64
- </set-scoped>
65
- </def>
66
-
67
-
68
- <def tag="base-collection" attrs="sortable, sortable-options"><%
69
- sortable = (sortable != false and
70
- first = this.first and
71
- first.respond_to?(:position_column) and
72
- reorder_url = object_url(this.member_class, :reorder, :method => :post) and
73
- can_edit?(first, first.position_column))
74
- if sortable
75
- singular_name = first.class.name.underscore
76
- attributes[:id] ||= "#{singular_name}_ordering"
77
- end
78
- %>
79
- <ul class="collection #{this.origin_attribute.to_s.gsub('_', '-')}" merge-attrs>
80
- <li: id="&%(#{singular_name}_#{this.id}) if sortable" param>
81
- <div class="ordering-handle" param="handle" if="&sortable">&uarr;<br/>&darr;</div>
82
- <card param/>
83
- </li:>
84
- </ul>
85
- <%= if sortable && Hobo::Dryml.last_if
86
- opts = { :url => reorder_url,
87
- :constraint => :vertical,
88
- :overlap => :vertical,
89
- :scroll => :window,
90
- :handle => 'ordering-handle',
91
- :complete => [visual_effect(:highlight, attributes[:id])]
92
- }
93
- opts.reverse_merge!(sortable_options) if sortable_options
94
- sortable_element attributes[:id], opts
95
- end
96
- %>
97
- </def>
98
-
99
-
100
- <def tag="collection-preview" attrs="limit, if-any">
101
- <% limit ||= 6 %>
102
- <do with="&this.is_a?(Class) ? this.limit(limit).all : this.limit(limit)">
103
- <unless test="&if_any && this.empty?">
104
- <set collection-name="&(this.try.origin_attribute || this.member_class.name.pluralize).to_s"/>
105
- <div class="collection-preview" merge-attrs>
106
- <h2>
107
- <do param="heading"><collection-name.titleize/></do>
108
- <span param="show-all-link" if="&linkable? && this.count > limit">(<a>show all</a>)</span>
109
- </h2>
110
- <collection merge-params>
111
- <card: class="small"/>
112
- </collection>
113
- </div>
114
- </unless>
115
- </do>
116
- </def>
117
-
@@ -1,359 +0,0 @@
1
- <def tag="base-page" attrs="title, full-title, doctype">
2
- <% full_title ||= "#{title} : #{app_name}" %>
3
- <doctype param version="&doctype || 'HTML 4.01 STRICT'"/>
4
- <html>
5
- <head param>
6
- <title param><%= full_title.gsub(/<.*?>/, '') %></title>
7
- <do param="stylesheets">
8
- <stylesheet name="reset"/>
9
- <stylesheet name="hobo-rapid"/>
10
- <stylesheet name="application"/>
11
- </do>
12
-
13
- <do param="scripts">
14
- <javascript param name="prototype, effects, dragdrop, controls, lowpro, hobo-rapid, application"/>
15
- <do param="fix-ie6"><%= "<!--[if lt IE 7]>" %><javascript name="IE7"/><%= "<![endif]-->" %></do>
16
- <hobo-rapid-javascripts param/>
17
- </do>
18
- </head>
19
-
20
- <body onload="Hobo.applyEvents();" param/>
21
- </html>
22
- </def>
23
-
24
-
25
- <def tag="simple-layout">
26
- <base-page merge>
27
- <body: param>
28
- <ajax-progress/>
29
- <header class="page-header" param>
30
- <heading param="app-name"><a href="#{base_url}/"><app-name/></a></heading>
31
- <live-search param if="&defined_route? :site_search"/>
32
- <nav param>
33
- <account-nav if="&Hobo::User.default_user_model" param/>
34
- <main-nav param/>
35
- </nav>
36
- </header>
37
- <section class="page-content" param="content">
38
- <flash-message param/>
39
- <flash-message type="error" param/>
40
- <header class="content-header" param="content-header"/>
41
- <section class="content-body" param="content-body"/>
42
- <footer class="content-footer" param="content-footer"/>
43
- </section>
44
- <footer class="page-footer" param/>
45
- <part-contexts-javascripts/>
46
- </body:>
47
- </base-page>
48
- </def>
49
-
50
-
51
- <def tag="aside-layout">
52
- <simple-layout merge>
53
- <body: class="aside-layout" param/>
54
- <content: param>
55
- <section class="main-content" param="main-content">
56
- <param-content for="content"/>
57
- </section>
58
- <aside class="aside-content" empty param/>
59
- </content:>
60
- </simple-layout>
61
- </def>
62
-
63
-
64
- <def tag="page" attrs="layout"><call-tag tag="#{layout || 'simple'}-layout" merge/></def>
65
-
66
-
67
- <def tag="index-page">
68
- <set model="&this.try.member_class || self.model"/>
69
- <set model-name="&model.name.titleize"/>
70
- <page title="All #{type_name :with => model, :plural => true}" merge>
71
- <body: class="index-page #{type_id model}" param/>
72
- <content-header: param>
73
- <heading param><type-name with="&model" plural/></heading>
74
- <p class="note" param="count">
75
- <if>There <count prefix="are"/></if>
76
- <else>There aren't any <type-name lowercase plural/> yet.</else>
77
- </p>
78
- </content-header:>
79
-
80
- <content-body: param>
81
- <nav param="top-pagination-nav"><page-nav/></nav>
82
-
83
- <collection param><empty-message:></empty-message:></collection>
84
-
85
- <nav param="bottom-pagination-nav"><page-nav/></nav>
86
- </content-body>
87
-
88
- <content-footer: param>
89
- <a to="&model" action="new" param="new-link"/>
90
- <else>
91
- <if with="&model.user_new current_user">
92
- <section class="create-new">
93
- <h2>New <type-name/></h2>
94
- <form><field-list param="new-field-list"/><submit label="Create"/></form>
95
- </section>
96
- </if>
97
- </else>
98
- </content-footer:>
99
- </page>
100
- </def>
101
-
102
-
103
- <def tag="new-page">
104
- <page title="New #{type_name}" merge>
105
- <body: class="new-page #{type_name :dasherize => true}" param/>
106
- <content-header: param>
107
- <heading param>New <type-name title/></heading>
108
- </content-header>
109
-
110
- <content-body: param>
111
- <error-messages param/>
112
-
113
- <form param>
114
- <field-list param/>
115
- <div class="actions" param="actions">
116
- <submit label="Create #{type_name}" param/><do param="back-link"> or <a>Cancel</a></do>
117
- </div>
118
- </form>
119
- </content-body>
120
- </page>
121
- </def>
122
-
123
-
124
- <def tag="show-page" attrs="primary-collection">
125
- <set primary-collection-name="&(primary_collection || self.primary_collection_name).to_s" model="&this.class"/>
126
- <set boolean-fields="&model.columns.select {|c| c.type == :boolean }.*.name"/>
127
- <set skip-fields="&boolean_fields + [model.name_attribute, model.primary_content_attribute, model.creator_attribute, model.dependent_on.first].compact"/>
128
- <set flags="&boolean_fields.map {|f| f.titleize if this.send(f)}.compact.join(', ')"/>
129
-
130
- <page merge title="#{name :no_wrapper => true}">
131
-
132
- <body: class="show-page #{type_name :dasherize => true}" param/>
133
-
134
- <content-header: param>
135
- <if with="&this.dependent_on.reject{|x| x.is_a?(Hobo::User)}.first">
136
- <div class="container"><a>&laquo; <name/></a></div>
137
- </if>
138
-
139
- <heading param><this/></heading>
140
-
141
- <div class="flags"><flags/></div>
142
-
143
- <creation-details param/>
144
- <do field="&primary_collection_name" if="&primary_collection_name" param="primary-collection-count">
145
- <association-count class="primary-collection-count" part="primary-collection-count"/>
146
- </do>
147
-
148
- <a action="edit" class="edit" if="&linkable?(:edit) && can_edit?" param="edit-link">Edit <type-name/></a>
149
- </content-header>
150
-
151
- <content-body: param>
152
- <primary-content param/>
153
-
154
- <field-list skip="&skip_fields" skip-associations="has_many" param/>
155
-
156
- <with-primary-collection name="&primary_collection_name" if="&primary_collection_name">
157
- <section class="primary-collection">
158
- <h2 param="primary-collection-title"><primary-collection-name.titleize/></h2>
159
-
160
- <do param="primary-collection">
161
- <collection part="primary-collection">
162
- <card:><delete-button: update="primary-collection-count"></delete-button:></card:>
163
- </collection>
164
- </do>
165
-
166
- <do with="&@this.send(primary_collection_name)">
167
- <if test="&can_create?" param="primary-collection-add">
168
- <nav class="new-link"><a action="new" if="&linkable?(:new) && can_create?"/></nav>
169
- <else>
170
- <section class="create-new" with="&new_for_current_user">
171
- <h2>Add <A-or-An word="&primary_collection_name.singularize.titleize"/></h2>
172
- <form update="primary-collection, primary-collection-count"
173
- message="Adding #{primary_collection_name.singularize.titleize}..." reset-form>
174
- <field-list skip="#{@this.class.reverse_reflection(@this.send(primary_collection_name).proxy_reflection.name).name}"
175
- skip-associations="has_many" param="primary-collection-field-list"/>
176
- <submit label="Add"/>
177
- </form>
178
- </section>
179
- </else>
180
- </if>
181
- </do>
182
- </section>
183
- </with-primary-collection>
184
- </content-body:>
185
-
186
- <aside: param>
187
- <section class="preview-collections">
188
- <with-fields fields="&non_through_collections - [(primary_collection_name.to_sym unless primary_collection_name.blank?)]">
189
- <collection-preview class="#{this_field.dasherize}"/>
190
- </with-fields>
191
- </section>
192
- </aside:>
193
-
194
- </page>
195
- </def>
196
-
197
-
198
- <def tag="edit-page">
199
- <page merge>
200
- <body: class="edit-page #{type_name :dasherize => true}" param/>
201
- <content-header: param>
202
- <heading param><if test="&this.respond_to? :name"><name/></if><else><type-name/></else></heading>
203
- <delete-button label="Remove This #{type_name}" param/>
204
- </content-header>
205
-
206
- <content-body: param>
207
- <error-messages param/>
208
- <form param>
209
- <field-list param/>
210
- <div class="actions" param="actions">
211
- <submit label="Save Changes" param/><do param="back-link"> or <a>Cancel</a></do>
212
- </div>
213
- </form>
214
-
215
- </content-body>
216
- </page>
217
- </def>
218
-
219
-
220
- <def tag="new-in-collection-page">
221
- <set association-name="&@association.origin_attribute.to_s"/>
222
- <page title="New #{type_name}" merge>
223
- <body: class="new-in-collection-page #{association_name.underscore.dasherize} #{type_name :dasherize => true}" param/>
224
- <content-header: param>
225
- <heading param>New <association-name.singularize.titleize/></heading>
226
- <sub-heading param>For: <a with="&@association.origin"/></sub-heading>
227
- </content-header>
228
-
229
- <content-body: param>
230
- <error-messages/>
231
-
232
- <form param>
233
- <field-list skip="#{@association.origin.class.reverse_reflection(association_name.to_sym).name}" param/>
234
- <div class="actions" param="actions">
235
- <submit label="Create #{association_name.singularize.titleize}" param/>
236
- <do param="back-link"> or <a with="&@association.origin">Cancel</a></do>
237
- </div>
238
- </form>
239
- </content-body>
240
- </page>
241
- </def>
242
-
243
-
244
- <def tag="show-collection-page">
245
- <% title = "#{this.origin_attribute.to_s.titleize} for #{name(:with => this.origin)}" %>
246
- <page title="&title" merge>
247
- <body: class="show-collection-page #{type_name(:with => this.origin)} #{type_name(:pluralize => true) rescue debugger}"
248
- param/>
249
- <content-header: param>
250
- <nav>Back to <a:origin/></nav>
251
- <heading><%= title %></heading>
252
- <sub-heading><count/></sub-heading>
253
- </content-header>
254
-
255
- <content-body: param>
256
- <nav param="top-pagination-nav"><page-nav/></nav>
257
-
258
- <card repeat/>
259
-
260
- <nav param="bottom-pagination-nav"><page-nav param/></nav>
261
-
262
- <nav if="&Hobo.simple_has_many_association?(this)" param="new-link">
263
- <a action="new"/>
264
- </nav>
265
- </content-body>
266
- </page>
267
- </def>
268
-
269
-
270
- <def tag="permission-denied-page" attrs="message">
271
- <% message ||= "That operation is not allowed" %>
272
- <page merge>
273
- <body: class="permission-denied"/>
274
- <content-header: param>
275
- <heading param><message/></heading>
276
- </content-header>
277
- </page>
278
- </def>
279
-
280
-
281
- <def tag="not-found-page" attrs="message">
282
- <% message ||= "The page you were looking for could not be found" %>
283
- <page merge>
284
- <body: class="not-found"/>
285
- <content-header: param>
286
- <heading param><message/></heading>
287
- </content-header>
288
- </page>
289
- </def>
290
-
291
-
292
- <def tag="doctype" attrs="version"><%=
293
- case version.upcase
294
- when "HTML 4.01 STRICT"
295
- '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" ' +
296
- '"http://www.w3.org/TR/html4/strict.dtd">'
297
- when "HTML 4.01 TRANSITIONAL"
298
- '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ' +
299
- '"http://www.w3.org/TR/html4/loose.dtd">'
300
- when "XHTML 1.0 STRICT"
301
- '!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" ' +
302
- '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
303
- when "XHTML 1.0 TRANSITIONAL"
304
- '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ' +
305
- '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'
306
- when "XHTML 1.1"
307
- '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" ' +
308
- '"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'
309
- end
310
- %></def>
311
-
312
-
313
- <def tag="stylesheet" attrs="name, media">
314
- <repeat with="&comma_split(name)">
315
- <link href="#{base_url}/stylesheets/#{this}.css" media="#{ media || 'all' }"
316
- rel="stylesheet" type="text/css" />
317
- </repeat>
318
- </def>
319
-
320
-
321
- <def tag="javascript" attrs="name">
322
- <if test="&name.is_a?(Symbol)">
323
- <%= javascript_include_tag name %>
324
- </if>
325
- <else>
326
- <repeat with="&comma_split(name)">
327
- <%= javascript_include_tag this %>
328
- </repeat>
329
- </else>
330
- </def>
331
-
332
-
333
- <def tag="flash-message" attrs="type">
334
- <% type = type ? type.to_sym : :notice %>
335
- <div class="flash #{type}" if="&flash[type]" merge-attrs><%= flash[type] %></div>
336
- </def>
337
-
338
-
339
- <def tag="ajax-progress">
340
- <div id="ajax-progress">
341
- <div>
342
- <span id="ajax-progress-text"></span>
343
- </div>
344
- </div>
345
- </def>
346
-
347
-
348
- <def tag="default-page-title"><%= t = this.to_s; ; "#{t.blank? ? '' : t + ' - '}#{app_name}" %></def>
349
-
350
-
351
- <def tag="with-primary-collection" attrs="name"><%
352
- ivar = "@#{this.class.name.underscore}_#{name}"
353
-
354
- if (collection = instance_variable_get(ivar))
355
- %><do with="&collection" param="default"/><%
356
- else
357
- %><do field="&name" param="default"/><%
358
- end
359
- %></def>