zen 0.3 → 0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.gems +3 -2
- data/.rvmrc +1 -1
- data/.travis.yml +5 -0
- data/.yardopts +2 -1
- data/LICENSE +1 -1
- data/README.md +28 -24
- data/Rakefile +5 -2
- data/guide/asset_management.md +6 -6
- data/guide/autosaving_forms.md +42 -0
- data/guide/changelog.md +41 -0
- data/guide/faq.md +49 -0
- data/guide/getting_started.md +24 -13
- data/guide/hacking.md +40 -9
- data/guide/images/categories/categories.png +0 -0
- data/guide/images/categories/category_groups.png +0 -0
- data/guide/images/categories/new_category.png +0 -0
- data/guide/images/categories/new_category_group.png +0 -0
- data/guide/images/comments/comments.png +0 -0
- data/guide/images/comments/edit_comment.png +0 -0
- data/guide/images/custom_fields/custom_field_groups.png +0 -0
- data/guide/images/custom_fields/custom_field_types.png +0 -0
- data/guide/images/custom_fields/custom_fields.png +0 -0
- data/guide/images/custom_fields/edit_custom_field_general.png +0 -0
- data/guide/images/custom_fields/edit_custom_field_group.png +0 -0
- data/guide/images/custom_fields/edit_custom_field_settings.png +0 -0
- data/guide/images/custom_fields/edit_custom_field_type.png +0 -0
- data/guide/images/dashboard/added.png +0 -0
- data/guide/images/dashboard/columns.png +0 -0
- data/guide/images/dashboard/dashboard.png +0 -0
- data/guide/images/dashboard/options.png +0 -0
- data/guide/images/menus/edit_menu.png +0 -0
- data/guide/images/menus/edit_menu_item.png +0 -0
- data/guide/images/menus/menu_item_hierarchy.png +0 -0
- data/guide/images/menus/menu_items.png +0 -0
- data/guide/images/menus/menus.png +0 -0
- data/guide/images/sections/edit_entry.png +0 -0
- data/guide/images/sections/edit_entry_categories.png +0 -0
- data/guide/images/sections/edit_entry_general.png +0 -0
- data/guide/images/sections/edit_entry_meta.png +0 -0
- data/guide/images/sections/edit_section_comments.png +0 -0
- data/guide/images/sections/edit_section_general.png +0 -0
- data/guide/images/sections/edit_section_groups.png +0 -0
- data/guide/images/sections/entries.png +0 -0
- data/guide/images/sections/sections.png +0 -0
- data/guide/images/settings/overview_general.png +0 -0
- data/guide/images/settings/overview_security.png +0 -0
- data/guide/images/settings/overview_user.png +0 -0
- data/guide/images/users/edit_user.png +0 -0
- data/guide/images/users/edit_user_group.png +0 -0
- data/guide/images/users/edit_user_group_permissions.png +0 -0
- data/guide/images/users/edit_user_permissions.png +0 -0
- data/guide/images/users/overview.png +0 -0
- data/guide/images/users/user_groups_overview.png +0 -0
- data/guide/installation.md +7 -1
- data/guide/javascript.md +36 -273
- data/guide/javascript/zen_autosave.md +26 -0
- data/guide/javascript/zen_editor.md +83 -0
- data/guide/javascript/zen_hash.md +34 -0
- data/guide/javascript/zen_htmltable.md +78 -0
- data/guide/javascript/zen_tabs.md +44 -0
- data/guide/javascript/zen_window.md +49 -0
- data/guide/zen_compared.md +201 -0
- data/lib/vendor/sequel_sluggable.rb +1 -1
- data/lib/zen.rb +64 -44
- data/lib/zen/asset_groups.rb +10 -10
- data/lib/zen/bin/create.rb +8 -1
- data/lib/zen/helper/breadcrumb.rb +4 -12
- data/lib/zen/helper/controller.rb +209 -6
- data/lib/zen/helper/locale.rb +19 -0
- data/lib/zen/helper/search.rb +1 -1
- data/lib/zen/helper/stacked_aspect.rb +7 -43
- data/lib/zen/helper/theme.rb +3 -3
- data/lib/zen/language.rb +5 -10
- data/lib/zen/language/translation.rb +1 -1
- data/lib/zen/layout/admin.xhtml +41 -25
- data/lib/zen/layout/login.xhtml +8 -3
- data/lib/zen/migrator.rb +54 -0
- data/lib/zen/model/helper.rb +20 -1
- data/lib/zen/model/init.rb +2 -0
- data/lib/zen/model/plugin/events.rb +158 -0
- data/lib/zen/package.rb +32 -6
- data/lib/zen/package/all.rb +1 -0
- data/lib/zen/package/categories/lib/categories.rb +6 -6
- data/lib/zen/package/categories/lib/categories/controller/categories.rb +20 -83
- data/lib/zen/package/categories/lib/categories/controller/category_groups.rb +23 -74
- data/lib/zen/package/categories/lib/categories/model/category.rb +58 -1
- data/lib/zen/package/categories/lib/categories/model/category_group.rb +62 -2
- data/lib/zen/package/categories/lib/categories/view/admin/categories/form.xhtml +46 -40
- data/lib/zen/package/categories/lib/categories/view/admin/categories/index.xhtml +74 -75
- data/lib/zen/package/categories/lib/categories/view/admin/category-groups/form.xhtml +27 -24
- data/lib/zen/package/categories/lib/categories/view/admin/category-groups/index.xhtml +83 -86
- data/lib/zen/package/comments/lib/comments.rb +5 -5
- data/lib/zen/package/comments/lib/comments/controller/comments.rb +12 -64
- data/lib/zen/package/comments/lib/comments/controller/comments_form.rb +4 -22
- data/lib/zen/package/comments/lib/comments/model/comment.rb +65 -16
- data/lib/zen/package/comments/lib/comments/view/admin/comments/form.xhtml +52 -49
- data/lib/zen/package/comments/lib/comments/view/admin/comments/index.xhtml +52 -60
- data/lib/zen/package/comments/migrations/1308774099_comment_status.rb +1 -1
- data/lib/zen/package/custom_fields/lib/custom_fields.rb +11 -13
- data/lib/zen/package/custom_fields/lib/custom_fields/blue_form_parameters.rb +29 -13
- data/lib/zen/package/custom_fields/lib/custom_fields/controller/custom_field_groups.rb +21 -50
- data/lib/zen/package/custom_fields/lib/custom_fields/controller/custom_field_types.rb +27 -71
- data/lib/zen/package/custom_fields/lib/custom_fields/controller/custom_fields.rb +25 -78
- data/lib/zen/package/custom_fields/lib/custom_fields/model/custom_field.rb +48 -1
- data/lib/zen/package/custom_fields/lib/custom_fields/model/custom_field_group.rb +35 -1
- data/lib/zen/package/custom_fields/lib/custom_fields/model/custom_field_method.rb +3 -0
- data/lib/zen/package/custom_fields/lib/custom_fields/model/custom_field_type.rb +40 -1
- data/lib/zen/package/custom_fields/lib/custom_fields/model/custom_field_value.rb +1 -0
- data/lib/zen/package/custom_fields/lib/custom_fields/view/admin/custom-field-groups/form.xhtml +29 -26
- data/lib/zen/package/custom_fields/lib/custom_fields/view/admin/custom-field-groups/index.xhtml +96 -100
- data/lib/zen/package/custom_fields/lib/custom_fields/view/admin/custom-field-types/form.xhtml +56 -53
- data/lib/zen/package/custom_fields/lib/custom_fields/view/admin/custom-field-types/index.xhtml +82 -82
- data/lib/zen/package/custom_fields/lib/custom_fields/view/admin/custom-fields/form.xhtml +88 -85
- data/lib/zen/package/custom_fields/lib/custom_fields/view/admin/custom-fields/index.xhtml +83 -80
- data/lib/zen/package/dashboard/lib/dashboard.rb +28 -0
- data/lib/zen/package/dashboard/lib/dashboard/controller/dashboard.rb +154 -0
- data/lib/zen/package/dashboard/lib/dashboard/language/en/dashboard.rb +35 -0
- data/lib/zen/package/dashboard/lib/dashboard/language/nl/dashboard.rb +36 -0
- data/lib/zen/package/dashboard/lib/dashboard/model/widget.rb +45 -0
- data/lib/zen/package/dashboard/lib/dashboard/public/admin/dashboard/css/dashboard.css +74 -0
- data/lib/zen/package/dashboard/lib/dashboard/public/admin/dashboard/js/dashboard.js +102 -0
- data/lib/zen/package/dashboard/lib/dashboard/view/admin/index.xhtml +29 -0
- data/lib/zen/package/dashboard/lib/dashboard/view/admin/widget/welcome.xhtml +28 -0
- data/lib/zen/package/dashboard/lib/dashboard/widget.rb +292 -0
- data/lib/zen/package/dashboard/lib/dashboard/widget/welcome.rb +9 -0
- data/lib/zen/package/dashboard/migrations/1326411254_create_schema.rb +28 -0
- data/lib/zen/package/extensions/lib/extensions.rb +5 -5
- data/lib/zen/package/extensions/lib/extensions/view/admin/extensions/index.xhtml +72 -67
- data/lib/zen/package/menu.rb +6 -1
- data/lib/zen/package/menus/lib/menus.rb +6 -4
- data/lib/zen/package/menus/lib/menus/controller/menu_items.rb +69 -104
- data/lib/zen/package/menus/lib/menus/controller/menus.rb +19 -76
- data/lib/zen/package/menus/lib/menus/helper/menu.rb +54 -38
- data/lib/zen/package/menus/lib/menus/helper/menu_frontend.rb +7 -13
- data/lib/zen/package/menus/lib/menus/model/menu.rb +158 -2
- data/lib/zen/package/menus/lib/menus/model/menu_item.rb +73 -10
- data/lib/zen/package/menus/lib/menus/public/admin/menus/css/menus.css +47 -0
- data/lib/zen/package/menus/lib/menus/public/admin/menus/js/lib/nested_sortables.js +549 -0
- data/lib/zen/package/menus/lib/menus/public/admin/menus/js/menu_items.js +38 -0
- data/lib/zen/package/menus/lib/menus/view/admin/menu-items/form.xhtml +51 -61
- data/lib/zen/package/menus/lib/menus/view/admin/menu-items/index.xhtml +18 -81
- data/lib/zen/package/menus/lib/menus/view/admin/menus/form.xhtml +49 -44
- data/lib/zen/package/menus/lib/menus/view/admin/menus/index.xhtml +81 -83
- data/lib/zen/package/sections/lib/sections.rb +9 -4
- data/lib/zen/package/sections/lib/sections/controller/section_entries.rb +80 -132
- data/lib/zen/package/sections/lib/sections/controller/sections.rb +27 -73
- data/lib/zen/package/sections/lib/sections/helper/section.rb +44 -1
- data/lib/zen/package/sections/lib/sections/language/en/section_entries.rb +2 -0
- data/lib/zen/package/sections/lib/sections/language/nl/section_entries.rb +2 -0
- data/lib/zen/package/sections/lib/sections/model/section.rb +48 -1
- data/lib/zen/package/sections/lib/sections/model/section_entry.rb +55 -5
- data/lib/zen/package/sections/lib/sections/model/section_entry_status.rb +2 -0
- data/lib/zen/package/sections/lib/sections/view/admin/section-entries/form.xhtml +76 -67
- data/lib/zen/package/sections/lib/sections/view/admin/section-entries/index.xhtml +74 -79
- data/lib/zen/package/sections/lib/sections/view/admin/section-entries/recent_entries.xhtml +45 -0
- data/lib/zen/package/sections/lib/sections/view/admin/sections/form.xhtml +119 -0
- data/lib/zen/package/sections/lib/sections/view/admin/sections/index.xhtml +96 -0
- data/lib/zen/package/sections/lib/sections/widget/recent_entries.rb +14 -0
- data/lib/zen/package/sections/migrations/1308813320_section_entry_statuses.rb +1 -1
- data/lib/zen/package/settings/lib/settings.rb +14 -5
- data/lib/zen/package/settings/lib/settings/controller/settings.rb +4 -4
- data/lib/zen/package/settings/lib/settings/language/nl/settings.rb +1 -1
- data/lib/zen/package/settings/lib/settings/setting.rb +1 -1
- data/lib/zen/package/settings/lib/settings/view/admin/settings/index.xhtml +21 -17
- data/lib/zen/package/users/lib/users.rb +18 -19
- data/lib/zen/package/users/lib/users/controller/user_groups.rb +23 -50
- data/lib/zen/package/users/lib/users/controller/users.rb +57 -89
- data/lib/zen/package/users/lib/users/helper/acl.rb +1 -0
- data/lib/zen/package/users/lib/users/language/en/user_groups.rb +1 -0
- data/lib/zen/package/users/lib/users/language/en/users.rb +2 -1
- data/lib/zen/package/users/lib/users/language/nl/user_groups.rb +1 -0
- data/lib/zen/package/users/lib/users/language/nl/users.rb +2 -1
- data/lib/zen/package/users/lib/users/model/permission.rb +13 -0
- data/lib/zen/package/users/lib/users/model/user.rb +57 -4
- data/lib/zen/package/users/lib/users/model/user_group.rb +37 -3
- data/lib/zen/package/users/lib/users/model/user_status.rb +4 -0
- data/lib/zen/package/users/lib/users/public/admin/{css/users/permissions.css → users/css/users.css} +0 -0
- data/lib/zen/package/users/lib/users/public/admin/{js/users/permissions.js → users/js/users.js} +4 -2
- data/lib/zen/package/users/lib/users/view/admin/user-groups/form.xhtml +51 -47
- data/lib/zen/package/users/lib/users/view/admin/user-groups/index.xhtml +62 -69
- data/lib/zen/package/users/lib/users/view/admin/users/form.xhtml +92 -82
- data/lib/zen/package/users/lib/users/view/admin/users/index.xhtml +68 -66
- data/lib/zen/package/users/lib/users/view/admin/users/login.xhtml +36 -28
- data/lib/zen/package/users/lib/users/view/admin/users/permissions.xhtml +5 -7
- data/lib/zen/package/users/lib/users/view/admin/users/register.xhtml +47 -41
- data/lib/zen/package/users/migrations/1320272365_status_ids.rb +1 -1
- data/lib/zen/public/admin/{js/vendor/mootools → mootools/js}/core.js +113 -108
- data/lib/zen/public/admin/{js/vendor/mootools → mootools/js}/more.js +99 -6
- data/lib/zen/public/admin/zen/css/buttons.css +106 -0
- data/lib/zen/public/admin/{css/zen → zen/css}/datepicker.css +45 -30
- data/lib/zen/public/admin/zen/css/editor.css +69 -0
- data/lib/zen/public/admin/{css/zen → zen/css}/forms.css +28 -30
- data/lib/zen/public/admin/zen/css/general.css +183 -0
- data/lib/zen/public/admin/zen/css/layout.css +224 -0
- data/lib/zen/public/admin/zen/css/messages.css +34 -0
- data/lib/zen/public/admin/{css/zen → zen/css}/reset.css +4 -9
- data/lib/zen/public/admin/zen/css/tables.css +57 -0
- data/lib/zen/public/admin/zen/css/tabs.css +84 -0
- data/lib/zen/public/admin/zen/css/window.css +74 -0
- data/lib/zen/public/admin/{images/zen → zen/images}/icons/asc.png +0 -0
- data/lib/zen/public/admin/{images/zen → zen/images}/icons/bold.png +0 -0
- data/lib/zen/public/admin/zen/images/icons/box.png +0 -0
- data/lib/zen/public/admin/zen/images/icons/categories.png +0 -0
- data/lib/zen/public/admin/{images/zen → zen/images}/icons/close.png +0 -0
- data/lib/zen/public/admin/zen/images/icons/comment.png +0 -0
- data/lib/zen/public/admin/{images/zen → zen/images}/icons/desc.png +0 -0
- data/lib/zen/public/admin/{images/zen → zen/images}/icons/edit.png +0 -0
- data/lib/zen/public/admin/{images/zen → zen/images}/icons/error.png +0 -0
- data/lib/zen/public/admin/zen/images/icons/external.png +0 -0
- data/lib/zen/public/admin/zen/images/icons/globe.png +0 -0
- data/lib/zen/public/admin/{images/zen → zen/images}/icons/italic.png +0 -0
- data/lib/zen/public/admin/{images/zen → zen/images}/icons/link.png +0 -0
- data/lib/zen/public/admin/zen/images/icons/lock.png +0 -0
- data/lib/zen/public/admin/{images/zen → zen/images}/icons/ol.png +0 -0
- data/lib/zen/public/admin/zen/images/icons/pages.png +0 -0
- data/lib/zen/public/admin/{images/zen → zen/images}/icons/preview.png +0 -0
- data/lib/zen/public/admin/zen/images/icons/relation.png +0 -0
- data/lib/zen/public/admin/zen/images/icons/settings.png +0 -0
- data/lib/zen/public/admin/zen/images/icons/template.png +0 -0
- data/lib/zen/public/admin/{images/zen → zen/images}/icons/ul.png +0 -0
- data/lib/zen/public/admin/{images/zen → zen/images}/icons/user.png +0 -0
- data/lib/zen/public/admin/zen/images/icons/user_group.png +0 -0
- data/lib/zen/public/admin/{js/zen → zen/js}/index.js +21 -9
- data/lib/zen/public/admin/zen/js/lib/autosave.js +185 -0
- data/lib/zen/public/admin/zen/js/lib/base.js +60 -0
- data/lib/zen/public/admin/{js/vendor → zen/js/lib}/datepicker.js +52 -28
- data/lib/zen/public/admin/{js/zen → zen/js}/lib/editor.js +23 -34
- data/lib/zen/public/admin/{js/zen → zen/js}/lib/editor/markdown.js +5 -1
- data/lib/zen/public/admin/{js/zen → zen/js}/lib/editor/textile.js +4 -0
- data/lib/zen/public/admin/zen/js/lib/hash.js +218 -0
- data/lib/zen/public/admin/{js/zen → zen/js}/lib/html_table.js +5 -0
- data/lib/zen/public/admin/zen/js/lib/tabs.js +194 -0
- data/lib/zen/public/admin/{js/zen → zen/js}/lib/window.js +54 -29
- data/lib/zen/security.rb +50 -0
- data/lib/zen/spec/helper.rb +5 -120
- data/lib/zen/spec/helper/capybara.rb +75 -0
- data/lib/zen/spec/helper/general.rb +75 -0
- data/lib/zen/spec/simplecov.rb +1 -0
- data/lib/zen/task/build.rake +2 -21
- data/lib/zen/task/clean.rake +1 -10
- data/lib/zen/task/db.rake +4 -10
- data/lib/zen/task/package.rake +2 -5
- data/lib/zen/task/setup.rake +1 -1
- data/lib/zen/task/test.rake +6 -6
- data/lib/zen/task/theme.rake +2 -5
- data/lib/zen/theme.rb +26 -22
- data/lib/zen/version.rb +1 -1
- data/lib/zen/view/bottom.xhtml +2 -3
- data/lib/zen/view/search.xhtml +3 -5
- data/proto/app/config/config.rb.erb +1 -1
- data/proto/app/theme/default/index.xhtml +116 -20
- data/proto/app/theme/partials/head.xhtml +9 -0
- data/proto/app/theme/partials/sidebar.xhtml +40 -0
- data/proto/app/theme/theme.rb +3 -0
- data/spec/Rakefile +1 -2
- data/spec/fixtures/zen/helper/stacked_aspect.rb +54 -0
- data/spec/fixtures/zen/package/dashboard/controller/widget.rb +15 -0
- data/spec/fixtures/zen/package/dashboard/widget.rb +5 -0
- data/spec/fixtures/zen/theme/theme.rb +2 -2
- data/spec/helper.rb +19 -10
- data/spec/zen/controller/admin_controller.rb +3 -3
- data/spec/zen/controller/main_controller.rb +7 -7
- data/spec/zen/controller/preview.rb +3 -3
- data/spec/zen/event.rb +4 -4
- data/spec/zen/helper/breadcrumb.rb +4 -8
- data/spec/zen/helper/controller.rb +47 -4
- data/spec/zen/helper/locale.rb +3 -3
- data/spec/zen/helper/message.rb +4 -4
- data/spec/zen/helper/stacked_aspect.rb +40 -0
- data/spec/zen/helper/theme.rb +9 -9
- data/spec/zen/language.rb +8 -8
- data/spec/zen/markup.rb +6 -6
- data/spec/zen/package.rb +11 -9
- data/spec/zen/package/categories/controller/categories.rb +56 -24
- data/spec/zen/package/categories/controller/category_groups.rb +55 -23
- data/spec/zen/package/categories/helper/category.rb +5 -5
- data/spec/zen/package/categories/helper/category_frontend.rb +5 -5
- data/spec/zen/package/comments/anti_spam.rb +4 -4
- data/spec/zen/package/comments/controller/comments.rb +95 -24
- data/spec/zen/package/comments/controller/comments_form.rb +31 -26
- data/spec/zen/package/comments/helper/comment.rb +3 -3
- data/spec/zen/package/comments/helper/comment_frontend.rb +6 -6
- data/spec/zen/package/custom_fields/blue_form_parameters.rb +8 -8
- data/spec/zen/package/custom_fields/controller/custom_field_groups.rb +58 -27
- data/spec/zen/package/custom_fields/controller/custom_field_types.rb +57 -27
- data/spec/zen/package/custom_fields/controller/custom_fields.rb +58 -27
- data/spec/zen/package/custom_fields/helper/custom_field.rb +7 -7
- data/spec/zen/package/dashboard/controller/dashboard.rb +147 -0
- data/spec/zen/package/dashboard/widget.rb +56 -0
- data/spec/zen/package/extensions/controller/extensions.rb +4 -4
- data/spec/zen/package/menus/controller/menu_items.rb +48 -39
- data/spec/zen/package/menus/controller/menus.rb +55 -24
- data/spec/zen/package/menus/helper/menu.rb +6 -14
- data/spec/zen/package/menus/helper/menu_frontend.rb +7 -7
- data/spec/zen/package/menus/model/menu.rb +121 -0
- data/spec/zen/package/menus/model/menu_item.rb +34 -0
- data/spec/zen/package/sections/controller/section_entries.rb +104 -39
- data/spec/zen/package/sections/controller/sections.rb +60 -27
- data/spec/zen/package/sections/helper/section.rb +5 -5
- data/spec/zen/package/sections/helper/section_frontend.rb +9 -9
- data/spec/zen/package/sections/widget.rb +44 -0
- data/spec/zen/package/settings/controller/settings.rb +18 -16
- data/spec/zen/package/settings/settings.rb +12 -12
- data/spec/zen/package/users/controller/user_groups.rb +61 -29
- data/spec/zen/package/users/controller/users.rb +118 -39
- data/spec/zen/package/users/helper/access.rb +3 -3
- data/spec/zen/package/users/helper/acl.rb +4 -4
- data/spec/zen/package/users/helper/users.rb +5 -5
- data/spec/zen/security.rb +25 -0
- data/spec/zen/theme.rb +20 -18
- data/spec/zen/validation.rb +5 -5
- data/spec/zen/vendor/sequel_sluggable.rb +12 -0
- data/zen.gemspec +27 -4
- metadata +182 -124
- data/AUTHORS +0 -4
- data/guide/_static/categories/categories.png +0 -0
- data/guide/_static/categories/category_groups.png +0 -0
- data/guide/_static/categories/new_category.png +0 -0
- data/guide/_static/categories/new_category_group.png +0 -0
- data/guide/_static/comments/comments.png +0 -0
- data/guide/_static/comments/edit_comment.png +0 -0
- data/guide/_static/custom_fields/custom_field_groups.png +0 -0
- data/guide/_static/custom_fields/custom_field_types.png +0 -0
- data/guide/_static/custom_fields/custom_fields.png +0 -0
- data/guide/_static/custom_fields/edit_custom_field_general.png +0 -0
- data/guide/_static/custom_fields/edit_custom_field_group.png +0 -0
- data/guide/_static/custom_fields/edit_custom_field_settings.png +0 -0
- data/guide/_static/custom_fields/edit_custom_field_type.png +0 -0
- data/guide/_static/menus/edit_menu.png +0 -0
- data/guide/_static/menus/edit_menu_item.png +0 -0
- data/guide/_static/menus/menu_items.png +0 -0
- data/guide/_static/menus/menus.png +0 -0
- data/guide/_static/sections/edit_entry.png +0 -0
- data/guide/_static/sections/edit_entry_categories.png +0 -0
- data/guide/_static/sections/edit_entry_general.png +0 -0
- data/guide/_static/sections/edit_entry_meta.png +0 -0
- data/guide/_static/sections/edit_section_comments.png +0 -0
- data/guide/_static/sections/edit_section_general.png +0 -0
- data/guide/_static/sections/edit_section_groups.png +0 -0
- data/guide/_static/sections/entries.png +0 -0
- data/guide/_static/sections/sections.png +0 -0
- data/guide/_static/settings/overview_general.png +0 -0
- data/guide/_static/settings/overview_security.png +0 -0
- data/guide/_static/settings/overview_user.png +0 -0
- data/guide/_static/users/edit_user.png +0 -0
- data/guide/_static/users/edit_user_group.png +0 -0
- data/guide/_static/users/edit_user_group_permissions.png +0 -0
- data/guide/_static/users/edit_user_permissions.png +0 -0
- data/guide/_static/users/overview.png +0 -0
- data/guide/_static/users/user_groups_overview.png +0 -0
- data/lib/zen/controller/translations.rb +0 -49
- data/lib/zen/package/sections/lib/sections/view/admin/form.xhtml +0 -113
- data/lib/zen/package/sections/lib/sections/view/admin/index.xhtml +0 -97
- data/lib/zen/public/admin/css/zen/buttons.css +0 -46
- data/lib/zen/public/admin/css/zen/editor.css +0 -88
- data/lib/zen/public/admin/css/zen/general.css +0 -109
- data/lib/zen/public/admin/css/zen/grid.css +0 -100
- data/lib/zen/public/admin/css/zen/layout.css +0 -184
- data/lib/zen/public/admin/css/zen/messages.css +0 -54
- data/lib/zen/public/admin/css/zen/tables.css +0 -97
- data/lib/zen/public/admin/css/zen/tabs.css +0 -47
- data/lib/zen/public/admin/css/zen/window.css +0 -73
- data/lib/zen/public/admin/images/zen/icons/accept.png +0 -0
- data/lib/zen/public/admin/images/zen/icons/add.png +0 -0
- data/lib/zen/public/admin/images/zen/icons/back.png +0 -0
- data/lib/zen/public/admin/images/zen/icons/delete.png +0 -0
- data/lib/zen/public/admin/images/zen/icons/help.png +0 -0
- data/lib/zen/public/admin/images/zen/icons/info.png +0 -0
- data/lib/zen/public/admin/images/zen/icons/logout.png +0 -0
- data/lib/zen/public/admin/images/zen/icons/pdf.png +0 -0
- data/lib/zen/public/admin/images/zen/icons/view.png +0 -0
- data/lib/zen/public/admin/js/zen/lib/tabs.js +0 -207
- data/lib/zen/view/main.xhtml +0 -19
data/.gems
CHANGED
data/.rvmrc
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
|
-
rvm use --create 1.9.3@zen
|
2
|
+
rvm use --install --create 1.9.3@zen
|
data/.travis.yml
CHANGED
@@ -16,7 +16,12 @@ env:
|
|
16
16
|
- 'ADAPTER=sqlite'
|
17
17
|
- 'ADAPTER=mysql2 DATABASE=zen_dev'
|
18
18
|
- 'ADAPTER=postgres DATABASE=zen_dev USERNAME=postgres'
|
19
|
+
- 'LRU=1 ADAPTER=sqlite'
|
20
|
+
- 'LRU=1 ADAPTER=mysql2 DATABASE=zen_dev'
|
21
|
+
- 'LRU=1 ADAPTER=postgres DATABASE=zen_dev USERNAME=postgres'
|
19
22
|
|
20
23
|
before_script:
|
21
24
|
- "mysql -e 'CREATE DATABASE zen_dev;'"
|
22
25
|
- "psql -c 'CREATE DATABASE zen_dev;' -U postgres"
|
26
|
+
- "export DISPLAY=:99.0"
|
27
|
+
- "sh -e /etc/init.d/xvfb start"
|
data/.yardopts
CHANGED
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -38,12 +38,25 @@ small portion of what it can do.
|
|
38
38
|
* A well documented, tested and easy to understand API.
|
39
39
|
* A database structure that doesn't make you cry.
|
40
40
|
|
41
|
-
##
|
41
|
+
## Requirements
|
42
|
+
|
43
|
+
* Ruby (YARV) 1.9.2 or newer (Rubinius, jruby and others are not supported).
|
44
|
+
* Ramaze 2011.10.23 or newer.
|
45
|
+
* A SQL database supported by Sequel. Zen has been tested and confirmed to
|
46
|
+
work on MySQL, SQLite3 and PostgreSQL. You'll also need the required gems for
|
47
|
+
these DBMS' such as "mysql2" for MySQL and "pg" for PostgreSQL.
|
48
|
+
* A Rack compatible server such as Thin or Unicorn.
|
49
|
+
* A library to convert your markup of choice to HTML. Zen by default has support
|
50
|
+
for Textile using Redcloth and Markdown using RDiscount. RDiscount and
|
51
|
+
RedCloth are installed automatically when needed.
|
52
|
+
|
53
|
+
## User Guide
|
42
54
|
|
43
55
|
* {file:installation Installation}
|
44
56
|
* {file:getting_started Getting Started}
|
45
|
-
* {file:
|
46
|
-
* {file:
|
57
|
+
* {file:zen_compared Comparing Zen with Others}
|
58
|
+
* {file:faq Frequently Asked Questions}
|
59
|
+
* {Dashboard::Controller::Dashboard Dashboard}
|
47
60
|
* {Categories Categories}
|
48
61
|
* {Categories::Controller::CategoryGroups Managing Category Groups}
|
49
62
|
* {Categories::Controller::Categories Managing Categories}
|
@@ -72,47 +85,38 @@ small portion of what it can do.
|
|
72
85
|
* {Users Users, User Groups and Permissions}
|
73
86
|
* {Users::Controller::Users Managing Users}
|
74
87
|
* {Users::Controller::UserGroups Managing User Groups}
|
88
|
+
|
89
|
+
## Developers Guide
|
90
|
+
|
91
|
+
* {file:hacking Hacking/Contributing}
|
92
|
+
* {file:changelog Changelog}
|
75
93
|
* {Zen::Package Packages}
|
76
94
|
* {Zen::Theme Themes}
|
77
95
|
* {Zen::Language Localization}
|
78
96
|
* {Zen::Event Events}
|
79
97
|
* {Zen::Validation Validating Objects}
|
98
|
+
* {Zen::Security.sanitize Sanitizing User Input}
|
99
|
+
* {file:autosaving_forms Automatically Saving Form Data}
|
100
|
+
* {Ramaze::Helper::Locale Working With Dates}
|
80
101
|
* {file:asset_management Asset Management}
|
102
|
+
* {Zen::Markup Converting Markup}
|
81
103
|
* {file:javascript Javascript API}
|
82
104
|
|
83
|
-
## Requirements
|
84
|
-
|
85
|
-
* Ruby >= 1.9.2 (Rubinius, jruby and others are not supported).
|
86
|
-
* Ramaze 2011.10.23 or newer.
|
87
|
-
* A SQL database supported by Sequel. Zen has been tested and confirmed to
|
88
|
-
work on MySQL, SQLite3 and PostgreSQL. You'll also need the required gems for
|
89
|
-
these DBMS' such as "mysql2" for MySQL and "pg" for PostgreSQL.
|
90
|
-
* A Rack compatible server such as Thin or Unicorn.
|
91
|
-
* A library to convert your markup of choice to HTML. Zen by default has support
|
92
|
-
for Textile using Redcloth and Markdown using RDiscount. RDiscount and
|
93
|
-
RedCloth are installed automatically when needed.
|
94
|
-
|
95
105
|
## Community
|
96
106
|
|
97
107
|
* [Website][zen website]
|
98
108
|
* [Mailing list][mailing list]
|
99
|
-
|
100
|
-
Zen does not have it's own IRC channel at this time but you can usually find me
|
101
|
-
in any of the following channels on Freenode:
|
102
|
-
|
103
|
-
* \#forrst-chat
|
104
|
-
* \#ramaze
|
105
|
-
* \#ruby-lang
|
109
|
+
* IRC channel: \#zen-cms on Freenode
|
106
110
|
|
107
111
|
## Websites Using Zen
|
108
112
|
|
109
113
|
* http://yorickpeterse.com/
|
110
114
|
* http://ramaze.net/
|
111
115
|
* http://zen-cms.com/
|
116
|
+
* http://aplusm.me/
|
112
117
|
|
113
118
|
If you've built a website using Zen and you'd like to have it listed here sent
|
114
|
-
an Email to me (yorickpeterse
|
115
|
-
mailing list.
|
119
|
+
an Email to me (yorickpeterse@gmail.com) or send an Email to the mailing list.
|
116
120
|
|
117
121
|
## Special Thanks
|
118
122
|
|
data/Rakefile
CHANGED
@@ -4,6 +4,9 @@ Zen::Gemspec = Gem::Specification::load(
|
|
4
4
|
File.expand_path('../zen.gemspec', __FILE__)
|
5
5
|
)
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
task_path = File.expand_path('../lib/zen/task', __FILE__)
|
8
|
+
tasks = ['build', 'clean', 'proto', 'setup', 'test']
|
9
|
+
|
10
|
+
tasks.each do |task|
|
11
|
+
import File.join(task_path, "#{task}.rake")
|
9
12
|
end
|
data/guide/asset_management.md
CHANGED
@@ -17,7 +17,7 @@ The asset helper is loaded in the admin controller and therefor available to all
|
|
17
17
|
controllers that extend it. Loading assets using the first method works as
|
18
18
|
following:
|
19
19
|
|
20
|
-
Zen.asset.serve(:javascript, ['admin/js/
|
20
|
+
Zen.asset.serve(:javascript, ['admin/mootools/js/core'])
|
21
21
|
|
22
22
|
The first parameter is the type of files to load. Out of the box you can use
|
23
23
|
``:javascript`` and ``:css``. The second parameter is an array of paths relative
|
@@ -34,7 +34,7 @@ following:
|
|
34
34
|
class Posts < Zen::Controller::AdminController
|
35
35
|
map '/admin/posts'
|
36
36
|
|
37
|
-
serve(:javascript, ['admin/js/
|
37
|
+
serve(:javascript, ['admin/mootools/js/core'])
|
38
38
|
end
|
39
39
|
|
40
40
|
The ``serve()`` method has the same syntax as ``Zen.asset.serve()``, it just
|
@@ -45,7 +45,7 @@ package):
|
|
45
45
|
|
46
46
|
serve(
|
47
47
|
:javascript,
|
48
|
-
['admin/js/
|
48
|
+
['admin/users/js/lib/access_rules', 'admin/users/js/access_rules'],
|
49
49
|
:methods => [:edit, :new],
|
50
50
|
:name => 'users'
|
51
51
|
)
|
@@ -73,7 +73,7 @@ asset groups to know for what controller they should be loaded:
|
|
73
73
|
Zen.asset.register_asset_group(:my_asset_group) do |asset, controller|
|
74
74
|
asset.serve(
|
75
75
|
:javascript,
|
76
|
-
['admin/js/
|
76
|
+
['admin/mootools/js/core'],
|
77
77
|
:controller => controller
|
78
78
|
)
|
79
79
|
end
|
@@ -110,8 +110,8 @@ entire layout. These files are called "global.css" and "global.js" and (in order
|
|
110
110
|
to use them) should be placed in the following directories (where ROOT is the
|
111
111
|
root directory of the application):
|
112
112
|
|
113
|
-
* ROOT/admin/css/global.css
|
114
|
-
* ROOT/admin/js/global.js
|
113
|
+
* ROOT/admin/zen/css/global.css
|
114
|
+
* ROOT/admin/zen/js/global.js
|
115
115
|
|
116
116
|
[ramaze-asset]: https://github.com/yorickpeterse/ramaze-asset
|
117
117
|
[ramaze-env]: https://github.com/YorickPeterse/ramaze-asset/blob/master/lib/ramaze/asset/environment.rb
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# Automatically Saving Form Data
|
2
|
+
|
3
|
+
To make it easier for users to work with their data Zen allows developers to
|
4
|
+
easily implement a system that makes it possible for form data to be saved
|
5
|
+
automatically. It is recommended that all forms that create or update data
|
6
|
+
automatically save their data.
|
7
|
+
|
8
|
+
For this to work you must first make it possible for your controllers to respond
|
9
|
+
to these auto saving actions. This can be done by calling
|
10
|
+
{Ramaze::Helper::Controller::ClassMethods#autosave} in your controller
|
11
|
+
declaration. The first parameter is the model to save the data with, the second
|
12
|
+
an array of columns to save and the third a permission required to perform the
|
13
|
+
action. For example, the controller {Categories::Controller::CategoryGroups}
|
14
|
+
calls this method as following:
|
15
|
+
|
16
|
+
autosave Model::CategoryGroup,
|
17
|
+
Model::CategoryGroup::COLUMNS,
|
18
|
+
:edit_category_group
|
19
|
+
|
20
|
+
The array {Categories::Model::CategoryGroup::COLUMNS} contains a list of column
|
21
|
+
names that can be set by the user.
|
22
|
+
|
23
|
+
Once the controller has been prepared you must update your forms so that they
|
24
|
+
include a ``data-autosave-url`` attribute. This attribute should contain a
|
25
|
+
string that points to the URL that will receive the form data. If you're using
|
26
|
+
the autosave method discussed above you should call ``.r(:autosave)`` on your
|
27
|
+
controller. For category groups this is done as following:
|
28
|
+
|
29
|
+
:'data-autosave-url' => Categories::Controller::CategoryGroups.r(:autosave)
|
30
|
+
|
31
|
+
The last step is to make sure that your form has a hidden field with the name
|
32
|
+
"id", usually this field contains the primary value of an object (the ID). If
|
33
|
+
this field is empty Zen will **not** save the form automatically, this is to
|
34
|
+
prevent it from trying to save forms related to non existing objects. Adding
|
35
|
+
this field is as simple as the following (assuming you're using the BlueForm
|
36
|
+
helper, which you should):
|
37
|
+
|
38
|
+
f.input_hidden(:id)
|
39
|
+
|
40
|
+
And that's it, Zen will take care of the rest for you from this point on. Every
|
41
|
+
10 minutes Zen will automatically save the form for you and take care of the
|
42
|
+
logic related to retrieving error messages, updating CSRF tokens and so on.
|
data/guide/changelog.md
CHANGED
@@ -1,5 +1,46 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.4 - March 7th, 2012
|
4
|
+
|
5
|
+
* Packages can contain multiple menus.
|
6
|
+
* New UI for the backend.
|
7
|
+
* All Javascript code is executed in strict mode.
|
8
|
+
* Added a new Javascript class for parsing hash fragments: Zen.Hash.
|
9
|
+
* Active tabs "persist" by changing URL hash fragments.
|
10
|
+
* Slugs are generated less aggressively, allowing the use of characters such as
|
11
|
+
hyphens.
|
12
|
+
* Various documentation improvements and numerous bug fixes.
|
13
|
+
* Datepickers can be customized using HTML attributes.
|
14
|
+
* Etanni template tags are escaped when dealing with user input.
|
15
|
+
* Added a new package: "Dashboard". This package shows various widgets and
|
16
|
+
replaces the "Sections" package as the landing page after logging in.
|
17
|
+
* Performance improvements for ``Ramaze::Helper::MenuFrontend#render_menu()``.
|
18
|
+
These improvements mean that only two queries are needed to retrieve a menu
|
19
|
+
and build the hierarchy of menu items (regardless of the amount).
|
20
|
+
* Fixed an issue that would incorrectly generate application names when creating
|
21
|
+
a new application using ``zen create``.
|
22
|
+
* Full stack traces are logged in case of errors rather than just the message.
|
23
|
+
* Model related events (e.g. before_new_section_entry) have been moved into
|
24
|
+
their corresponding models.
|
25
|
+
* Menu item manager has been re-written so that menu items can be organized
|
26
|
+
using a drop and drag interface.
|
27
|
+
* The various assets used by Zen have been re-organized.
|
28
|
+
* Custom data can be stored in themes and packages in the ``env`` attribute.
|
29
|
+
* Forms are automatically saved every 10 minutes. This only happens for forms
|
30
|
+
that contain data of existing objects.
|
31
|
+
* The controller Zen::Controller::Translations has been removed. Instead of
|
32
|
+
using a controller translations are simply dumped as a JSON string in a view.
|
33
|
+
* Fixed an issue that would cause Zen to crash when trying to store certain data
|
34
|
+
using Ramaze::Cache::LRU.
|
35
|
+
* Custom fields are re-filled with their values whenever a user tries to
|
36
|
+
save/create a section entry with invalid/missing data.
|
37
|
+
* CSRF errors no longer show a plain text message but instead redirect users
|
38
|
+
back to the previous page. In case of such an error forms will be re-filled to
|
39
|
+
prevent data loss.
|
40
|
+
* The sort order of menu items increments automatically unless a custom order
|
41
|
+
has been specified.
|
42
|
+
* Various dependencies have been updated.
|
43
|
+
|
3
44
|
## 0.3 - November 27th, 2011
|
4
45
|
|
5
46
|
* Fixed slug generation.
|
data/guide/faq.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Frequently Asked Questions
|
2
|
+
|
3
|
+
## When starting I get the warning "Failed to migrate the settings..."
|
4
|
+
|
5
|
+
This warning appears when Zen failed to insert/update the various settings
|
6
|
+
stored in the database. In almost all cases this warning is caused because the
|
7
|
+
settings table doesn't exist. This issue can be solved by simply running the
|
8
|
+
following command:
|
9
|
+
|
10
|
+
$ rake db:migrate
|
11
|
+
|
12
|
+
## I get errors such as "no such table: X"
|
13
|
+
|
14
|
+
Similar to the issue above this error is caused by missing database tables and
|
15
|
+
again this can be fixed by simply migrating the database:
|
16
|
+
|
17
|
+
$ rake db:migrate
|
18
|
+
|
19
|
+
## Users are randomly logged out and settings are lost
|
20
|
+
|
21
|
+
This happens when you're running your Zen application using a Rack server that
|
22
|
+
uses multiple processes (e.g. Unicorn) in combination with memory based caches
|
23
|
+
for the session and settings data. The easiest fix for this problem is to simply
|
24
|
+
use an external cache for the settings and session data.
|
25
|
+
|
26
|
+
It's recommended to either use Memcached using ``Ramaze::Cache::MemCache`` or
|
27
|
+
Redis using ``Ramaze::Cache::Redis``. These caches can be set as following in
|
28
|
+
``config/config.rb``:
|
29
|
+
|
30
|
+
Ramaze::Cache.options.session = Ramaze::Cache::MemCache
|
31
|
+
Ramaze::Cache.options.settings = Ramaze::Cache::MemCache
|
32
|
+
|
33
|
+
For Redis you'd do the following:
|
34
|
+
|
35
|
+
Ramaze::Cache.options.session = Ramaze::Cache::Redis
|
36
|
+
Ramaze::Cache.options.settings = Ramaze::Cache::Redis
|
37
|
+
|
38
|
+
## Can I use Zen for non open source projects?
|
39
|
+
|
40
|
+
Yes. Zen is licensed under the MIT license which is a very flexible license. As
|
41
|
+
long as you keep the license intact and include it in your projects that use Zen
|
42
|
+
you're free to do whatever you like. For more information see the "LICENSE"
|
43
|
+
file, you can find this file in the Git repository as well as in the "File list"
|
44
|
+
dropdown at the top right of this page.
|
45
|
+
|
46
|
+
## Can I contact you personally via Email or IRC?
|
47
|
+
|
48
|
+
Yes, as long as any messages are written in decent English so that I can
|
49
|
+
understand them you're more than welcome to contact me directly.
|
data/guide/getting_started.md
CHANGED
@@ -2,9 +2,8 @@
|
|
2
2
|
|
3
3
|
Once installed (see {file:installation Installation}) you can use the ``zen``
|
4
4
|
executable to create new applications. Keep in mind that this command is not a
|
5
|
-
wrapper for the ``ramaze`` executable
|
6
|
-
|
7
|
-
your application.
|
5
|
+
wrapper for the ``ramaze`` executable, you still have to type ``ramaze console``
|
6
|
+
or ``ramaze start`` if you want to open up a console or start your application.
|
8
7
|
|
9
8
|
In order to create a new application based on Zen you'll need to execute the
|
10
9
|
following command:
|
@@ -15,7 +14,7 @@ This command will start an interactive installer that walks you through the
|
|
15
14
|
process of creating a new project. Using this installer you can specify the
|
16
15
|
project name, database settings and various other settings.
|
17
16
|
|
18
|
-
The prototype applications generated by the
|
17
|
+
The prototype applications generated by the Zen executable are pretty basic but
|
19
18
|
should be enough for most users. If you want to change anything of it you're
|
20
19
|
free to do so just make sure that all paths and such are updated correctly.
|
21
20
|
|
@@ -30,15 +29,28 @@ This creates all the database tables and inserts a default user with a random
|
|
30
29
|
password.
|
31
30
|
|
32
31
|
When creating the database tables for the first time you'll see one or two
|
33
|
-
yellow warnings telling you certain tables might be missing. These
|
34
|
-
|
32
|
+
yellow warnings telling you certain tables might be missing. These warnings are
|
33
|
+
triggered whenever Zen fails to automatically insert/update the settings table.
|
34
|
+
These warnings can be safely ignored the first time you create a new
|
35
|
+
application.
|
35
36
|
|
36
|
-
|
37
|
-
it.
|
37
|
+
Once an application has been created and the database tables have been put in
|
38
|
+
place you can start using it. Starting a Zen application (during development)
|
39
|
+
can be done using the following command:
|
40
|
+
|
41
|
+
$ ramaze start
|
42
|
+
|
43
|
+
This will start the application using WEBRick, if you want to use an alternative
|
44
|
+
server instead (such as Thin) you can do this by setting the ``-s`` option:
|
45
|
+
|
46
|
+
$ ramaze start -s thin
|
47
|
+
|
48
|
+
For more information on the available commands and options execute ``zen
|
49
|
+
--help`` or ``ramaze --help``.
|
38
50
|
|
39
51
|
## Updating Applications
|
40
52
|
|
41
|
-
Updating Zen in general is quite easy and requires the following two commands
|
53
|
+
Updating Zen in general is quite easy and requires the following two commands:
|
42
54
|
|
43
55
|
$ gem update zen
|
44
56
|
$ rake db:migrate
|
@@ -47,10 +59,9 @@ However, with some releases there may be some extra steps that are required in
|
|
47
59
|
order to properly update your installation so it's always wise to check the
|
48
60
|
release notes before updating an installation.
|
49
61
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
backup of your database before updating.
|
62
|
+
While the database migrations written for Zen will always try to migrate your
|
63
|
+
existing content (unless this simply isn't possible) I **highly** recommend you
|
64
|
+
to make database backups before migrating the database.
|
54
65
|
|
55
66
|
## Logging In
|
56
67
|
|
data/guide/hacking.md
CHANGED
@@ -5,16 +5,46 @@ Zen doesn't degrade developers should stick with the guidelines described in
|
|
5
5
|
this document. Zen also follows the [Ramaze guidelines][ramaze guidelines] as
|
6
6
|
much as possible.
|
7
7
|
|
8
|
-
##
|
8
|
+
## Coding Standards
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
10
|
+
Zen follows a rather strict set of coding guidelines that developers should
|
11
|
+
follow if they wish to contribute to Zen. Write your code like the next
|
12
|
+
developer looking at it is a psychopath with an axe and knows where you live.
|
13
|
+
|
14
|
+
### Indentation
|
15
|
+
|
16
|
+
For Ruby 2 spaces per indentation level is used. The use of tabs is not
|
17
|
+
allowed at all times and pull requests containing incorrectly indented code will
|
18
|
+
not be accepted until the indentation has been fixed.
|
19
|
+
|
20
|
+
For Javascript, CSS and HTML 4 spaces per indentation level is used instead of
|
21
|
+
2 spaces. This is because I personally find 4 spaces to be far easier to read in
|
22
|
+
these languages. Again no tabs are allowed.
|
23
|
+
|
24
|
+
### Documentation
|
25
|
+
|
26
|
+
The same rule about the psychopath with the axe applies to documentation. Proper
|
27
|
+
documentation is very, *very* important. Documentation should be written
|
28
|
+
following the YARD syntax and by using Markdown where needed. If you need any
|
29
|
+
examples just look at the source code of {Zen::Package} or {Zen::Theme}.
|
30
|
+
|
31
|
+
### Line Width
|
32
|
+
|
33
|
+
The maximum amount of characters per line should be no greater than 80
|
34
|
+
characters whenever possible. Sometimes it's simply not possible (e.g. when
|
35
|
+
adding a URL) but try to stick to this as much as possible.
|
36
|
+
|
37
|
+
Limiting the amount of characters per line to 80 ensures that everybody will be
|
38
|
+
able to read it, whether they're using Vim with multiple split windows or
|
39
|
+
reading a file in their terminal.
|
40
|
+
|
41
|
+
### CSS
|
42
|
+
|
43
|
+
When writing CSS the properties of a selector (background-image, color, etc)
|
44
|
+
should be sorted alphabetically. There are a few exceptions to this. For
|
45
|
+
example, the CSS file buttons.css contains a set of background-image properties
|
46
|
+
that are grouped together for better readability. As long as it's readable I'm
|
47
|
+
ok with it.
|
18
48
|
|
19
49
|
## Comitting
|
20
50
|
|
@@ -50,3 +80,4 @@ The test ouput is displayed using [TAP][tap protocol].
|
|
50
80
|
[commit guidelines]: http://ramaze.net/documentation/file.contributing.html#Commit_Messages
|
51
81
|
[bacon]: https://github.com/chneukirchen/bacon
|
52
82
|
[tap protocol]: https://en.wikipedia.org/wiki/Test_Anything_Protocol
|
83
|
+
[allman style]: https://en.wikipedia.org/wiki/Indent_style#Allman_style
|