zena 1.0.0.beta3 → 1.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (418) hide show
  1. data/History.txt +29 -0
  2. data/Rakefile +2 -0
  3. data/TODO_ZENA_1_0 +13 -23
  4. data/app/controllers/columns_controller.rb +1 -1
  5. data/app/controllers/comments_controller.rb +4 -3
  6. data/app/controllers/documents_controller.rb +8 -11
  7. data/app/controllers/nodes_controller.rb +39 -21
  8. data/app/controllers/users_controller.rb +8 -3
  9. data/app/controllers/versions_controller.rb +2 -2
  10. data/app/controllers/virtual_classes_controller.rb +17 -11
  11. data/app/helpers/documents_helper.rb +0 -3
  12. data/app/helpers/users_helper.rb +17 -0
  13. data/app/models/cache.rb +36 -31
  14. data/app/models/column.rb +48 -5
  15. data/app/models/comment.rb +14 -5
  16. data/app/models/data_entry.rb +2 -2
  17. data/app/models/document.rb +23 -33
  18. data/app/models/idx_nodes_datetime.rb +4 -0
  19. data/app/models/idx_nodes_float.rb +4 -0
  20. data/app/models/idx_project.rb +3 -0
  21. data/app/models/node.rb +372 -308
  22. data/app/models/page.rb +1 -31
  23. data/app/models/relation.rb +4 -4
  24. data/app/models/relation_proxy.rb +128 -17
  25. data/app/models/role.rb +27 -2
  26. data/app/models/site.rb +64 -56
  27. data/app/models/template.rb +11 -12
  28. data/app/models/text_document.rb +6 -7
  29. data/app/models/user.rb +95 -46
  30. data/app/models/version.rb +2 -2
  31. data/app/models/virtual_class.rb +418 -73
  32. data/app/views/columns/_form.html.erb +1 -1
  33. data/app/views/columns/_li.html.erb +1 -1
  34. data/app/views/comments/_form.rhtml +1 -1
  35. data/app/views/comments/_li.rhtml +1 -1
  36. data/app/views/comments/_li_simple.rhtml +1 -1
  37. data/app/views/groups/_form.rhtml +1 -1
  38. data/app/views/links/_li.rhtml +1 -1
  39. data/app/views/nodes/_groups.rhtml +1 -1
  40. data/app/views/nodes/_import_results.rhtml +1 -1
  41. data/app/views/nodes/_parent.rhtml +1 -1
  42. data/app/views/nodes/_results.rhtml +1 -1
  43. data/app/views/nodes/create.rjs +4 -2
  44. data/app/views/relations/_li.erb +2 -2
  45. data/app/views/templates/document_create_tabs/_file.rhtml +1 -1
  46. data/app/views/templates/document_create_tabs/_template.rhtml +2 -2
  47. data/app/views/templates/document_create_tabs/_text_document.rhtml +2 -2
  48. data/app/views/templates/edit_tabs/_help.rhtml +1 -1
  49. data/app/views/templates/edit_tabs/_title.rhtml +0 -3
  50. data/app/views/users/_form.rhtml +2 -6
  51. data/app/views/users/_li.rhtml +1 -3
  52. data/app/views/users/create.rjs +4 -4
  53. data/app/views/users/preferences.html.erb +1 -4
  54. data/app/views/versions/custom_tab.rhtml +5 -0
  55. data/app/views/virtual_classes/_form.erb +20 -10
  56. data/app/views/virtual_classes/_li.erb +21 -8
  57. data/app/views/zafu/default/Node-+search.zafu +1 -1
  58. data/app/views/zafu/default/Node.zafu +3 -3
  59. data/bricks/captcha/lib/bricks/captcha.rb +1 -1
  60. data/bricks/mongrel/zena/deploy.rb +14 -0
  61. data/bricks/{data2pdf → pdf}/.document +0 -0
  62. data/bricks/pdf/README +33 -0
  63. data/bricks/{data2pdf → pdf}/Rakefile +0 -0
  64. data/bricks/pdf/VERSION +1 -0
  65. data/bricks/pdf/lib/bricks/pdf.rb +110 -0
  66. data/bricks/pdf/lib/bricks/pdf/engine/prince.rb +38 -0
  67. data/bricks/pdf/lib/bricks/pdf/engine/xhtml2pdf.rb +9 -0
  68. data/bricks/pdf/lib/bricks/pdf/install.rb +121 -0
  69. data/bricks/pdf/test/engines/test_prince.rb +15 -0
  70. data/bricks/pdf/test/engines/test_xhtml2pdf.rb +15 -0
  71. data/bricks/{data2pdf → pdf}/test/fixtures/application.css +0 -0
  72. data/bricks/{data2pdf → pdf}/test/fixtures/contact.html +0 -0
  73. data/bricks/{data2pdf → pdf}/test/fixtures/pisa-default.css +0 -0
  74. data/bricks/{data2pdf → pdf}/test/fixtures/sheet1.css +0 -0
  75. data/bricks/{data2pdf → pdf}/test/fixtures/sheet2.css +0 -0
  76. data/bricks/{data2pdf → pdf}/test/fixtures/simple-html.html +0 -0
  77. data/bricks/{data2pdf → pdf}/test/fixtures/simple-text.txt +0 -0
  78. data/bricks/{data2pdf → pdf}/test/helper.rb +4 -5
  79. data/bricks/pdf/test/shoulda_macros/shoulda_pdf.rb +72 -0
  80. data/bricks/pdf/zena/init.rb +5 -0
  81. data/bricks/pdf/zena/tasks.rb +17 -0
  82. data/bricks/sphinx/lib/{use_sphinx.rb → bricks/sphinx.rb} +1 -1
  83. data/bricks/tags/zena/init.rb +2 -2
  84. data/bricks/tags/zena/test/zafu/tags.yml +4 -4
  85. data/bricks/zena/zena/migrate/01_base.rb +482 -0
  86. data/config/bricks.yml +22 -6
  87. data/config/gems.yml +8 -6
  88. data/db/20100628074512_zena0x_to1x.rb +6 -1
  89. data/db/fix/024_correct_vclass_kpath.rb +11 -0
  90. data/db/fix/025_move_tag_into_vclass.rb +13 -0
  91. data/db/{migrate → fix}/026_rename_templates.rb +0 -0
  92. data/db/{migrate → fix}/045_avoid_star_in_templates.rb +0 -0
  93. data/db/{migrate → fix}/046_fix_zazen_image_tag.rb +0 -0
  94. data/db/{migrate → fix}/047_change_default_link_id_to_zero.rb +1 -3
  95. data/db/{migrate → fix}/049_fix_publish_from_is_null.rb +0 -0
  96. data/db/{migrate → fix}/20090924141459_zafu_fix_sept09.rb +0 -0
  97. data/db/{migrate → fix}/20091013100351_rename_publish_group_to_drive_group.rb +1 -3
  98. data/db/{migrate → fix}/20091124161608_rebuild_fullpath.rb +0 -1
  99. data/db/{migrate → fix}/20100115134729_rebuild_fullpath_after_fix.rb +0 -0
  100. data/db/{migrate → fix}/20100526090140_renamed_contact_model_to_base_contact.rb +2 -4
  101. data/db/{migrate → fix/old_migrations}/001_create_base.rb +0 -1
  102. data/db/{migrate → fix/old_migrations}/002_add_time_zone_to_users.rb +0 -0
  103. data/db/{migrate → fix/old_migrations}/003_add_custom_base_flag.rb +0 -0
  104. data/db/{migrate → fix/old_migrations}/004_rename_template_skin.rb +0 -0
  105. data/db/{migrate → fix/old_migrations}/005_create_cached_pages.rb +0 -0
  106. data/db/{migrate → fix/old_migrations}/006_create_sites.rb +0 -0
  107. data/db/{migrate → fix/old_migrations}/007_replace_id_by_zip.rb +0 -0
  108. data/db/{migrate → fix/old_migrations}/008_user_status.rb +0 -0
  109. data/db/{migrate → fix/old_migrations}/009_fulltext.rb +0 -0
  110. data/db/fix/old_migrations/010_create_template_content.rb +17 -0
  111. data/db/{migrate → fix/old_migrations}/011_project_to_section.rb +0 -0
  112. data/db/{migrate → fix/old_migrations}/012_add_project_id.rb +0 -0
  113. data/db/{migrate → fix/old_migrations}/013_remove_defaults.rb +0 -0
  114. data/db/{migrate → fix/old_migrations}/014_add_sort_field.rb +0 -0
  115. data/db/{migrate → fix/old_migrations}/015_add_dyn_attributes.rb +0 -0
  116. data/db/{migrate → fix/old_migrations}/016_remove_translations.rb +0 -0
  117. data/db/{migrate → fix/old_migrations}/017_rename_authorize.rb +0 -0
  118. data/db/{migrate → fix/old_migrations}/018_add_auth_option.rb +0 -0
  119. data/db/{migrate → fix/old_migrations}/019_remove_user_status.rb +0 -0
  120. data/db/{migrate → fix/old_migrations}/020_create_participation.rb +0 -0
  121. data/db/{migrate → fix/old_migrations}/021_create_relations.rb +0 -0
  122. data/db/{migrate → fix/old_migrations}/022_create_virtual_classes.rb +0 -0
  123. data/db/{migrate → fix/old_migrations}/023_ip_on_anonymous_comment.rb +0 -0
  124. data/db/{migrate → fix/old_migrations}/027_add_country_to_contacts.rb +0 -0
  125. data/db/{migrate → fix/old_migrations}/028_change_size_of_conten_type_field.rb +0 -0
  126. data/db/{migrate → fix/old_migrations}/029_create_data_entries.rb +0 -0
  127. data/db/{migrate → fix/old_migrations}/030_redit_auto_publish_site_settings.rb +0 -0
  128. data/db/{migrate → fix/old_migrations}/031_create_iformats.rb +0 -0
  129. data/db/{migrate → fix/old_migrations}/032_caches_context_as_hash.rb +0 -0
  130. data/db/{migrate → fix/old_migrations}/033_documents_kpath_change.rb +0 -0
  131. data/db/{migrate → fix/old_migrations}/034_change_file_storage.rb +0 -0
  132. data/db/{migrate → fix/old_migrations}/035_add_status_to_link.rb +0 -0
  133. data/db/{migrate → fix/old_migrations}/036_add_flag_fields_on_nodes.rb +0 -0
  134. data/db/{migrate → fix/old_migrations}/037_add_auto_create_discussion_to_v_class.rb +0 -0
  135. data/db/{migrate → fix/old_migrations}/038_create_site_attributes.rb +0 -0
  136. data/db/{migrate → fix/old_migrations}/039_default_position.rb +0 -0
  137. data/db/{migrate → fix/old_migrations}/040_second_value_for_data_entry.rb +0 -0
  138. data/db/{migrate → fix/old_migrations}/041_add_attributes_to_v_class.rb +0 -0
  139. data/db/{migrate → fix/old_migrations}/042_fix_position_should_be_float.rb +0 -0
  140. data/db/{migrate → fix/old_migrations}/043_move_user_lang_into_participation.rb +0 -0
  141. data/db/{migrate → fix/old_migrations}/044_remove_monolingual_site_option.rb +0 -0
  142. data/db/{migrate → fix/old_migrations}/048_link_source_target_can_be_null.rb +0 -0
  143. data/db/{migrate → fix/old_migrations}/050_date_in_links.rb +0 -0
  144. data/db/{migrate → fix/old_migrations}/051_add_exif_tags_to_images.rb +0 -0
  145. data/db/{migrate → fix/old_migrations}/20090825201159_insert_zero_link.rb +0 -0
  146. data/db/{migrate → fix/old_migrations}/20090825201200_merge_bricks_migrations_with_std_migrations.rb +0 -0
  147. data/db/{migrate → fix/old_migrations}/20090927125912_allow_null_in_text_fields.rb +0 -0
  148. data/db/{migrate → fix/old_migrations}/20090928133440_no_more_private_nodes.rb +0 -0
  149. data/db/{migrate → fix/old_migrations}/20090928143754_version_status_change.rb +0 -0
  150. data/db/{migrate → fix/old_migrations}/20091001084025_change_status_values_for_comments.rb +0 -0
  151. data/db/{migrate → fix/old_migrations}/20091009084057_add_vhash_in_node.rb +0 -0
  152. data/db/{migrate → fix/old_migrations}/20091014130833_fix_template_title.rb +0 -0
  153. data/db/{migrate → fix/old_migrations}/20091014183726_merge_participation_into_users.rb +0 -0
  154. data/db/{migrate → fix/old_migrations}/20091018200734_add_popup_info_to_image_format.rb +0 -0
  155. data/db/{migrate → fix/old_migrations}/20091026161708_add_persistence_token.rb +0 -0
  156. data/db/{migrate → fix/old_migrations}/20091101184952_add_session_table.rb +0 -0
  157. data/db/{migrate → fix/old_migrations}/20091123175137_add_single_access_token.rb +0 -0
  158. data/db/{migrate → fix/old_migrations}/20100125062254_add_dynamo_to_version.rb +0 -0
  159. data/db/{migrate → fix/old_migrations}/20100201133242_remove_default_status_on_version.rb +0 -0
  160. data/db/{migrate → fix/old_migrations}/20100208194210_create_attachments.rb +0 -0
  161. data/db/{migrate → fix/old_migrations}/20100210112319_change_dynamo_to_property.rb +0 -0
  162. data/db/{migrate → fix/old_migrations}/20100320145726_transform_template_contents_into_index.rb +0 -0
  163. data/db/{migrate → fix/old_migrations}/20100328125634_change_skin_name_to_id.rb +0 -0
  164. data/db/{migrate → fix/old_migrations}/20100417061257_add_properties_to_sites.rb +0 -0
  165. data/db/{migrate → fix/old_migrations}/20100419163149_rename_name_to_node_name.rb +0 -0
  166. data/db/{migrate → fix/old_migrations}/20100422091606_change_v_class_table_into_roles.rb +0 -0
  167. data/db/{migrate → fix/old_migrations}/20100422094048_node_habtm_roles.rb +0 -0
  168. data/db/{migrate → fix/old_migrations}/20100422115935_create_columns.rb +0 -0
  169. data/db/{migrate → fix/old_migrations}/20100513181529_add_site_id_to_columns.rb +0 -0
  170. data/db/{migrate → fix/old_migrations}/20100519091711_add_index_definition_to_columns.rb +0 -0
  171. data/db/{migrate → fix/old_migrations}/20100519091940_create_idx_nodes_string.rb +0 -0
  172. data/db/{migrate → fix/old_migrations}/20100519232432_create_idx_nodes_ml_string.rb +0 -0
  173. data/db/{migrate → fix/old_migrations}/20100525113858_add_porperties_to_users.rb +0 -0
  174. data/db/{migrate → fix/old_migrations}/20100527130937_change_column_index_to_string.rb +0 -0
  175. data/db/{migrate → fix/old_migrations}/20100531135128_add_fulltext_builder_fields.rb +0 -0
  176. data/db/{migrate → fix/old_migrations}/20100915062903_add_api_group_id_to_site.rb +0 -0
  177. data/db/fix/old_migrations/20100923154807_remove_base_contact.rb +84 -0
  178. data/db/fix/old_migrations/20100926192223_remove_su_user.rb +8 -0
  179. data/db/fix/old_migrations/20100927141658_add_eval_attributes_to_v_class.rb +12 -0
  180. data/db/fix/old_migrations/20100928185257_add_obvious_idx.rb +52 -0
  181. data/db/fix/old_migrations/20100929143111_remove_node_name.rb +11 -0
  182. data/db/fix/old_migrations/20101006090454_store_properties_in_long_text.rb +9 -0
  183. data/db/fix/old_migrations/20101014185753_remove_user_prototype_id.rb +9 -0
  184. data/db/fix/old_migrations/20101101084318_create_scope_index.rb +35 -0
  185. data/db/fix/old_migrations/20101109074232_create_idx_nodes_tables.rb +65 -0
  186. data/db/fix/old_migrations/20101110184235_add_role_update_to_site.rb +9 -0
  187. data/db/fix/old_migrations/20101116103920_change_scope_index.rb +31 -0
  188. data/db/fix/old_migrations/20101123125822_add_integer_idx.rb +17 -0
  189. data/db/fix/old_migrations/20101130134522_add_index_field.rb +13 -0
  190. data/db/fix/old_migrations/20101213133816_add_group_to_relation.rb +9 -0
  191. data/db/init/base/help.fr.zml +1 -1
  192. data/db/init/base/skins/default.zml +0 -1
  193. data/db/init/base/skins/default/Node-+search.zafu +1 -1
  194. data/db/init/base/skins/default/Node-tree.zafu +3 -3
  195. data/db/init/base/skins/default/Node.zafu +3 -3
  196. data/lib/bricks/loader.rb +4 -1
  197. data/lib/bricks/requirements_validation.rb +11 -6
  198. data/lib/log_recorder/lib/log_recorder.rb +2 -2
  199. data/lib/tasks/zena.rake +25 -15
  200. data/lib/zena.rb +42 -9
  201. data/lib/zena/acts/enrollable.rb +81 -99
  202. data/lib/zena/acts/secure.rb +27 -23
  203. data/lib/zena/acts/secure_node.rb +10 -55
  204. data/lib/zena/acts/serializable.rb +9 -10
  205. data/lib/zena/app.rb +0 -2
  206. data/lib/zena/code_syntax.rb +1 -1
  207. data/lib/zena/controller/test_case.rb +0 -5
  208. data/lib/zena/core_ext/string.rb +48 -20
  209. data/lib/zena/db.rb +10 -442
  210. data/lib/zena/db_helper/abstract_db.rb +184 -0
  211. data/lib/zena/db_helper/mysql.rb +150 -0
  212. data/lib/zena/db_helper/postgresql.rb +79 -0
  213. data/lib/zena/db_helper/sqlite3.rb +135 -0
  214. data/lib/zena/deploy.rb +4 -1
  215. data/lib/zena/deploy/httpd.rhtml +3 -3
  216. data/lib/zena/deploy/vhost.rhtml +1 -1
  217. data/lib/zena/foxy_parser.rb +37 -18
  218. data/lib/zena/info.rb +3 -13
  219. data/lib/zena/migrator.rb +0 -1
  220. data/lib/zena/parser/zafu_rules.rb +9 -4
  221. data/lib/zena/parser/zazen_rules.rb +5 -5
  222. data/lib/zena/parser/zena_rules.rb +1 -1
  223. data/lib/zena/remote/interface.rb +1 -1
  224. data/lib/zena/site_worker.rb +3 -3
  225. data/lib/zena/test_controller.rb +10 -10
  226. data/lib/zena/use/action.rb +66 -6
  227. data/lib/zena/use/ajax.rb +39 -13
  228. data/lib/zena/use/ancestry.rb +210 -0
  229. data/lib/zena/use/authlogic.rb +30 -1
  230. data/lib/zena/use/calendar.rb +158 -0
  231. data/lib/zena/use/conditional.rb +3 -2
  232. data/lib/zena/use/context.rb +42 -12
  233. data/lib/zena/use/dates.rb +15 -14
  234. data/lib/zena/use/display.rb +54 -7
  235. data/lib/zena/use/error_rendering.rb +1 -0
  236. data/lib/zena/use/field_index.rb +20 -0
  237. data/lib/zena/use/fixtures.rb +12 -9
  238. data/lib/zena/use/forms.rb +230 -106
  239. data/lib/zena/use/fulltext.rb +28 -14
  240. data/lib/zena/use/html_tags.rb +1 -24
  241. data/lib/zena/use/i18n.rb +69 -14
  242. data/lib/zena/use/kpath.rb +60 -0
  243. data/lib/zena/use/ml_index.rb +6 -4
  244. data/lib/zena/use/node_context.rb +63 -0
  245. data/lib/zena/use/prop_eval.rb +90 -0
  246. data/lib/zena/use/query_builder.rb +159 -29
  247. data/lib/zena/use/query_comment.rb +1 -1
  248. data/lib/zena/use/query_node.rb +147 -56
  249. data/lib/zena/use/recursion.rb +2 -2
  250. data/lib/zena/use/relations.rb +31 -19
  251. data/lib/zena/use/rendering.rb +111 -121
  252. data/lib/zena/use/scope_index.rb +230 -0
  253. data/lib/zena/use/search.rb +7 -7
  254. data/lib/zena/use/urls.rb +87 -25
  255. data/lib/zena/use/version_hash.rb +113 -113
  256. data/lib/zena/use/workflow.rb +5 -1
  257. data/lib/zena/use/zafu_attributes.rb +11 -14
  258. data/lib/zena/use/zafu_eval.rb +1 -1
  259. data/lib/zena/use/zafu_safe_definitions.rb +91 -9
  260. data/lib/zena/use/zafu_templates.rb +146 -102
  261. data/lib/zena/use/zazen.rb +5 -4
  262. data/lib/zena/zafu_compiler.rb +1 -0
  263. data/locale/en/LC_MESSAGES/zena.mo +0 -0
  264. data/locale/en/zena.po +0 -1
  265. data/locale/fr/LC_MESSAGES/zena.mo +0 -0
  266. data/locale/fr/zena.mo +0 -0
  267. data/locale/fr/zena.po +4 -4
  268. data/misc/zena +35 -0
  269. data/misc/zena_init +41 -0
  270. data/public/images/ext/{basecontact.png → contact.png} +0 -0
  271. data/public/javascripts/zena.js +35 -7
  272. data/public/stylesheets/admin.css +5 -2
  273. data/public/stylesheets/default.css +2 -1
  274. data/public/stylesheets/popup.css +1 -1
  275. data/public/stylesheets/zena.css +2 -2
  276. data/test/custom_queries/complex.host.yml +12 -5
  277. data/test/fixtures/files/Node-test.zafu +3 -3
  278. data/test/fixtures/files/translations_fr.yml +4 -2
  279. data/test/functional/documents_controller_test.rb +31 -0
  280. data/test/functional/nodes_controller_commit_test.rb +1 -5
  281. data/test/functional/nodes_controller_test.rb +92 -12
  282. data/test/functional/user_sessions_controller_test.rb +2 -2
  283. data/test/functional/users_controller_test.rb +31 -29
  284. data/test/functional/versions_controller_test.rb +2 -2
  285. data/test/functional/virtual_classes_controller_test.rb +2 -2
  286. data/test/integration/multiple_hosts_test.rb +19 -8
  287. data/test/integration/navigation_test.rb +91 -12
  288. data/test/integration/query_node/basic.yml +40 -37
  289. data/test/integration/query_node/complex.yml +23 -18
  290. data/test/integration/query_node/dates.yml +3 -3
  291. data/test/integration/query_node/errors.yml +7 -1
  292. data/test/integration/query_node/filters.yml +41 -35
  293. data/test/integration/query_node/idx_fields.yml +11 -0
  294. data/test/integration/query_node/idx_key_value.yml +77 -0
  295. data/test/integration/query_node/idx_scope.yml +33 -0
  296. data/test/integration/query_node/relations.yml +13 -13
  297. data/test/integration/query_node_test.rb +6 -10
  298. data/test/integration/zafu_compiler/action.yml +19 -6
  299. data/test/integration/zafu_compiler/ajax.yml +111 -51
  300. data/test/integration/zafu_compiler/apphelper.yml +1 -1
  301. data/test/integration/zafu_compiler/asset.yml +1 -1
  302. data/test/integration/zafu_compiler/basic.yml +42 -52
  303. data/test/integration/zafu_compiler/calendar.yml +3 -3
  304. data/test/integration/zafu_compiler/complex.yml +16 -16
  305. data/test/integration/zafu_compiler/complex_ok.yml +2 -2
  306. data/test/integration/zafu_compiler/conditional.yml +42 -33
  307. data/test/integration/zafu_compiler/data.yml +3 -3
  308. data/test/integration/zafu_compiler/dates.yml +25 -10
  309. data/test/integration/zafu_compiler/display.yml +49 -12
  310. data/test/integration/zafu_compiler/errors.yml +26 -6
  311. data/test/integration/zafu_compiler/eval.yml +4 -4
  312. data/test/integration/zafu_compiler/forms.yml +89 -15
  313. data/test/integration/zafu_compiler/i18n.yml +23 -18
  314. data/test/integration/zafu_compiler/idx_scope.yml +7 -0
  315. data/test/integration/zafu_compiler/later.yml +10 -16
  316. data/test/integration/zafu_compiler/off/off.yml +2 -2
  317. data/test/integration/zafu_compiler/query.yml +207 -0
  318. data/test/integration/zafu_compiler/recursion.yml +2 -2
  319. data/test/integration/zafu_compiler/relations.yml +144 -168
  320. data/test/integration/zafu_compiler/roles.yml +86 -10
  321. data/test/integration/zafu_compiler/rubyless.yml +49 -6
  322. data/test/integration/zafu_compiler/safe_definitions.yml +35 -6
  323. data/test/integration/zafu_compiler/search.yml +1 -1
  324. data/test/integration/zafu_compiler/security.yml +37 -0
  325. data/test/integration/zafu_compiler/urls.yml +50 -40
  326. data/test/integration/zafu_compiler/user.yml +21 -6
  327. data/test/integration/zafu_compiler/version.yml +6 -6
  328. data/test/integration/zafu_compiler/zafu_attributes.yml +43 -34
  329. data/test/integration/zafu_compiler/zazen.yml +10 -10
  330. data/test/integration/zafu_compiler_test.rb +19 -13
  331. data/test/sites/complex/nodes.yml +0 -2
  332. data/test/sites/complex/roles.yml +9 -1
  333. data/test/sites/complex/sites.yml +0 -1
  334. data/test/sites/complex/users.yml +2 -5
  335. data/test/sites/ocean/nodes.yml +2 -5
  336. data/test/sites/ocean/roles.yml +8 -0
  337. data/test/sites/ocean/sites.yml +0 -1
  338. data/test/sites/ocean/users.yml +0 -13
  339. data/test/sites/zena/columns.yml +27 -5
  340. data/test/sites/zena/idx_projects.yml +5 -0
  341. data/test/sites/zena/nodes.yml +8 -32
  342. data/test/sites/zena/relations.yml +5 -0
  343. data/test/sites/zena/roles.yml +25 -3
  344. data/test/sites/zena/sites.yml +2 -2
  345. data/test/sites/zena/users.yml +1 -21
  346. data/test/sites/zena/versions.yml +35 -12
  347. data/test/test_helper.rb +7 -0
  348. data/test/unit/after_commit_test.rb +7 -7
  349. data/test/unit/cache_test.rb +32 -0
  350. data/test/unit/cached_page_test.rb +1 -1
  351. data/test/unit/column_test.rb +31 -7
  352. data/test/unit/comment_test.rb +2 -2
  353. data/test/unit/core_ext_test.rb +38 -7
  354. data/test/unit/document_test.rb +14 -42
  355. data/test/unit/node_test.rb +311 -324
  356. data/test/unit/note_test.rb +23 -31
  357. data/test/unit/page_test.rb +16 -58
  358. data/test/unit/project_test.rb +2 -2
  359. data/test/unit/relation_proxy_test.rb +148 -21
  360. data/test/unit/relation_test.rb +23 -3
  361. data/test/unit/remote_test.rb +15 -9
  362. data/test/unit/role_test.rb +9 -0
  363. data/test/unit/site_test.rb +49 -47
  364. data/test/unit/skin_test.rb +16 -0
  365. data/test/unit/template_test.rb +60 -69
  366. data/test/unit/text_document_test.rb +15 -14
  367. data/test/unit/user_test.rb +101 -41
  368. data/test/unit/version_test.rb +4 -4
  369. data/test/unit/virtual_class_test.rb +577 -36
  370. data/test/unit/workflow_test.rb +58 -21
  371. data/test/unit/zena/acts/enrollable_test.rb +36 -127
  372. data/test/unit/zena/acts/secure_test.rb +6 -22
  373. data/test/unit/zena/acts/serializable_test.rb +18 -0
  374. data/test/unit/zena/db_test.rb +14 -14
  375. data/test/unit/zena/parser/zafu.yml +5 -3
  376. data/test/unit/zena/use/ancestry_test.rb +198 -0
  377. data/test/unit/zena/use/calendar_test.rb +8 -8
  378. data/test/unit/zena/use/dates_test.rb +2 -0
  379. data/test/unit/zena/use/fulltext_test.rb +9 -1
  380. data/test/unit/zena/use/html_tags_test.rb +2 -16
  381. data/test/unit/zena/use/i18n_test.rb +2 -2
  382. data/test/unit/zena/use/kpath_test.rb +13 -0
  383. data/test/unit/zena/use/ml_index_test.rb +60 -12
  384. data/test/unit/zena/use/prop_eval_test.rb +170 -0
  385. data/test/unit/zena/use/query_node_test.rb +9 -2
  386. data/test/unit/zena/use/rendering_test.rb +98 -1
  387. data/test/unit/zena/use/scope_index_test.rb +464 -0
  388. data/test/unit/zena/use/urls_test.rb +23 -13
  389. data/test/unit/zena/use/version_hash_test.rb +2 -2
  390. data/test/unit/zena/use/zafu_template_test.rb +21 -8
  391. data/test/unit/zena/use/zazen_test.rb +47 -47
  392. data/zena.gemspec +177 -143
  393. metadata +222 -141
  394. data/app/models/base_contact.rb +0 -79
  395. data/app/models/book.rb +0 -242
  396. data/app/models/contact_content.rb +0 -70
  397. data/app/models/contact_version.rb +0 -40
  398. data/app/models/reference.rb +0 -18
  399. data/app/views/templates/edit_tabs/_basecontact.rhtml +0 -8
  400. data/bricks/data2pdf/README +0 -19
  401. data/bricks/data2pdf/VERSION +0 -1
  402. data/bricks/data2pdf/lib/data2pdf.rb +0 -60
  403. data/bricks/data2pdf/lib/engines/prince.rb +0 -39
  404. data/bricks/data2pdf/lib/engines/xhtml2pdf.rb +0 -41
  405. data/bricks/data2pdf/lib/install.rb +0 -111
  406. data/bricks/data2pdf/test/engines/test_prince.rb +0 -14
  407. data/bricks/data2pdf/test/engines/test_xhtml2pdf.rb +0 -14
  408. data/bricks/data2pdf/test/shoulda_macros/shoulda_data2pdf.rb +0 -91
  409. data/bricks/data2pdf/test/unit/test_rendering.rb +0 -37
  410. data/config/routes.rb +0 -3
  411. data/db/migrate/010_create_template_content.rb +0 -17
  412. data/db/migrate/024_correct_vclass_kpath.rb +0 -13
  413. data/db/migrate/025_move_tag_into_vclass.rb +0 -15
  414. data/lib/version_off.rb +0 -323
  415. data/lib/zena/use/node_name.rb +0 -94
  416. data/test/integration/query_node/properties.yml +0 -41
  417. data/test/unit/base_contact_test.rb +0 -242
  418. data/test/unit/node_name_test.rb +0 -137
@@ -38,17 +38,17 @@ class QueryNodeTest < Zena::Unit::TestCase
38
38
  login @context[:visitor].to_sym
39
39
 
40
40
  @context[:rubyless_helper] = self
41
+ defaults = (@context[:default] ||= {})
42
+ defaults[:order] ||= 'zip asc'
41
43
 
42
44
  if klass = @context.delete(:class)
43
- klass = Node.get_class(klass)
44
- klass = Zena::Acts::Enrollable.make_class(klass)
45
- @context[:main_class] = klass
45
+ @context[:main_class] = VirtualClass[klass]
46
46
  end
47
47
 
48
48
  begin
49
49
  query = Node.build_query(:all, yt_get('src', file, test), @context)
50
50
  sql, node_class = query.to_s, query.main_class
51
- rescue QueryBuilder::Error => err
51
+ rescue ::QueryBuilder::Error => err
52
52
  errors = err.message
53
53
  end
54
54
 
@@ -72,11 +72,7 @@ class QueryNodeTest < Zena::Unit::TestCase
72
72
 
73
73
  res = node_class.do_find(:all, sql)
74
74
 
75
- if node_class == Comment
76
- res = res ? res.map {|r| r[:title]}.join(', ') : ''
77
- else
78
- res = res ? res.map {|r| r[:node_name]}.join(', ') : ''
79
- end
75
+ res = res ? res.map(&:title).join(', ') : ''
80
76
 
81
77
  yt_assert test_res, class_prefix + res
82
78
  else
@@ -145,7 +141,7 @@ class QueryNodeTest < Zena::Unit::TestCase
145
141
  login(:ant)
146
142
  page = secure!(Node) { nodes(:cleanWater) }
147
143
 
148
- sql = Node.build_query(:all, 'nodes where node_name like "a%" in site').to_s(:count)
144
+ sql = Node.build_query(:all, 'nodes where title like "a%" in site').to_s(:count)
149
145
  assert_equal 3, Node.do_find(:count, eval(sql))
150
146
  end
151
147
 
@@ -12,7 +12,7 @@ logout_link:
12
12
  # Forces NodesController type of url and params
13
13
  fake_controller: 'nodes'
14
14
  src: "<r:login_link/>"
15
- res: '<a href="/logout?redirect=%2Fen%2Fprojects%2FcleanWater%2Fpage22.html">logout</a>'
15
+ res: '<a href="/logout?redirect=%2Fen%2Fprojects-list%2FClean-Water-project%2Fpage22.html">logout</a>'
16
16
 
17
17
  login_link:
18
18
  context:
@@ -20,7 +20,7 @@ login_link:
20
20
  # Forces NodesController type of url and params
21
21
  fake_controller: 'nodes'
22
22
  src: "<r:login_link/>"
23
- res: '<a href="/oo/projects/cleanWater/page22.html">login</a>'
23
+ res: '<a href="/oo/projects-list/Clean-Water-project/page22.html">login</a>'
24
24
 
25
25
  logout_link_other_controller:
26
26
  src: "<r:login_link/>"
@@ -33,13 +33,13 @@ login_link_other_controller:
33
33
  res: '<a href="/login">login</a>'
34
34
 
35
35
  login_link_with_blocks:
36
- src: "<r:login_link>ONE ONE<r:else do='node_name'/></r:login_link>"
37
- res: "<a href='/logout'>status</a>"
36
+ src: "<r:login_link>ONE ONE<r:else do='title'/></r:login_link>"
37
+ res: "<a href='/logout'>status title</a>"
38
38
 
39
39
  login_link_with_blocks_not_logged_in:
40
40
  context:
41
41
  visitor: 'anon'
42
- src: "<r:login_link><r:title/><r:else do='node_name'/></r:login_link>"
42
+ src: "<r:login_link><r:title/><r:else do='title'/></r:login_link>"
43
43
  res: "<a href='/login'>status title</a>"
44
44
 
45
45
  visitor_link_not_logged_in:
@@ -64,4 +64,17 @@ visitor_link_blocks:
64
64
 
65
65
  action:
66
66
  src: "<p do='action' select='edit' do='t'>hello</p>"
67
- res: "/nodes/22/versions/0/edit.*Open the edition window to edit the node.*Zena.open_window/"
67
+ res: "/nodes/22/versions/0/edit.*Open the edition window to edit the node.*Zena.open_window/"
68
+
69
+ swap:
70
+ src: "<span do='block' do='swap' attr='custom_a' states='100,-100' do='custom_a'/>"
71
+ tem: '/:dom_id => "list1", :t_url => "action/swap/list1"/'
72
+ '/action/swap/en/list1.erb': "/<span id='list1'>/"
73
+
74
+ swap_in_each:
75
+ src: "<r:pages><li do='each'><span do='swap' attr='origin' states='todo,done,alert'/></li></r:pages>"
76
+ tem: "/\"node\[origin\]\" => \"#\{next_in_list_s\(var2.prop\['origin'\], \"todo,done,alert\"/"
77
+
78
+ hand_made_swap:
79
+ src: "<r:link update='_page' node[origin]='#{next_in_list(origin, \"todo,done\")}' action='update'/>"
80
+ tem: "/:_method => .put., :.node\[origin\]. => .#\{next_in_list_s\(@node.prop\['origin'\], .todo,done.\)/"
@@ -5,9 +5,9 @@ default:
5
5
  node: 'status'
6
6
 
7
7
  block:
8
- src: "<r:parent><r:block name='foobar' do='node_name'/></r:parent>"
9
- tem: "<% if var1 = @node.parent -%><div id='foobar'><%= var1.node_name %></div><% end -%>"
10
- 'ajax/block/en/foobar.erb': "<div id='foobar'><%= @node.node_name %></div>"
8
+ src: "<r:parent><r:block name='foobar' do='title'/></r:parent>"
9
+ tem: "<% if var1 = @node.parent %><div id='foobar'><%= var1.prop['title'] %></div><% end %>"
10
+ 'ajax/block/en/foobar.erb': "<div id='foobar'><%= @node.prop['title'] %></div>"
11
11
 
12
12
  add:
13
13
  src: "<ul id='children' do='nodes'><li do='each' do='link'/><li do='add'/></ul>"
@@ -20,8 +20,8 @@ edit_not_each:
20
20
  res: "/<li class='blah'>this is a post <a href='/nodes/22/edit'>edit</a></li>/"
21
21
 
22
22
  add_each_no_form:
23
- src: "<ul do='children' id='things'><li do='each'>I <p do='node_name'>blah</p></li><li do='add'/></ul>"
24
- res: "/<ul><li.*id='things_add'.*li.*class='form' id='things_form'.*form.*I <p><input id=.things_node_name. name=.node\[node_name\]. .*type=.text..*hidden/"
23
+ src: "<ul do='children' id='things'><li do='each'>I <p do='title'>blah</p></li><li do='add'/></ul>"
24
+ res: "/<ul><li.*id='things_add'.*li.*class='form' id='things_form'.*form.*I <p><input id=.things_title. name=.node\[title\]. .*type=.text..*hidden/"
25
25
 
26
26
  add_each_no_form_date:
27
27
  src: "<ul do='children' id='things'><li do='each'>I <p do='show' date='event_at' tformat='short_date'>blah</p></li><li do='add'/></ul>"
@@ -36,11 +36,11 @@ each_add_with_form:
36
36
  node: 'wiki'
37
37
  src: |
38
38
  <ol do='children'>
39
- <li do='each' do='node_name'>blah</li>
39
+ <li do='each' do='title'>blah</li>
40
40
  <li do='add'>add new</li>
41
41
  <li do='form'><input name='title'/> this is the form</li>
42
42
  </ol>
43
- res: "/<li id='list2_30'>bird.*<li id='list2_31'>flower.*<li.*list1_add.*list1_form.*toggle.*<li style.*none.*list1_form.*Ajax.Request.*input type='hidden' name='t_url' value=.ajax/each/add/with/form/list1.*input type='hidden' name='node\[parent_id\]' value=.29./"
43
+ res: "/<li id='list1_30'>bird.*<li id='list1_31'>flower.*<li.*list1_add.*list1_form.*toggle.*<li style.*none.*list1_form.*Ajax.Request.*input type='hidden' name='t_url' value=.ajax/each/add/with/form/list1.*input type='hidden' name='node\[parent_id\]' value=.29./"
44
44
 
45
45
  each_add_with_form_in_sub_block:
46
46
  context:
@@ -48,7 +48,7 @@ each_add_with_form_in_sub_block:
48
48
  src: |
49
49
  <r:children>
50
50
  <ol do='void' name='boo'>
51
- <li do='each' do='node_name'>blah</li>
51
+ <li do='each' do='title'>blah</li>
52
52
  <li do='add'>add new</li>
53
53
  <li do='form'><input name='title'/> this is the form</li>
54
54
  </ol>
@@ -60,43 +60,43 @@ each_add_with_form_klass_set:
60
60
  node: 'wiki'
61
61
  src: |
62
62
  <r:children>
63
- <li do='each' do='node_name'>blah</li>
63
+ <li do='each' do='title'>blah</li>
64
64
  <li do='add'>add new</li>
65
65
  <li do='form'><input name='title'/> <select name='klass' root_class='Note' selected='Post'/> this is the form</li>
66
66
  </r:children>
67
67
  res: "!/hidden.*node\[klass\].*Node.*select.*node\[klass\]/"
68
68
 
69
69
  each_add_with_select:
70
- src: "<r:children><r:each do='node_name'/><r:add/><r:form><select name='icon_id' nodes='images in project' selected='[main.icon_id]_abc'/></r:form></r:children>"
71
- 'ajax/each/en/add/with/select/list1_form.erb': '/map.|r| \[r.name, r.zip.to_s\]., \"#.@node.icon_zip._abc\"\)/'
70
+ src: "<r:children><r:each do='title'/><r:add/><r:form><select name='icon_id' nodes='images in project' selected='[main.icon_id]_abc'/></r:form></r:children>"
71
+ 'ajax/each/add/with/select/en/list1_form.erb': '/map.|r| \[r.name, r.zip.to_s\]., \"#.@node.icon_zip._abc\"\)/'
72
72
  tem: "/nodes.kpath LIKE 'NDI%'/"
73
73
 
74
74
  each_edit_with_form:
75
75
  context:
76
76
  node: 'wiki'
77
- src: "<r:children><li do='each'><r:show attr='node_name'>blah</r:show> <r:edit>edit</r:edit></li>\n<r:form><li><form>this is the form</form></li></r:form></r:children>"
78
- res: "/<li id='list2_30'>bird <a href='/nodes/30/edit' onclick='new Ajax.Request\(\"/nodes/30/edit\?.*t_url=ajax%2Feach%2Fedit%2Fwith%2Fform%2Flist2_form/"
77
+ src: "<r:children><li do='each'><r:show attr='title'>blah</r:show> <r:edit>edit</r:edit></li>\n<r:form><li><form>this is the form</form></li></r:form></r:children>"
78
+ res: "/<li id='list1_30'>bird <a href='/nodes/30/edit' onclick='new Ajax.Request\(\"/nodes/30/edit\?.*t_url=ajax%2Feach%2Fedit%2Fwith%2Fform%2Flist1_form/"
79
79
 
80
80
  make_form:
81
- src: "<ul do='children'><li do='each' do='node_name'/><li do='add'/></ul>"
81
+ src: "<ul do='children'><li do='each' do='title'/><li do='add'/></ul>"
82
82
  tem: "/<li style='display:none;' class='form' id='list1_form'>.*remote_form_for\(:node, var2_new"
83
- 'ajax/make/en/form/list1.erb': "<li id='<%= ndom_id(@node) %>'><%= @node.node_name %></li>"
84
- 'ajax/make/en/form/list1_form.erb': "/<li class='form' id='<%= ndom_id\(@node\) %>'>/"
83
+ 'ajax/make/form/en/list1.erb': "<li id='<%= ndom_id(@node) %>'><%= @node.prop['title'] %></li>"
84
+ 'ajax/make/form/en/list1_form.erb': "/<li class='form' id='<%= ndom_id\(@node\) %>'>/"
85
85
 
86
86
  each_edit_cannot_write:
87
87
  context:
88
88
  node: 'cleanWater'
89
89
  visitor: 'anon'
90
- src: "<r:children><li do='each'><r:show attr='node_name'>blah</r:show> <r:edit>edit</r:edit></li>\n</r:children>"
91
- res: "/<li id='list2_24'>lake</li>.*/"
90
+ src: "<r:children><li do='each'><r:show attr='title'>blah</r:show> <r:edit>edit</r:edit></li>\n</r:children>"
91
+ res: "/<li id='list1_24'>it's a lake</li>.*/"
92
92
 
93
93
  add_each_publish:
94
- src: "<ul do='children' id='things'><li do='each'>I <p do='node_name'>blah</p></li><li do='add' publish='true'/></ul>"
94
+ src: "<ul do='children' id='things'><li do='each'>I <p do='title'>blah</p></li><li do='add' publish='true'/></ul>"
95
95
  res: "/hidden.*name=.node\[v_status\]. value=.50./"
96
96
 
97
97
  block_edit_form:
98
- src: "<r:block><p do='node_name'/> <r:edit/> <r:form>please enter name: <input name='name'/> <r:input type='submit'/></r:form></r:block>"
99
- res: "/<p>status<\/p>.*edit/"
98
+ src: "<r:block><p do='title'/> <r:edit/> <r:form>please enter name: <input name='name'/> <r:input type='submit'/></r:form></r:block>"
99
+ res: "/<p>status title<\/p>.*edit/"
100
100
 
101
101
  query_in_block:
102
102
  src: "<r:block><r:tagged where='title like \"%#{params[:tag]}%\"' in='site'/></r:block>"
@@ -104,17 +104,22 @@ query_in_block:
104
104
 
105
105
  saved_each_block:
106
106
  src: "<ol do='pages'><li do='each' on_if='ancestor' do='link'/><li do='add'/></ol>"
107
- 'ajax/saved/en/each/block/list1.erb': "!/var1/"
107
+ 'ajax/saved/each/block/en/list1.erb': "!/var1/"
108
108
 
109
109
  no_recursion_in_saved_block:
110
- src: "<r:void name='grp'><r:show attr='node_name'/><r:pages><r:each><r:include part='grp'/></r:each><r:add/></r:pages></r:void>"
111
- 'ajax/no/en/recursion/in/saved/block/grp1.erb': "!/no_recursion_in_saved_block_grp/"
110
+ src: "<r:void name='grp'><r:show attr='title'/><r:pages><r:each><r:include part='grp'/></r:each><r:add/></r:pages></r:void>"
111
+ 'ajax/no/recursion/in/saved/block/en/grp1.erb': "!/no_recursion_in_saved_block_grp/"
112
112
 
113
- each_in_each:
113
+ each_in_each_form:
114
114
  # should render correct form
115
115
  src: "<r:pages><r:form>FORM1</r:form><r:each><r:pages>sub-pages <r:form>FORM2</r:form></r:pages></r:each><r:add/></r:pages>"
116
116
  res: "/FORM1/"
117
117
 
118
+ each_in_each_dom_id:
119
+ # should render correct form
120
+ src: "<r:pages do='each'><r:title/><r:edit/><r:pages do='each'><r:title/><r:edit/></r:pages></r:pages>"
121
+ tem: "/list2_#\{var.\.zip\}_#\{var.\.zip\}/"
122
+
118
123
  default_focus_field:
119
124
  src: "<ol do='comments'><li do='each'/><li do='form'><input name='author_name'/> ... <input name='text'/></li><li do='add'/></ol>"
120
125
  res: "/\$\(\"list1_form_t\"\).focusFirstElement\(\)/"
@@ -122,49 +127,76 @@ default_focus_field:
122
127
  live_filter:
123
128
  context:
124
129
  node: cleanWater
125
- src: "<r:filter live='true'/><r:block><ol do='pages where node_name like \"#{params[:f]}%\"'><li do='each' do='node_name'/></ol></r:block>"
126
- tem: "/nodes.node_name LIKE \?.*, \"#\{params\[:f\]\}%\"/"
127
- 'ajax/live/en/filter/list1.erb': "/<div id='list1.*, \"#\{params\[:f\]\}%\".*var2.node_name/"
128
- res: "/<input type='text' name='f'.*<div id='list1'><ol><li>crocodiles</li><li>status</li><li>track</li></ol></div>/"
130
+ src: "<r:filter live='true'/><r:block><ol do='pages where title like \"#{params[:f]}%\"'><li do='each' do='title'/></ol></r:block>"
131
+ tem: "/ml1.value LIKE \?.*, \"#\{params\[:f\]\}%\"/"
132
+ 'ajax/live/filter/en/list1.erb': "/<div id='list1.*, \"#\{params\[:f\]\}%\".*var2.prop\['title'\]/"
133
+ res: "/<input type='text' name='f'.*<div id='list1'><ol><li>crocodiles</li><li>Keeping things clean !</li><li>status title</li></ol></div>/"
129
134
 
130
135
  live_filter_single_element:
131
136
  context:
132
137
  node: cleanWater
133
- src: "<r:filter live='true'/><r:block><r:page where='node_name like \"#{params[:f]}%\"' find='first'><b do='node_name'/></r:page></r:block>"
138
+ src: "<r:filter live='true'/><r:block><r:page where='title like \"#{params[:f]}%\"' find='first'><b do='title'/></r:page></r:block>"
134
139
  tem: "/, \"#\{params\[:f\]\}%\"/"
135
- 'ajax/live/en/filter/single/element/list1.erb': "/<div id='list1.*params\[:f\].*var1.node_name/"
140
+ 'ajax/live/filter/single/element/en/list1.erb': "/<div id='list1.*params\[:f\].*var1.prop\['title'\]/"
136
141
  res: "/<input type='text' name='f'.*<div id='list1'><b>crocodiles</b></div>/"
137
142
 
138
143
  live_filter_select_options:
139
144
  context:
140
145
  node: cleanWater
141
- src: "<r:filter live='true' do='select' name='f' values='1,2'/><r:block><ol do='pages where node_name like \"#{params[:f]}%\"'><li do='each' do='node_name'/></ol></r:block>"
146
+ src: "<r:filter live='true' do='select' name='f' values='1,2'/><r:block><ol do='pages where title like \"#{params[:f]}%\"'><li do='each' do='title'/></ol></r:block>"
142
147
  tem: "/select name=.f.><%= options_for_select\(\[.1., .2.\], params\[:f\].to_s/"
143
- 'ajax/live/en/filter/select/options/list1.erb': "/<div id='list1'.*params\[:f\]/"
144
- res: "/<select name='f'.*<div id='list1'><ol><li>crocodiles</li><li>status</li><li>track</li></ol></div>/"
148
+ 'ajax/live/filter/select/options/en/list1.erb': "/<div id='list1'.*params\[:f\]/"
149
+ res: "/<select name='f'.*<div id='list1'><ol><li>crocodiles</li><li>Keeping things clean !</li><li>status title</li></ol></div>/"
145
150
 
146
151
  draggable_do_syntax:
147
152
  src: "<r:images in='site' do='each' draggable='all' do='img' mode='pv'/>"
148
- tem: "/add_drag_id\(\"list1_#\{var2.zip\}\"/"
149
- res: "/id='list1_30'><img src='/en/image30_pv.jpg\?967816914293'/"
150
- js: '/"list1_40"\].each.*Zena.draggable\(item, false\)/'
153
+ tem: "/add_drag_id\(\"drag_#\{var2.zip\}\"/"
154
+ res: "/id='drag_30'><img src='/en/image30_pv.jpg\?967816914293'/"
155
+ js: '/"drag_24"\].each.*Zena.draggable\(item, false\)/'
151
156
 
152
157
  draggable_true:
153
158
  # should use 'drag_handle' class
154
- src: "<r:link draggable='true'/>"
155
- tem: "/add_drag_id\(\"list1_\#\{@node.zip\}\", .*drag_handle/"
159
+ src: "<r:link draggable='true'><b do='title'/></r:link>"
160
+ tem: "/span class='drag_handle'.*add_drag_id\(\"drag_\#\{@node.zip\}\", .*drag_handle/"
161
+
162
+ draggable_on_each_with_id:
163
+ src: "<ul do='pages in site'><li do='each'><b do='link' draggable='true'/> <r:edit/></li></ul>"
164
+ # should not use each id
165
+ tem: "/li id='<%= %Q\{list1_#\{var2.zip\}\}.*%Q\{drag_#\{var2.zip\}\}.*add_drag_id\(\"drag_#\{var2.zip\}\"/"
166
+
167
+ drag_with_form:
168
+ src: "<table do='pages in site'>
169
+ <tr do='add'/>
170
+ <tr do='each'>
171
+ <td><r:link draggable='true'><b do='title'/></r:link></td>
172
+ <td class='edit'> <r:edit class='edit'>éditer</r:edit></td>
173
+ </tr>
174
+ </table>"
175
+ tem: "/tr id='<%= %Q\{list1_#\{var2.zip\}\}.*<div[^>]+id='<%= %Q\{drag_#\{var2.zip\}\}.*add_drag_id\(\"drag_#\{var2.zip\}\"/"
176
+
177
+ draggable_existing_class:
178
+ # should use 'drag_handle' class
179
+ src: "<r:link draggable='true'><r:img class='drag_handle' mode='tiny'/> <r:title/></r:link>"
180
+ tem: "!/span class='drag_handle'/"
181
+ res: "/div class='drag' id='drag_22'><a href='.*22.*img src='/images/ext/page_tiny.png' .*class='drag_handle'/> status title/"
182
+
183
+ draggable_existing_class_do:
184
+ # should use 'drag_handle' class
185
+ src: "<r:link draggable='drag_img'><b class='drag_img' do='img' mode='tiny'/> blah</r:link>"
186
+ tem: "!/span class='drag_handle'|span class='drag_img'/"
187
+ res: "/div class='drag' id='drag_22'><a href='.*22.*<b class='drag_img'.*img src='/images/ext/page_tiny.png'/"
156
188
 
157
189
  draggable_in_block:
158
190
  # should use 'hooba' class
159
- src: "<r:block><r:link draggable='true'/></r:block>"
160
- tem: "/add_drag_id\(\"list1_\#\{@node.zip\}\", .*hooba/"
161
- res: "<div class='drag' id='list1_22'><a href='/oo/projects/cleanWater/page22.html'>status title</a></div>"
191
+ src: "<r:block><r:link draggable='hooba'/></r:block>"
192
+ tem: "/add_drag_id\(\"drag_\#\{@node.zip\}\", .*hooba/"
193
+ res: "<div id='list1'><div class='drag' id='drag_22'><span class='hooba'>&nbsp;</span><a href='/oo/projects-list/Clean-Water-project/page22.html'>status title</a></div></div>"
162
194
  js: "/Zena.draggable\(item, \"hooba\"\)/"
163
195
 
164
196
  draggable_with_id_set:
165
197
  # should not change original id
166
198
  src: "<h1 id='title' do='title' draggable='true'/>"
167
- tem: "/<h1 id='title'><span class='drag' id='<%= %Q\{title_#\{@node.zip\}\} %>'><% add_drag_id\(\"title_#\{@node.zip\}/"
199
+ tem: "/<h1 id='title'><span class='drag' id='<%= %Q\{drag_#\{@node.zip\}\} %>'><span class='drag_handle'>&nbsp;</span><% add_drag_id\(\"drag_#\{@node.zip\}/"
168
200
 
169
201
  unlink:
170
202
  context:
@@ -186,11 +218,11 @@ edit_link:
186
218
  node: 'art'
187
219
  class: Tag
188
220
  lang: 'fr'
189
- src: "<r:context select='tagged'><r:each><r:show attr='node_name'/>: <r:show attr='l_status'/> <r:edit/></r:each></r:context>"
221
+ src: "<r:context select='tagged'><r:each><r:show attr='title'/>: <r:show attr='l_status'/> <r:edit/></r:each></r:context>"
190
222
  # The link_id should be sent with the url.
191
223
  res: "/link_id.*éditer/"
192
- 'ajax/edit/fr/link/list1_form.erb': "/<input type='hidden' name='link_id' value=.<%= @node.link_id %>./>/"
193
- 'ajax/edit/fr/link/list1.erb': "/:link_id => @node.link_id/"
224
+ 'ajax/edit/link/fr/list1_form.erb': "/<input type='hidden' name='link_id' value=.<%= @node.link_id %>./>/"
225
+ 'ajax/edit/link/fr/list1.erb': "/:link_id => @node.link_id/"
194
226
 
195
227
  start_id:
196
228
  src: "<r:form><input type='hidden' name='s' value='#{start_id}'/></r:form>"
@@ -198,13 +230,17 @@ start_id:
198
230
 
199
231
  drop_add_link:
200
232
  context:
201
- class: BaseContact
233
+ class: Contact
202
234
  src: "<div do='drop' add='favorite'></div>"
203
235
  # without the ugly inspect, this would be '#{id}' or "\#{id}"
204
236
  tem: "/drop_node_path.*\"node\[favorite_id\]\" => \"\\\\#\{id\}\"/"
205
237
  res: "<div class='drop' id='list1'>drop</div>"
206
238
  js: "/Droppables.add\('list1'.*/nodes/22/drop.*node%5Bfavorite_id%5D=%23%7Bid%7D"
207
239
 
240
+ drop_var_scope:
241
+ src: "<div do='visitor.node'><div do='drop' add='favorite' change='receiver'><r:favorites>.</r:favorites></div></div>"
242
+ tem: "/var2 = Node.do_find.*ml1.value ASC\}, var1.id\]\)/"
243
+
208
244
  drop_done_remove:
209
245
  src: "<div do='drop' set='reference' done='remove'></div>"
210
246
  js: "/done=remove/"
@@ -217,15 +253,22 @@ drop_param:
217
253
 
218
254
  drop_param_in_each:
219
255
  src: "<r:pages do='each' do='drop' change='params' d='foo'><r:show eval='params[:d]'/></r:pages>"
220
- tem: "/<div class='drop' id='<%= %Q\{list2_#\{var2.zip\}\} %>'><% add_drop_id\(\"list2_#\{var2.zip\}\"/"
256
+ tem: "/<div class='drop' id='<%= %Q\{list1_#\{var2.zip\}\} %>'><% add_drop_id\(\"list1_#\{var2.zip\}\"/"
221
257
 
222
258
  update_target:
223
259
  src: "UT: <div id='foo' do='block'>...</div> <r:link update='foo'/>"
224
260
  tem: "/UT: <div id='foo'>...</div> .*Ajax.Request.*:dom_id => \"foo\"/"
225
261
 
262
+ update_target_encode_params:
263
+ context:
264
+ a:
265
+ b: 'c'
266
+ src: "UT: <div id='foo' do='block'>...</div> <r:link update='foo' encode_params='a'/>"
267
+ res: "/Ajax.Request\([^\)]+a%5Bb%5D=c/"
268
+
226
269
  include_update_target:
227
- src: "IUT: <r:include template='/ajax/update/target'><r:with part='foo'><r:show attr='node_name'/></r:with></r:include>"
228
- tem: "/IUT: UT: <div id='foo'><%= @node.node_name %></div> <a .*zen_path.*onclick='new Ajax.Request/"
270
+ src: "IUT: <r:include template='/ajax/update/target'><r:with part='foo'><r:show attr='title'/></r:with></r:include>"
271
+ tem: "/IUT: UT: <div id='foo'><%= @node.prop\['title'\] %></div> <a .*zen_path.*onclick='new Ajax.Request/"
229
272
 
230
273
  id_in_each_group_should_be_scoped:
231
274
  src: "<ul do='comments from nodes in site' do='group' by='discussion_id'><li do='each'><r:node do='block' do='title'/></li></ul>"
@@ -235,7 +278,7 @@ link_page_next:
235
278
  context:
236
279
  pak: 2
237
280
  src: "<div id='foo' do='block' do='nodes in site' limit='3' order='zip' paginate='pak'><r:link page='previous'/> | <r:pak/> | <r:link update='foo' page='next'/> || <r:each join=',' do='[id]'/></div>"
238
- res: "/<a href='/oo/projects/cleanWater/page22.html\?pak=1'>1</a> \| 2 \| .*22/zafu\?dom_id=foo.*pak=3.*>3</a>/"
281
+ res: "/<a href='/oo/projects-list/Clean-Water-project/page22.html\?pak=1'>1</a> \| 2 \| .*22/zafu\?dom_id=foo.*pak=3.*>3</a>/"
239
282
 
240
283
  link_page_list:
241
284
  context:
@@ -255,3 +298,20 @@ toggle_attribute_in_each:
255
298
  src: "<ul do='pages'><li do='each' toggle='favorite' for='visitor.node' do='title'/></ul>"
256
299
  res: "/<ul><li class='toggle' id='list1_26'>crocodiles</li>/"
257
300
  js: "/list1_26.*each/"
301
+
302
+ toggle_dyn_attribute_in_each:
303
+ context:
304
+ node: cleanWater
305
+ rel: favorite
306
+ src: "<ul do='pages'><li do='each' toggle='#{params[:rel]}' for='visitor.node' do='title'/></ul>"
307
+ tem: "/add_toggle_id\(\"list1_#\{var2.zip\}\", \"var2_tog\", \"#\{params\[:rel\]\}\"\)/"
308
+ res: "/<ul><li class='toggle' id='list1_26'>crocodiles</li>/"
309
+ js: "/list1_26.*each/"
310
+
311
+ toggle_bad_rel:
312
+ context:
313
+ node: cleanWater
314
+ rel: bad
315
+ src: "<ul do='pages'><li do='each' toggle='#{params[:rel]}' for='visitor.node' do='title'/></ul>"
316
+ res: "/<ul><li class='toggle' id='list1_26'>crocodiles</li>/"
317
+ js: "/list1_26.*each/"
@@ -29,7 +29,7 @@ zen_url:
29
29
  context:
30
30
  node: status
31
31
  tem: "<%= zen_url(@node, :mode=>'rss', :format=>'xml') %>"
32
- res: "http://test.host/oo/projects/cleanWater/page22_rss.xml"
32
+ res: "http://test.host/oo/projects-list/Clean-Water-project/page22_rss.xml"
33
33
 
34
34
  zen_url_root_mode_format:
35
35
  context:
@@ -9,5 +9,5 @@ default:
9
9
 
10
10
 
11
11
  rename_asset:
12
- src: "<link href='/default/style.css' rel='Stylesheet' type='text/css'/>"
12
+ src: "<link href='/Default skin/style.css' rel='Stylesheet' type='text/css'/>"
13
13
  tem: "<link href='/en/textdocument53.css?1144713600' rel='Stylesheet' type='text/css'/>"
@@ -9,16 +9,6 @@ default:
9
9
 
10
10
  #----------- fixed up to here
11
11
 
12
- show_path:
13
- src: "<ul id='path' do='show_path'><ul><li><a href='#'>first</a></li> / <li><a href='#'>second</a></li> / <li><a href='#' class='current'>here</a></li></ul></div>"
14
- tem: "<ul id='path'><%= show_path(:node=>@node) %></ul>"
15
- res: "/<ul id='path'><li>.*zena.*<li>.*oo/page18.html.*<li><.*/projects/cleanWater.*cleanWater</a>.*/oo/projects/cleanWater/page22.html.*class='current'>status</a>/"
16
-
17
- show_path_options:
18
- src: "<div id='path' do='show_path' wrap='p'/>"
19
- res: "/<div id='path'><p>.*zena.*<p>.*oo/page18.html.*<p><.*/projects/cleanWater.*cleanWater</a>.*/oo/projects/cleanWater/page22.html.*class='current'>status</a>/"
20
-
21
-
22
12
  flash_messages_both:
23
13
  src: "<r:flash_messages/>"
24
14
  tem: "/id.*messages.*notice.*flash.*notice.*error.*flash.*error/"
@@ -46,7 +36,7 @@ show_author_large:
46
36
 
47
37
  each_traductions:
48
38
  src: "<r:traductions except='current'><ul><li do='each'><r:show attr='title'/></li></ul></r:traductions>"
49
- tem: "<% if list1 = @node.traductions(:conditions=>\"lang != 'en'\") -%><ul><% list1.each do |var1| -%><li><%= var1.title %></li><% end -%></ul><% end -%>"
39
+ tem: "<% if list1 = @node.traductions(:conditions=>\"lang != 'en'\") %><ul><% list1.each do |var1| %><li><%= var1.title %></li><% end %></ul><% end %>"
50
40
  res: "<ul><li>Etat des travaux</li></ul>"
51
41
 
52
42
  each_traductions_except_list:
@@ -60,50 +50,50 @@ each_traductions_only_list:
60
50
  each_alternate_class:
61
51
  context:
62
52
  node: 'cleanWater'
63
- src: "<ol do='pages'><li do='each' alt_class='blue' do='node_name'/></ol>"
64
- res: "<ol><li class=''>crocodiles</li><li class='blue'>status</li><li class=''>track</li></ol>"
53
+ src: "<ol do='pages'><li do='each' alt_class='blue' do='title'/></ol>"
54
+ res: "<ol><li class=''>crocodiles</li><li class='blue'>status title</li><li class=''>Keeping things clean !</li></ol>"
65
55
 
66
56
  each_alternate_class_reverse:
67
57
  context:
68
58
  node: 'cleanWater'
69
- src: "<ol do='pages' limit='2'><li do='each' alt_class='blue' alt_reverse='true' do='node_name'/></ol>"
70
- res: "<ol><li class='blue'>crocodiles</li><li class=''>status</li></ol>"
59
+ src: "<ol do='pages' limit='2'><li do='each' alt_class='blue' alt_reverse='true' do='title'/></ol>"
60
+ res: "<ol><li class='blue'>crocodiles</li><li class=''>status title</li></ol>"
71
61
 
72
62
  each_alternate_class_two:
73
63
  context:
74
64
  node: 'collections'
75
- src: "<ol do='pages'><li class='post' do='each' alt_class='stripe' do='node_name'/></ol>"
65
+ src: "<ol do='pages'><li class='post' do='each' alt_class='stripe' do='title'/></ol>"
76
66
  res: "<ol><li class='post '>art</li><li class='post stripe'>menu</li><li class='post '>news</li><li class='post stripe'>wikiSkin</li></ol>"
77
67
 
78
68
  each_alternate_class_ajax:
79
69
  context:
80
70
  node: 'cleanWater'
81
- src: "<ol do='pages' limit='2'><li do='each' alt_class='blue' do='node_name'/><li do='add'/></ol>"
71
+ src: "<ol do='pages' limit='2'><li do='each' alt_class='blue' do='title'/><li do='add'/></ol>"
82
72
  res: "/<li>crocodiles<\/li><li class=\"blue\">status/"
83
73
 
84
74
  each_else:
85
75
  context:
86
76
  node: 'opening'
87
- src: "<div do='pages'>has pages (<r:each join=', ' do='node_name'/>)<r:else>no pages</r:else></div>"
88
- tem: "/<% if var1.* -%><div>has pages \(<% var1.each_with_index .* -%><%= var2.node_name %><% end -%>\)</div><% elsif true -%><div>no pages</div><% end -%>/"
77
+ src: "<div do='pages'>has pages (<r:each join=', ' do='title'/>)<r:else>no pages</r:else></div>"
78
+ tem: "/<% if var1.* %><div>has pages \(<% var1.each_with_index .* %><%= var2.prop\['title'\] %><% end %>\)</div><% elsif true %><div>no pages</div><% end %>/"
89
79
  res: "<div>no pages</div>"
90
80
 
91
81
 
92
82
  simple_each:
93
- src: "<r:children><r:each><r:show attr='node_name'/></r:each></r:children>"
94
- tem: "/.*if var1.*each.*var2.node_name/"
83
+ src: "<r:children><r:each><r:show attr='title'/></r:each></r:children>"
84
+ tem: "/.*if var1.*each.*var2.prop\['title'\]/"
95
85
  res: ""
96
86
 
97
87
  each_join:
98
88
  context:
99
89
  node: 'wiki'
100
- src: "<r:children><r:each join=', '><r:show attr='node_name'/></r:each></r:children>"
90
+ src: "<r:children><r:each join=', '><r:show attr='title'/></r:each></r:children>"
101
91
  res: "bird, flower"
102
92
 
103
93
  each_join_if:
104
94
  context:
105
95
  node: 'status'
106
- src: "<r:pages in='site' order='name'><r:each join=', ' join_if='prev.id ne main.id and id ne main.id'><r:show attr='node_name'/></r:each></r:pages>"
96
+ src: "<r:pages in='site' order='name'><r:each join=', ' join_if='prev.id ne main.id and id ne main.id'><r:show attr='title'/></r:each></r:pages>"
107
97
  res: "/projects, skinsstatustalk, track/"
108
98
 
109
99
  set_attribute:
@@ -124,27 +114,27 @@ set_node_param_main_other_class:
124
114
  res: "<p class='class_22'></p>"
125
115
 
126
116
  set_attribute_with_inner:
127
- src: "<p set_id='node[id]' do='show' attr='node_name' set_class='s[v_status]'>some blah blah</p>"
128
- res: "<p class='s50' id='node22'>status</p>"
117
+ src: "<p set_id='node[id]' do='show' attr='title' set_class='s[v_status]'>some blah blah</p>"
118
+ res: "<p class='s50' id='node22'>status title</p>"
129
119
 
130
120
  set_in_ztag:
131
- src: "<r:show attr='node_name' set_id='node[id]'/>"
132
- res: "<div id='node22'>status</div>"
121
+ src: "<r:show attr='title' set_id='node[id]'/>"
122
+ res: "<div id='node22'>status title</div>"
133
123
 
134
124
  set_attribute_stored_node:
135
- src: "<r:void store='foo'><r:parent><p do='node_name' set_id='test_[foo.id]'>hey</p></r:parent></r:void>"
136
- res: "<p id='test_22'>cleanWater</p>"
125
+ src: "<r:void store='foo'><r:parent><p do='title' set_id='test_[foo.id]'>hey</p></r:parent></r:void>"
126
+ res: "<p id='test_22'>Clean Water project</p>"
137
127
 
138
128
  set_attribute_main_node:
139
- src: "<r:parent><p id='test_#{main.node_name}' do='node_name'>hey</p></r:parent>"
140
- res: "<p id='test_status'>cleanWater</p>"
129
+ src: "<r:parent><p id='test_#{main.zip}' do='title'>hey</p></r:parent>"
130
+ res: "<p id='test_22'>Clean Water project</p>"
141
131
 
142
132
  set_attribute_in_list:
143
133
  context:
144
134
  node: 'projects'
145
- src: "<div do='pages'><p id='#{node_name}'>...</p></div>"
135
+ src: "<div do='pages'><p id='#{id}'>...</p></div>"
146
136
  tem: /var1.first/
147
- res: "<div><p id='cleanWater'>...</p></div>"
137
+ res: "<div><p id='21'>...</p></div>"
148
138
 
149
139
  set_attribute_with_namespace:
150
140
  src: "<entry do='void' set_xml:base='[name]'>..</entry>"
@@ -153,13 +143,13 @@ set_attribute_with_namespace:
153
143
  each_join_html:
154
144
  context:
155
145
  node: 'wiki'
156
- src: "<r:children><r:each join='&lt;br/&gt;'><r:show attr='node_name'/></r:each></r:children>"
146
+ src: "<r:children><r:each join='&lt;br/&gt;'><r:show attr='title'/></r:each></r:children>"
157
147
  res: "bird<br/>flower"
158
148
 
159
149
  each_join_nasty_erb:
160
150
  context:
161
151
  node: 'wiki'
162
- src: "<r:children><r:each join='&lt;% puts \'nasty\' -%&gt;'><r:show attr='node_name'/></r:each></r:children>"
152
+ src: "<r:children><r:each join='&lt;% puts \'nasty\' -%&gt;'><r:show attr='title'/></r:each></r:children>"
163
153
  res: "bird&lt;% puts 'nasty' -%&gt;flower"
164
154
 
165
155
  test_children_plural:
@@ -169,7 +159,7 @@ test_children_plural:
169
159
  each_do:
170
160
  context:
171
161
  node: 'wiki'
172
- src: "<r:children><r:each join=', ' do='show' attr='node_name'/></r:children>"
162
+ src: "<r:children><r:each join=', ' do='show' attr='title'/></r:children>"
173
163
  res: "bird, flower"
174
164
 
175
165
  parent_do:
@@ -187,7 +177,7 @@ do_each:
187
177
  do_with_inner:
188
178
  context:
189
179
  node: 'wiki'
190
- src: "<ul do='children' do='each' tag='li'><r:show attr='node_name'/></ul>"
180
+ src: "<ul do='children' do='each' tag='li'><r:show attr='title'/></ul>"
191
181
  res: "<ul><li>bird</li><li>flower</li></ul>"
192
182
 
193
183
  do_each_do:
@@ -207,8 +197,8 @@ do_ignore:
207
197
  res: ""
208
198
 
209
199
  name_title:
210
- src: "title: <h1 id='lala' do='show' name='title' attr='node_name'>blah</h1>"
211
- res: "title: <h1 id='lala'>status</h1>"
200
+ src: "title: <h1 id='lala' do='show' name='title' attr='title'>blah</h1>"
201
+ res: "title: <h1 id='lala'>status title</h1>"
212
202
 
213
203
  include_with:
214
204
  src: "include_with: <r:include template='/basic/name/title'><h1 do='with' part='title' attr='id'/>"
@@ -228,21 +218,21 @@ include_named:
228
218
 
229
219
  # this test is a dummy used by include_context
230
220
  context_dummy:
231
- src: "CD: <r:pages in='site' where='name like \"s%\"' node_name='pages'><r:each join=', ' do='node_name'/></r:pages>"
221
+ src: "CD: <r:pages in='site' where='title like \"s%\"' name='pages'><r:each join=', ' do='title'/></r:pages>"
232
222
  res: "CD: skins, status"
233
223
 
234
224
  include_context:
235
- src: "IC: <r:include template='/context/dummy'><r:with part='pages'><r:each join=' / ' do='node_name'/></r:with></r:include>"
225
+ src: "IC: <r:include template='/context/dummy'><r:with part='pages'><r:each join=' / ' do='title'/></r:with></r:include>"
236
226
  res: "IC: CD: skins / status"
237
227
 
238
228
  content_for_layout:
239
229
  src: "<r:content_for_layout>blah blah</r:content_for_layout>"
240
- tem: "<% if content_for_layout = yield -%><%= content_for_layout %><% else -%>blah blah<% end -%>"
230
+ tem: "<% if content_for_layout = yield %><%= content_for_layout %><% else %>blah blah<% end %>"
241
231
  res: "blah blah"
242
232
 
243
233
  title_for_layout:
244
234
  src: "<r:title_for_layout>blah blih</r:title_for_layout>"
245
- res: "zena/projects/cleanWater/status"
235
+ res: "zena/projects-list/Clean-Water-project/status"
246
236
 
247
237
  tada:
248
238
  context:
@@ -332,7 +322,7 @@ design_by_options:
332
322
 
333
323
  comments_shown_if_empty_but_can_comment:
334
324
  src: "<r:comments><r:each do='[title]'/><r:add/></r:comments>"
335
- tem: "/if \(list1 = @node.comments\) \|\| \(@node.can_comment\? && list1=\[\]\) -%>/"
325
+ tem: "/if \(list1 = @node.comments\) \|\| \(@node.can_comment\? && list1=\[\]\) %>/"
336
326
 
337
327
 
338
328
 
@@ -357,12 +347,12 @@ find_count:
357
347
  link_page_next:
358
348
  context:
359
349
  pak: 2
360
- src: "<r:nodes in='site' limit='3' order='zip' paginate='pak'><r:link page='previous'/> | <r:show var='pak'/> | <r:link page='next'/> || <r:each join=',' do='node_name'/></r:nodes>"
361
- res: "<a href='/oo/projects/cleanWater/page22.html?pak=1'>1</a> | 2 | <a href='/oo/projects/cleanWater/page22.html?pak=3'>3</a> || tiger,lion,myLife"
350
+ src: "<r:nodes in='site' limit='3' order='zip' paginate='pak'><r:link page='previous'/> | <r:show var='pak'/> | <r:link page='next'/> || <r:each join=',' do='title'/></r:nodes>"
351
+ res: "<a href='/oo/projects-list/Clean-Water-project/page22.html?pak=1'>1</a> | 2 | <a href='/oo/projects-list/Clean-Water-project/page22.html?pak=3'>3</a> || tiger,lion,myLife"
362
352
 
363
353
  link_page_next_with_block:
364
354
  src: "<r:nodes in='site' limit='3' order='zip' paginate='pak'><r:link page='next' do='t'>next</r:link></r:nodes>"
365
- res: "<a href='/oo/projects/cleanWater/page22.html?pak=2'>next</a>"
355
+ res: "<a href='/oo/projects-list/Clean-Water-project/page22.html?pak=2'>next</a>"
366
356
 
367
357
  link_page_list:
368
358
  context:
@@ -408,7 +398,7 @@ link_page_previous_else_page2:
408
398
  context:
409
399
  pak: 2
410
400
  src: "<r:nodes in='site' limit='3' order='zip' paginate='pak'><r:link page='previous' do='else'>noprev</r:link></r:nodes>"
411
- res: "<a href='/oo/projects/cleanWater/page22.html?pak=1'>1</a>"
401
+ res: "<a href='/oo/projects-list/Clean-Water-project/page22.html?pak=1'>1</a>"
412
402
 
413
403
  link_page_list_else:
414
404
  context:
@@ -420,14 +410,14 @@ debug_params:
420
410
  context:
421
411
  foo: 'bar'
422
412
  dev: true
423
- src: "DEBUG: <r:debug title='no idea for a title' show='params'/><r:debug do='node_name'/>"
413
+ src: "DEBUG: <r:debug title='no idea for a title' show='params'/><r:debug do='title'/>"
424
414
  tem: "DEBUG: <div class='debug'><p>no idea for a title</p><pre><%= params.inspect %></pre></div><div class='debug'><%= @node.name %></div>"
425
- res: "/DEBUG: <div class='debug'><p>no idea for a title</p><pre>.*\"foo\"=>\"bar\".*</pre></div><div class='debug'>status</div>/"
415
+ res: "/DEBUG: <div class='debug'><p>no idea for a title</p><pre>.*\"foo\"=>\"bar\".*</pre></div><div class='debug'>status title</div>/"
426
416
 
427
417
  debug_params_not_in_dev_mode:
428
418
  context:
429
419
  foo: 'bar'
430
- src: "DEBUG: <r:debug show='params'/><r:debug do='node_name'/><r:debug title='help needed'/>"
420
+ src: "DEBUG: <r:debug show='params'/><r:debug do='title'/><r:debug title='help needed'/>"
431
421
  tem: 'DEBUG: '
432
422
  res: 'DEBUG: '
433
423
 
@@ -443,4 +433,4 @@ expand_with_set_host:
443
433
  node: 'projects'
444
434
  src: "relative:<r:link/> absolute:<r:expand_with set_host='[site.host]' do='link'/>"
445
435
  tem: "/relative:.*zen_path\(@node\).*absolute:.*zen_path\(@node, :host => \"#\{current_site.host\}\"/"
446
- res: "relative:<a href='/oo/page18.html'>projects list</a> absolute:<a href='http://test.host/oo/page18.html'>projects list</a>"
436
+ res: "relative:<a href='/oo/page18.html'>projects list</a> absolute:<a href='http://test.host/oo/page18.html'>projects list</a>"