zena 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +28 -0
- data/README.rdoc +6 -6
- data/Rakefile +3 -0
- data/app/controllers/users_controller.rb +4 -2
- data/app/models/acl.rb +6 -0
- data/app/models/cached_page.rb +2 -1
- data/app/models/document.rb +3 -4
- data/app/models/node.rb +8 -5
- data/app/models/site.rb +1 -1
- data/app/models/template.rb +2 -2
- data/app/models/user.rb +5 -3
- data/app/views/acls/_add.rhtml +2 -1
- data/app/views/acls/_form.rhtml +15 -7
- data/app/views/acls/_li.rhtml +2 -0
- data/app/views/acls/index.rhtml +3 -1
- data/app/views/acls/show.html.erb +1 -1
- data/app/views/links/destroy.rjs +16 -2
- data/app/views/versions/destroy.rjs +1 -1
- data/app/views/zafu/default/Node-admin.zafu +1 -1
- data/bin/zena +5 -3
- data/bricks/acls/lib/bricks/acls.rb +11 -4
- data/bricks/acls/zena/migrate/20110627193757_add_allowed_mode_and_format_to_acl.rb +11 -0
- data/bricks/acls/zena/test/integration/acl_integration_test.rb +42 -0
- data/bricks/acls/zena/test/sites/erebus/acls.yml +8 -0
- data/bricks/mongrel/zena/deploy.rb +19 -0
- data/bricks/single/lib/bricks/single.rb +15 -0
- data/bricks/single/zena/init.rb +1 -0
- data/bricks/sphinx/zena/tasks.rb +1 -1
- data/bricks/static/lib/bricks/static.rb +151 -0
- data/bricks/static/zena/init.rb +1 -0
- data/bricks/static/zena/migrate/20110702010330_add_static_to_idx_templates.rb +12 -0
- data/bricks/static/zena/skins/blog/Image-edit.zafu +6 -0
- data/bricks/static/zena/skins/blog/Image.zafu +19 -0
- data/bricks/static/zena/skins/blog/Node-+index.zafu +1 -0
- data/bricks/static/zena/skins/blog/Node-+notFound.zafu +7 -0
- data/bricks/static/zena/skins/blog/Node-+search.zafu +19 -0
- data/bricks/static/zena/skins/blog/Node.zafu +66 -0
- data/bricks/static/zena/skins/blog/Post.zafu +12 -0
- data/bricks/static/zena/skins/blog/Project--kml.zafu +30 -0
- data/bricks/static/zena/skins/blog/Project.zafu +45 -0
- data/bricks/static/zena/skins/blog/comments.zafu +30 -0
- data/bricks/static/zena/skins/blog/dict.yml +11 -0
- data/bricks/static/zena/skins/blog/img/dateBg.jpg +0 -0
- data/bricks/static/zena/skins/blog/img/header.png +0 -0
- data/bricks/static/zena/skins/blog/img/mapPin.png +0 -0
- data/bricks/static/zena/skins/blog/img/menu.gif +0 -0
- data/bricks/static/zena/skins/blog/img/menuover.gif +0 -0
- data/bricks/static/zena/skins/blog/img/style.css +110 -0
- data/bricks/static/zena/test/integration/static_integration_test.rb +30 -0
- data/bricks/static/zena/test/unit/static_test.rb +33 -0
- data/bricks/zena/zena/migrate/01_base.rb +1 -2
- data/bricks/zena/zena/migrate/20110623072048_fix_cached_path_index.rb +10 -0
- data/bricks/zena/zena/migrate/20110710113731_remove_icon_field.rb +18 -0
- data/config/bricks.yml +4 -0
- data/config/deploy.rb +17 -2
- data/config/gems.yml +9 -7
- data/config/selenium.yml +38 -0
- data/lib/bricks/requirements_validation.rb +8 -2
- data/lib/gettext_strings.rb +2 -1
- data/lib/tasks/zena.rake +5 -0
- data/lib/zena/app.rb +12 -0
- data/lib/zena/console.rb +9 -1
- data/lib/zena/core_ext/string.rb +7 -2
- data/lib/zena/deploy.rb +60 -6
- data/lib/zena/deploy/app_init.rhtml +56 -0
- data/lib/zena/deploy/haproxy.cnf.rhtml +34 -0
- data/lib/zena/deploy/httpd.rhtml +6 -0
- data/lib/zena/deploy/start_stop.rhtml +35 -0
- data/lib/zena/info.rb +1 -1
- data/lib/zena/remote/connection.rb +1 -1
- data/lib/zena/site_worker.rb +9 -5
- data/lib/zena/use.rb +1 -1
- data/lib/zena/use/action.rb +2 -2
- data/lib/zena/use/ajax.rb +22 -9
- data/lib/zena/use/conditional.rb +5 -0
- data/lib/zena/use/context.rb +6 -1
- data/lib/zena/use/dates.rb +17 -2
- data/lib/zena/use/display.rb +14 -3
- data/lib/zena/use/forms.rb +37 -47
- data/lib/zena/use/html_tags.rb +3 -0
- data/lib/zena/use/node_context.rb +17 -17
- data/lib/zena/use/rendering.rb +1 -1
- data/lib/zena/use/urls.rb +11 -2
- data/lib/zena/use/zafu_attributes.rb +1 -0
- data/lib/zena/use/zafu_safe_definitions.rb +16 -1
- data/lib/zena/use/zafu_templates.rb +39 -24
- data/lib/zena/use/zazen.rb +1 -0
- data/locale/de/LC_MESSAGES/zena.mo +0 -0
- data/locale/de/zena.po +105 -89
- data/locale/en/LC_MESSAGES/zena.mo +0 -0
- data/locale/en/zena.mo +0 -0
- data/locale/en/zena.po +188 -253
- data/locale/fr/LC_MESSAGES/zena.mo +0 -0
- data/locale/fr/zena.mo +0 -0
- data/locale/fr/zena.po +200 -257
- data/locale/zena.pot +95 -85
- data/public/javascripts/zena.js +2 -2
- data/test/fixtures/files/{Node-test.zafu → TestNode.zafu} +206 -4
- data/test/functional/nodes_controller_test.rb +2 -2
- data/test/integration/navigation_test.rb +9 -3
- data/test/integration/query_node/basic.yml +4 -4
- data/test/integration/query_node/filters.yml +2 -2
- data/test/integration/zafu_compiler/ajax.yml +6 -6
- data/test/integration/zafu_compiler/basic.yml +1 -1
- data/test/integration/zafu_compiler/calendar.yml +4 -3
- data/test/integration/zafu_compiler/conditional.yml +3 -10
- data/test/integration/zafu_compiler/context.yml +1 -1
- data/test/integration/zafu_compiler/dates.yml +9 -1
- data/test/integration/zafu_compiler/display.yml +7 -1
- data/test/integration/zafu_compiler/eval.yml +12 -46
- data/test/integration/zafu_compiler/forms.yml +1 -1
- data/test/integration/zafu_compiler/query.yml +2 -2
- data/test/integration/zafu_compiler/relations.yml +19 -9
- data/test/integration/zafu_compiler/roles.yml +12 -0
- data/test/integration/zafu_compiler/safe_definitions.yml +1 -1
- data/test/integration/zafu_compiler/urls.yml +13 -5
- data/test/integration/zafu_compiler/version.yml +6 -0
- data/test/integration/zafu_compiler/zafu_attributes.yml +4 -4
- data/test/integration/zafu_compiler_test.rb +1 -1
- data/test/selenium.readme +8 -0
- data/test/selenium/Add/0setup.rsel +12 -0
- data/test/selenium/Add/add1.rsel +22 -0
- data/test/selenium/Add/add2.rsel +22 -0
- data/test/selenium/Add/add3.rsel +22 -0
- data/test/selenium/Drop/0setup.rsel +12 -0
- data/test/selenium/Drop/drop1.rsel +25 -0
- data/test/selenium/Drop/drop2.rsel +25 -0
- data/test/selenium/Drop/drop3.rsel +51 -0
- data/test/selenium/Drop/drop4.rsel +44 -0
- data/test/selenium/Drop/drop5.rsel +16 -0
- data/test/selenium/Edit/0setup.rsel +12 -0
- data/test/selenium/Edit/edit1.rsel +31 -0
- data/test/selenium/Edit/edit2.rsel +39 -0
- data/test/selenium/Edit/edit3.rsel +40 -0
- data/test/selenium/Form/0setup.rsel +12 -0
- data/test/selenium/Form/form1.rsel +9 -0
- data/test/selenium/Form/form2.rsel +9 -0
- data/test/selenium/Paginate/0setup.rsel +12 -0
- data/test/selenium/Paginate/paginate1.rsel +24 -0
- data/test/selenium/Toggle/0setup.rsel +12 -0
- data/test/selenium/Toggle/toggle1.rsel +21 -0
- data/test/sites/zena/nodes.yml +4 -4
- data/test/sites/zena/roles.yml +3 -2
- data/test/sites/zena/versions.yml +12 -11
- data/test/unit/core_ext_test.rb +23 -5
- data/test/unit/document_test.rb +6 -2
- data/test/unit/node_test.rb +2 -2
- data/test/unit/remote_test.rb +1 -2
- data/test/unit/role_test.rb +2 -2
- data/test/unit/user_test.rb +48 -1
- data/test/unit/virtual_class_test.rb +7 -7
- data/test/unit/zena/acts/secure_test.rb +1 -1
- data/test/unit/zena/use/rendering_test.rb +1 -1
- data/test/unit/zena/use/urls_test.rb +3 -3
- data/zena.gemspec +65 -101
- metadata +67 -103
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run 2.tmCommand +0 -24
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run Context.tmCommand +0 -58
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run Focused Should.tmCommand +0 -88
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run.tmCommand +0 -27
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/YAML to Shoulda.tmCommand +0 -23
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Preferences/Symbol List: Context.tmPreferences +0 -19
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Preferences/Symbol List: Should.tmPreferences +0 -19
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory attributes for.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory build.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_define with class.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_define.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_next.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_sequence.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_bad_value.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_contains.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_does_not_contain.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_good_value.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_same_elements.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_save.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_sent_email.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_valid.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/association.tmSnippet +0 -17
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/attribute.tmSnippet +0 -17
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/before_should block.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/context block get.tmSnippet +0 -22
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/context block post.tmSnippet +0 -23
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/context block with setup.tmSnippet +0 -25
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/setup.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should block with before proc.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should block.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_allow_values_for.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_assign_to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_be_restful denied.tmSnippet +0 -20
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_be_restful.tmSnippet +0 -20
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_belong_to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_change by.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_change from to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_length_at_least.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_length_in_range.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_length_is.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_value_in_range.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_eventually.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_filter_params.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_and_belong_to_many.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_class_methods.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_db_column.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_db_columns.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_index.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_indices.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_instance_methods.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_many.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_named_scope.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_one.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_readonly_attributes.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_allow_mass_assignment_of.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_allow_values_for.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_assign_to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_change.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_set_the_flash.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_redirect_to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_a_form.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_template.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_with_layout.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_without_layout.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_respond_with.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_respond_with_content_type.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_return_from_session.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_route.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_set_the_flash_to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_acceptance_of.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_numericality_of.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_presence_of.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_uniqueness_of with scope.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_uniqueness_of.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/catch_exception.rb +0 -39
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/run_script.rb +0 -104
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/stdin_dialog.rb +0 -14
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/test.rb +0 -17
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/todo.txt +0 -13
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/bin/yaml_to_shoulda.rb +0 -25
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Syntaxes/Ruby on Rails (Shoulda).tmLanguage +0 -166
- data/vendor/TextMate/Ruby Shoulda.tmbundle/info.plist +0 -304
- data/vendor/TextMate/Zena.tmbundle/Commands/Run all yaml tests.tmCommand +0 -37
- data/vendor/TextMate/Zena.tmbundle/Commands/Run focused yaml test.tmCommand +0 -52
- data/vendor/TextMate/Zena.tmbundle/Support/RubyMate/catch_exception.rb +0 -39
- data/vendor/TextMate/Zena.tmbundle/Support/RubyMate/run_script.rb +0 -118
- data/vendor/TextMate/Zena.tmbundle/Support/RubyMate/stdin_dialog.rb +0 -14
- data/vendor/TextMate/Zena.tmbundle/info.plist +0 -17
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<kml xmlns="http://earth.google.com/kml/2.2">
|
|
3
|
+
<Document do='default' host='#{site.host}' do='images' in='project' order='created_at asc'>
|
|
4
|
+
<r:each do='if' test='gps_latitude'>
|
|
5
|
+
<Placemark>
|
|
6
|
+
<name do='title'>Le désert</name>
|
|
7
|
+
<description>
|
|
8
|
+
<![CDATA[
|
|
9
|
+
<r:img mode='med'/><br/>
|
|
10
|
+
<h3 do='parent' do='link'/>
|
|
11
|
+
]]>
|
|
12
|
+
</description>
|
|
13
|
+
<Point>
|
|
14
|
+
<coordinates><r:show attr='gps_longitude'/>,<r:show attr='gps_latitude'/></coordinates>
|
|
15
|
+
</Point>
|
|
16
|
+
</Placemark>
|
|
17
|
+
</r:each>
|
|
18
|
+
<Placemark>
|
|
19
|
+
<name>Route</name>
|
|
20
|
+
<LineString>
|
|
21
|
+
<extrude>1</extrude>
|
|
22
|
+
<tessellate>1</tessellate>
|
|
23
|
+
<coordinates>
|
|
24
|
+
<r:each><r:if test='gps_latitude'><r:show attr='gps_longitude'/>,<r:show attr='gps_latitude'/>
|
|
25
|
+
</r:if></r:each>
|
|
26
|
+
</coordinates>
|
|
27
|
+
</LineString>
|
|
28
|
+
</Placemark>
|
|
29
|
+
</Document>
|
|
30
|
+
</kml>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<r:include template='Node'>
|
|
2
|
+
<r:with part='main'>
|
|
3
|
+
<ul id='main_content' do='posts in site' order='date desc'>
|
|
4
|
+
<li do='add' after='self' klass='Post'/>
|
|
5
|
+
<li do='form'><b>titre</b> <r:input name='title'/> <b>date</b> <r:input name='date' type='date'/> <r:input type='submit'/></li>
|
|
6
|
+
<li class='post' do='each' do='void' name='post'>
|
|
7
|
+
<p class='post_date' do='show' attr='date' format='%b %d'/>
|
|
8
|
+
<p class='icon' do='link' do='image' do='img' mode='post'/>
|
|
9
|
+
<h1 do='title' actions='all'>Donec mauris metus, venenatis vitae</h1>
|
|
10
|
+
<r:void name='text'>
|
|
11
|
+
<r:zazen eval='summary || text' limit='1'/>
|
|
12
|
+
<p class='comments'><r:link do='t'>Lire la suite... </r:link> <r:tags> - mots clés: <r:each join=', ' do='link' href='main' tagged='#{name}'/></r:tags> - <r:link href='this' anchor='comments'>commentaires (<r:show attr='comments_count'/>)</r:link></p>
|
|
13
|
+
</r:void>
|
|
14
|
+
</li>
|
|
15
|
+
</ul>
|
|
16
|
+
</r:with>
|
|
17
|
+
|
|
18
|
+
<div id='lcomments' do='with' part='latest_comments'>
|
|
19
|
+
<h2>commentaires</h2>
|
|
20
|
+
<ul do='comments where status = 50 from nodes in site order by created_at desc limit 9' do='group' by='discussion_id'>
|
|
21
|
+
<li do='each_group'>
|
|
22
|
+
<r:node do='link' class='post' anchor='comments'/>
|
|
23
|
+
<ul>
|
|
24
|
+
<li do='each' class='comment'><span class='date' do='show' attr='created_at' format='%d %b %Hh'/> <r:show attr='author_name'/></li>
|
|
25
|
+
</ul>
|
|
26
|
+
</li>
|
|
27
|
+
</ul>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<r:with part='pages' do='if' test='can_write?' do='pages'>
|
|
31
|
+
<h2>pages</h2>
|
|
32
|
+
<ul>
|
|
33
|
+
<li do='each' do='link'/>
|
|
34
|
+
<li do='add' klass='Page'/>
|
|
35
|
+
</ul>
|
|
36
|
+
</r:with>
|
|
37
|
+
|
|
38
|
+
<r:with part='photos' do='images in section order by created_at desc limit 15'>
|
|
39
|
+
<h2>photos</h2>
|
|
40
|
+
<p class='map'><a target='_blank' href='http://maps.google.com?q=http://#{site.host}/#{visitor.lang}/project#{main.id}.kml&t=p'>le parcours !</a></p>
|
|
41
|
+
<ul>
|
|
42
|
+
<li do='each' do='img' mode='pv'/>
|
|
43
|
+
</ul>
|
|
44
|
+
</r:with>
|
|
45
|
+
</r:include>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<div id='comments' do='discussion' do='comments'>
|
|
2
|
+
<h3 do='t'>comments</h3>
|
|
3
|
+
<ol>
|
|
4
|
+
<li class='comment' alt_class='alt' do='each' name='com'>
|
|
5
|
+
<div class='header'>
|
|
6
|
+
<p class='prop' do='if' test='status < 50'><r:t>Your message has been received and is waiting approval for publication.</r:t></p>
|
|
7
|
+
<span class='date' do='created_at' tformat='comment_date'/>
|
|
8
|
+
<span class='sign' do='show' attr='author_name' sanitize='true'/>
|
|
9
|
+
</div>
|
|
10
|
+
<div class='body'>
|
|
11
|
+
<div class='zazen'>
|
|
12
|
+
<r:if test='text' do='zazen' attr='text' filter='css,html'/>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
</li>
|
|
16
|
+
<li class='form' do='form'>
|
|
17
|
+
<ol>
|
|
18
|
+
<li do='cancel'/>
|
|
19
|
+
<li class='author' do='if' test='visitor.is_anon?'><b do='t'>author</b> <r:input name='author_name'/></li>
|
|
20
|
+
<li class='text'>
|
|
21
|
+
<b do='t'>message</b>
|
|
22
|
+
<r:textarea name='text'/>
|
|
23
|
+
</li>
|
|
24
|
+
<li class='captcha' do='captcha' theme='white'/>
|
|
25
|
+
<li class='validate'><r:input type='submit'/></li>
|
|
26
|
+
</ol>
|
|
27
|
+
</li>
|
|
28
|
+
<li do='add'><img src='/img/add.png'/> <r:t>leave a comment</r:t></li>
|
|
29
|
+
</ol>
|
|
30
|
+
</div>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
translations:
|
|
2
|
+
'new project': nouveau projet
|
|
3
|
+
'upcoming dates': prochaines dates
|
|
4
|
+
'project dates': dates du projet
|
|
5
|
+
project: projet
|
|
6
|
+
title: titre
|
|
7
|
+
comments: commentaires
|
|
8
|
+
'leave a comment': ajouter un commentaire
|
|
9
|
+
'Your message has been received and is waiting approval for publication.': Votre message nous est bien parvenu et est en attente de validation.
|
|
10
|
+
post_date: %A, %d %B %Y
|
|
11
|
+
comment_date: %A, %d %B %Y %Hh%M
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
* {padding:0; margin:0; }
|
|
2
|
+
|
|
3
|
+
body {margin:0; padding:0; background:#111; color:#666; font:12px Verdana, Arial, Tahoma, sans-serif; line-height:20px; }
|
|
4
|
+
|
|
5
|
+
img {border:none; }
|
|
6
|
+
a{ color:#0F61B4; text-decoration:none; }
|
|
7
|
+
a:hover { color:#000; }
|
|
8
|
+
form .date_box { float:none;}
|
|
9
|
+
|
|
10
|
+
#content {width:760px; margin:20px auto; background:#ccad7f; }
|
|
11
|
+
|
|
12
|
+
#header {background:#000 url('/fr/image22.png') no-repeat; height:80px; padding-top:10px;}
|
|
13
|
+
#header a { display:block; height:50px; margin:0px; width:300px;}
|
|
14
|
+
|
|
15
|
+
#navigation {background:#111 url('/fr/image23.gif') repeat-x; height:30px; line-height:30px; margin:0; }
|
|
16
|
+
#navigation ul {list-style-type:none;}
|
|
17
|
+
#navigation li {float:left; border-right:1px solid #444; }
|
|
18
|
+
#navigation li a {display:block; padding:0 20px; text-decoration:none; color:#fff; letter-spacing:1px; }
|
|
19
|
+
#navigation li a:hover {background:#333 url('/fr/image24.gif') repeat-x; color:#fff; text-decoration:none; }
|
|
20
|
+
#navigation .visitor { float:right; border:0;}
|
|
21
|
+
#navigation .visitor a { color:#999; display:inline; padding:5px; font-size:10px;}
|
|
22
|
+
#navigation #search { float:right;}
|
|
23
|
+
|
|
24
|
+
#main {float:left; width:530px; padding:10px; margin-left:50px; line-height:14px; }
|
|
25
|
+
#right h2 {margin-top:10px; font:bold 12px Verdana, 'Trebuchet MS', Sans-serif; padding:5px 0 5px 5px; border-bottom:1px dotted #999; }
|
|
26
|
+
#right ul {color:#999; text-align:left; margin:3px 0 8px 0; padding-left:20px; text-decoration:none; list-style-type:square; }
|
|
27
|
+
#right ul li {padding:2px 0 2px 0px; margin:0 2px; }
|
|
28
|
+
#right ul a {font-weight:600; color:#173D7F; }
|
|
29
|
+
#right ul a:hover { color :#333; }
|
|
30
|
+
|
|
31
|
+
#right { clear:right; float:right; width:130px; padding:5px; margin-right:20px; }
|
|
32
|
+
#right h2 {padding:2px 0 5px 0px; font:bold 14px Verdana, 'Trebuchet MS', Sans-serif; color:#444; border-bottom:1px dotted #999; margin-bottom:5px; margin-top:10px; }
|
|
33
|
+
#right div { clear:both;}
|
|
34
|
+
|
|
35
|
+
#lcomments li,#lcomments ul { list-style-type:none; margin:0;padding:0; color:#444;}
|
|
36
|
+
#lcomments .post { font-size:11px; font-weight:normal; display:block;}
|
|
37
|
+
#lcomments .date { color:#666;}
|
|
38
|
+
|
|
39
|
+
#footer { background:#222; color:#aaa; margin-top:20px; height:30px; line-height:30px; text-align:center; font-size:11px;}
|
|
40
|
+
#footer a { color:inherit; text-decoration:none; }
|
|
41
|
+
#footer a:hover { color:orange; }
|
|
42
|
+
|
|
43
|
+
#main_content { background:white; padding:15px; padding-right:20px; border:1px solid #aaa;}
|
|
44
|
+
ul#main_content { list-style-type:none; }
|
|
45
|
+
#main_content li { position:relative; padding-bottom:3em;}
|
|
46
|
+
#main_content li.btn_add { padding-bottom:0;}
|
|
47
|
+
img.post { border:4px solid #ddd; }
|
|
48
|
+
.post_date { position:absolute; left:-56px; top:0; height:30px; width:30px; background:url('img/dateBg.jpg') no-repeat ;
|
|
49
|
+
font-family:Georgia,"Times New Roman",Times,serif; text-transform:uppercase; font-size:16px;
|
|
50
|
+
padding:5px;}
|
|
51
|
+
.comments { border-bottom:1px solid #ccc; background:#FFE; padding:2px; text-align:right;
|
|
52
|
+
font-size:90%;}
|
|
53
|
+
#main_content h1 { margin:1em 0 1em 10px; font-family:Georgia,"Times New Roman",Times,serif; font-variant:small-caps;}
|
|
54
|
+
#main_content h1 a { color:inherit;}
|
|
55
|
+
#main_content .zazen { margin-left:10px;}
|
|
56
|
+
.zazen { line-height:18px; font-size:12px; margin-bottom:1em; }
|
|
57
|
+
.zazen .img_title { font-size:80%; margin-bottom:2em; font-style:italic;}
|
|
58
|
+
.zazen p, .zazen h3 { margin-bottom:1em;}
|
|
59
|
+
.zazen img { border:1px solid #333;}
|
|
60
|
+
#main_content .zazen ul {list-style-type:disc;}
|
|
61
|
+
#main_content .zazen li {padding-bottom:0; margin-left:2em;}
|
|
62
|
+
|
|
63
|
+
#photos ul {list-style-type:none;}
|
|
64
|
+
#photos li { float:left; padding:0; margin:2px; line-height:10px;}
|
|
65
|
+
#photos { list-style-type:none; padding:0;}
|
|
66
|
+
#photos img { border:1px solid #777;}
|
|
67
|
+
#photos .btn_add img { border:0;}
|
|
68
|
+
|
|
69
|
+
#pages li.btn_add { list-style-type:none;}
|
|
70
|
+
|
|
71
|
+
#comments ol { margin-top:8px; list-style-type:none;}
|
|
72
|
+
#comments_add, #comments .form { margin-top:18px;}
|
|
73
|
+
#comments .form .btn_x { margin:0;}
|
|
74
|
+
#comments .form ol, #comments .btn_add a { visibility:visible; background:#eee; display:table; padding:9px 9px 8px; margin-top:18px; border:1px solid grey;}
|
|
75
|
+
#comments .btn_add img { float:left; margin-right:4px;}
|
|
76
|
+
#comments .form b { display:block; float:left; width:65px;}
|
|
77
|
+
#comments .form li { clear:both; margin-top:5px;}
|
|
78
|
+
#comments .form .title input, #comments .form .author input { width:360px;}
|
|
79
|
+
#comments .form textarea { width:360px; height:8em;}
|
|
80
|
+
|
|
81
|
+
#main_content li.comment { padding:8px; border-bottom:1px solid #ccc;}
|
|
82
|
+
.alt { background:#eee;}
|
|
83
|
+
.comment .sign { color:#a88; font-size:16px; font-family:Georgia,serif;}
|
|
84
|
+
.comment .date { float:right; color:#a88; font-size:10px;}
|
|
85
|
+
.comment .prop { border:1px solid #055; padding:5px; background:#cee; color:black; font-weight:bold;}
|
|
86
|
+
.comment .body { padding:8px 0; }
|
|
87
|
+
|
|
88
|
+
.captcha { padding: 5px 0 0 63px; height:135px;}
|
|
89
|
+
|
|
90
|
+
#search_results { margin-top:2em;}
|
|
91
|
+
#search_box { width:100%; font-size:0.8em;}
|
|
92
|
+
#search_box input { border:1px inset #444; width:146px; padding:1px; margin:0; font-size:10px;}
|
|
93
|
+
#search_results { width:100%; }
|
|
94
|
+
#search_results p { margin:0;}
|
|
95
|
+
.results, #search_loader { border:1px solid #444; margin:3px 0 0; padding:2px; text-align:left; background:#97A97F; }
|
|
96
|
+
.result_entry { list-style:none; padding:5px 0; border-top:1px solid #647D35;}
|
|
97
|
+
.result_entry:first-child { border-top-width:0;}
|
|
98
|
+
.result_entry img { float:left; margin-right:3px; }
|
|
99
|
+
.result_entry img.mini { border:1px solid grey; float:left; margin:0 2px 0 0;}
|
|
100
|
+
|
|
101
|
+
.result_entry { position:relative;}
|
|
102
|
+
.result_id {color:#5C2200; font-weight:bold; float:left; padding-right:3px; }
|
|
103
|
+
.result_name { font-weight:bold; }
|
|
104
|
+
.result_name em { color:#333; font-size:90%; font-weight:normal;}
|
|
105
|
+
.result_path { color:#bbb;}
|
|
106
|
+
|
|
107
|
+
#location { margin-left:15px; margin-bottom:1em;}
|
|
108
|
+
|
|
109
|
+
/* old browsers hack */
|
|
110
|
+
#main .s50 .actions, .li_s50 .actions, #main .btn_add a { visibility:visible; }
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
require File.dirname(__FILE__) + '/../../../../../test/test_helper'
|
|
2
|
+
|
|
3
|
+
class StaticIntegrationTest < Zena::Integration::TestCase
|
|
4
|
+
|
|
5
|
+
context 'A page using a static Skin' do
|
|
6
|
+
subject do
|
|
7
|
+
secure(Node) { nodes(:wiki) }
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
setup do
|
|
11
|
+
$_test_site = 'zena'
|
|
12
|
+
login(:lion)
|
|
13
|
+
skin = secure(Skin) { Skin.create(:title => 'foo', :z_static => 'static-blog', :parent_id => nodes_id(:skins), :v_status => Zena::Status::Pub)}
|
|
14
|
+
subject.skin_id = skin.id
|
|
15
|
+
assert subject.save
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
context 'on zafu rebuild' do
|
|
19
|
+
setup do
|
|
20
|
+
FileUtils.rmtree("#{SITES_ROOT}/test.host/zafu")
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
should 'use static template' do
|
|
24
|
+
get "http://test.host/en/blog#{subject.zip}.html"
|
|
25
|
+
assert_response :success
|
|
26
|
+
assert_match %r{Copyright <a href="#">Static blog</a>}, response.body
|
|
27
|
+
end
|
|
28
|
+
end # with normal access
|
|
29
|
+
end # A page using a static Skin
|
|
30
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
require File.dirname(__FILE__) + '/../../../../../test/test_helper'
|
|
2
|
+
|
|
3
|
+
class StaticTest < Zena::Unit::TestCase
|
|
4
|
+
|
|
5
|
+
context 'A Skin' do
|
|
6
|
+
setup do
|
|
7
|
+
login(:lion)
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
subject do
|
|
11
|
+
secure(Node) { nodes(:wikiSkin) }
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
should 'have z_static prop' do
|
|
15
|
+
subject.z_static = 'foo'
|
|
16
|
+
assert_equal 'foo', subject.prop['z_static']
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
should 'allow brick-skin values' do
|
|
20
|
+
assert subject.update_attributes(:z_static => 'static-blog')
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
should 'allow nil values' do
|
|
24
|
+
assert subject.update_attributes(:z_static => 'static-blog')
|
|
25
|
+
assert subject.update_attributes(:z_static => nil)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
should 'not allow any value' do
|
|
29
|
+
assert !subject.update_attributes(:z_static => '../foo-/bar/..')
|
|
30
|
+
assert_equal 'invalid', subject.errors[:z_static]
|
|
31
|
+
end
|
|
32
|
+
end # A Skin
|
|
33
|
+
end
|
|
@@ -16,7 +16,7 @@ class Base < ActiveRecord::Migration
|
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
create_table "cached_pages", :options => table_options, :force => true do |t|
|
|
19
|
-
t.
|
|
19
|
+
t.string "path"
|
|
20
20
|
t.datetime "expire_after"
|
|
21
21
|
t.datetime "created_at"
|
|
22
22
|
t.integer "node_id"
|
|
@@ -320,7 +320,6 @@ class Base < ActiveRecord::Migration
|
|
|
320
320
|
t.string "name"
|
|
321
321
|
t.string "kpath", :limit => 16
|
|
322
322
|
t.string "real_class", :limit => 16
|
|
323
|
-
t.string "icon", :limit => 200
|
|
324
323
|
t.integer "create_group_id"
|
|
325
324
|
t.integer "site_id", :null => false
|
|
326
325
|
t.boolean "auto_create_discussion"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
class FixCachedPathIndex < ActiveRecord::Migration
|
|
2
|
+
def self.up
|
|
3
|
+
remove_index "cached_pages", :name => "index_cached_pages_on_path_and_site_id" rescue nil
|
|
4
|
+
change_column :cached_pages, :path, :string
|
|
5
|
+
add_index "cached_pages", ["path", "site_id"], :name => "index_cached_pages_on_path_and_site_id"
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def self.down
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
class RemoveIconField < ActiveRecord::Migration
|
|
2
|
+
def self.up
|
|
3
|
+
if Role.column_names.include?('icon')
|
|
4
|
+
native_key = :icon
|
|
5
|
+
prop_key = 'icon'
|
|
6
|
+
Role.all.each do |rec|
|
|
7
|
+
next unless value = rec[native_key]
|
|
8
|
+
prop = rec.prop
|
|
9
|
+
prop[prop_key] = value
|
|
10
|
+
Zena::Db.execute "UPDATE #{rec.class.table_name} SET properties=#{Zena::Db.quote(rec.class.encode_properties(prop))} WHERE id=#{rec[:id]}"
|
|
11
|
+
end
|
|
12
|
+
remove_column :roles, :icon
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def self.down
|
|
17
|
+
end
|
|
18
|
+
end
|
data/config/bricks.yml
CHANGED
|
@@ -4,6 +4,7 @@ test:
|
|
|
4
4
|
tags: ON
|
|
5
5
|
captcha: ON
|
|
6
6
|
acls: ON
|
|
7
|
+
static: OFF
|
|
7
8
|
sphinx: OFF
|
|
8
9
|
worker: OFF
|
|
9
10
|
uv: OFF
|
|
@@ -27,6 +28,7 @@ development:
|
|
|
27
28
|
tags: ON
|
|
28
29
|
captcha: ON
|
|
29
30
|
acls: ON
|
|
31
|
+
static: OFF
|
|
30
32
|
sphinx:
|
|
31
33
|
switch: OFF
|
|
32
34
|
activate_if:
|
|
@@ -58,6 +60,8 @@ production:
|
|
|
58
60
|
tags: ON
|
|
59
61
|
captcha: ON
|
|
60
62
|
acls: ON
|
|
63
|
+
static: OFF
|
|
64
|
+
single: OFF
|
|
61
65
|
sphinx:
|
|
62
66
|
switch: OFF
|
|
63
67
|
activate_if:
|
data/config/deploy.rb
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
set :db_name, "zena" # If you change this: no dots in this name !
|
|
2
|
-
set :server_ip, nil # FIXME: set this to your remote server IP in the form: "215.0.0.1"
|
|
3
|
-
set :app_type, :passenger
|
|
2
|
+
set :server_ip, 'nil' # FIXME: set this to your remote server IP in the form: "215.0.0.1"
|
|
4
3
|
set :db_password, nil # FIXME: set password (can be anything).
|
|
4
|
+
set :app_type, :mongrel
|
|
5
|
+
set :mongrel_port, 8000
|
|
6
|
+
set :mongrel_count, 3
|
|
7
|
+
set :haproxy_port, 9000
|
|
8
|
+
set :haproxy_password, nil # If you set this, you can view stats on /_haproxy
|
|
5
9
|
|
|
6
10
|
# You need to give the public key from the server to the git repository if the application is not public
|
|
7
11
|
set :scm, 'git'
|
|
8
12
|
set :repository, 'git@github.com:YOUR_PROJECT/APPLICATION.git'
|
|
9
13
|
set :branch, 'master'
|
|
10
14
|
|
|
15
|
+
# Uncomment if you are using rvm on the remote server
|
|
16
|
+
# set :rvm_ruby_string, '1.8.7'
|
|
17
|
+
|
|
11
18
|
if self[:server_ip]
|
|
12
19
|
#================= ADVANCED SETTINGS =============#
|
|
13
20
|
|
|
@@ -27,6 +34,14 @@ if self[:server_ip]
|
|
|
27
34
|
role :app, "#{ssh_user}@#{server_ip}"
|
|
28
35
|
role :db, "#{ssh_user}@#{server_ip}", :primary => true
|
|
29
36
|
|
|
37
|
+
# Set to 'true' if you use rvm on the remote server
|
|
38
|
+
if self[:rvm_ruby_string]
|
|
39
|
+
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) # Add RVM's lib directory to the load path.
|
|
40
|
+
require "rvm/capistrano" # Load RVM's capistrano plugin.
|
|
41
|
+
# Uncomment if you are not using a System wide install of rvm
|
|
42
|
+
# set :rvm_type, :user
|
|
43
|
+
end
|
|
44
|
+
|
|
30
45
|
#================= END ADVANCED SETTINGS ==========#
|
|
31
46
|
# We need to set RAILS_ROOT and RAILS_ENV to know which bricks we need to load, activate
|
|
32
47
|
if !defined?(::RAILS_ROOT)
|
data/config/gems.yml
CHANGED
|
@@ -13,12 +13,12 @@ differ: '= 0.1.2'
|
|
|
13
13
|
shoulda: '= 2.10.3'
|
|
14
14
|
httparty: '= 0.7.8'
|
|
15
15
|
|
|
16
|
-
querybuilder: '= 1.0.
|
|
16
|
+
querybuilder: '= 1.0.1'
|
|
17
17
|
yamltest: '= 0.7.0'
|
|
18
|
-
rubyless: '= 0.8.
|
|
18
|
+
rubyless: '= 0.8.5'
|
|
19
19
|
property: '= 2.2.0'
|
|
20
20
|
versions: '= 0.3.1'
|
|
21
|
-
zafu: '= 0.8.
|
|
21
|
+
zafu: '= 0.8.2'
|
|
22
22
|
|
|
23
23
|
jeweler:
|
|
24
24
|
|
|
@@ -26,10 +26,12 @@ RedCloth:
|
|
|
26
26
|
lib: 'redcloth'
|
|
27
27
|
version: '= 3.0.4'
|
|
28
28
|
|
|
29
|
-
rmagick
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
# Cannot do "gem 'rmagick', '= 1.3.14'" on some hosts. Leave this alone and
|
|
30
|
+
# let 'require' pick whatever it can.
|
|
31
|
+
# rmagick:
|
|
32
|
+
# optional: yes
|
|
33
|
+
# lib: 'RMagick'
|
|
34
|
+
# version: '= 2.13.1'
|
|
33
35
|
|
|
34
36
|
thinking-sphinx:
|
|
35
37
|
optional: yes
|