RISC OS Open
Safeguarding the past, present and future of RISC OS for everyone
ROOL
Home | News | Downloads | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account
You are currently browsing the Subversion repository.
Changesets can be listed by changeset number.
The Git repository is here.
  • Changesets
  • » Changeset 193

Changeset 193

First stage commit of Typo 4.1, modified for the ROOL site.
Includes all local modifications but a final pass needs to be
made to delete any files left over from earlier Typo versions
that shouldn't be here anymore. See the 'tags' section of the
repository for a clean Typo 4.1 tree.

Note that symlinks to shared files in the RISC OS Open theme
directory have been deliberately included this time around; I
decided that on balance it was better to leave them in as
placeholders, since unlike symlinks in app/views/shared, the
Typo theme structure is not a standard Rails concept.

  • Comitted by: rool
  • Date: Wednesday April 04 18:51:02 2007 (over 15 years ago)

Affected files:

  • Added rool/rails/typo/trunk/vendor/plugins/haml/
  • Added rool/rails/typo/trunk/vendor/plugins/haml/bin/
  • Added rool/rails/typo/trunk/vendor/plugins/haml/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/haml/lib/haml/
  • Added rool/rails/typo/trunk/app/views/admin/shared/
  • Added rool/rails/typo/trunk/lang/
  • Added rool/rails/typo/trunk/public/files/
  • Added rool/rails/typo/trunk/public/stylesheets/textmate/
  • Added rool/rails/typo/trunk/spec/
  • Added rool/rails/typo/trunk/spec/controllers/
  • Added rool/rails/typo/trunk/spec/fixtures/
  • Added rool/rails/typo/trunk/spec/helpers/
  • Added rool/rails/typo/trunk/spec/models/
  • Added rool/rails/typo/trunk/tmp/pids/
  • Added rool/rails/typo/trunk/vendor/cached_model/
  • Added rool/rails/typo/trunk/vendor/cached_model/lib/
  • Added rool/rails/typo/trunk/vendor/cached_model/test/
  • Added rool/rails/typo/trunk/vendor/memcache-client/
  • Added rool/rails/typo/trunk/vendor/memcache-client/lib/
  • Added rool/rails/typo/trunk/vendor/memcache-client/test/
  • Added rool/rails/typo/trunk/vendor/plugins/action_view_patch/
  • Added rool/rails/typo/trunk/vendor/plugins/action_view_patch/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/action_view_patch/test/
  • Added rool/rails/typo/trunk/vendor/plugins/aimpresence_sidebar/
  • Added rool/rails/typo/trunk/vendor/plugins/aimpresence_sidebar/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/aimpresence_sidebar/test/
  • Added rool/rails/typo/trunk/vendor/plugins/aimpresence_sidebar/views/
  • Added rool/rails/typo/trunk/vendor/plugins/amazon_sidebar/
  • Added rool/rails/typo/trunk/vendor/plugins/amazon_sidebar/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/amazon_sidebar/views/
  • Added rool/rails/typo/trunk/vendor/plugins/archives_sidebar/
  • Added rool/rails/typo/trunk/vendor/plugins/archives_sidebar/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/archives_sidebar/test/
  • Added rool/rails/typo/trunk/vendor/plugins/archives_sidebar/views/
  • Added rool/rails/typo/trunk/vendor/plugins/audioscrobbler_sidebar/
  • Added rool/rails/typo/trunk/vendor/plugins/audioscrobbler_sidebar/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/audioscrobbler_sidebar/test/
  • Added rool/rails/typo/trunk/vendor/plugins/audioscrobbler_sidebar/views/
  • Added rool/rails/typo/trunk/vendor/plugins/backpack_sidebar/
  • Added rool/rails/typo/trunk/vendor/plugins/backpack_sidebar/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/backpack_sidebar/test/
  • Added rool/rails/typo/trunk/vendor/plugins/backpack_sidebar/views/
  • Added rool/rails/typo/trunk/vendor/plugins/category_sidebar/
  • Added rool/rails/typo/trunk/vendor/plugins/category_sidebar/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/category_sidebar/test/
  • Added rool/rails/typo/trunk/vendor/plugins/category_sidebar/views/
  • Added rool/rails/typo/trunk/vendor/plugins/delicious_sidebar/
  • Added rool/rails/typo/trunk/vendor/plugins/delicious_sidebar/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/delicious_sidebar/test/
  • Added rool/rails/typo/trunk/vendor/plugins/delicious_sidebar/views/
  • Added rool/rails/typo/trunk/vendor/plugins/flickr_sidebar/
  • Added rool/rails/typo/trunk/vendor/plugins/flickr_sidebar/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/flickr_sidebar/test/
  • Added rool/rails/typo/trunk/vendor/plugins/flickr_sidebar/views/
  • Added rool/rails/typo/trunk/vendor/plugins/fortythree_sidebar/
  • Added rool/rails/typo/trunk/vendor/plugins/fortythree_sidebar/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/fortythree_sidebar/test/
  • Added rool/rails/typo/trunk/vendor/plugins/fortythree_sidebar/views/
  • Added rool/rails/typo/trunk/vendor/plugins/fortythreeplaces_sidebar/
  • Added rool/rails/typo/trunk/vendor/plugins/fortythreeplaces_sidebar/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/fortythreeplaces_sidebar/test/
  • Added rool/rails/typo/trunk/vendor/plugins/fortythreeplaces_sidebar/views/
  • Added rool/rails/typo/trunk/vendor/plugins/haml/lib/haml/helpers/
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/mocks/
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/results/
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/rhtml/
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/templates/
  • Added rool/rails/typo/trunk/vendor/plugins/localization/
  • Added rool/rails/typo/trunk/vendor/plugins/localization/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/magnolia_sidebar/
  • Added rool/rails/typo/trunk/vendor/plugins/magnolia_sidebar/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/magnolia_sidebar/test/
  • Added rool/rails/typo/trunk/vendor/plugins/magnolia_sidebar/views/
  • Added rool/rails/typo/trunk/vendor/plugins/recent_comments_sidebar/
  • Added rool/rails/typo/trunk/vendor/plugins/recent_comments_sidebar/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/recent_comments_sidebar/test/
  • Added rool/rails/typo/trunk/vendor/plugins/recent_comments_sidebar/views/
  • Added rool/rails/typo/trunk/vendor/plugins/static_sidebar/
  • Added rool/rails/typo/trunk/vendor/plugins/static_sidebar/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/static_sidebar/views/
  • Added rool/rails/typo/trunk/vendor/plugins/tada_sidebar/
  • Added rool/rails/typo/trunk/vendor/plugins/tada_sidebar/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/tada_sidebar/test/
  • Added rool/rails/typo/trunk/vendor/plugins/tada_sidebar/views/
  • Added rool/rails/typo/trunk/vendor/plugins/tag_sidebar/
  • Added rool/rails/typo/trunk/vendor/plugins/tag_sidebar/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/tag_sidebar/test/
  • Added rool/rails/typo/trunk/vendor/plugins/tag_sidebar/views/
  • Added rool/rails/typo/trunk/vendor/plugins/technorati_sidebar/
  • Added rool/rails/typo/trunk/vendor/plugins/technorati_sidebar/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/technorati_sidebar/test/
  • Added rool/rails/typo/trunk/vendor/plugins/technorati_sidebar/views/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_amazon/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_amazon/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_amazon/tasks/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_amazon/test/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_code/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_code/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_code/tasks/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_code/test/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_flickr/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_flickr/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_flickr/tasks/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_flickr/test/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_htmlfilter/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_htmlfilter/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_htmlfilter/tasks/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_htmlfilter/test/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_lightbox/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_lightbox/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_lightbox/tasks/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_lightbox/test/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_markdown/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_markdown/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_markdown/tasks/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_markdown/test/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_none/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_none/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_none/tasks/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_none/test/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_smartypants/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_smartypants/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_smartypants/tasks/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_smartypants/test/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_sparkline/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_sparkline/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_sparkline/tasks/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_sparkline/test/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile/tasks/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile/test/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile_and_markdown/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile_and_markdown/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile_and_markdown/tasks/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile_and_markdown/test/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_tmcode/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_tmcode/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_tmcode/tasks/
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_tmcode/test/
  • Added rool/rails/typo/trunk/vendor/plugins/upcoming_sidebar/
  • Added rool/rails/typo/trunk/vendor/plugins/upcoming_sidebar/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/upcoming_sidebar/test/
  • Added rool/rails/typo/trunk/vendor/plugins/upcoming_sidebar/views/
  • Added rool/rails/typo/trunk/vendor/plugins/xbox_sidebar/
  • Added rool/rails/typo/trunk/vendor/plugins/xbox_sidebar/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/xbox_sidebar/test/
  • Added rool/rails/typo/trunk/vendor/plugins/xbox_sidebar/views/
  • Added rool/rails/typo/trunk/vendor/plugins/xml_sidebar/
  • Added rool/rails/typo/trunk/vendor/plugins/xml_sidebar/lib/
  • Added rool/rails/typo/trunk/vendor/plugins/xml_sidebar/test/
  • Added rool/rails/typo/trunk/vendor/plugins/xml_sidebar/views/
  • Added rool/rails/typo/trunk/CHANGES-4.1
  • Added rool/rails/typo/trunk/README.SIDEBARS
  • Added rool/rails/typo/trunk/TODO-4.1
  • Added rool/rails/typo/trunk/app/models/categorization.rb
  • Added rool/rails/typo/trunk/app/models/content_state/ham.rb
  • Added rool/rails/typo/trunk/app/models/content_state/just_marked_as_ham.rb
  • Added rool/rails/typo/trunk/app/models/content_state/just_marked_as_spam.rb
  • Added rool/rails/typo/trunk/app/models/content_state/just_presumed_ham.rb
  • Added rool/rails/typo/trunk/app/models/content_state/just_withdrawn.rb
  • Added rool/rails/typo/trunk/app/models/content_state/presumed_ham.rb
  • Added rool/rails/typo/trunk/app/models/content_state/presumed_spam.rb
  • Added rool/rails/typo/trunk/app/models/content_state/spam.rb
  • Added rool/rails/typo/trunk/app/models/content_state/unclassified.rb
  • Added rool/rails/typo/trunk/app/models/content_state/withdrawn.rb
  • Added rool/rails/typo/trunk/app/models/feedback.rb
  • Added rool/rails/typo/trunk/app/models/notification.rb
  • Added rool/rails/typo/trunk/app/views/admin/shared/_edit.rhtml
  • Added rool/rails/typo/trunk/app/views/articles/read_and_comment.rhtml
  • Added rool/rails/typo/trunk/app/views/layouts/minimal.rhtml
  • Added rool/rails/typo/trunk/db/migrate/048_remove_count_caching.rb
  • Added rool/rails/typo/trunk/db/migrate/049_move_feedback_to_new_state_machine.rb
  • Added rool/rails/typo/trunk/db/migrate/050_add_status_confirmed_field_to_content.rb
  • Added rool/rails/typo/trunk/db/migrate/051_fix_canonical_server_url.rb
  • Added rool/rails/typo/trunk/db/migrate/052_remove_cached_html.rb
  • Added rool/rails/typo/trunk/db/migrate/053_promote_canonical_server_url.rb
  • Added rool/rails/typo/trunk/db/migrate/054_upgrade_sidebar_objects.rb
  • Added rool/rails/typo/trunk/db/migrate/055_link_sidebars_to_blog.rb
  • Added rool/rails/typo/trunk/db/migrate/056_create_notifications.rb
  • Added rool/rails/typo/trunk/db/migrate/057_add_categorization_model.rb
  • Added rool/rails/typo/trunk/db/migrate/058_separate_entries_and_feedback.rb
  • Added rool/rails/typo/trunk/db/migrate/059_cleanup_feedback_table.rb
  • Added rool/rails/typo/trunk/db/migrate/060_cleanup_contents_table.rb
  • Added rool/rails/typo/trunk/db/migrate/061_convert_title_prefix_setting.rb
  • Added rool/rails/typo/trunk/lang/fr_FR.rb
  • Added rool/rails/typo/trunk/lib/generators/sidebar/templates/Rakefile
  • Added rool/rails/typo/trunk/lib/generators/sidebar/templates/content.rhtml
  • Added rool/rails/typo/trunk/lib/generators/sidebar/templates/init.rb
  • Added rool/rails/typo/trunk/lib/generators/sidebar/templates/sidebar.rb
  • Added rool/rails/typo/trunk/lib/generators/sidebar/templates/unit_test.rb
  • Added rool/rails/typo/trunk/lib/memory_profiler.rb
  • Added rool/rails/typo/trunk/lib/route_cache.rb
  • Added rool/rails/typo/trunk/lib/sidebars/consolidated_plugin.rb
  • Added rool/rails/typo/trunk/lib/typo_deprecated.rb
  • Added rool/rails/typo/trunk/public/.htaccess
  • Added rool/rails/typo/trunk/public/images/bracket.gif
  • Added rool/rails/typo/trunk/public/images/cancel.png
  • Added rool/rails/typo/trunk/public/images/checked.png
  • Added rool/rails/typo/trunk/public/images/edit.png
  • Added rool/rails/typo/trunk/public/images/help.png
  • Added rool/rails/typo/trunk/public/images/show.png
  • Added rool/rails/typo/trunk/public/javascripts/codecollapse.js
  • Added rool/rails/typo/trunk/public/stylesheets/codecollapse.css
  • Added rool/rails/typo/trunk/public/stylesheets/minimal.css
  • Added rool/rails/typo/trunk/public/stylesheets/textmate/dawn.css
  • Added rool/rails/typo/trunk/public/stylesheets/textmate/iplastic.css
  • Added rool/rails/typo/trunk/public/stylesheets/textmate/space_cadet.css
  • Added rool/rails/typo/trunk/public/stylesheets/textmate/textmate.css
  • Added rool/rails/typo/trunk/public/stylesheets/textmate/twilight.css
  • Added rool/rails/typo/trunk/script/process/inspector
  • Added rool/rails/typo/trunk/spec/controllers/accounts_controller_spec.rb
  • Added rool/rails/typo/trunk/spec/controllers/articles_controller_spec.rb
  • Added rool/rails/typo/trunk/spec/fixtures/articles_tags.yml
  • Added rool/rails/typo/trunk/spec/fixtures/blacklist_patterns.yml
  • Added rool/rails/typo/trunk/spec/fixtures/blogs.yml
  • Added rool/rails/typo/trunk/spec/fixtures/categories.yml
  • Added rool/rails/typo/trunk/spec/fixtures/categorizations.yml
  • Added rool/rails/typo/trunk/spec/fixtures/contents.yml
  • Added rool/rails/typo/trunk/spec/fixtures/feedback.yml
  • Added rool/rails/typo/trunk/spec/fixtures/notifications.yml
  • Added rool/rails/typo/trunk/spec/fixtures/page_caches.yml
  • Added rool/rails/typo/trunk/spec/fixtures/redirects.yml
  • Added rool/rails/typo/trunk/spec/fixtures/resources.yml
  • Added rool/rails/typo/trunk/spec/fixtures/sidebars.yml
  • Added rool/rails/typo/trunk/spec/fixtures/tags.yml
  • Added rool/rails/typo/trunk/spec/fixtures/text_filters.yml
  • Added rool/rails/typo/trunk/spec/fixtures/triggers.yml
  • Added rool/rails/typo/trunk/spec/fixtures/users.yml
  • Added rool/rails/typo/trunk/spec/fixtures/whiteboards.yml
  • Added rool/rails/typo/trunk/spec/helpers/admin_base_helper_spec.rb
  • Added rool/rails/typo/trunk/spec/models/amazon_sidebar_spec.rb
  • Added rool/rails/typo/trunk/spec/models/audioscrobbler_spec.rb
  • Added rool/rails/typo/trunk/spec/models/blog_spec.rb
  • Added rool/rails/typo/trunk/spec/models/cache_support_spec.rb
  • Added rool/rails/typo/trunk/spec/models/category_spec.rb
  • Added rool/rails/typo/trunk/spec/models/configuration_spec.rb
  • Added rool/rails/typo/trunk/spec/models/content_state_spec.rb
  • Added rool/rails/typo/trunk/spec/models/delegate_to_content_state_spec.rb
  • Added rool/rails/typo/trunk/spec/models/delicious_spec.rb
  • Added rool/rails/typo/trunk/spec/models/flickr_spec.rb
  • Added rool/rails/typo/trunk/spec/models/metafragment_spec.rb
  • Added rool/rails/typo/trunk/spec/models/page_cache_spec.rb
  • Added rool/rails/typo/trunk/spec/models/page_spec.rb
  • Added rool/rails/typo/trunk/spec/models/ping_spec.rb
  • Added rool/rails/typo/trunk/spec/models/redirect_spec.rb
  • Added rool/rails/typo/trunk/spec/models/resource_spec.rb
  • Added rool/rails/typo/trunk/spec/models/static_sidebar_spec.rb
  • Added rool/rails/typo/trunk/spec/models/tag_spec.rb
  • Added rool/rails/typo/trunk/spec/models/text_filter_spec.rb
  • Added rool/rails/typo/trunk/spec/models/theme_spec.rb
  • Added rool/rails/typo/trunk/spec/models/trackback_spec.rb
  • Added rool/rails/typo/trunk/spec/models/trigger_spec.rb
  • Added rool/rails/typo/trunk/spec/models/user_spec.rb
  • Added rool/rails/typo/trunk/test/fixtures/categorizations.yml
  • Added rool/rails/typo/trunk/test/fixtures/feedback.yml
  • Added rool/rails/typo/trunk/test/unit/amazon_sidebar_test.rb
  • Added rool/rails/typo/trunk/test/unit/cache_support_test.rb
  • Added rool/rails/typo/trunk/test/unit/content_state/feedback_states_test.rb
  • Added rool/rails/typo/trunk/test/unit/notification_test.rb
  • Added rool/rails/typo/trunk/test/unit/static_sidebar_test.rb
  • Added rool/rails/typo/trunk/themes/risc_os_open/views/shared/fixed_footer.rhtml
  • Added rool/rails/typo/trunk/themes/risc_os_open/views/shared/fixed_header.rhtml
  • Added rool/rails/typo/trunk/themes/risc_os_open/views/shared/fixed_sidebar.rhtml
  • Added rool/rails/typo/trunk/vendor/cached_model/History.txt
  • Added rool/rails/typo/trunk/vendor/cached_model/LICENSE.txt
  • Added rool/rails/typo/trunk/vendor/cached_model/Manifest.txt
  • Added rool/rails/typo/trunk/vendor/cached_model/README.txt
  • Added rool/rails/typo/trunk/vendor/cached_model/Rakefile
  • Added rool/rails/typo/trunk/vendor/cached_model/lib/cached_model.rb
  • Added rool/rails/typo/trunk/vendor/cached_model/test/test_cached_model.rb
  • Added rool/rails/typo/trunk/vendor/memcache-client/History.txt
  • Added rool/rails/typo/trunk/vendor/memcache-client/LICENSE.txt
  • Added rool/rails/typo/trunk/vendor/memcache-client/Manifest.txt
  • Added rool/rails/typo/trunk/vendor/memcache-client/README.txt
  • Added rool/rails/typo/trunk/vendor/memcache-client/Rakefile
  • Added rool/rails/typo/trunk/vendor/memcache-client/lib/memcache.rb
  • Added rool/rails/typo/trunk/vendor/memcache-client/lib/memcache_util.rb
  • Added rool/rails/typo/trunk/vendor/memcache-client/test/test_mem_cache.rb
  • Added rool/rails/typo/trunk/vendor/plugins/action_view_patch/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/action_view_patch/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/action_view_patch/lib/action_view_patch.rb
  • Added rool/rails/typo/trunk/vendor/plugins/action_view_patch/test/action_view_patch_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/aimpresence_sidebar/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/aimpresence_sidebar/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/aimpresence_sidebar/lib/aimpresence_sidebar.rb
  • Added rool/rails/typo/trunk/vendor/plugins/aimpresence_sidebar/test/aimpresence_sidebar_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/aimpresence_sidebar/views/content.rhtml
  • Added rool/rails/typo/trunk/vendor/plugins/amazon_sidebar/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/amazon_sidebar/lib/amazon_sidebar.rb
  • Added rool/rails/typo/trunk/vendor/plugins/amazon_sidebar/views/content.rhtml
  • Added rool/rails/typo/trunk/vendor/plugins/archives_sidebar/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/archives_sidebar/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/archives_sidebar/lib/archives_sidebar.rb
  • Added rool/rails/typo/trunk/vendor/plugins/archives_sidebar/test/archives_sidebar_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/archives_sidebar/views/content.rhtml
  • Added rool/rails/typo/trunk/vendor/plugins/audioscrobbler_sidebar/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/audioscrobbler_sidebar/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/audioscrobbler_sidebar/lib/audioscrobbler.rb
  • Added rool/rails/typo/trunk/vendor/plugins/audioscrobbler_sidebar/lib/audioscrobbler_sidebar.rb
  • Added rool/rails/typo/trunk/vendor/plugins/audioscrobbler_sidebar/test/audioscrobbler_sidebar_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/audioscrobbler_sidebar/views/content.rhtml
  • Added rool/rails/typo/trunk/vendor/plugins/backpack_sidebar/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/backpack_sidebar/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/backpack_sidebar/lib/backpack.rb
  • Added rool/rails/typo/trunk/vendor/plugins/backpack_sidebar/lib/backpack_sidebar.rb
  • Added rool/rails/typo/trunk/vendor/plugins/backpack_sidebar/test/backpack_sidebar_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/backpack_sidebar/views/content.rhtml
  • Added rool/rails/typo/trunk/vendor/plugins/category_sidebar/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/category_sidebar/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/category_sidebar/lib/category_sidebar.rb
  • Added rool/rails/typo/trunk/vendor/plugins/category_sidebar/test/category_sidebar_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/category_sidebar/views/content.rhtml
  • Added rool/rails/typo/trunk/vendor/plugins/delicious_sidebar/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/delicious_sidebar/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/delicious_sidebar/lib/delicious.rb
  • Added rool/rails/typo/trunk/vendor/plugins/delicious_sidebar/lib/delicious_sidebar.rb
  • Added rool/rails/typo/trunk/vendor/plugins/delicious_sidebar/test/delicious_sidebar_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/delicious_sidebar/views/content.rhtml
  • Added rool/rails/typo/trunk/vendor/plugins/flickr_sidebar/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/flickr_sidebar/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/flickr_sidebar/lib/flickr.rb
  • Added rool/rails/typo/trunk/vendor/plugins/flickr_sidebar/lib/flickr_sidebar.rb
  • Added rool/rails/typo/trunk/vendor/plugins/flickr_sidebar/test/flickr_sidebar_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/flickr_sidebar/views/content.rhtml
  • Added rool/rails/typo/trunk/vendor/plugins/fortythree_sidebar/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/fortythree_sidebar/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/fortythree_sidebar/lib/fortythree.rb
  • Added rool/rails/typo/trunk/vendor/plugins/fortythree_sidebar/lib/fortythree_sidebar.rb
  • Added rool/rails/typo/trunk/vendor/plugins/fortythree_sidebar/test/fortythree_sidebar_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/fortythree_sidebar/views/content.rhtml
  • Added rool/rails/typo/trunk/vendor/plugins/fortythreeplaces_sidebar/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/fortythreeplaces_sidebar/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/fortythreeplaces_sidebar/lib/fortythree.rb
  • Added rool/rails/typo/trunk/vendor/plugins/fortythreeplaces_sidebar/lib/fortythreeplaces_sidebar.rb
  • Added rool/rails/typo/trunk/vendor/plugins/fortythreeplaces_sidebar/test/fortythreeplaces_sidebar_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/fortythreeplaces_sidebar/views/content.rhtml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/MIT-LICENSE
  • Added rool/rails/typo/trunk/vendor/plugins/haml/REFERENCE
  • Added rool/rails/typo/trunk/vendor/plugins/haml/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/haml/VERSION
  • Added rool/rails/typo/trunk/vendor/plugins/haml/bin/haml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/haml/lib/haml/buffer.rb
  • Added rool/rails/typo/trunk/vendor/plugins/haml/lib/haml/engine.rb
  • Added rool/rails/typo/trunk/vendor/plugins/haml/lib/haml/helpers.rb
  • Added rool/rails/typo/trunk/vendor/plugins/haml/lib/haml/helpers/action_view_mods.rb
  • Added rool/rails/typo/trunk/vendor/plugins/haml/lib/haml/template.rb
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/benchmark.rb
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/engine_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/helper_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/mocks/article.rb
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/profile.rb
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/results/content_for_layout.xhtml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/results/eval_suppressed.xhtml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/results/helpers.xhtml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/results/helpful.xhtml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/results/just_stuff.xhtml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/results/list.xhtml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/results/original_engine.xhtml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/results/partials.xhtml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/results/silent_script.xhtml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/results/standard.xhtml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/results/tag_parsing.xhtml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/results/very_basic.xhtml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/results/whitespace_handling.xhtml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/rhtml/standard.rhtml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/runner.rb
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/template_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/templates/_partial.haml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/templates/_text_area.haml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/templates/content_for_layout.haml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/templates/eval_suppressed.haml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/templates/helpers.haml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/templates/helpful.haml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/templates/just_stuff.haml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/templates/list.haml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/templates/original_engine.haml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/templates/partialize.haml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/templates/partials.haml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/templates/silent_script.haml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/templates/standard.haml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/templates/tag_parsing.haml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/templates/very_basic.haml
  • Added rool/rails/typo/trunk/vendor/plugins/haml/test/templates/whitespace_handling.haml
  • Added rool/rails/typo/trunk/vendor/plugins/localization/CHANGELOG
  • Added rool/rails/typo/trunk/vendor/plugins/localization/README
  • Added rool/rails/typo/trunk/vendor/plugins/localization/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/localization/lib/localization.rb
  • Added rool/rails/typo/trunk/vendor/plugins/magnolia_sidebar/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/magnolia_sidebar/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/magnolia_sidebar/lib/magnolia_aggregation.rb
  • Added rool/rails/typo/trunk/vendor/plugins/magnolia_sidebar/lib/magnolia_sidebar.rb
  • Added rool/rails/typo/trunk/vendor/plugins/magnolia_sidebar/test/magnolia_sidebar_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/magnolia_sidebar/views/content.rhtml
  • Added rool/rails/typo/trunk/vendor/plugins/recent_comments_sidebar/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/recent_comments_sidebar/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/recent_comments_sidebar/lib/recent_comments_sidebar.rb
  • Added rool/rails/typo/trunk/vendor/plugins/recent_comments_sidebar/test/recent_comments_sidebar_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/recent_comments_sidebar/views/content.rhtml
  • Added rool/rails/typo/trunk/vendor/plugins/static_sidebar/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/static_sidebar/lib/static_sidebar.rb
  • Added rool/rails/typo/trunk/vendor/plugins/static_sidebar/views/content.rhtml
  • Added rool/rails/typo/trunk/vendor/plugins/tada_sidebar/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/tada_sidebar/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/tada_sidebar/lib/tada.rb
  • Added rool/rails/typo/trunk/vendor/plugins/tada_sidebar/lib/tada_sidebar.rb
  • Added rool/rails/typo/trunk/vendor/plugins/tada_sidebar/test/tada_sidebar_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/tada_sidebar/views/content.rhtml
  • Added rool/rails/typo/trunk/vendor/plugins/tag_sidebar/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/tag_sidebar/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/tag_sidebar/lib/tag_sidebar.rb
  • Added rool/rails/typo/trunk/vendor/plugins/tag_sidebar/test/tag_sidebar_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/tag_sidebar/views/content.rhtml
  • Added rool/rails/typo/trunk/vendor/plugins/technorati_sidebar/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/technorati_sidebar/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/technorati_sidebar/lib/technorati.rb
  • Added rool/rails/typo/trunk/vendor/plugins/technorati_sidebar/lib/technorati_sidebar.rb
  • Added rool/rails/typo/trunk/vendor/plugins/technorati_sidebar/test/technorati_sidebar_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/technorati_sidebar/views/content.rhtml
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_amazon/README
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_amazon/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_amazon/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_amazon/install.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_amazon/lib/typo_textfilter_amazon.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_amazon/tasks/typo_textfilter_amazon_tasks.rake
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_amazon/test/typo_textfilter_amazon_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_code/README
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_code/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_code/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_code/install.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_code/lib/typo_textfilter_code.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_code/tasks/typo_textfilter_code_tasks.rake
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_code/test/typo_textfilter_code_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_flickr/README
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_flickr/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_flickr/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_flickr/install.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_flickr/lib/typo_textfilter_flickr.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_flickr/tasks/typo_textfilter_flickr_tasks.rake
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_flickr/test/typo_textfilter_flickr_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_htmlfilter/README
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_htmlfilter/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_htmlfilter/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_htmlfilter/install.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_htmlfilter/lib/typo_textfilter_htmlfilter.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_htmlfilter/tasks/typo_textfilter_htmlfilter_tasks.rake
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_htmlfilter/test/typo_textfilter_htmlfilter_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_lightbox/README
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_lightbox/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_lightbox/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_lightbox/install.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_lightbox/lib/typo_textfilter_lightbox.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_lightbox/tasks/typo_textfilter_lightbox_tasks.rake
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_lightbox/test/typo_textfilter_lightbox_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_markdown/README
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_markdown/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_markdown/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_markdown/install.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_markdown/lib/typo_textfilter_markdown.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_markdown/tasks/typo_textfilter_markdown_tasks.rake
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_markdown/test/typo_textfilter_markdown_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_none/README
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_none/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_none/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_none/install.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_none/lib/typo_textfilter_none.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_none/tasks/typo_textfilter_none_tasks.rake
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_none/test/typo_textfilter_none_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_smartypants/README
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_smartypants/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_smartypants/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_smartypants/install.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_smartypants/lib/typo_textfilter_smartypants.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_smartypants/tasks/typo_textfilter_smartypants_tasks.rake
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_smartypants/test/typo_textfilter_smartypants_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_sparkline/README
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_sparkline/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_sparkline/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_sparkline/install.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_sparkline/lib/typo_textfilter_sparkline.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_sparkline/tasks/typo_textfilter_sparkline_tasks.rake
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_sparkline/test/typo_textfilter_sparkline_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile/README
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile/install.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile/lib/typo_textfilter_textile.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile/tasks/typo_textfilter_textile_tasks.rake
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile/test/typo_textfilter_textile_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile_and_markdown/README
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile_and_markdown/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile_and_markdown/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile_and_markdown/install.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile_and_markdown/lib/typo_textfilter_textile_and_markdown.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile_and_markdown/tasks/typo_textfilter_textile_and_markdown_tasks.rake
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile_and_markdown/test/typo_textfilter_textile_and_markdown_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_tmcode/README
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_tmcode/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_tmcode/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_tmcode/install.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_tmcode/lib/typo_textfilter_tmcode.rb
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_tmcode/tasks/typo_textfilter_tmcode_tasks.rake
  • Added rool/rails/typo/trunk/vendor/plugins/typo_textfilter_tmcode/test/typo_textfilter_tmcode_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/upcoming_sidebar/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/upcoming_sidebar/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/upcoming_sidebar/lib/upcoming.rb
  • Added rool/rails/typo/trunk/vendor/plugins/upcoming_sidebar/lib/upcoming_sidebar.rb
  • Added rool/rails/typo/trunk/vendor/plugins/upcoming_sidebar/test/upcoming_sidebar_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/upcoming_sidebar/views/content.rhtml
  • Added rool/rails/typo/trunk/vendor/plugins/xbox_sidebar/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/xbox_sidebar/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/xbox_sidebar/lib/xbox_sidebar.rb
  • Added rool/rails/typo/trunk/vendor/plugins/xbox_sidebar/test/xbox_sidebar_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/xbox_sidebar/views/content.rhtml
  • Added rool/rails/typo/trunk/vendor/plugins/xml_sidebar/Rakefile
  • Added rool/rails/typo/trunk/vendor/plugins/xml_sidebar/init.rb
  • Added rool/rails/typo/trunk/vendor/plugins/xml_sidebar/lib/xml_sidebar.rb
  • Added rool/rails/typo/trunk/vendor/plugins/xml_sidebar/test/xml_sidebar_test.rb
  • Added rool/rails/typo/trunk/vendor/plugins/xml_sidebar/views/content.rhtml
  • Updated rool/rails/typo/trunk/MAINTAINERS (diff)
  • Updated rool/rails/typo/trunk/README (diff)
  • Updated rool/rails/typo/trunk/Rakefile (diff)
  • Updated rool/rails/typo/trunk/app/apis/blogger_service.rb (diff)
  • Updated rool/rails/typo/trunk/app/apis/meta_weblog_service.rb (diff)
  • Updated rool/rails/typo/trunk/app/apis/movable_type_service.rb (diff)
  • Updated rool/rails/typo/trunk/app/controllers/accounts_controller.rb (diff)
  • Updated rool/rails/typo/trunk/app/controllers/admin/blacklist_controller.rb (diff)
  • Updated rool/rails/typo/trunk/app/controllers/admin/cache_controller.rb (diff)
  • Updated rool/rails/typo/trunk/app/controllers/admin/comments_controller.rb (diff)
  • Updated rool/rails/typo/trunk/app/controllers/admin/content_controller.rb (diff)
  • Updated rool/rails/typo/trunk/app/controllers/admin/feedback_controller.rb (diff)
  • Updated rool/rails/typo/trunk/app/controllers/admin/general_controller.rb (diff)
  • Updated rool/rails/typo/trunk/app/controllers/admin/pages_controller.rb (diff)
  • Updated rool/rails/typo/trunk/app/controllers/admin/sidebar_controller.rb (diff)
  • Updated rool/rails/typo/trunk/app/controllers/admin/textfilters_controller.rb (diff)
  • Updated rool/rails/typo/trunk/app/controllers/admin/themes_controller.rb (diff)
  • Updated rool/rails/typo/trunk/app/controllers/admin/users_controller.rb (diff)
  • Updated rool/rails/typo/trunk/app/controllers/application.rb (diff)
  • Updated rool/rails/typo/trunk/app/controllers/articles_controller.rb (diff)
  • Updated rool/rails/typo/trunk/app/controllers/backend_controller.rb (diff)
  • Updated rool/rails/typo/trunk/app/controllers/content_controller.rb (diff)
  • Updated rool/rails/typo/trunk/app/controllers/live_controller.rb (diff)
  • Updated rool/rails/typo/trunk/app/controllers/redirect_controller.rb (diff)
  • Updated rool/rails/typo/trunk/app/controllers/textfilter_controller.rb (diff)
  • Updated rool/rails/typo/trunk/app/controllers/theme_controller.rb (diff)
  • Updated rool/rails/typo/trunk/app/controllers/xml_controller.rb (diff)
  • Updated rool/rails/typo/trunk/app/helpers/admin/base_helper.rb (diff)
  • Updated rool/rails/typo/trunk/app/helpers/admin/content_helper.rb (diff)
  • Updated rool/rails/typo/trunk/app/helpers/admin/feedback_helper.rb (diff)
  • Updated rool/rails/typo/trunk/app/helpers/admin/pages_helper.rb (diff)
  • Updated rool/rails/typo/trunk/app/helpers/application_helper.rb (diff)
  • Updated rool/rails/typo/trunk/app/helpers/articles_helper.rb (diff)
  • Updated rool/rails/typo/trunk/app/helpers/mail_helper.rb (diff)
  • Updated rool/rails/typo/trunk/app/helpers/sidebar_helper.rb (diff)
  • Updated rool/rails/typo/trunk/app/helpers/xml_helper.rb (diff)
  • Updated rool/rails/typo/trunk/app/models/article.rb (diff)
  • Updated rool/rails/typo/trunk/app/models/blog.rb (diff)
  • Updated rool/rails/typo/trunk/app/models/blog_sweeper.rb (diff)
  • Updated rool/rails/typo/trunk/app/models/category.rb (diff)
  • Updated rool/rails/typo/trunk/app/models/comment.rb (diff)
  • Updated rool/rails/typo/trunk/app/models/content.rb (diff)
  • Updated rool/rails/typo/trunk/app/models/content_state/base.rb (diff)
  • Updated rool/rails/typo/trunk/app/models/content_state/draft.rb (diff)
  • Updated rool/rails/typo/trunk/app/models/content_state/factory.rb (diff)
  • Updated rool/rails/typo/trunk/app/models/content_state/just_published.rb (diff)
  • Updated rool/rails/typo/trunk/app/models/content_state/new.rb (diff)
  • Updated rool/rails/typo/trunk/app/models/content_state/publication_pending.rb (diff)
  • Updated rool/rails/typo/trunk/app/models/content_state/published.rb (diff)
  • Updated rool/rails/typo/trunk/app/models/email_notifier.rb (diff)
  • Updated rool/rails/typo/trunk/app/models/notification_mailer.rb (diff)
  • Updated rool/rails/typo/trunk/app/models/page.rb (diff)
  • Updated rool/rails/typo/trunk/app/models/ping.rb (diff)
  • Updated rool/rails/typo/trunk/app/models/sidebar.rb (diff)
  • Updated rool/rails/typo/trunk/app/models/tag.rb (diff)
  • Updated rool/rails/typo/trunk/app/models/text_filter.rb (diff)
  • Updated rool/rails/typo/trunk/app/models/theme.rb (diff)
  • Updated rool/rails/typo/trunk/app/models/trackback.rb (diff)
  • Updated rool/rails/typo/trunk/app/models/user.rb (diff)
  • Updated rool/rails/typo/trunk/app/views/accounts/login.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/accounts/logout.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/accounts/signup.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/base/_recent_comments.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/base/_recent_trackbacks.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/blacklist/_blacklist_patterns.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/blacklist/_form.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/blacklist/_quick_post.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/blacklist/destroy.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/blacklist/edit.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/blacklist/list.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/cache/list.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/categories/_categories.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/categories/_form.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/categories/_quick_post.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/categories/destroy.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/categories/edit.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/categories/list.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/categories/reorder.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/categories/show.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/comments/_form.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/comments/comments.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/comments/destroy.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/comments/edit.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/comments/list.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/comments/new.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/comments/show.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/content/_articles.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/content/_attachment.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/content/_form.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/content/_pages.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/content/_quick_post.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/content/_show_categories.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/content/_show_resources.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/content/destroy.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/content/edit.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/content/list.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/content/new.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/content/preview.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/content/show.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/feedback/_item.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/feedback/list.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/general/index.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/general/update_database.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/pages/_form.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/pages/_pages.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/pages/_quick_post.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/pages/destroy.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/pages/edit.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/pages/list.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/pages/new.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/pages/preview.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/pages/show.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/resources/_itunes_category_edit.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/resources/_metadata_add.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/resources/_metadata_edit.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/resources/_mime_edit.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/resources/_pages.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/resources/_resources.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/resources/destroy.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/resources/list.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/resources/new.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/sidebar/_active.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/sidebar/_availables.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/sidebar/_publish.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/sidebar/_target.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/sidebar/index.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/textfilters/_form.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/textfilters/_macros.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/textfilters/_textfilters.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/textfilters/destroy.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/textfilters/edit.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/textfilters/list.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/textfilters/macro_help.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/textfilters/new.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/textfilters/show.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/textfilters/show_help.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/themes/index.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/trackbacks/_form.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/trackbacks/destroy.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/trackbacks/edit.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/trackbacks/list.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/trackbacks/new.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/trackbacks/show.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/users/_form.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/users/_user.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/users/destroy.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/users/edit.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/users/list.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/users/new.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/admin/users/show.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/articles/_article.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/articles/_comment.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/articles/_comment_box.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/articles/_trackback.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/articles/archives.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/articles/comment_preview.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/articles/groupings.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/articles/index.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/articles/read.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/articles/view_page.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/layouts/administration.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/live/search.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/notification_mailer/_mail_footer.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/notification_mailer/article.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/notification_mailer/comment.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/settings/done.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/settings/install.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/shared/_search.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/sidebar/_sidebar.rhtml (diff)
  • Updated rool/rails/typo/trunk/app/views/xml/_atom10_item_article.rxml (diff)
  • Updated rool/rails/typo/trunk/app/views/xml/_atom10_item_comment.rxml (diff)
  • Updated rool/rails/typo/trunk/app/views/xml/_atom10_item_trackback.rxml (diff)
  • Updated rool/rails/typo/trunk/app/views/xml/_googlesitemap_item_article.rxml (diff)
  • Updated rool/rails/typo/trunk/app/views/xml/_googlesitemap_item_category.rxml (diff)
  • Updated rool/rails/typo/trunk/app/views/xml/_googlesitemap_item_page.rxml (diff)
  • Updated rool/rails/typo/trunk/app/views/xml/_googlesitemap_item_tag.rxml (diff)
  • Updated rool/rails/typo/trunk/app/views/xml/_itunes_item_resource.rxml (diff)
  • Updated rool/rails/typo/trunk/app/views/xml/_rss20_item_article.rxml (diff)
  • Updated rool/rails/typo/trunk/app/views/xml/_rss20_item_comment.rxml (diff)
  • Updated rool/rails/typo/trunk/app/views/xml/atom10_feed.rxml (diff)
  • Updated rool/rails/typo/trunk/app/views/xml/itunes_feed.rxml (diff)
  • Updated rool/rails/typo/trunk/app/views/xml/rsd.rxml (diff)
  • Updated rool/rails/typo/trunk/app/views/xml/rss20_feed.rxml (diff)
  • Updated rool/rails/typo/trunk/bin/typo (diff)
  • Updated rool/rails/typo/trunk/config/boot.rb (diff)
  • Updated rool/rails/typo/trunk/config/environment.rb (diff)
  • Updated rool/rails/typo/trunk/config/environments/production.rb (diff)
  • Updated rool/rails/typo/trunk/config/environments/test.rb (diff)
  • Updated rool/rails/typo/trunk/config/routes.rb (diff)
  • Updated rool/rails/typo/trunk/db/migrate/046_fixup_forthcoming_publications.rb (diff)
  • Updated rool/rails/typo/trunk/db/schema.mysql.sql (diff)
  • Updated rool/rails/typo/trunk/db/schema.postgresql.sql (diff)
  • Updated rool/rails/typo/trunk/db/schema.rb (diff)
  • Updated rool/rails/typo/trunk/db/schema.sqlite.sql (diff)
  • Updated rool/rails/typo/trunk/db/schema.sqlserver.sql (diff)
  • Updated rool/rails/typo/trunk/db/schema_version (diff)
  • Updated rool/rails/typo/trunk/doc/Installer.txt (diff)
  • Updated rool/rails/typo/trunk/lib/email_notify.rb (diff)
  • Updated rool/rails/typo/trunk/lib/generators/sidebar/sidebar_generator.rb (diff)
  • Updated rool/rails/typo/trunk/lib/jabber_notify.rb (diff)
  • Updated rool/rails/typo/trunk/lib/rails_patch/active_record.rb (diff)
  • Updated rool/rails/typo/trunk/lib/sidebars/component_plugin.rb (diff)
  • Updated rool/rails/typo/trunk/lib/sidebars/plugin.rb (diff)
  • Updated rool/rails/typo/trunk/lib/spam_protection.rb (diff)
  • Updated rool/rails/typo/trunk/lib/tasks/release.rake (diff)
  • Updated rool/rails/typo/trunk/lib/text_filter_plugin.rb (diff)
  • Updated rool/rails/typo/trunk/lib/typo_version.rb (diff)
  • Updated rool/rails/typo/trunk/public/500.html (diff)
  • Updated rool/rails/typo/trunk/public/dispatch.rb (diff)
  • Updated rool/rails/typo/trunk/public/images/delete.png
  • Updated rool/rails/typo/trunk/public/javascripts/controls.js (diff)
  • Updated rool/rails/typo/trunk/public/javascripts/dragdrop.js (diff)
  • Updated rool/rails/typo/trunk/public/javascripts/effects.js (diff)
  • Updated rool/rails/typo/trunk/public/javascripts/prototype.js (diff)
  • Updated rool/rails/typo/trunk/public/javascripts/typo.js (diff)
  • Updated rool/rails/typo/trunk/public/stylesheets/administration.css (diff)
  • Updated rool/rails/typo/trunk/test/fixtures/blogs.yml (diff)
  • Updated rool/rails/typo/trunk/test/fixtures/contents.yml (diff)
  • Updated rool/rails/typo/trunk/test/fixtures/sidebars.yml (diff)
  • Updated rool/rails/typo/trunk/test/functional/accounts_controller_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/functional/admin/article_preview_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/functional/admin/blacklist_controller_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/functional/admin/categories_controller_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/functional/admin/comments_controller_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/functional/admin/content_controller_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/functional/admin/feedback_controller_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/functional/admin/general_controller_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/functional/admin/pages_controller_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/functional/admin/resources_controller_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/functional/admin/textfilters_controller_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/functional/admin/themes_controller_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/functional/admin/trackbacks_controller_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/functional/admin/users_controller_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/functional/articles_controller_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/functional/backend_controller_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/functional/redirect_controller_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/functional/textfilter_controller_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/functional/theme_controller_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/functional/xml_controller_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/mocks/test/xmlrpc_mock.rb (diff)
  • Updated rool/rails/typo/trunk/test/mocks/themes/azure/layouts/default.rhtml (diff)
  • Updated rool/rails/typo/trunk/test/test_helper.rb (diff)
  • Updated rool/rails/typo/trunk/test/unit/article_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/unit/blog_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/unit/category_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/unit/comment_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/unit/content_state/factory_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/unit/magnolia_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/unit/page_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/unit/ping_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/unit/sidebar_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/unit/tag_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/unit/text_filter_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/unit/theme_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/unit/trackback_test.rb (diff)
  • Updated rool/rails/typo/trunk/test/unit/user_test.rb (diff)
  • Updated rool/rails/typo/trunk/themes/azure/layouts/default.rhtml (diff)
  • Updated rool/rails/typo/trunk/themes/risc_os_open/layouts/default.rhtml (diff)
  • Updated rool/rails/typo/trunk/themes/scribbish/layouts/default.rhtml (diff)
  • Updated rool/rails/typo/trunk/themes/scribbish/stylesheets/content.css (diff)
  • Updated rool/rails/typo/trunk/themes/scribbish/views/articles/_article.rhtml (diff)
  • Updated rool/rails/typo/trunk/themes/scribbish/views/articles/_comment.rhtml (diff)
  • Updated rool/rails/typo/trunk/themes/scribbish/views/articles/_comment_form.rhtml (diff)
  • Updated rool/rails/typo/trunk/themes/scribbish/views/articles/_search.rhtml (diff)
  • Updated rool/rails/typo/trunk/themes/scribbish/views/articles/comment_preview.rhtml (diff)
  • Updated rool/rails/typo/trunk/themes/scribbish/views/articles/index.rhtml (diff)
  • Updated rool/rails/typo/trunk/themes/scribbish/views/articles/read.rhtml (diff)
  • Updated rool/rails/typo/trunk/vendor/akismet/akismet.rb (diff)
  • Updated rool/rails/typo/trunk/vendor/flickr/flickr.rb (diff)
  • Updated rool/rails/typo/trunk/vendor/plugins/expiring_action_cache/lib/actionparamcache.rb (diff)

rool/rails/typo/trunk/MAINTAINERS:

prev.current 
blog: http://kevin.sb.org
irc: Eridius
24   Patrick Lenz <patrick@lenz.sh>
25   blog: http://poocs.net/
26   irc: scoop
27  
28   Seth Hall <seth@remor.com>
29   blog: http://blog.remor.com/
30   irc: sethh
  24 Frédéric de Villamil <frederic@de-villamil.com>
  25 blog: http://fredericdevillamil.com
  26 irc: neuro`

rool/rails/typo/trunk/README:

prev.current 
Currently you need all of those things to get typo to run:
* Ruby 1.8.4 or higher
16   * Rails 1.1.x
  16 * Rails 1.2.x
* A database. Typo supports MySQL, PostgreSQL, and SQLite.
* Ruby drivers for your database.
* For best performance, you should have a web server running either

rool/rails/typo/trunk/Rakefile:

prev.current 
require 'rake/testtask'
require 'rake/rdoctask'
10   require 'tasks/rails'
  11 require 'tasks/rails'

rool/rails/typo/trunk/app/apis/blogger_service.rb:

prev.current 
:lastname => "",
:nickname => username,
:email => "",
58   :url => controller.url_for(:controller => "/")
  58 :url => this_blog.base_url
)
end
def getUsersBlogs(appkey, username, password)
[BloggerStructs::Blog.new(
64   :url => controller.url_for(:controller => "/"),
65   :blogid => 1,
  64 :url => this_blog.base_url,
  65 :blogid => this_blog.id,
:blogName => this_blog.blog_name
)]
end

rool/rails/typo/trunk/app/apis/meta_weblog_service.rb:

prev.current 
resource = Resource.create(:filename => data['name'], :mime => data['type'], :created_at => Time.now)
resource.write_to_disk(data['bits'])
152   MetaWeblogStructs::Url.new("url" => controller.url_for(:controller => "/files/#{resource.filename}"))
  152 MetaWeblogStructs::Url.new("url" => this_blog.file_url(resource.filename))
end
def article_dto_from(article)
... ...
:description => article.body,
:title => article.title,
:postid => article.id.to_s,
160   :url => article_url(article).to_s,
161   :link => article_url(article).to_s,
162   :permaLink => article_url(article).to_s,
  160 :url => article.permalink_url(only_path=false),
  161 :link => article.permalink_url(only_path=false),
  162 :permaLink => article.permalink_url(only_path=false),
:categories => article.categories.collect { |c| c.name },
:mt_text_more => article.extended.to_s,
:mt_excerpt => article.excerpt.to_s,
... ...
protected
177   def article_url(article)
178   begin
179   controller.url_for :controller=>"articles", :action =>"permalink",
180   :year => article.published_at.year, :month => sprintf("%.2d", article.published_at.month),
181   :day => sprintf("%.2d", article.published_at.day), :title => article.stripped_title
182   rescue
183   created = article.published_at
184   sprintf("/articles/%.4d/%.2d/%.2d/#{article.stripped_title}", created.year, created.month, created.day)
185   # FIXME: rescue is needed for functional tests as the test framework currently doesn't supply fully
186   # fledged controller instances (yet?)
187   end
188   end
189  
190   def server_url
191   controller.url_for(:only_path => false, :controller => "/")
192   end
193  
def pub_date(time)
time.strftime "%a, %e %b %Y %H:%M:%S %Z"
end

rool/rails/typo/trunk/app/apis/movable_type_service.rb:

prev.current 
end
def getCategoryList(blogid, username, password)
87   Category.find_all.collect do |c|
  87 Category.find(:all).collect do |c|
MovableTypeStructs::CategoryList.new(
:categoryId => c.id,
:categoryName => c.name
... ...
end
def getPostCategories(postid, username, password)
96   this_blog.articles.find(postid).categories.collect do |c|
  96 this_blog.articles.find(postid).categorizations.collect do |c|
MovableTypeStructs::CategoryPerPost.new(
98   :categoryName => c.name,
99   :categoryId => c.id.to_i,
  98 :categoryName => c.category.name,
  99 :categoryId => c.category_id.to_i,
:isPrimary => c.is_primary.to_i
)
end
... ...
for c in categories
category = Category.find(c['categoryId'])
111   article.categories.push_with_attributes(category, :is_primary => c['isPrimary'])
  111 article.categories.push_with_attributes(category, :is_primary => c['isPrimary'] || 0)
end
article.save
end

rool/rails/typo/trunk/app/controllers/accounts_controller.rb:

prev.current 
end
def signup
22   redirect_to :action => "login" and return unless User.count.zero?
  22 unless User.count.zero?
  23 redirect_to :action => 'login'
  24 return
  25 end
@user = User.new(params[:user])

rool/rails/typo/trunk/app/controllers/admin/blacklist_controller.rb:

prev.current 
end
def list
8   @blacklist_patterns = BlacklistPattern.find_all
  8 @blacklist_patterns = BlacklistPattern.find :all
end
def show

rool/rails/typo/trunk/app/controllers/admin/cache_controller.rb:

prev.current 
expire_fragment(/.*/)
flash[:notice] = 'Cache was cleared'
17   redirect_to :controller => 'general'
  17 redirect_to :controller => '/admin/general'
end
def sweep_html
21   Article.transaction do
22   Article.update_all 'body_html = null'
23   Comment.update_all 'body_html = null'
24   Page.update_all 'body_html = null'
25   end
  21 expire_fragment(/^contents_html.*/)
flash[:notice] = 'HTML was cleared'
28   redirect_to :controller => 'general'
  24 redirect_to :controller => '/admin/general'
end
end

rool/rails/typo/trunk/app/controllers/admin/comments_controller.rb:

prev.current 
if request.post? and @comment.save
# We should probably wave a spam filter over this, but for now, just mark it as published.
23   @comment.published = true
  23 @comment.mark_as_ham!
flash[:notice] = 'Comment was successfully created.'
redirect_to :action => 'show', :id => @comment.id
end

rool/rails/typo/trunk/app/controllers/admin/content_controller.rb:

prev.current 
  1 require 'base64'
  2
class Admin::ContentController < Admin::BaseController
def index
list
... ...
end
def list
8   @articles_pages, @articles = with_blog_scoped_classes do
9   paginate(:article, :per_page => 15, :order_by => "created_at DESC",
10   :parameter => 'id')
11   end
  10 now = Time.now
  11 count = this_blog.articles.count
  12 @articles_pages = Paginator.new(self, count, 15, params[:id])
  13 @articles = this_blog.articles.find(:all, :limit => 15, :order => 'id DESC',
  14 :offset => @articles_pages.current.offset)
setup_categories
@article = this_blog.articles.build(params[:article])
end
def show
17   @article = Article.find(params[:id])
  20 @article = this_blog.articles.find(params[:id])
setup_categories
@resources = Resource.find(:all, :order => 'created_at DESC')
end
... ...
def edit; new_or_edit; end
def destroy
26   @article = Article.find(params[:id])
  29 @article = this_blog.articles.find(params[:id])
if request.post?
@article.destroy
redirect_to :action => 'list'
... ...
end
def category_add; do_add_or_remove_fu; end
34   alias_method :category_remove, :category_add
alias_method :resource_add, :category_add
alias_method :resource_remove, :category_add
  40 def category_remove
  41 @article = this_blog.articles.find(params[:id])
  42 @category = @article.categories.find(params['category_id'])
  43 setup_categories
  44 @article.categorizations.delete(@article.categorizations.find_by_category_id(params['category_id']))
  45 @article.save
  46 render :partial => 'show_categories'
  47 end
  48
def preview
39   @headers["Content-Type"] = "text/html; charset=utf-8"
40   @article = Article.new(params[:article])
41   render :layout => false
  50 headers["Content-Type"] = "text/html; charset=utf-8"
  51 @article = this_blog.articles.build
  52 @article.attributes = params[:article]
  53 set_article_author
  54 data = render_to_string(:layout => "minimal")
  55 data = Base64.encode64(data).gsub("\n", '')
  56 data = "data:text/html;charset=utf-8;base64,#{data}"
  57 render :text => data
end
def attachment_box_add
45   render :partial => 'admin/content/attachment', :locals => { :attachment_num => params[:id] }
  61 render :update do |page|
  62 page["attachment_add_#{params[:id]}"].remove
  63 page.insert_html :bottom, 'attachments',
  64 :partial => 'admin/content/attachment',
  65 :locals => { :attachment_num => params[:id], :hidden => true }
  66 page.visual_effect(:toggle_appear, "attachment_#{params[:id]}")
  67 end
end
48   def attachment_box_remove
49   render :inline => "<%= javascript_tag 'document.getElementById(\"attachments\").removeChild(document.getElementById(\"attachment_#{params[:id]}\")); return false;' -%>"
50   end
51  
def attachment_save(attachment)
begin
Resource.create(:filename => attachment.original_filename,
... ...
def do_add_or_remove_fu
attrib, action = params[:action].split('_')
68   @article = Article.find(params[:id])
  86 @article = this_blog.articles.find(params[:id])
self.send("#{attrib}=", self.class.const_get(attrib.classify).find(params["#{attrib}_id"]))
send("setup_#{attrib.pluralize}")
@article.send(attrib.pluralize).send(real_action_for(action), send(attrib))
... ...
def new_or_edit
get_or_build_article
params[:article] ||= {}
81   # params[:article].reverse_merge!('allow_comments' => this_blog.default_allow_comments,
82   # 'allow_pings' => this_blog.default_allow_pings,
83   # 'published' => true)
84   @article.attributes = (params[:article])
  99
  100 @article.attributes = params[:article]
setup_categories
@selected = @article.categories.collect { |c| c.id }
if request.post?
... ...
end
def set_article_categories
124   @article.categories.clear
125   @article.categories = Category.find(params[:categories]) if params[:categories]
  140 @article.categorizations.clear
  141 if params[:categories]
  142 Category.find(params[:categories]).each do |cat|
  143 @article.categories << cat
  144 end
  145 end
@selected = params[:categories] || []
end
def get_or_build_article
@article = case params[:action]
when 'new'
132   art = this_blog.articles.build
133   art.allow_comments = this_blog.default_allow_comments
134   art.allow_pings = this_blog.default_allow_pings
135   art.published = true
136   art
  152 returning(this_blog.articles.build) do |art|
  153 art.allow_comments = this_blog.default_allow_comments
  154 art.allow_pings = this_blog.default_allow_pings
  155 art.published = true
  156 end
when 'edit'
this_blog.articles.find(params[:id])
else

rool/rails/typo/trunk/app/controllers/admin/feedback_controller.rb:

prev.current 
  1 require 'comment'
  2 require 'trackback'
  3
class Admin::FeedbackController < Admin::BaseController
  5
def index
3   conditions = ["(contents.type = 'Comment' or contents.type = 'Trackback')"]
  7 conditions = ['blog_id = :blog_id', {:blog_id => Blog.default.id}]
if params[:search]
6   search_sql = "%#{params[:search]}%"
7   conditions.first << ' and (url like ? or author like ? or title like ? or ip like ? or email like ?)'
8   5.times { conditions.push search_sql }
  10 conditions.first << ' and (url like :pattern or author like :pattern or title like :pattern or ip like :pattern or email like :pattern)'
  11 conditions.last.merge!(:pattern => "%#{params[:search]}%")
end
if params[:published] == 'f'
12   conditions.first << ' and (published = ?)'
13   conditions.push false
  15 conditions.first << ' and (published = :published)'
  16 conditions.last.merge!(:published => false)
end
16   @pages, @feedback = paginate(:contents,
17   :order => 'contents.created_at desc',
  19 if params[:confirmed] == 'f'
  20 conditions.first << ' AND (status_confirmed = :status_confirmed)'
  21 conditions.last.merge!(:status_confirmed => false)
  22 end
  23
  24 @pages, @feedback = paginate(:feedback,
  25 :order => 'feedback.created_at desc',
:conditions => conditions,
:per_page => 40)
20  
  28
render_action 'list'
end
23  
  31
def delete
if request.post?
26   feedback = Content.find(params[:id])
27   if feedback.kind_of? Comment or feedback.kind_of? Trackback
28   feedback.destroy
  34 begin
  35 Feedback.destroy(params[:id])
flash[:notice] = "Deleted"
30   else
  37 rescue ActiveRecord::RecordNotFound
flash[:notice] = "Not found"
end
end
redirect_to :action => 'index', :page => params[:page], :search => params[:search]
end
36  
  43
def bulkops
38   STDERR.puts "Bulkops: #{params.inspect}"
39  
ids = (params[:feedback_check]||{}).keys.map(&:to_i)
41  
  46
case params[:commit]
when 'Delete Checked Items'
count = 0
ids.each do |id|
46   count += Content.delete(id)
  51 count += Feedback.delete(id) ## XXX Should this be #destroy?
end
flash[:notice] = "Deleted #{count} item(s)"
49   when 'Publish Checked Items'
  54
  55 # Sweep cache
  56 PageCache.sweep_all
  57 expire_fragment(/.*/)
  58 when 'Mark Checked Items as Ham'
ids.each do |id|
51   feedback = Content.find(id)
52   feedback.attributes[:published] = true
53   feedback.set_spam(false)
54   feedback.save
  60 feedback = Feedback.find(id)
  61 feedback.mark_as_ham!
end
56   flash[:notice]= "Published #{ids.size} item(s)"
57   when 'Unpublish Checked Items'
  63 flash[:notice]= "Marked #{ids.size} item(s) as Ham"
  64 when 'Mark Checked Items as Spam'
ids.each do |id|
59   feedback = Content.find(id)
60   feedback.withdraw!
61   feedback.set_spam(true)
62   feedback.save
  66 feedback = Feedback.find(id)
  67 feedback.mark_as_spam!
end
64   flash[:notice]= "Unpublished #{ids.size} item(s)"
  69 flash[:notice]= "Marked #{ids.size} item(s) as Spam"
  70 when 'Confirm Classification of Checked Items'
  71 ids.each do |id|
  72 Feedback.find(id).confirm_classification!
  73 end
  74 flash[:notice] = "Confirmed classification of #{ids.size} item(s)"
else
flash[:notice] = "Not implemented"
end

rool/rails/typo/trunk/app/controllers/admin/general_controller.rb:

prev.current 
class Admin::GeneralController < Admin::BaseController
def index
3   if this_blog.canonical_server_url.blank?
4   this_blog.canonical_server_url = server_url
  3 if this_blog.base_url.blank?
  4 this_blog.base_url = blog_base_url
end
@page_cache_size = PageCache.count
end
... ...
def update
if request.post?
Blog.transaction do
33   params[:setting].each { |k,v| this_blog[k] = v}
  33 params[:setting].each { |k,v| this_blog.send("#{k.to_s}=", v) }
this_blog.save
flash[:notice] = 'config updated.'
end

rool/rails/typo/trunk/app/controllers/admin/pages_controller.rb:

prev.current 
  1 require 'base64'
  2
class Admin::PagesController < Admin::BaseController
def index
list
... ...
end
def preview
45   @headers["Content-Type"] = "text/html; charset=utf-8"
  47 headers["Content-Type"] = "text/html; charset=utf-8"
@page = this_blog.pages.build(params[:page])
47   render :layout => false
  49 data = render_to_string(:layout => "minimal")
  50 data = Base64.encode64(data).gsub("\n", '')
  51 data = "data:text/html;charset=utf-8;base64,#{data}"
  52 render :text => data
end
49  
end

rool/rails/typo/trunk/app/controllers/admin/sidebar_controller.rb:

prev.current 
class Admin::SidebarController < Admin::BaseController
def index
3   @sidebars = ::SidebarController.available_sidebars.inject({}) do |hash,sb|
4   hash.merge({ sb.short_name => sb })
5   end
  3 @available = available
# Reset the staged position based on the active position.
7   Sidebar.delete_all('active_position is null')
8   @active = Sidebar.find(:all, :order => 'active_position').select do |sb|
9   @sidebars[sb.controller]
10   end
  5 Sidebar.delete_all(['blog_id = ? and active_position is null',
  6 this_blog.id])
  7 @active = this_blog.sidebars
flash[:sidebars] = @active.map {|sb| sb.id }
12   @available = @sidebars.values.sort { |a,b| a.name <=> b.name }
end
def set_active
# Get all available plugins
18   defaults_for = available.inject({}) do |hash, item|
19   hash.merge({ item.short_name => item.default_config })
  14 klass_for = available.inject({}) do |hash, klass|
  15 hash.merge({ klass.short_name => klass })
end
# Get all already active plugins
activemap = flash[:sidebars].inject({}) do |h, sb_id|
sb = Sidebar.find(sb_id.to_i)
24   sb ? h.merge({ sb.html_id => sb_id }) : h
  20 sb ? h.merge(sb.html_id => sb_id) : h
end
# Figure out which plugins are referenced by the params[:active] array and
# lay them out in a easy accessible sequential array
flash[:sidebars] = params[:active].inject([]) do |array, name|
30   if defaults_for.has_key?(name)
31   @new_item = Sidebar.create!(:controller => name,
32   :config => defaults_for[name])
  26 if klass_for.has_key?(name)
  27 @new_item = klass_for[name].create!(:blog => this_blog)
@target = name
array << @new_item.id
elsif activemap.has_key?(name)
... ...
def publish
Sidebar.transaction do
position = 0
53   params[:configure] ||= []
54   Sidebar.update_all('active_position = null')
  48 params[:configure] ||= { }
  49 this_blog.sidebars.update_all('active_position = null')
flash[:sidebars].each do |id|
56   Sidebar.find(id).update_attributes(:config => params[:configure][id.to_s],
57   :active_position => position)
  51 sidebar = Sidebar.find(id)
  52 sb_attribs = params[:configure][id.to_s] || {}
  53 # If it's a checkbox and unchecked, convert the 0 to false
  54 # This is ugly. Anyone have an improvement?
  55 sidebar.fields.each do |field|
  56 sb_attribs[field.key] = field.canonicalize(sb_attribs[field.key])
  57 end
  58
  59 sidebar.update_attributes(:config => sb_attribs,
  60 :active_position => position)
position += 1
end
60   Sidebar.delete_all('active_position is null')
  63 Sidebar.delete_all(['blog_id = ? and active_position is null',
  64 this_blog.id])
end
index
end
... ...
end
def available
71   ::SidebarController.available_sidebars.sort { |a,b| a.name <=> b.name }
  75 ::Sidebar.available_sidebars
end
helper_method :available
end

rool/rails/typo/trunk/app/controllers/admin/textfilters_controller.rb:

prev.current 
end
def preview
75   @headers["Content-Type"] = "text/html; charset=utf-8"
  75 headers["Content-Type"] = "text/html; charset=utf-8"
@textfilter = params[:textfilter]
render :layout => false
end
... ...
@filterparams = Hash.new
@filterdescriptions = Hash.new
@filterhelp = Hash.new
  93 @filteroptions = Hash.new
(types['macropre']+types['macropost']+types['postprocess']).each do |f|
f.default_config.each do |key,value|
@filterparams[key] = value[:default]
@filterdescriptions[key] = value[:description]
@filterhelp[key] = value[:help]
  100 @filteroptions[key] = value[:options]
end
end

rool/rails/typo/trunk/app/controllers/admin/themes_controller.rb:

prev.current 
def index
@themes = Theme.find_all
@themes.each do |theme|
6   theme.description_html = TextFilter.filter_text(theme.description, self, nil, [:markdown,:smartypants])
  6 theme.description_html = TextFilter.filter_text(this_blog, theme.description, nil, [:markdown,:smartypants])
end
@active = this_blog.current_theme
end

rool/rails/typo/trunk/app/controllers/admin/users_controller.rb:

prev.current 
end
def list
9   @users = User.find_all
  9 @users = User.find :all
end
def show
13   @user = User.find(params[:id])
  13 @user = User.find(params[:id], :include => [ :articles ])
  14 @articles = @user.articles
end
def new

rool/rails/typo/trunk/app/controllers/application.rb:

prev.current 
# Standard Typo gubbins follows, including its own admin login system.
include LoginSystem
  15 before_filter :reset_local_cache, :fire_triggers
  16 after_filter :reset_local_cache
16   before_filter :get_the_blog_object
17   before_filter :fire_triggers
18   after_filter :flush_the_blog_object
  18 # Extra filter to prime URL writing so that it doesn't make invalid
  19 # assumptions about protocol or port
20   around_filter Blog
  21 before_filter :prime_url_writer
protected
  25 def prime_url_writer
  26 $url_writer_request_information = request;
  27 end
  28
def fire_triggers
Trigger.fire
end
28   def with_blog_scoped_classes(klasses=[Content, Article, Comment, Page, Trackback], &block)
29   default_id = this_blog.id
30   scope_hash = { :find => { :conditions => "blog_id = #{default_id}"},
31   :create => { :blog_id => default_id } }
32   klasses.inject(block) do |blk, klass|
33   lambda { klass.with_scope(scope_hash, &blk) }
34   end.call
  33 def reset_local_cache
  34 CachedModel.cache_reset
  35 session[:user].reload if session[:user]
end
37   def article_url(article, only_path = true, anchor = nil)
38   article.location(anchor, only_path)
39   end
40  
  38 # Axe?
def server_url
42   this_blog.server_url
  40 this_blog.base_url
end
def cache
$cache ||= SimpleCache.new 1.hour
end
49   def get_the_blog_object
50   @blog = Blog.default || Blog.create!
51   true
52   end
  47 @@blog_id_for = Hash.new
54   def flush_the_blog_object
55   @blog = nil
56   true
57   end
58  
  49 # The Blog object for the blog that matches the current request. This is looked
  50 # up using Blog.find_blog and cached for the lifetime of the controller instance;
  51 # generally one request.
def this_blog
60   @blog || Blog.default || Blog.new
  53 @blog ||= if @@blog_id_for[blog_base_url]
  54 Blog.find(@@blog_id_for[blog_base_url])
  55 else
  56 returning(Blog.find_blog(blog_base_url)) do |blog|
  57 @@blog_id_for[blog_base_url] = blog.id
  58 end
  59 end
end
helper_method :this_blog
  63 # The base URL for this request, calculated by looking up the URL for the main
  64 # blog index page. This is matched with Blog#base_url to determine which Blog
  65 # is supposed to handle this URL
  66 def blog_base_url
  67 url_for(:controller => '/articles').gsub(%r{/$},'')
  68 end
  69
def self.include_protected(*modules)
modules.reverse.each do |mod|
included_methods = mod.public_instance_methods.reject do |meth|

rool/rails/typo/trunk/app/controllers/articles_controller.rb:

prev.current 
class ArticlesController < ContentController
2  
3   # We might expect to have to do the stuff below, but because the only
4   # method protected presently is 'comment' and that works by AJAX it has
5   # to take a different approach. The commented out code is left here in
6   # case other methods become protected in future - saves having to dig
7   # out reference code from some other controller to use as a template.
8   #
9   # # Action permissions for this class as a class variable, exposed
10   # # to the public through a class method.
11   #
12   # @@hubssolib_permissions = HubSsoLib::Permissions.new({
13   # :comment => [ :admin, :webmaster, :privileged, :normal ]
14   # })
15   #
16   # def ArticlesController.hubssolib_permissions
17   # @@hubssolib_permissions
18   # end
19  
before_filter :verify_config
layout :theme_layout, :except => [:comment_preview, :trackback]
cache_sweeper :blog_sweeper
26   cached_pages = [:index, :category, :find_by_date, :archives, :view_page, :tag, :author]
  8 cached_pages = [:index, :read, :permalink, :category, :find_by_date, :archives, :view_page, :tag, :author]
# If you're really memory-constrained, then consider replacing
# caches_action_with_params with caches_page
caches_action_with_params *cached_pages
30   session :off, :only => cached_pages
  12 session :new_session => false
verify(:only => [:nuke_comment, :nuke_trackback],
:session => :user, :method => :post,
:render => { :text => 'Forbidden', :status => 403 })
  18 @@hubssolib_permissions = HubSsoLib::Permissions.new({
  19 :read_and_comment => [ :admin, :webmaster, :privileged, :normal ]
  20 })
  21
  22 def ArticlesController.hubssolib_permissions
  23 @@hubssolib_permissions
  24 end
  25
def index
# On Postgresql, paginate's default count is *SLOW*, because it does a join against
# all of the eager-loaded tables. I've seen it take up to 7 seconds on my test box.
#
# So, we're going to use the older Paginator class and manually provide a count.
# This is a 100x speedup on my box.
42   count = Article.count(:conditions => ['published = ? AND contents.published_at < ? AND blog_id = ?',
43   true, Time.now, this_blog.id])
44   @pages = Paginator.new self, count, this_blog.limit_article_display, @params[:page]
45   @articles = Article.find( :all,
46   :offset => @pages.current.offset,
47   :limit => @pages.items_per_page,
48   :order => "contents.published_at DESC",
49   :include => [:categories, :tags, :user, :blog],
50   :conditions =>
51   ['published = ? AND contents.published_at < ? AND blog_id = ?',
52   true, Time.now, this_blog.id]
53   )
  32 now = Time.now
  33 count = this_blog.articles.count(:conditions => ['published = ? AND contents.published_at < ?',
  34 true, now])
  35 @pages = Paginator.new self, count, this_blog.limit_article_display, params[:page]
  36 @articles = this_blog.published_articles.find( :all,
  37 :offset => @pages.current.offset,
  38 :limit => @pages.items_per_page,
  39 :conditions => ['contents.published_at < ?', now] )
end
def search
... ...
display_article { this_blog.published_articles.find(params[:id]) }
end
  66 def read_and_comment
  67 display_article(nil, 'read_and_comment') {
  68 this_blog.published_articles.find(params[:id])
  69 }
  70 end
  71
def permalink
display_article(this_blog.published_articles.find_by_permalink(*params.values_at(:year, :month, :day, :title)))
end
... ...
# Receive comments to articles
def comment
108   unless @request.xhr? || this_blog.sp_allow_non_ajax_comments
  100 unless request.xhr? || this_blog.sp_allow_non_ajax_comments
render_error("non-ajax commenting is disabled")
return
end
113   # The Hub filter would catch this action if we let it, but because
114   # it is fetched by an AJAX mechanism we end up with the login page
115   # embedded inside the parent :-) - so take steps to prevent this.
116  
unless hubssolib_logged_in?
render_error("You are not logged in; you cannot comment on articles")
return
... ...
if request.post?
begin
124   params[:comment].merge!({:ip => request.remote_ip,
125   :published => true })
@article = this_blog.published_articles.find(params[:id])
  113 params[:comment].merge!({:ip => request.remote_ip,
  114 :published => true,
  115 :user => session[:user],
  116 :user_agent => request.env['HTTP_USER_AGENT'],
  117 :referrer => request.env['HTTP_REFERER'],
  118 :permalink => @article.permalink_url})
@comment = @article.comments.build(params[:comment])
128   @comment.user = session[:user]
129  
130   spam_options = {
131   :user_agent => request.env['HTTP_USER_AGENT'],
132   :referrer => request.env['HTTP_REFERER'],
133   :permalink => this_blog.article_url(@article, false)}
134  
135   if @comment.is_spam? spam_options
136   STDERR.puts "Moderating comment as spam!"
137   @comment.withdraw
138   end
139  
  120 @comment.author ||= 'Anonymous'
@comment.save!
141  
  122 add_to_cookies(:typoapp_author, @comment.author)
add_to_cookies(:typoapp_url, @comment.url)
143   add_to_cookies(:typoapp_email, @comment.email)
set_headers
render :partial => "comment", :object => @comment
... ...
end
end
218   def display_article(article = nil)
  198 def display_article(article = nil, action = 'read')
begin
@article = block_given? ? yield : article
@comment = Comment.new
@page_title = @article.title
auto_discovery_feed :type => 'article', :id => @article.id
224   render :action => 'read'
  204 render :action => action
rescue ActiveRecord::RecordNotFound, NoMethodError => e
error("Post not found...")
end
... ...
end
def set_headers
237   @headers["Content-Type"] = "text/html; charset=utf-8"
  217 headers["Content-Type"] = "text/html; charset=utf-8"
end
def list_groupings(klass)
... ...
def render_grouping(klass)
return list_groupings(klass) unless params[:id]
249   @page_title = "#{this_blog.blog_name} - #{klass.to_s.underscore} #{params[:id]}"
  229 @page_title = "#{klass.to_s.underscore} #{params[:id]}"
@articles = klass.find_by_permalink(params[:id]).articles.find_already_published rescue []
auto_discovery_feed :type => klass.to_s.underscore, :id => params[:id]
render_paginated_index("Can't find posts with #{klass.to_prefix} '#{h(params[:id])}'")
... ...
def render_paginated_index(on_empty = "No posts found...")
return error(on_empty) if @articles.empty?
258   @pages = Paginator.new self, @articles.size, this_blog.limit_article_display, @params[:page]
  238 @pages = Paginator.new self, @articles.size, this_blog.limit_article_display, params[:page]
start = @pages.current.offset
stop = (@pages.current.next.offset - 1) rescue @articles.size
# Why won't this work? @articles.slice!(start..stop)

rool/rails/typo/trunk/app/controllers/backend_controller.rb:

prev.current 
session :off
web_service_dispatching_mode :layered
  6 web_service_exception_reporting false
  7
web_service(:metaWeblog) { MetaWeblogService.new(self) }
web_service(:mt) { MovableTypeService.new(self) }
web_service(:blogger) { BloggerService.new(self) }

rool/rails/typo/trunk/app/controllers/content_controller.rb:

prev.current 
end
include LoginSystem
22   model :user
  22 # model :user
helper :theme
before_filter :auto_discovery_defaults
... ...
def auto_discovery_defaults
@auto_discovery_url_rss =
51   @request.instance_variable_get(:@auto_discovery_url_rss)
  51 request.instance_variable_get(:@auto_discovery_url_rss)
@auto_discovery_url_atom =
53   @request.instance_variable_get(:@auto_discovery_url_atom)
  53 request.instance_variable_get(:@auto_discovery_url_atom)
unless @auto_discovery_url_rss && @auto_discovery_url_atom
auto_discovery_feed(:type => 'feed')
56   @request.instance_variable_set(:@auto_discovery_url_rss,
57   @auto_discovery_url_rss)
58   @request.instance_variable_set(:@auto_discovery_url_atom,
59   @auto_discovery_url_atom)
  56 request.instance_variable_set(:@auto_discovery_url_rss,
  57 @auto_discovery_url_rss)
  58 request.instance_variable_set(:@auto_discovery_url_atom,
  59 @auto_discovery_url_atom)
end
end

rool/rails/typo/trunk/app/controllers/live_controller.rb:

prev.current 
def search
@search = params[:q]
@articles = Article.search(@search)
7   @headers["Content-Type"] = "text/html; charset=utf-8"
  7 headers["Content-Type"] = "text/html; charset=utf-8"
end
end

rool/rails/typo/trunk/app/controllers/redirect_controller.rb:

prev.current 
class RedirectController < ContentController
  2 session :off
  3
def redirect
r = Redirect.find_by_from_path(params[:from])
... ...
path = url_root + path unless url_root.nil? or path[0,url_root.length] == url_root
redirect_to path
else
13   render :text => '<html><head><title>Page not found</title></head><body>Internal redirection error - page not found.<br>Please consult the system adminstrator.</body></html>', :status => 404
  15 render :text => "Page not found", :status => 404
end
end
end

rool/rails/typo/trunk/app/controllers/textfilter_controller.rb:

prev.current 
end
end
20   Dir["#{RAILS_ROOT}/components/plugins/textfilters/[_a-z]*.rb"].each do |f|
21   require_dependency f
22   end

rool/rails/typo/trunk/app/controllers/theme_controller.rb:

prev.current 
session :off
def stylesheets
6   render_theme_item(:stylesheets, params[:filename], 'text/css')
  6 render_theme_item(:stylesheets, params[:filename], 'text/css; charset=utf-8')
end
def javascript
10   render_theme_item(:javascript, params[:filename], 'text/javascript')
  10 render_theme_item(:javascript, params[:filename], 'text/javascript; charset=utf-8')
end
def images
... ...
private
26   def render_theme_item(type, file, mime = mime_for(file))
27   render :text => "Not Found", :status => 404 and return if file.split(%r{[\\/]}).include?("..")
28   send_file this_blog.current_theme_path + "/#{type}/#{file}", :type => mime, :disposition => 'inline', :stream => false
  26 def render_theme_item(type, file, mime = nil)
  27 mime ||= mime_for(file)
  28 if file.split(%r{[\\/]}).include?("..")
  29 render :text => "Not Found", :status => 404
  30 return
  31 end
  32 send_file(this_blog.current_theme.path + "/#{type}/#{file}",
  33 :type => mime, :disposition => 'inline', :stream => false)
end
def mime_for(filename)

rool/rails/typo/trunk/app/controllers/xml_controller.rb:

prev.current 
def feed
@items = Array.new
@format = params[:format]
  17 @blog = this_blog
if @format == 'atom03'
19   @headers["Status"] = "301 Moved Permanently"
  20 headers["Status"] = "301 Moved Permanently"
return redirect_to(:format=>'atom')
end
@feed_title = this_blog.blog_name
24   @link = url_for({:controller => "articles"},{:only_path => false})
  25 @link = this_blog.base_url
@format = NORMALIZED_FORMAT_FOR[@format]
... ...
return
end
33   @headers["Content-Type"] = "#{CONTENT_TYPE_FOR[@format]}; charset=utf-8"
  34 headers["Content-Type"] = "#{CONTENT_TYPE_FOR[@format]}; charset=utf-8"
if respond_to?("prep_#{params[:type]}")
self.send("prep_#{params[:type]}")
... ...
protected
68   def fetch_items(association, order='created_at DESC', limit=nil)
  69 def fetch_items(association, order='published_at DESC', limit=nil)
if association.instance_of?(Symbol)
association = this_blog.send(association)
end
... ...
def prep_article
article = this_blog.articles.find(params[:id])
92   fetch_items(article.comments, 'created_at DESC', 25)
  93 fetch_items(article.comments, 'published_at DESC', 25)
@items.unshift(article)
@feed_title << ": #{article.title}"
95   @link = article_url(article, false)
  96 @link = article.permalink_url
end
def prep_category
category = Category.find_by_permalink(params[:id])
fetch_items(category.articles)
@feed_title << ": Category #{category.name}"
102   @link = url_for({:controller => "articles", :action => "category", :id => category.permalink},
103   {:only_path => false})
  103 @link = category.permalink_url
end
def prep_tag
tag = Tag.find_by_name(params[:id])
fetch_items(tag.articles)
@feed_title << ": Tag #{tag.display_name}"
110   @link = url_for({:controller => "articles_controller.rb", :action => 'tag', :tag => tag.name},
111   {:only_path => false})
  110 @link = tag.permalink_url
end
def prep_sitemap
... ...
@items += Category.find_all_with_article_counters(1000)
@items += Tag.find_all_with_article_counters(1000)
end
120  
end

rool/rails/typo/trunk/app/helpers/admin/base_helper.rb:

prev.current 
module Admin::BaseHelper
  2 include ActionView::Helpers::DateHelper
  4 def state_class(item)
  5 item.state.memento.underscore.sub(/.*\//, '')
  6 end
  7
def render_flash
output = []
... ...
output = []
for key,value in @tasks
17   output << "<a href=\"#{value}\">#{key}</a>"
18   end if @tasks
  22 output << "<a href=\"#{value}\">#{key}</a>"
  23 end if @tasks
20   output.join("<br/>\n")
  25 output.join("<br />\n")
end
def current_user_notice
... ...
def tab(label, options = {})
if controller.controller_name =~ /#{options[:controller].split('/').last}/
33   content_tag :li, link_to(label, options, {"class"=> "active"}), {"class"=> "active"}
  38 content_tag :li, link_to(label, options, {"class"=> ""}), {"class"=> ""}
else
content_tag :li, link_to(label, options)
end
... ...
end
def link_to_show(record)
52   link_to image_tag('go'), :action => 'show', :id => record.id
  57 link_to image_tag('go.png'), :action => 'show', :id => record.id
end
def link_to_edit(record)
56   link_to image_tag('go'), :action => 'edit', :id => record.id
  61 link_to image_tag('edit.png', :alt => "edit", :title => "Edit content"), :action => 'edit', :id => record.id
end
def link_to_destroy(record)
60   link_to image_tag('delete'), :action => 'destroy', :id => record.id
  65 link_to image_tag('delete.png', :alt => "delete", :title => "Delete content"), :action => 'destroy', :id => record.id
end
def text_filter_options
... ...
def task_edit_resource_mime(title,id)
link_to_function(title, toggle_effect('edit-resource-mime-' + id.to_s, 'Effect.BlindUp', "duration:0.4", "Effect.BlindDown", "duration:0.4"))
end
  129
  130 def time_delta_from_now_in_words(timestamp)
  131 distance_of_time_in_words_to_now(timestamp) + ((Time.now < timestamp) ? ' from now' : ' ago')
  132 end
end

rool/rails/typo/trunk/app/helpers/admin/content_helper.rb:

prev.current 
module Admin::ContentHelper
  2 include ArticlesHelper
  3
  4 def contents
  5 [@article]
  6 end
  7
end

rool/rails/typo/trunk/app/helpers/admin/feedback_helper.rb:

prev.current 
module Admin::FeedbackHelper
def link_to_article_edit(article)
3   link_to truncate(article.title, 60), :controller => 'content', :action => 'edit', :id => article.id
  3 link_to truncate(article.title, 60), :controller => '/admin/content', :action => 'edit', :id => article.id
end
5  
  5
def task_showmod(title)
7   content_tag :li, link_to(title, :published => 'f', :search => params[:search])
8   end
  7 content_tag :li,
  8 link_to(title, :published => (title =~ /spam/ ? 'f' : ''),
  9 :confirmed => (title =~ /unconfirmed/ ? 'f' : ''),
  10 :search => params[:search])
  11 end
end

rool/rails/typo/trunk/app/helpers/admin/pages_helper.rb:

prev.current 
module Admin::PagesHelper
  2 include ArticlesHelper
  3
  4 def contents
  5 [@page]
  6 end
end

rool/rails/typo/trunk/app/helpers/application_helper.rb:

prev.current 
require 'digest/sha1'
module ApplicationHelper
5   def server_url_for(options = {})
6   url_for options.update(:only_path => false)
7   end
  5 # Override the default ActionController#url_for.
  6 def url_for(options = { })
  7 # this_blog.url_for doesn't do relative URLs.
  8 # if options.kind_of? Hash
  9 # unless options[:controller]
  10 # options[:controller] = params[:controller]
  11 # end
  12 # end
9   def config_value(name)
10   this_blog[name]
  14 # this_blog.url_for(options)
  15 super(options)
end
13   def config
14   this_blog
15   end
16  
17   def item_link(title, item, anchor=nil)
18   link_to title, item.location(anchor)
19   end
20  
21   alias_method :article_link, :item_link
22   alias_method :page_link, :item_link
23   alias_method :comment_url_link, :item_link
24  
25   def url_of(item, only_path=true, anchor=nil)
26   item.location(anchor, only_path)
27   end
28  
29   alias_method :trackback_url, :url_of
30   alias_method :comment_url, :url_of
31   alias_method :article_url, :url_of
32   alias_method :page_url, :url_of
33  
  18 # Basic english pluralizer.
  19 # Axe?
def pluralize(size, word)
case size
36   when 0 then "no #{word}s"
  22 when 0 then "no #{word.pluralize}"
when 1 then "1 #{word}"
38   else "#{size} #{word}s"
  24 else "#{size} #{word.pluralize}"
end
end
  28 # Produce a link to the permalink_url of 'item'.
  29 def link_to_permalink(item, title, anchor=nil)
  30 anchor = "##{anchor}" if anchor
  31 "<a href=\"#{item.permalink_url}#{anchor}\">#{title}</a>"
  32 end
  33
  34 # The '5 comments' link from the bottom of articles
def comments_link(article)
43   article_link(pluralize(article.comments.size, "comment"),
44   article, 'comments')
  36 link_to_permalink(article,pluralize(article.published_comments.size, 'comment'),'comments')
end
def trackbacks_link(article)
48   article_link(pluralize(article.trackbacks.size, "trackback"),
49   article, 'trackbacks')
  40 link_to_permalink(article,pluralize(article.published_trackbacks.size, 'trackback'),'trackbacks')
end
def check_cache(aggregator, *args)
... ...
end
def js_distance_of_time_in_words_to_now(date)
58   time = date.utc.strftime("%a, %d %b %Y %H:%M:%S GMT")
59   "<span class=\"typo_date\" title=\"#{time}\">#{time}</span>"
  49 if date
  50 time = date.utc.strftime("%a, %d %b %Y %H:%M:%S GMT")
  51 else
  52 time = Time.now
  53 end
  54 "<span class=\"typo_date\" title=\"#{time}\">#{time}</span>"
end
def meta_tag(name, value)
... ...
"$('#{domid}').style.display == 'none' ? new #{false_effect}('#{domid}', {#{false_opts}}) : new #{true_effect}('#{domid}', {#{true_opts}}); return false;"
end
  74 def markup_help_popup(markup, text)
  75 if markup and markup.commenthelp.size > 1
  76 "<a href=\"#{url_for :controller => '/articles', :action => 'markup_help', :id => markup.id}\" onclick=\"return popup(this, 'Typo Markup Help')\">#{text}</a>"
  77 else
  78 ''
  79 end
  80 end
  81
  82 # Deprecated helpers
  83 def server_url_for(options={})
  84 typo_deprecated "Use url_for instead"
  85 url_for(options)
  86 end
  87
  88 def config_value(name)
  89 typo_deprecated "Use this_blog.#{name} instead."
  90 this_blog.send(name)
  91 end
  92
  93 def config
  94 typo_deprecated "Use this_blog.configname instead of config[:configname]"
  95 raise "Unimplemented"
  96 end
  97
  98 def item_link(title, item, anchor=nil)
  99 typo_deprecated "Use link_to_permalink instead of item_link"
  100 link_to_permalink(item, title, anchor)
  101 end
  102
  103 alias_method :article_link, :item_link
  104 alias_method :page_link, :item_link
  105 alias_method :comment_url_link, :item_link
  106
  107 def url_of(item, only_path=true, anchor=nil)
  108 typo_deprecated "Use item.permalink_url instead"
  109 item.permalink_url
  110 end
  111
  112 alias_method :trackback_url, :url_of
  113 alias_method :comment_url, :url_of
  114 alias_method :article_url, :url_of
  115 alias_method :page_url, :url_of
  116
  117 def html(content, what = :all, deprecated = false)
  118 if deprecated
  119 msg = "use html(#{content.class.to_s.underscore}" + ((what == :all) ? "" : ", #{what.inspect}") + ")"
  120 typo_deprecated(msg)
  121 end
  122
  123 content.html(what)
  124 end
  125
def article_html(article, what = :all)
80   article.html(@controller, what)
  127 html(article, what, true)
end
def comment_html(comment)
84   comment.html(@controller, :body)
  131 html(comment, :body, true)
end
def page_html(page)
88   page.html(@controller,:body)
  135 html(page, :body, true)
end
91   def strip_html(text)
  138 def strip_html(text)
  139 typo_deprecated "use text.strip_html"
text.strip_html
end
94  
95   def markup_help_popup(markup, text)
96   if markup and markup.commenthelp.size > 1
97   "<a href=\"#{url_for :controller => '/articles', :action => 'markup_help', :id => markup.id}\" onClick=\"return popup(this, 'Typo Markup Help')\">#{text}</a>"
98   else
99   ''
100   end
101   end
end

rool/rails/typo/trunk/app/helpers/articles_helper.rb:

prev.current 
module ArticlesHelper
  2 include SidebarHelper
  3
def admin_tools_for(model)
type = model.class.to_s.downcase
tag = []
tag << content_tag("div",
link_to_remote('nuke', {
:url => { :action => "nuke_#{type}", :id => model },
8   :complete => visual_effect(:puff, "#{type}-#{model.id}", :duration => 0.6),
  10 :complete => visual_effect(:puff, "#{type}-I#{model.id}", :duration => 0.6),
:confirm => "Are you sure you want to delete this #{type}?"
}, :class => "admintools") <<
link_to('edit', {
12   :controller => "admin/#{type.pluralize}/article/#{model.article.id}",
  14 :controller => "admin/#{type.pluralize}",
  15 :article_id => model.article.id,
:action => "edit", :id => model
}, :class => "admintools"),
:id => "admin_#{type}_#{model.id}", :style => "display: none")
tag.join(" | ")
end
19   def onhover_show_admin_tools(type, id = nil)
20   tag = []
21   tag << %{ onmouseover="if (getCookie('typoapp_is_admin') == 'yes') { Element.show('admin_#{[type, id].compact.join('_')}'); }" }
22   tag << %{ onmouseout="Element.hide('admin_#{[type, id].compact.join('_')}');" }
23   tag
  22 def onhover_show_admin_tools(type, id = nil)
  23 tag = []
  24 tag << %{ onmouseover="if (getCookie('typoapp_is_admin') == 'yes') { Element.show('admin_#{[type, id].compact.join('_')}'); }" }
  25 tag << %{ onmouseout="Element.hide('admin_#{[type, id].compact.join('_')}');" }
  26 tag
end
25  
  28
def render_errors(obj)
return "" unless obj
tag = String.new
... ...
end
def page_title
  47 blog_name = this_blog.blog_name || "Typo"
if @page_title
45   @page_title
  49 # this is where the page title prefix (string) should go
  50 (this_blog.title_prefix == 1 ? blog_name + " : " : '') + @page_title + (this_blog.title_prefix == 2 ? " : " + blog_name : '')
else
47   this_blog.blog_name || "Typo"
  52 blog_name
end
end
def page_header
52   page_header_includes = contents.collect { |c| c.whiteboard }.collect { |w| w.select {|k,v| k =~ /^page_header_/}.collect {|(k,v)| v} }.flatten.uniq
  57 page_header_includes = contents.collect { |c| c.whiteboard }.collect do |w|
  58 w.select {|k,v| k =~ /^page_header_/}.collect do |(k,v)|
  59 v = v.chomp
  60 # trim the same number of spaces from the beginning of each line
  61 # this way plugins can indent nicely without making ugly source output
  62 spaces = /\A[ \t]*/.match(v)[0].gsub(/\t/, " ")
  63 v.gsub!(/^#{spaces}/, ' ') # add 2 spaces to line up with the assumed position of the surrounding tags
  64 end
  65 end.flatten.uniq
(
<<-HTML
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
#{ meta_tag 'ICBM', this_blog.geourl_location unless this_blog.geourl_location.empty? }
57   <link rel="EditURI" type="application/rsd+xml" title="RSD" href="#{ server_url_for :controller => 'xml', :action => 'rsd' }" />
  70 <link rel="EditURI" type="application/rsd+xml" title="RSD" href="#{ url_for :controller => 'xml', :action => 'rsd' }" />
<link rel="alternate" type="application/atom+xml" title="Atom" href="#{ @auto_discovery_url_atom }" />
<link rel="alternate" type="application/rss+xml" title="RSS" href="#{ @auto_discovery_url_rss }" />
#{ javascript_include_tag "cookies" }
#{ javascript_include_tag "prototype" }
#{ javascript_include_tag "effects" }
#{ javascript_include_tag "typo" }
64   #{ page_header_includes.join("\n") }
  77 #{ page_header_includes.join("\n") }
<script type="text/javascript">#{ @content_for_script }</script>
HTML
).chomp
... ...
end
def category_links(article)
80   "Posted in " + article.categories.collect { |c| link_to h(c.name),
81   { :controller => "articles", :action => "category", :id => c.permalink },
82   :rel => "tag"
83   }.join(", ")
  93 "Posted in " + article.categories.map { |c| link_to h(c.name), c.permalink_url, :rel => 'tag'}.join(", ")
end
def tag_links(article)
87   "Tags " + article.tags.collect { |tag| link_to tag.display_name,
88   { :controller => "articles", :action => "tag", :id => tag.name },
89   :rel => "tag"
90   }.sort.join(", ")
  97 "Tags " + article.tags.map { |tag| link_to tag.display_name, tag.permalink_url, :rel => "tag"}.sort.join(", ")
end
def author_link(article)
... ...
def next_link(article)
n = article.next
105   return n ? article_link("#{n.title} &raquo;", n) : ''
  112 return n ? n.link_to_permalink("#{n.title} &raquo;") : ''
end
def prev_link(article)
p = article.previous
110   return p ? article_link("&laquo; #{p.title}", p) : ''
  117 return p ? n.link_to_permalink("&laquo; #{p.title}") : ''
end
113   def render_sidebars
114   # ugly ugly hack to fix the extremely verbose sidebar logging
115   options = { :controller => SidebarController,
116   :action => 'display_plugins',
117   :params => {:contents => contents,
118   :request_params => params} }
119   render_component(options)
  120 def render_to_string(*args, &block)
  121 controller.send(:render_to_string, *args, &block)
end
# Generate the image tag for a commenters gravatar based on their email address
... ...
end
def urlspec_for_grouping(grouping)
146   { :controller => "articles", :action => grouping.class.to_prefix, :id => grouping.permalink }
  148 { :controller => "/articles", :action => grouping.class.to_prefix, :id => grouping.permalink }
end
def title_for_grouping(grouping)
... ...
end
def ul_tag_for(grouping_class)
154   case grouping_class
155   when Tag
  156 case
  157 when grouping_class == Tag
%{<ul id="taglist" class="tags">}
157   when Category
  159 when grouping_class == Category
%{<ul class="categorylist">}
else
'<ul>'

rool/rails/typo/trunk/app/helpers/mail_helper.rb:

prev.current 
module MailHelper
2   def article_url(controller, article, only_path = true, anchor = nil)
3   controller.url_for :controller=>"/articles", :action =>"permalink", :year => article.created_at.year, :month => sprintf("%.2d", article.created_at.month), :day => sprintf("%.2d", article.created_at.day), :title => article.permalink, :anchor => anchor
  2 # Mutter... ActionMailer doesn't do fragment caching.
  3 def html(content, what=:all)
  4 content.html(what)
end
end

rool/rails/typo/trunk/app/helpers/sidebar_helper.rb:

prev.current 
module SidebarHelper
  2 def render_sidebars
  3 this_blog.sidebars.inject('') do |acc, sb|
  4 @sidebar = sb
  5 sb.parse_request(contents, params)
  6 controller.response.lifetime = sb.lifetime if sb.lifetime
  7 acc + render_sidebar(sb)
  8 end
  9 end
  10
def render_sidebar(sidebar)
3   begin
4   # another ugly ugly hack like in articles_helper.rb
5   options = { :layout => false,
6   :controller => sidebar.sidebar_controller,
7   :action=>'index',
8   :params => params.merge({:sidebar => sidebar}) }
9  
10   render_component(options)
11   rescue => e
12   content_tag :p, e.message, :class => 'error'
  12 if sidebar.view_root
  13 # Allow themes to override sidebar views
  14 view_root = File.expand_path(sidebar.view_root)
  15 rails_root = File.expand_path(RAILS_ROOT)
  16 if view_root =~ /^#{Regexp.escape(rails_root)}/
  17 new_root = view_root[rails_root.size..-1]
  18 new_root.sub! %r{^/?vendor/}, ""
  19 new_root.sub! %r{/views}, ""
  20 new_root = File.join(this_blog.current_theme.path, "views", new_root)
  21 view_root = new_root if File.exists?(File.join(new_root, "content.rhtml"))
  22 end
  23 render_to_string(:file => "#{view_root}/content.rhtml",
  24 :locals => sidebar.to_locals_hash)
  25 else
  26 render_to_string(:partial => sidebar.content_partial,
  27 :locals => sidebar.to_locals_hash)
end
end
16   def page_header
17   javascript_include_tag("cookies") +
18   javascript_include_tag("prototype") +
19   javascript_include_tag("effects") +
20   javascript_include_tag("type")
21   end
end

rool/rails/typo/trunk/app/helpers/xml_helper.rb:

prev.current 
h(post.title)
end
10   def item_link(item)
11   item.location(nil, false)
12   end
13  
14   alias_method :post_link, :item_link
15   alias_method :comment_link, :item_link
16   alias_method :trackback_link, :item_link
17  
def blog_title
this_blog.blog_name || "Unnamed blog"
end
21  
22   def tag_link(tag)
23   url_for :controller => "articles", :action => 'tag', :id => tag.name, :only_path => false
24   end
def collection_lastmod(collection)
article_updated = collection.articles.find(:first, :order => 'updated_at DESC')
... ...
times.max.xmlschema
end
end
40  
41   def category_link(category)
42   url_for :controller => "articles", :action => 'category', :id => category.permalink, :only_path => false
43   end
end

rool/rails/typo/trunk/app/models/article.rb:

prev.current 
content_fields :body, :extended
9   has_many :pings, :dependent => true, :order => "created_at ASC"
10   has_many :comments, :dependent => true, :order => "created_at ASC"
11   has_many :trackbacks, :dependent => true, :order => "created_at ASC"
  9 has_many :pings, :dependent => :destroy, :order => "created_at ASC"
  10 has_many :comments, :dependent => :destroy, :order => "created_at ASC"
  11 has_many :trackbacks, :dependent => :destroy, :order => "created_at ASC"
has_many :resources, :order => "created_at DESC",
:class_name => "Resource", :foreign_key => 'article_id'
14   has_and_belongs_to_many :categories, :foreign_key => 'article_id'
  14 has_many :categorizations
  15 has_many :categories, :through => :categorizations, :uniq => true do
  16 def push_with_attributes(cat, join_attrs = { :is_primary => false })
  17 Categorization.with_scope(:create => join_attrs) { self << cat }
  18 end
  19 end
has_and_belongs_to_many :tags, :foreign_key => 'article_id'
belongs_to :user
has_many :triggers, :as => :pending_item
... ...
self.title.gsub(/<[^>]*>/,'').to_url
end
25   def location(anchor=nil, only_path=true)
26   blog.article_url(self, only_path, anchor)
  30 def permalink_url(anchor=nil, only_path=true)
  31 @cached_permalink_url ||= {}
  32 @cached_permalink_url["#{anchor}#{only_path}"] ||= blog.url_for(
  33 :year => published_at.year,
  34 :month => sprintf("%.2d", published_at.month),
  35 :day => sprintf("%.2d", published_at.day),
  36 :title => permalink,
  37 :anchor => anchor,
  38 :only_path => only_path,
  39 :controller => '/articles'
  40 )
end
  43 def trackback_url
  44 blog.url_for(:controller => "articles", :action =>"trackback", :id => id)
  45 end
  46
  47 def feed_url(format = :rss20)
  48 blog.url_for(:controller => 'xml', :action => 'feed', :type => 'article', :format => format, :id => id)
  49 end
  50
  51 def edit_url
  52 blog.url_for(:controller => "/admin/content", :action =>"edit", :id => id)
  53 end
  54
  55 def delete_url
  56 blog.url_for(:controller => "/admin/content", :action =>"destroy", :id => id)
  57 end
  58
def html_urls
urls = Array.new
31   (body_html.to_s + extended_html.to_s).gsub(/<a [^>]*>/) do |tag|
  61 html.gsub(/<a [^>]*>/) do |tag|
if(tag =~ /href="([^"]+)"/)
urls.push($1)
end
end
37   urls
  67 urls.uniq
end
40   def really_send_pings(serverurl = blog.server_url, articleurl = location(nil, false))
  70 def really_send_pings(serverurl = blog.base_url, articleurl = nil)
return unless blog.send_outbound_pings
  73 articleurl ||= permalink_url(nil, false)
  74
weblogupdatesping_urls = blog.ping_urls.gsub(/ +/,'').split(/[\n\r]+/)
pingback_or_trackback_urls = self.html_urls
... ...
if weblogupdatesping_urls.include?(url)
ping.send_weblogupdatesping(serverurl, articleurl)
55   else pingback_or_trackback_urls.include?(url)
  87 elsif pingback_or_trackback_urls.include?(url)
ping.send_pingback_or_trackback(articleurl)
end
end
59   rescue
  91 rescue Exception => e
  92 logger.error(e)
# in case the remote server doesn't respond or gives an error,
# we should throw an xmlrpc error here.
end
... ...
end
def next
71   Article.find(:first, :conditions => ['published_at > ?', published_at],
72   :order => 'published_at asc')
  104 blog.articles.find(:first, :conditions => ['published_at > ?', published_at],
  105 :order => 'published_at asc')
end
def previous
76   Article.find(:first, :conditions => ['published_at < ?', published_at],
77   :order => 'published_at desc')
  109 blog.articles.find(:first, :conditions => ['published_at < ?', published_at],
  110 :order => 'published_at desc')
end
# Count articles on a certain date
... ...
User.find_boolean(:all, :notify_on_new_articles)
end
135   def notify_user_via_email(controller, user)
  168 def notify_user_via_email(user)
if user.notify_via_email?
137   EmailNotify.send_article(controller, self, user)
  170 EmailNotify.send_article(self, user)
end
end
141   def notify_user_via_jabber(controller, user)
  174 def notify_user_via_jabber(user)
if user.notify_via_jabber?
JabberNotify.send_message(user, "New post",
"A new message was posted to #{blog.blog_name}",
145   content.body_html)
  178 html(:body))
end
end
... ...
end
end
  194 def published_comments
  195 comments.select {|c| c.published?}
  196 end
  197
  198 def published_trackbacks
  199 trackbacks.select {|c| c.published?}
  200 end
  201
  202 # Bloody rails reloading. Nasty workaround.
  203 def body=(newval)
  204 if self[:body] != newval
  205 changed
  206 self[:body] = newval
  207 end
  208 self[:body]
  209 end
  210
  211 def body_html
  212 typo_deprecated "Use html(:body)"
  213 html(:body)
  214 end
  215
  216 def extended=(newval)
  217 if self[:extended] != newval
  218 changed
  219 self[:extended] = newval
  220 end
  221 self[:extended]
  222 end
  223
  224 def extended_html
  225 typo_deprecated "Use html(:extended)"
  226 html(:extended)
  227 end
  228
  229 def self.html_map(field=nil)
  230 html_map = { :body => true, :extended => true }
  231 if field
  232 html_map[field.to_sym]
  233 else
  234 html_map
  235 end
  236 end
  237
  238 def content_fields
  239 [:body, :extended]
  240 end
  241
protected
163   before_create :set_defaults, :create_guid, :add_notifications
  244 before_create :set_defaults, :create_guid
before_save :set_published_at
after_save :keywords_to_tags
  247 after_create :add_notifications
167   def correct_counts
168   self.comments_count = self.comments_count
169   self.trackbacks_count = self.trackbacks_count
170   end
171  
def set_published_at
if self.published and self[:published_at].nil?
self[:published_at] = self.created_at || Time.now
... ...
if self.attributes.include?("permalink") and self.permalink.blank?
self.permalink = self.stripped_title
end
182   correct_counts
if blog && self.allow_comments.nil?
self.allow_comments = blog.default_allow_comments
end
... ...
if blog && self.allow_pings.nil?
self.allow_pings = blog.default_allow_pings
end
190  
  266
true
end
def add_notifications
195   # Grr, how do I do :conditions => 'notify_on_new_articles = true' when on MySQL boolean DB tables
196   # are integers, Postgres booleans are booleans, and sqlite is basically just a string?
197   #
198   # I'm punting for now and doing the test in Ruby. Feel free to rewrite.
199  
self.notify_users = User.find_boolean(:all, :notify_on_new_articles)
self.notify_users << self.user if (self.user.notify_watch_my_articles? rescue false)
self.notify_users.uniq!
end
205   def default_text_filter_config_key
206   'text_filter'
207   end
208  
def self.time_delta(year, month = nil, day = nil)
from = Time.mktime(year, month || 1, day || 1)
... ...
end
def find_published(what = :all, options = {})
220   options[:include] ||= []
221   options[:include] += [:user]
super(what, options)
end

rool/rails/typo/trunk/app/models/blog.rb:

prev.current 
# BlogRequest is a fake Request object, created so blog.url_for will work.
2   # This isn't enabled yet, but it will be soon...
class BlogRequest
4   include Reloadable
5  
  3
attr_accessor :protocol, :host_with_port, :path, :symbolized_path_parameters, :relative_url_root
7  
  5
def initialize(root)
@protocol = @host_with_port = @path = ''
@symbolized_path_parameters = {}
... ...
end
end
15   class Blog < ActiveRecord::Base
  13 # The Blog class represents one blog. It stores most configuration settings
  14 # and is linked to most of the assorted content classes via has_many.
  15 #
  16 # Typo decides which Blog object to use by searching for a Blog base_url that
  17 # matches the base_url computed for each request.
  18 class Blog < CachedModel
include ConfigManager
has_many :contents
... ...
has_many :comments
has_many :pages, :order => "id DESC"
has_many(:published_articles, :class_name => "Article",
24   :conditions => ["published = ?", true],
  27 :conditions => {:published => true},
:include => [:categories, :tags],
26   :order => "contents.created_at DESC") do
  29 :order => "contents.published_at DESC") do
def before(date = Time.now)
find(:all, :conditions => ["contents.created_at < ?", date])
end
... ...
has_many :pages
has_many :comments
  37 has_many :sidebars, :order => 'active_position ASC'
serialize :settings, Hash
# Description
setting :blog_name, :string, 'My Shiny Weblog!'
setting :blog_subtitle, :string, ''
  44 setting :title_prefix, :integer, 0
setting :geourl_location, :string, ''
41   setting :canonical_server_url, :string, ''
  46 setting :canonical_server_url, :string, '' # Deprecated
# Spam
setting :sp_global, :boolean, false
... ...
setting :limit_rss_display, :integer, 10
setting :default_allow_pings, :boolean, false
setting :default_allow_comments, :boolean, true
  72 setting :default_moderate_comments, :boolean, false
setting :link_to_author, :boolean, false
setting :show_extended_on_rss, :boolean, true
setting :theme, :string, 'azure'
... ...
setting :jabber_address, :string, ''
setting :jabber_password, :string, ''
80   def find_already_published(content_type)
81   self.send(content_type).find_already_published
  86 def initialize(*args)
  87 super
  88 # Yes, this is weird - PDC
  89 begin
  90 self.settings ||= {}
  91 rescue Exception => e
  92 self.settings = {}
  93 end
end
  96 # Find the Blog that matches a specific base URL. If no Blog object is found
  97 # that matches, then grab the default blog. If *that* fails, then create a new
  98 # Blog. The last case should only be used when Typo is first installed.
  99 def self.find_blog(base_url)
  100 (Blog.find_by_base_url(base_url) rescue nil)|| Blog.default || Blog.new
  101 end
  102
  103 # The default Blog. This is the lowest-numbered blog, almost always id==1.
  104 def self.default
  105 find(:first, :order => 'id')
  106 end
  107
def ping_article!(settings)
settings[:blog_id] = self.id
article_id = settings[:id]
settings.delete(:id)
trackback = published_articles.find(article_id).trackbacks.create!(settings)
89  
90   if trackback.is_spam?
91   STDERR.puts "Moderating trackback as spam!"
92   trackback.withdraw!
93   end
94  
95   trackback
end
98  
  115 # Check that all required blog settings have a value.
def is_ok?
settings.has_key?('blog_name')
end
103   def [](key)
104   self.send(key)
  120 # The +Theme+ object for the current theme.
  121 def current_theme
  122 @cached_theme ||= Theme.find(theme)
end
107   def []=(key, value)
108   self.send("#{key}=", value)
109   end
  125 # Generate a URL based on the +base_url+. This allows us to generate URLs
  126 # without needing a controller handy, so we can produce URLs from within models
  127 # where appropriate.
  128 #
  129 # It also uses our new RouteCache, so repeated URL generation requests should be
  130 # fast, as they bypass all of Rails' route logic.
  131 def url_for(options = {}, *extra_params)
  132 case options
  133 when String then options # They asked for 'url_for "/some/path"', so return it unedited.
  134 when Hash
  135 unless RouteCache[options]
  136 options.reverse_merge!(:only_path => true, :controller => '/articles',
  137 :action => 'permalink')
  138 # Remove internal semi-hack that valiantly attempts to isolate
  139 # code from needing a Controller but does so at the expense of
  140 # assuming protocol and port, based on the admin-set blog base
  141 # URL. Replace it with global (ugh) set in prime_url_writer,
  142 # a before_filter in application.rb.
  143 #
  144 # @url ||= ActionController::UrlRewriter.new(BlogRequest.new(self.base_url), {})
  145 @url ||= ActionController::UrlRewriter.new($url_writer_request_information, {})
  146 RouteCache[options] = @url.rewrite(options)
  147 end
111   def has_key?(key)
112   self.class.fields.has_key?(key.to_s)
  149 return RouteCache[options]
  150 else
  151 raise "Invalid URL in url_for: #{options.inspect}"
  152 end
end
115   def initialize(*args)
116   super
117   self.settings ||= { }
  155 # The URL for a static file.
  156 def file_url(filename)
  157 "#{base_url}/files/#{filename}"
end
120   def self.default
121   find(:first, :order => 'id')
  160 # The base server URL.
  161 def server_url
  162 base_url
end
124   @@controller_stack = []
125   cattr_accessor :controller_stack
126  
127   def self.before(controller)
128   controller_stack << controller
  165 # Deprecated
  166 def canonical_server_url
  167 typo_deprecated "Use base_url instead"
  168 base_url
end
131   def self.after(controller)
132   unless controller_stack.last == controller
133   raise "Controller stack got out of kilter!"
134   end
135   controller_stack.pop
  171 def [](key) # :nodoc:
  172 typo_deprecated "Use blog.#{key}"
  173 self.send(key)
end
138   def controller
139   controller_stack.last
  176 def []=(key, value) # :nodoc:
  177 typo_deprecated "Use blog.#{key}="
  178 self.send("#{key}=", value)
end
142   def current_theme_path
143   Theme.themes_root + "/" + theme
  181 def has_key?(key) # :nodoc:
  182 typo_deprecated "Why?"
  183 self.class.fields.has_key?(key.to_s)
end
146   def current_theme
147   Theme.theme_from_path(current_theme_path)
  186 def find_already_published(content_type) # :nodoc:
  187 typo_deprecated "Use #{content_type}.find_already_published"
  188 self.send(content_type).find_already_published
end
150   def url_for(options = {}, *extra_params)
151   case options
152   when String then options
153   when Hash
154   options.reverse_merge!(:only_path => true, :controller => '/articles',
155   :action => 'permalink')
156   url = ActionController::UrlRewriter.new(request, {})
157   url.rewrite(options)
158   else
159   options.location(*extra_params)
160   end
  191 def current_theme_path # :nodoc:
  192 typo_deprecated "use current_theme.path"
  193 Theme.themes_root + "/" + theme
end
162  
163   def article_url(article, only_path = true, anchor = nil)
164   url_for(:year => article.published_at.year,
165   :month => sprintf("%.2d", article.published_at.month),
166   :day => sprintf("%.2d", article.published_at.day),
167   :title => article.permalink, :anchor => anchor,
168   :only_path => only_path)
169   end
170  
171   def server_url
172   if controller
173   controller.send :url_for, :only_path => false, :controller => "/"
174   else
175   settings[:canonical_server_url]
176   end
177   end
178  
179   private
180  
181   def request
182   #BlogRequest.new(self.canonical_server_url)
183   controller.request rescue ActionController::TestRequest.new
184   end
end

rool/rails/typo/trunk/app/models/blog_sweeper.rb:

prev.current 
class BlogSweeper < ActionController::Caching::Sweeper
2   observe Article, Category, Comment, Trackback, Page, Blog, Sidebar, User
  2 observe Article, Category, Feedback, Page, Blog, Sidebar, User
def after_save(record)
  5 logger.info "Expiring #{record}, with controller: #{controller}"
expire_for(record)
end
def after_destroy(record)
9   expire_for(record)
  10 expire_for(record, true)
end
12   def expire_for(record)
  13 def expire_for(record, destroying = false)
case record
14   when Blog, Sidebar, Category, Comment, Trackback, Article, User
15   PageCache.sweep_all
16   expire_fragment(/.*/)
when Page
18   PageCache.sweep("/pages/#{record.name}.html")
  16 sweep_pages(record)
  17 when Content
  18 if record.invalidates_cache?(destroying)
  19 sweep_all
  20 end
  21 when Sidebar, Category
  22 sweep_articles
  23 sweep_pages(record)
  24 when Blog, User
  25 sweep_all
  26 end
  27 end
  28
  29 def sweep_all
  30 PageCache.sweep_all
  31 expire_fragment(/.*/)
  32 end
  33
  34 def sweep_articles
  35 PageCache.sweep('/articles/%')
  36 expire_fragment(%r{.*/articles/.*})
  37 end
  38
  39 def sweep_pages(record)
  40 PageCache.sweep("/pages/#{record.name rescue ''}.html")
expire_fragment(/.*\/pages\/.*/)
expire_fragment(/.*\/view_page.*/)
21   end
end
  44
  45 def logger
  46 @logger ||= RAILS_DEFAULT_LOGGER || Logger.new(STDERR)
  47 end
end

rool/rails/typo/trunk/app/models/category.rb:

prev.current 
class Category < ActiveRecord::Base
acts_as_list
3   has_and_belongs_to_many(:articles,
4   :order => "published_at DESC, created_at DESC")
  3 has_many :categorizations
  4 has_many :articles, :through => :categorizations,
  5 :order => "published_at DESC, created_at DESC"
def self.find_all_with_article_counters(maxcount=nil)
self.find_by_sql([%{
SELECT categories.id, categories.name, categories.permalink, categories.position, COUNT(articles.id) AS article_counter
FROM #{Category.table_name} categories
10   LEFT OUTER JOIN #{Category.table_name_prefix}articles_categories#{Category.table_name_suffix} articles_categories
  11 LEFT OUTER JOIN #{Category.table_name_prefix}categorizations#{Category.table_name_suffix} articles_categories
ON articles_categories.category_id = categories.id
LEFT OUTER JOIN #{Article.table_name} articles
ON (articles_categories.article_id = articles.id AND articles.published = ?)
... ...
}, true]).each {|item| item.article_counter = item.article_counter.to_i }
end
  20 def self.find(*args)
  21 with_scope :find => {:order => 'position ASC'} do
  22 super
  23 end
  24 end
  25
def self.find_by_permalink(*args)
super || new
end
... ...
def self.reorder(serialized_list)
self.transaction do
serialized_list.each_with_index do |cid,index|
34   find(cid).update_attribute "position", index rescue nil
  41 find(cid).update_attribute "position", index
end
end
end
... ...
name
end
  58 def permalink_url(anchor=nil, only_path=true)
  59 blog = Blog.find(1) # remove me...
  60
  61 blog.url_for(
  62 :controller => '/articles',
  63 :action => 'category',
  64 :id => permalink
  65 )
  66 end
  67
protected
before_save :set_defaults

rool/rails/typo/trunk/app/models/comment.rb:

prev.current 
require 'sanitize'
require 'timeout'
5   class Comment < Content
6   include TypoGuid
7  
8   content_fields :body
9  
10   belongs_to :article, :counter_cache => true
  5 class Comment < Feedback
  6 belongs_to :article
belongs_to :user
12  
  8 content_fields :body
validates_presence_of :author, :body
14   validates_age_of :article_id
15   validate_on_create :check_article_is_open_to_comments
  11 attr_accessor :user_agent
  12 attr_accessor :referrer
  13 attr_accessor :permalink
18   def self.default_order
19   'created_at ASC'
20   end
21  
22   def notify_user_via_email(controller, user)
  15 def notify_user_via_email(user)
if user.notify_via_email?
24   EmailNotify.send_comment(controller, self, user)
  17 EmailNotify.send_comment(self, user)
end
end
28   def notify_user_via_jabber(controller, user)
  21 def notify_user_via_jabber(user)
if user.notify_via_jabber?
30   JabberNotify.send_message(user, "New comment", "A new comment was posted to '#{article.title}' on #{blog.blog_name} by #{author}: #{body}", self.body_html)
  23 JabberNotify.send_message(user, "New comment", "A new comment was posted to '#{article.title}' on #{blog.blog_name} by #{author}:
  24 #{body} (#{controller.url_for :anchor => 'comments', :action => 'read', :id => article.id})", self.body_html)
end
end
... ...
users
end
40   def location(anchor=:ignored, only_path=true)
41   blog.url_for(article, "comment-#{id}", only_path)
  34 def default_text_filter
  35 blog.comment_text_filter.to_text_filter
end
protected
46   def check_article_is_open_to_comments
47   return unless article
48   unless article.allow_comments?
49   errors.add(:article, "Article is not open to comments")
50   end
  40 def article_allows_feedback?
  41 return true if article.allow_comments?
  42 errors.add(:article, "Article is not open to comments")
  43 false
end
53   def body_html_postprocess(value, controller)
54   sanitize(controller.send(:auto_link, value),'a href, b, br, i, p, em, strong, pre, code, ol, ul, li')
  46 def originator
  47 author
end
57   def default_text_filter_config_key
58   'comment_text_filter'
  50 def additional_akismet_options
  51 { :user_agent => user_agent,
  52 :referrer => referrer,
  53 :permalink => permalink }
end
61   before_create :create_guid
62   before_save :correct_url, :make_nofollow
63  
64   def correct_url
65   unless url.to_s.empty?
66   unless url =~ /^http\:\/\//
67   self.url = "http://#{url}"
68   end
  56 def self.html_map(field=nil)
  57 html_map = { :body => true }
  58 if field
  59 html_map[field.to_sym]
  60 else
  61 html_map
end
end
72   def make_nofollow
73   self.author = author.nofollowify
74   self.body_html = body_html.to_s.nofollowify
  65 def content_fields
  66 [:body]
end
76  
77   def akismet_options
78   {:user_ip => ip, :comment_type => 'comment', :comment_author => author, :comment_author_email => email,
79   :comment_author_url => url, :comment_content => body}
80   end
81  
82   def spam_fields
83   [:body, :url, :ip]
84   end
end

rool/rails/typo/trunk/app/models/content.rb:

prev.current 
composed_of :state, :class_name => 'ContentState::Factory',
:mapping => %w{ state memento }
14   has_and_belongs_to_many :notify_users, :class_name => 'User',
15   :join_table => 'notifications', :foreign_key => 'notify_content_id',
16   :association_foreign_key => 'notify_user_id', :uniq => true
  14 has_many :notifications, :foreign_key => 'content_id'
  15 has_many :notify_users, :through => :notifications,
  16 :source => 'notify_user',
  17 :uniq => true
  19 def notify_users=(collection)
  20 return notify_users.clear if collection.empty?
  21 self.class.transaction do
  22 self.notifications.clear
  23 collection.uniq.each do |u|
  24 self.notifications.build(:notify_user => u)
  25 end
  26 notify_users.target = collection
  27 end
  28 end
  29
has_many :triggers, :as => :pending_item, :dependent => :delete_all
before_save :state_before_save
21   after_save :post_trigger
  33 after_save :post_trigger, :state_after_save
serialize :whiteboard
@@content_fields = Hash.new
@@html_map = Hash.new
28   def initialize(*args)
29   super(*args)
  40 def initialize(*args, &block)
  41 super(*args, &block)
set_default_blog
end
  45 def invalidates_cache?(on_destruction = false)
  46 if on_destruction
  47 just_changed_published_status? || published?
  48 else
  49 changed? && published? || just_changed_published_status?
  50 end
  51 end
  52
def set_default_blog
if self.blog_id == nil or self.blog_id == 0
self.blog = Blog.default
... ...
end
class << self
  60 # Quite a bit of this isn't needed anymore.
def content_fields(*attribs)
@@content_fields[self] = ((@@content_fields[self]||[]) + attribs).uniq
@@html_map[self] = nil
... ...
if self[field] != newval
changed
self[field] = newval
48   if html_map(field)
49   self[html_map(field)] = nil
50   end
51   notify_observers(self, field.to_sym)
end
self[field]
end
unless self.method_defined?("#{field}_html")
define_method("#{field}_html") do
57   if blog.controller
58   html(blog.controller, field.to_sym)
59   else
60   self["#{field}_html"]
61   end
  74 typo_deprecated "Use html(:#{field})"
  75 html(field.to_sym)
end
end
end
... ...
@@html_map[self] = Hash.new
instance = self.new
@@content_fields[self].each do |attrib|
72   @@html_map[self][attrib] = "#{attrib}_html"
  86 @@html_map[self][attrib] = true
end
end
if field
... ...
end
def find_published(what = :all, options = {})
83   options.reverse_merge!(:order => default_order)
84   options[:conditions] = merge_conditions(['published = ?', true],
85   options[:conditions])
86   options[:include] ||= []
87   options[:include] += [:blog]
88   find(what, options)
  97 with_scope(:find => {:order => default_order, :conditions => {:published => true}}) do
  98 find what, options
  99 end
end
def default_order
... ...
find_published(what, options)
end
end
  117 end
107   def merge_conditions(*conditions)
108   conditions.compact.collect do |cond|
109   '(' + sanitize_sql(cond) + ')'
110   end.join(' AND ')
111   end
  119 def content_fields
  120 @@content_fields[self.class]
end
def state_before_save
115   self.state.before_save(self)
  124 state.before_save(self)
end
118   def html_map(field=nil); self.class.html_map(field); end
  127 def state_after_save
  128 state.after_save(self)
  129 end
120   def full_html
121   unless blog.controller
122   raise "full_html only works with an active controller"
123   end
124   html(blog.controller, :all)
  131 def html_map(field=nil)
  132 self.class.html_map(field)
end
127   def populate_html_fields(controller)
128   html_map.each do |field, html_field|
129   if !self[field].blank? && self[html_field].blank?
130   html = text_filter.filter_text_for_controller( self[field].to_s, controller, self, false )
131   self[html_field] = self.send("#{html_field}_postprocess",
132   html, controller)
133   end
134   end
  135 def cache_key(field)
  136 id ? "contents_html/#{id}/#{field}" : nil
end
137   def html(controller,what = :all)
138   populate_html_fields(controller)
139  
140   if what == :all
141   self[:body_html].to_s + (self[:extended_html].to_s rescue '')
142   elsif self.class.html_map(what)
143   self[html_map(what)]
  139 # Return HTML for some part of this object. It will be fetched from the
  140 # cache if possible, or regenerated if needed.
  141 def html(field = :all)
  142 if field == :all
  143 generate_html(:all, content_fields.map{|f| self[f].to_s}.join("\n\n"))
  144 elsif self.class.html_map(field)
  145 generate_html(field)
else
145   raise "Unknown 'what' in article.html"
  147 raise "Unknown field: #{field.inspect} in article.html"
end
end
149   def method_missing(method, *args, &block)
150   if method.to_s =~ /_postprocess$/
151   args[0]
152   else
153   super(method, *args, &block)
154   end
  151 # Generate HTML for a specific field using the text_filter in use for this
  152 # object. The HTML is cached in the fragment cache, using the +ContentCache+
  153 # object in @@cache.
  154 def generate_html(field, text = nil)
  155 text ||= self[field].to_s
  156 html = text_filter.filter_text_for_content(blog, text, self)
  157 html ||= text # just in case the filter puked
  158 html_postprocess(field,html).to_s
end
  161 # Post-process the HTML. This is a noop by default, but Comment overrides it
  162 # to enforce HTML sanity.
  163 def html_postprocess(field,html)
  164 html
  165 end
  166
def whiteboard
self[:whiteboard] ||= Hash.new
end
  171 # The default text filter. Generally, this is the filter specified by blog.text_filter,
  172 # but comments may use a different default.
  173 def default_text_filter
  174 blog.text_filter.to_text_filter
  175 end
  177 # Grab the text filter for this object. It's either the filter specified by
  178 # self.text_filter_id, or the default specified in the blog object.
def text_filter
163   self[:text_filter] ||= if self[:text_filter_id]
164   TextFilter.find(self[:text_filter_id])
165   else
166   blog[default_text_filter_config_key].to_text_filter
167   end
  180 if self[:text_filter_id] && !self[:text_filter_id].zero?
  181 TextFilter.find(self[:text_filter_id])
  182 else
  183 default_text_filter
  184 end
end
  187 # Set the text filter for this object.
def text_filter=(filter)
171   self[:text_filter_id] = filter.to_text_filter.id
  189 returning(filter.to_text_filter) { |tf| self.text_filter_id = tf.id }
end
  192 # Changing the title flags the object as changed
  193 def title=(new_title)
  194 if new_title == self[:title]
  195 self[:title]
  196 else
  197 self.changed
  198 self[:title] = new_title
  199 end
  200 end
  201
  202 # FIXME -- this feels wrong.
def blog
self[:blog] ||= blog_id.to_i.zero? ? Blog.default : Blog.find(blog_id)
end
  207 def state=(newstate)
  208 if state
  209 state.exit_hook(self, newstate)
  210 end
  211 @state = newstate
  212 self[:state] = newstate.memento
  213 newstate.enter_hook(self)
  214 @state
  215 end
  216
def publish!
self.published = true
self.save!
end
def withdraw
184   self.published = false
185   self.published_at = nil
  223 state.withdraw(self)
end
def withdraw!
... ...
self[:published_at] || self[:created_at]
end
  244 def published?
  245 state.published?(self)
  246 end
  247
def just_published?
state.just_published?
end
  252 def just_changed_published_status?
  253 state.just_changed_published_status?
  254 end
  255
  256 def withdrawn?
  257 state.withdrawn?
  258 end
  259
def publication_pending?
state.publication_pending?
end
... ...
state.after_save(self)
end
222   def send_notification_to_user(controller, user)
223   notify_user_via_email(controller, user)
224   notify_user_via_jabber(controller, user)
  272 def send_notification_to_user(user)
  273 notify_user_via_email(user)
  274 notify_user_via_jabber(user)
end
227   def send_notifications(controller = nil)
228   state.send_notifications(self, controller || blog.controller)
  277 def send_notifications()
  278 state.send_notifications(self)
end
230  
231   # is_spam? checks to see if this is spam. This really belongs in a 'feedback' class
232   # that is the parent of Comment and Trackback, but we aren't going to build one right
233   # now.
234   #
235   # options are passed on to Akismet. Recommended options (when available) are:
236   #
237   # :permalink => the article's URL
238   # :user_agent => the poster's UserAgent string
239   # :referer => the poster's Referer string
240   #
241   def is_spam?(options={})
242   return false unless blog.sp_global
244   sp = SpamProtection.new(blog)
245   spam = false
  281 # deprecated
  282 def full_html
  283 typo_deprecated "use .html instead"
  284 html
  285 end
247   # Check fields against the blacklist.
248   spam_fields.each do |field|
249   spam ||= sp.is_spam? self[field]
250   end
  287 end
252   # Attempt to use Akismet. Timeout after 5 seconds if we can't contact them.
253   unless blog.sp_akismet_key.blank?
254   Timeout.timeout(5) do
255   akismet = Akismet.new(blog.sp_akismet_key,blog.canonical_server_url)
256   spam ||= akismet.commentCheck(akismet_options.merge(options))
257   end
258   end
259  
260   spam == true
  289 class Object
  290 def to_text_filter
  291 TextFilter.find_by_name(self.to_s) || TextFilter.find_by_name('none')
end
262  
263   def set_spam(is_spam, options ={})
264   unless blog.sp_akismet_key.blank?
265   Timeout.timeout(5) do
266   akismet = Akismet.new(blog.sp_akismet_key,blog.canonical_server_url)
267   if is_spam
268   STDERR.puts "** submitting spam for #{id}"
269   akismet.submitSpam(akismet_options.merge(options))
270   else
271   STDERR.puts "** submitting ham for #{id}"
272   akismet.submitHam(akismet_options.merge(options))
273   end
274   end
275   end
276   end
end
279   class Object; def to_text_filter; TextFilter.find_by_name(self.to_s); end; end
  295 class ContentTextHelpers
  296 include ActionView::Helpers::TagHelper
  297 include ActionView::Helpers::TextHelper
  298 end
  299

rool/rails/typo/trunk/app/models/content_state/base.rb:

prev.current 
module ContentState
  2 class StateError < StandardError
  3 end
  4
  5 class StateNotSerializable < StateError
  6 end
  7
  8 class InvalidMethodForState < StandardError
  9 end
  10
class Base
3   include Reloadable
4  
class << self
def instance
nil
... ...
self.class.to_s
end
  24 def exit_hook(content, target_state)
  25 logger.debug("#{content} leaving state #{self.memento}")
  26 end
  27
  28 def enter_hook(content)
  29 logger.debug("#{content} entering state #{self.memento}")
  30 end
  31
def before_save(content)
18   serialize_on(content)
true
end
22   def published?
  36 def after_save(content)
  37 true
  38 end
  39
  40 def withdraw(content)
  41 end
  42
  43 def mark_as_spam(content)
  44 content.state = Factory.new(:just_marked_as_spam)
  45 end
  46
  47 def mark_as_ham(content)
  48 content.state = Factory.new(:just_marked_as_ham)
  49 end
  50
  51 def published?(content)
false
end
... ...
false
end
  59 def just_changed_published_status?
  60 false
  61 end
  62
def draft?
false
end
... ...
false
end
  71 def withdrawn?
  72 false
  73 end
  74
def after_save(content)
true
end
... ...
true
end
46   def send_notifications(content)
  83 def send_notifications(controller)
true
end
def send_pings(content)
true
end
  90
  91 def is_spam?(content)
  92 false
  93 end
  94
  95 def status_confirmed?(content)
  96 false
  97 end
  98
  99 def logger
  100 @logger ||= RAILS_DEFAULT_LOGGER || Logger.new(STDERR)
  101 end
  102
  103 def confirm_classification(content)
  104 end
  105
  106 def ==(other_state)
  107 self.class == other_state.class
  108 end
end
end

rool/rails/typo/trunk/app/models/content_state/draft.rb:

prev.current 
module ContentState
class Draft < Base
3   include Reloadable
include Singleton
5   class << self
6   def derivable_from(content)
7   ! content.new_record? &&
8   ! content.published &&
9   content.published_at.nil?
10   end
11   end
13   def serialize_on(content)
  5 def enter_hook(content)
  6 super
content[:published] = false
15   content.published_at = nil
16   true
  8 content[:published_at] = nil
end
def change_published_state(content, boolean)
content[:published] = boolean
21   if content.published
  13 if boolean
content.state = JustPublished.instance
end
end

rool/rails/typo/trunk/app/models/content_state/factory.rb:

prev.current 
module ContentState
class Factory
def self.new(state_name)
4   return ContentState::New.instance unless state_name
  4 return ContentState::New.instance if !state_name || state_name.blank?
state_name = state_name.to_s.underscore
unless state_name.rindex('/')
state_name = 'content_state/' + state_name

rool/rails/typo/trunk/app/models/content_state/just_published.rb:

prev.current 
module ContentState
class JustPublished < Published
3   include Reloadable
include Singleton
6   class << self
7   def derivable_from(content)
8   content.new_record? &&
9   content.published &&
10   content[:published_at].nil?
11   end
  5 # We need to save the state as 'Published', but we need after_save
  6 # to be handled by JustPublished. So, JustPublished tells Rails that
  7 # it's *actually* Published and all shall be well.
  8 def memento
  9 'ContentState::Published'
end
def just_published?
true
end
18  
19   def serialize_on(content)
20   content[:published] = true
21   content[:published_at] ||= Time.now
  16 def just_changed_published_status?
true
end
25   def set_published_at(content, new_time)
26   content[:published_at] = new_time
27   return if content[:published_at].nil?
28   if content.published_at > Time.now
29   content.state = PublicationPending.instance
30   end
  20 def published?(content)
  21 true
end
33   def after_save(content)
34   content.state = Published.instance
35   end
  24 # def enter_hook(content)
  25 # super
  26 # end
37   def send_notifications(content, controller)
  28 # def set_published_at(content, new_time)
  29 # super
  30 # end
  31
  32 def send_notifications(content)
content.interested_users.each do |user|
39   content.send_notification_to_user(controller, user)
  34 content.send_notification_to_user(user)
end
end
def send_pings(content)
content.really_send_pings
end
  41
  42 def withdraw(content)
  43 content[:published_at] = nil
  44 content.state = Factory.new(:draft)
  45 end
end
end

rool/rails/typo/trunk/app/models/content_state/new.rb:

prev.current 
module ContentState
class New < Base
3   include Reloadable
include Singleton
5   class << self
6   def derivable_from(content)
7   content.new_record? &&
8   !content.published &&
9   content.published_at.nil?
10   end
11   end
13   def serialize_on(content)
  5 def enter_hook(content)
  6 super
content[:published] = false
content[:published_at] = nil
16   true
end
def before_save(content)
... ...
def change_published_state(content, boolean)
content[:published] = boolean
26   if content.published
  18 if boolean
content.state = JustPublished.instance
end
end

rool/rails/typo/trunk/app/models/content_state/publication_pending.rb:

prev.current 
module ContentState
class PublicationPending < Base
3   include Reloadable
include Singleton
5   class << self
6   def derivable_from(content)
7   !content.published && content.published_at ||
8   content.new_record? && content.published_at &&
9   content.published_at > Time.now
10   end
11   end
13   def serialize_on(content)
  5 def enter_hook(content)
  6 super
content[:published] = false if content.new_record?
15   true
end
18   def change_published_state(content, boolean)
19   content[:published] = boolean
20   if content.published && content.published_at <= Time.now
  10 def change_published_state(content, published)
  11 content[:published] = published
  12
  13 if published && content.published_at <= Time.now
content.state = JustPublished.instance
end
end
... ...
def post_trigger(content)
Trigger.post_action(content.published_at, content, 'publish!')
end
  35
  36 def withdraw(content)
  37 content[:published_at] = nil
  38 content.state = Draft.instance
  39 end
end
end

rool/rails/typo/trunk/app/models/content_state/published.rb:

prev.current 
module ContentState
class Published < Base
3   include Reloadable
include Singleton
5   class << self
6   def derivable_from(content)
7   !content.new_record? && content.published
8   end
9   end
11   def serialize_on(content)
  5 def published?(content)
true
end
15   def published?
16   true
  9 def enter_hook(content)
  10 super
  11 content[:published] = true
  12 content[:published_at] ||= Time.now
end
def change_published_state(content, boolean)
20   content[:published] = boolean
21   if ! content.published
  16 if ! boolean
  17 content[:published] = false
content[:published_at] = nil
23   content.state = Draft.instance
  19 content.state = Factory.new(:just_withdrawn)
end
end
  23 def withdraw(content)
  24 content.state = Factory.new(:just_withdrawn)
  25 end
  26
def set_published_at(content, new_time)
content[:published_at] = new_time
29   return if content.published_at.nil?
30   if content.published_at > Time.now
31   content.state = JustPublished.instance
  29 return if new_time.nil?
  30 if new_time > Time.now
  31 content.state = PublicationPending.instance
end
end
end

rool/rails/typo/trunk/app/models/email_notifier.rb:

prev.current 
class EmailNotifier < ActiveRecord::Observer
observe Article, Comment
3  
  3
def after_save(content)
5   return true unless content.just_published?
content.send_notifications
true
end

rool/rails/typo/trunk/app/models/notification_mailer.rb:

prev.current 
class NotificationMailer < ActionMailer::Base
helper :mail
3  
4   def article(controller, article, user)
5   setup(controller, user, article)
  3
  4 def article(article, user)
  5 setup(user, article)
@subject = "[#{article.blog.blog_name}] New article: #{article.title}"
@body[:article] = article
end
10   def comment(controller, comment, user)
11   setup(controller, user, comment)
  10 def comment(comment, user)
  11 setup(user, comment)
@subject = "[#{comment.blog.blog_name}] New comment on #{comment.article.title}"
@body[:article] = comment.article
@body[:comment] = comment
end
def trackback(sent_at = Time.now)
18   setup(controller, user, trackback)
  18 setup(user, trackback)
@subject = "[#{trackback.blog.blog_name}] New trackback on #{trackback.article.title}"
@body[:article] = trackback.article
@body[:trackback] = trackback
end
private
25   def setup(controller, user, content)
  25 def setup(user, content)
@body[:user] = user
27   @body[:controller] = controller
  27 @body[:blog] = content.blog
@recipients = user.email
@from = content.blog.email_from
@headers = {'X-Mailer' => "Typo #{TYPO_VERSION}"}

rool/rails/typo/trunk/app/models/page.rb:

prev.current 
end
def location(anchor=nil, only_path=true)
13   blog.url_for(:only_path => only_path, :action => 'view_page',
14   :name => name, :anchor => anchor)
  13 typo_deprecated "Use permalink_url"
  14 permalink_url(anchor, only_path)
end
  16
  17 def permalink_url(anchor=nil, only_path=true)
  18 blog.url_for(
  19 :controller => '/articles',
  20 :action => 'view_page',
  21 :name => name,
  22 :anchor => anchor,
  23 :only_path => only_path
  24 )
  25 end
17   protected
18  
19   def default_text_filter_config_key; 'text_filter'; end
  27 def edit_url
  28 blog.url_for(:controller => "/admin/pages", :action =>"edit", :id => id)
  29 end
  30
  31 def delete_url
  32 blog.url_for(:controller => "/admin/pages", :action =>"destroy", :id => id)
  33 end
end

rool/rails/typo/trunk/app/models/ping.rb:

prev.current 
belongs_to :article
class Pinger
  7 attr_accessor :article
  8 attr_accessor :blog
  9
def send_pingback_or_trackback
begin
@response = Net::HTTP.get_response(URI.parse(ping.url))
... ...
@ping
end
42   def article
43   ping.article
44   end
45  
46   def config
47   ping.config
48   end
49  
def send_xml_rpc(*args)
ping.send(:send_xml_rpc, *args)
end
... ...
def initialize(origin_url, ping)
@origin_url = origin_url
@ping = ping
  81 # Make sure these are fetched now for thread safety purposes.
  82 self.article = ping.article
  83 self.blog = article.blog
end
end
def send_pingback_or_trackback(origin_url)
90   t = Thread.start do
91   Pinger.new(origin_url, self).send_pingback_or_trackback
92   end
93   t.join if defined? $TESTING
  88 Pinger.new(origin_url, self).send_pingback_or_trackback
end
def send_trackback(trackback_url, origin_url)
97   t = Thread.start do
98   trackback_uri = URI.parse(trackback_url)
  92 trackback_uri = URI.parse(trackback_url)
100   post = "title=#{CGI.escape(article.title)}"
101   post << "&excerpt=#{CGI.escape(article.body_html.strip_html[0..254])}"
102   post << "&url=#{origin_url}"
103   post << "&blog_name=#{CGI.escape(article.blog.blog_name)}"
  94 post = "title=#{CGI.escape(article.title)}"
  95 post << "&excerpt=#{CGI.escape(article.html(:body).strip_html[0..254])}"
  96 post << "&url=#{origin_url}"
  97 post << "&blog_name=#{CGI.escape(article.blog.blog_name)}"
105   Net::HTTP.start(trackback_uri.host, trackback_uri.port) do |http|
106   path = trackback_uri.path
107   path += "?#{trackback_uri.query}" if trackback_uri.query
108   http.post(path, post, 'Content-type' => 'application/x-www-form-urlencoded; charset=utf-8')
109   end
  99 Net::HTTP.start(trackback_uri.host, trackback_uri.port) do |http|
  100 path = trackback_uri.path
  101 path += "?#{trackback_uri.query}" if trackback_uri.query
  102 http.post(path, post, 'Content-type' => 'application/x-www-form-urlencoded; charset=utf-8')
end
111   t.join if defined? $TESTING
end
def send_weblogupdatesping(server_url, origin_url)
115   t = Thread.start do
116   send_xml_rpc(self.url, "weblogUpdates.ping", article.blog.blog_name, server_url, origin_url)
117   end
118   t.join if defined? $TESTING
  107 send_xml_rpc(self.url, "weblogUpdates.ping", article.blog.blog_name,
  108 server_url, origin_url)
end
protected
def send_xml_rpc(xml_rpc_url, name, *args)
124   t = Thread.start do
125   begin
126   server = XMLRPC::Client.new2(URI.parse(xml_rpc_url).to_s)
  114 begin
  115 server = XMLRPC::Client.new2(URI.parse(xml_rpc_url).to_s)
128   begin
129   result = server.call(name, *args)
130   rescue XMLRPC::FaultException => e
131   logger.error(e)
132   end
133   rescue Exception => e
  117 begin
  118 result = server.call(name, *args)
  119 rescue XMLRPC::FaultException => e
logger.error(e)
end
  122 rescue Exception => e
  123 logger.error(e)
end
137   t.join if defined? $TESTING
end
end

rool/rails/typo/trunk/app/models/sidebar.rb:

prev.current 
class Sidebar < ActiveRecord::Base
2   # acts_as_list
serialize :config
  3 belongs_to :blog
5   def self.find_all_visible
6   find :all, :conditions => 'active_position is not null', :order => 'active_position'
  5 class Field
  6 attr_accessor :key
  7 attr_accessor :options
  8 attr_accessor :default
  9 include ApplicationHelper
  10 include ActionView::Helpers::TagHelper
  11 include ActionView::Helpers::FormTagHelper
  12 include ActionView::Helpers::FormOptionsHelper
  13
  14 def initialize(key, default, options = { })
  15 @key, @default, @options = key.to_s, default, options
  16 end
  17
  18 def label
  19 options[:label] || key.humanize.gsub(/url/i, 'URL')
  20 end
  21
  22 def label_html(sidebar)
  23 content_tag('label', label)
  24 end
  25
  26 def input_html(sidebar)
  27 text_field_tag(input_name(sidebar), sidebar.config[key], options)
  28 end
  29
  30 def line_html(sidebar)
  31 label_html(sidebar) + "<br />" + input_html(sidebar) + "<br />"
  32 end
  33
  34 def input_name(sidebar)
  35 "configure[#{sidebar.id}][#{key}]"
  36 end
  37
  38 def canonicalize(value)
  39 value
  40 end
  41
  42 class SelectField < self
  43 def input_html(sidebar)
  44 select_tag(input_name(sidebar),
  45 options_for_select(options[:choices], sidebar.config[key]),
  46 options)
  47 end
  48 end
  49
  50 class TextAreaField < self
  51 def input_html(sidebar)
  52 html_options = { "rows" => "10", "cols" => "30", "style" => "width:255px"}.update(options.stringify_keys)
  53 text_area_tag(input_name(sidebar), h(sidebar.config[key]), html_options)
  54 end
  55 end
  56
  57 class RadioField < self
  58 def input_html(sidebar)
  59 options[:choices].collect do |choice|
  60 value = value_for(choice)
  61 radio_button_tag(input_name(sidebar), value,
  62 value == sidebar.config[key], options) +
  63 content_tag('label', label_for(choice))
  64 end.join("<br />")
  65 end
  66
  67 def label_for(choice)
  68 choice.is_a?(Array) ? choice.last : choice.to_s.humanize
  69 end
  70
  71 def value_for(choice)
  72 choice.is_a?(Array) ? choice.first : choice
  73 end
  74 end
  75
  76 class CheckBoxField < self
  77 def input_html(sidebar)
  78 check_box_tag(input_name(sidebar), 1, sidebar.config[key], options)+
  79 hidden_field_tag(input_name(sidebar),0)
  80 end
  81
  82 def line_html(sidebar)
  83 input_html(sidebar) + ' ' + label_html(sidebar) + '<br >'
  84 end
  85
  86 def canonicalize(value)
  87 case value
  88 when "0"
  89 false
  90 else
  91 true
  92 end
  93 end
  94 end
  95
  96 def self.build(key, default, options)
  97 field = class_for(options).new(key, default, options)
  98 end
  99
  100 def self.class_for(options)
  101 case options[:input_type]
  102 when :text_area
  103 TextAreaField
  104 when :textarea
  105 TextAreaField
  106 when :radio
  107 RadioField
  108 when :checkbox
  109 CheckBoxField
  110 when :select
  111 SelectField
  112 else
  113 if options[:choices]
  114 SelectField
  115 else
  116 self
  117 end
  118 end
  119 end
end
9   def self.find_all_staged
10   find :all, :conditions => 'staged_position is not null', :order => 'staged_position'
  122 class << self
  123 attr_accessor :view_root
  124
  125 def find_all_visible
  126 find :all, :conditions => 'active_position is not null', :order => 'active_position'
  127 end
  128
  129 def find_all_staged
  130 find :all, :conditions => 'staged_position is not null', :order => 'staged_position'
  131 end
  132
  133 def purge
  134 delete_all('active_position is null and staged_position is null')
  135 end
  136
  137 def setting(key, default=nil, options = { })
  138 return if instance_methods.include?(key.to_s)
  139 fields << Field.build(key.to_s, default, options)
  140 fieldmap.update(key.to_s => fields.last)
  141 self.send(:define_method, key) do
  142 self.config[key.to_s]
  143 end
  144 self.send(:define_method, "#{key}=") do |newval|
  145 self.config[key.to_s] = newval
  146 end
  147 end
  148
  149 def fieldmap
  150 @fieldmap ||= {}
  151 end
  152
  153 def fields
  154 @fields ||= []
  155 end
  156
  157 def fields=(newval)
  158 @fields = newval
  159 end
  160
  161 def description(desc = nil)
  162 if desc
  163 @description = desc
  164 else
  165 @description
  166 end
  167 end
  168
  169 def lifetime(timeout = nil)
  170 if timeout
  171 @lifetime = timeout
  172 else
  173 @lifetime
  174 end
  175 end
  176
  177 def short_name
  178 self.to_s.underscore.split(%r{_}).first
  179 end
  180
  181 def display_name(new_dn = nil)
  182 @display_name = new_dn if new_dn
  183 @display_name || short_name.humanize
  184 end
  185
  186 def available_sidebars
  187 Sidebar.subclasses.sort_by { |klass| klass.to_s }
  188 end
end
13   def self.purge
14   delete_all('active_position is null and staged_position is null')
  191 def initialize(*args, &block)
  192 super(*args, &block)
  193 self.class.fields.each do |field|
  194 unless config.has_key?(field.key)
  195 config[field.key] = field.default
  196 end
  197 end
end
  200
def publish
self.active_position=self.staged_position
end
  205 def config
  206 self[:config] ||= { }
  207 end
  208
def sidebar_controller
@sidebar_controller ||= SidebarController.available_sidebars.find { |s| s.short_name == self.controller }
end
25   def config
26   self[:config]||{}
  213 def html_id
  214 short_name + '-' + id.to_s
end
29   def html_id
30   controller+'-'+id.to_s
  217 def parse_request(contents, params)
end
  219
  220 def fields
  221 self.class.fields
  222 end
  223
  224 def fieldmap(field = nil)
  225 if field
  226 self.class.fieldmap[field.to_s]
  227 else
  228 self.class.fieldmap
  229 end
  230 end
  231
  232 def description
  233 self.class.description
  234 end
  235
  236 def short_name
  237 self.class.short_name
  238 end
  239
  240 def display_name
  241 self.class.display_name
  242 end
  243
  244 def content_partial
  245 "/sidebars/#{short_name}/content"
  246 end
  247
  248 def to_locals_hash
  249 fields.inject({ :sidebar => self }) do |hash, field|
  250 hash.merge(field.key => config[field.key])
  251 end
  252 end
  253
  254 def lifetime
  255 self.class.lifetime
  256 end
  257
  258 def view_root
  259 self.class.view_root
  260 end
end
  262

rool/rails/typo/trunk/app/models/tag.rb:

prev.current 
end
def self.to_prefix
53   'tags'
  53 'tag'
end
def published_articles
... ...
def permalink
self.name
end
  63
  64 def permalink_url(anchor=nil, only_path=true)
  65 blog = Blog.find(1) # remove me...
  66
  67 blog.url_for(
  68 :controller => '/articles',
  69 :action => 'tag',
  70 :id => permalink
  71 )
  72 end
  73
end

rool/rails/typo/trunk/app/models/text_filter.rb:

prev.current 
require 'net/http'
2   require_dependency 'textfilter_controller'
4   class TextFilter < ActiveRecord::Base
  3 class TextFilter < CachedModel
serialize :filters
serialize :params
def self.available_filters
9   objects = []
10   ObjectSpace.each_object(Class) do |o|
11   if TextFilterPlugin > o and o.to_s =~ /Controller/
12   objects.push o
13   end
14   end
15  
16   objects
  8 TextFilterPlugin.filter_map.values
end
  11 TYPEMAP={TextFilterPlugin::Markup => "markup",
  12 TextFilterPlugin::MacroPre => "macropre",
  13 TextFilterPlugin::MacroPost => "macropost",
  14 TextFilterPlugin::PostProcess => "postprocess",
  15 TextFilterPlugin => "other"}
  16
def self.available_filter_types
filters=available_filters
21   types={"macropre" => [],
22   "macropost" => [],
23   "markup" => [],
24   "postprocess" => [],
25   "other" => []}
  19 @cached_filter_types ||= {}
27   typemap={TextFilterPlugin::Markup => "markup",
28   TextFilterPlugin::MacroPre => "macropre",
29   TextFilterPlugin::MacroPost => "macropost",
30   TextFilterPlugin::PostProcess => "postprocess",
31   TextFilterPlugin => "other"}
  21 unless @cached_filter_types[filters]
  22 types={"macropre" => [],
  23 "macropost" => [],
  24 "markup" => [],
  25 "postprocess" => [],
  26 "other" => []}
33   filters.each { |filter| types[typemap[filter.superclass]].push(filter) }
  28 filters.each { |filter| types[TYPEMAP[filter.superclass]].push(filter) }
35   types
  30 @cached_filter_types[filters] = types
  31 end
  32
  33 @cached_filter_types[filters]
end
def self.filters_map
39   available_filters.inject({}) { |map,filter| map[filter.short_name] = filter; map }
  37 TextFilterPlugin.filter_map
end
42   def self.filter_text(text, controller, content, filters, filterparams={}, filter_html=false)
43  
  40 def self.filter_text(blog, text, content, filters, filterparams={})
map=TextFilter.filters_map
45   filters = [:htmlfilter, filters].flatten if filter_html
filters.each do |filter|
next if filter == nil
begin
50   filter_controller = map[filter.to_s]
51   next unless filter_controller
52   text = filter_controller.filtertext(controller, content, text, :filterparams => filterparams)
  46 filter_class = map[filter.to_s]
  47 next unless filter_class
  48 text = filter_class.filtertext(blog, content, text, :filterparams => filterparams)
rescue => err
logger.error "Filter #{filter} failed: #{err}"
end
... ...
text
end
61   def self.filter_text_by_name(text, controller, filtername, filter_html=false)
  57 def self.filter_text_by_name(blog, text, filtername)
f = TextFilter.find_by_name(filtername)
63   f.filter_text_for_controller text, controller, nil, filter_html
  59 f.filter_text_for_content blog, text, nil
end
66   def filter_text_for_controller(text, controller, content, filter_html=false)
67   self.class.filter_text(
68   text, controller, content,
69   [:macropre, markup, :macropost, filters].flatten, params,
70   filter_html)
  62 def filter_text_for_content(blog, text, content)
  63 self.class.filter_text(blog, text, content,
  64 [:macropre, markup, :macropost, filters].flatten, params)
end
73   def filter(text,filter_html=false)
74   self.class.filter(text,self.filters,self.params,filter_html)
  67 def filter(text)
  68 typo_deprecated "What does this do?"
  69 self.class.filter(text,self.filters,self.params)
end
def help
... ...
def commenthelp
filter_map = TextFilter.filters_map
96   filter_types = TextFilter.available_filter_types
help = [filter_map[markup]]
filters.each { |f| help.push(filter_map[f.to_s]) }

rool/rails/typo/trunk/app/models/theme.rb:

prev.current 
File.read("#{path}/about.markdown") rescue "### #{name}"
end
  19 # Find a theme, given the theme name
  20 def self.find(name)
  21 self.new(name,theme_path(name))
  22 end
  23
def self.themes_root
RAILS_ROOT + "/themes"
end
  28 def self.theme_path(name)
  29 themes_root + "/" + name
  30 end
  31
def self.theme_from_path(path)
name = path.scan(/[-\w]+$/i).flatten.first
self.new(name, path)

rool/rails/typo/trunk/app/models/trackback.rb:

prev.current 
require_dependency 'spam_protection'
3   class Trackback < Content
4   include TypoGuid
5   belongs_to :article, :counter_cache => true
6  
  3 class Trackback < Feedback
  4 belongs_to :article
content_fields :excerpt
8  
9   validates_age_of :article_id
validates_presence_of :title, :excerpt, :url
11   validate_on_create :article_is_pingable
13   def self.default_order
14   'created_at ASC'
15   end
16  
def initialize(*args, &block)
super(*args, &block)
self.title ||= self.url
self.blog_name ||= ""
end
23   def location(anchor=:ignored, only_path=true)
24   blog.url_for(article, "trackback-#{id}", only_path)
25   end
  14 before_create :process_trackback
27   protected
28   before_create :make_nofollow, :process_trackback, :create_guid
29  
def make_nofollow
31   self.blog_name = blog_name.strip_html
32   self.title = title.strip_html
33   self.excerpt = excerpt.strip_html
  17 typo_deprecated 'Do it via postprocessing.'
end
def process_trackback
... ...
end
end
43   def article_is_pingable
44   return if article.nil?
45   if blog.global_pings_disable
46   errors.add(:article, "Pings are disabled")
47   end
48   unless article.allow_pings?
49   errors.add(:article, "Article is not pingable")
50   end
  27 def article_allows_feedback?
  28 return true if article.allow_pings?
  29 errors.add(:article, 'Article is not pingable')
  30 false
end
53   def akismet_options
54   {:user_ip => ip, :comment_type => 'trackback', :comment_author => blog_name, :comment_author_email => nil,
55   :comment_author_url => url, :comment_content => excerpt}
  33 def blog_allows_feedback?
  34 return true unless blog.global_pings_disable
  35 errors.add(:article, "Pings are disabled")
  36 false
end
57  
58   def spam_fields
59   [:title, :excerpt, :ip, :url]
  38
  39 def originator
  40 blog_name
end
  42
  43 def body
  44 excerpt
  45 end
  46
  47 def body=(newval)
  48 self.excerpt = newval
  49 end
end

rool/rails/typo/trunk/app/models/user.rb:

prev.current 
require 'digest/sha1'
# this model expects a certain database layout and its based on the name/login pattern.
4   class User < ActiveRecord::Base
5   has_and_belongs_to_many :notify_contents, :class_name => 'Content',
6   :join_table => 'notifications', :foreign_key => 'notify_user_id',
7   :association_foreign_key => 'notify_content_id', :uniq => true
  4 class User < CachedModel
  5 has_many :notifications, :foreign_key => 'notify_user_id'
  6 has_many :notify_contents, :through => :notifications,
  7 :source => 'notify_content',
  8 :uniq => true
has_many :articles, :order => 'created_at DESC' do
def published
... ...
# @user = User.authenticate('bob', 'bobpass')
#
def self.authenticate(login, pass)
25   find_first(["login = ? AND password = ?", login, sha1(pass)])
  26 find(:first,
  27 :conditions => ["login = ? AND password = ?", login, sha1(pass)])
end
def self.authenticate?(login, pass)

rool/rails/typo/trunk/app/views/accounts/login.rhtml:

prev.current 
1   <%= start_form_tag :action=> "login" %>
  1 <% form_tag :action=> "login" do %>
<div title="Account login" id="loginform">
5  
6   <h3>Please login</h3>
7  
8   <div class="form">
9   <% if @flash[:notice] %>
10   <h4><%= @flash[:notice] %></h4>
11   <% end %>
12   <label for="user_login">Login:</label><br/>
13   <input type="text" name="user_login" id="user_login" size="20" value=""/><br/>
15   <label for="user_password">Password:</label><br/>
16   <input type="password" name="user_password" id="user_password" size="30"/>
  6 <h3>Typo</h3>
18   <br/>
19   <input type="submit" name="login" value="Login &#187;" class="primary" />
  8 <div class="form admin">
  9 <% if flash[:notice] %>
  10 <h4><%= flash[:notice] %></h4>
  11 <% end %>
  12 <ul>
  13 <li>
  14 <label for="user_login" class="block"><%= _('Username')%>:</label>
  15 <input type="text" name="user_login" id="user_login" size="20" value=""/>
  16 </li>
  17 <li>
  18 <label for="user_password" class="block"><%= _('Password') %>:</label>
  19 <input type="password" name="user_password" id="user_password" size="30"/>
  20 </li>
  21 </ul>
  22 <input type="submit" name="login" value= "<%= _('Login') %> &#187;" class="primary" />
  23 <p><%= link_to "&laquo; " + _('Back to the blog'), { :controller => '/articles' } %></p>
</div>
</div>
23   <%= end_form_tag %>
  27 <% end %>

rool/rails/typo/trunk/app/views/accounts/logout.rhtml:

prev.current 
1   <h3>Logoff</h3>
  1 <h3><%= _("Logoff")%></h3>
<div class="memo">
<p>
5   You are now logged out of the system.
6   <%= link_to "Do you want to go to your blog?", :controller => "/" %>
  5 <%= _("You are now logged out of the system") %>.
  6 <%= link_to _("Do you want to go to your blog?"), :controller => "articles" %>
</p>
8  
9   <%= link_to "&#171; login", :action => "login" %><br />
10  
  8
  9 <%= link_to "&#171; " + _('Login'), :action => "login" %><br />
  10
</div>

rool/rails/typo/trunk/app/views/accounts/signup.rhtml:

prev.current 
1   <%= start_form_tag :action=> "signup" %>
  1 <% form_tag :action=> "signup" do %>
<%= error_messages_for 'user' %><br/>
<div title="Account signup" id="loginform">
6   <h3>Signup</h3>
  6 <h3><%= _('Signup') %></h3>
<div class="form">
8   <label for="user_login">Desired login:</label><br/>
  8 <label for="user_login"><%= _("Desired login") %>:</label><br/>
<%= text_field "user", "login", :size => 20 %><br/>
11   <label for="user_login">Display name:</label><br/>
  11 <label for="user_login"><%= _("Display name")%>:</label><br/>
<%= text_field "user", "name", :size => 30 %><br/>
14   <label for="user_login">Email:</label><br/>
  14 <label for="user_login"><%= _("Email")%>:</label><br/>
<%= text_field "user", "email", :size => 30 %><br/>
17   <label for="user_password">Choose password:</label><br/>
  17 <label for="user_password"><%= _("Choose password")%>:</label><br/>
<%= password_field "user", "password", :size => 30 %><br/>
19   <label for="user_password_confirmation">Confirm password:</label><br/>
  19 <label for="user_password_confirmation"><%= _("Confirm password")%>:</label><br/>
<%= password_field "user", "password_confirmation", :size => 30 %><br/>
21   <input type="submit" value="Signup &#187;" class="primary" />
  21 <input type="submit" value="<%= _('Signup') %>" class="primary" />
</div>
</div>
25   <%= end_form_tag %>
  25 <% end %>

rool/rails/typo/trunk/app/views/admin/base/_recent_comments.rhtml:

prev.current 
1   <h2>Recent comments</h2>
  1 <h2><%= _("Recent comments")%></h2>
<ul class="recent">
<% for comment in Comment.find(:all, :limit => 5, :order => 'id DESC' ) %>
<li>
<h4><%= truncate(comment.author, 20) %></h4>
6   <div><%= link_to truncate(comment.body, 20), :controller => "comments", :action => "show", :id => comment.id, :article_id => comment.article_id %></div>
  6 <div><%= link_to truncate(comment.body, 20), :controller => "/admin/comments", :action => "show", :id => comment.id, :article_id => comment.article_id %></div>
<p class="right"><%= time_ago_in_words(comment.created_at) %> ago</p>
</li>
<% end %>

rool/rails/typo/trunk/app/views/admin/base/_recent_trackbacks.rhtml:

prev.current 
1   <h2>Recent trackbacks</h2>
  1 <h2><%=_("Recent trackbacks")%></h2>
<ul class="recent">
<% for trackback in Trackback.find(:all, :limit => 5, :order => 'id DESC' ) %>
<li>
5   <%= link_to truncate(trackback.excerpt, 20), :controller => "trackbacks", :action => "show", :id => trackback.id, :article_id => trackback.article_id %><br />
  5 <%= link_to truncate(trackback.excerpt, 20), :controller => "/admin/trackbacks", :action => "show", :id => trackback.id, :article_id => trackback.article_id %><br />
by <%= truncate(trackback.blog_name, 20) %><br />
<%= time_ago_in_words(trackback.created_at) %> ago
</li>

rool/rails/typo/trunk/app/views/admin/blacklist/_blacklist_patterns.rhtml:

prev.current 
<table cellspacing="1" cellpadding="0">
<tr>
3   <th>Pattern</th>
4   <th>Type</th>
5   <th>Edit</th>
6   <th>Delete</th>
  3 <th><%= _("Pattern") %></th>
  4 <th><%= _("Type") %></th>
  5 <th><%= _("Edit") %></th>
  6 <th><%= _("Delete")%></th>
</tr>
<% for blacklist_pattern in @blacklist_patterns -%>
<tr <%= alternate_class -%>>

rool/rails/typo/trunk/app/views/admin/blacklist/_form.rhtml:

prev.current 
<%= error_messages_for 'blacklist_pattern' %>
<!--[form:blacklist_pattern]-->
<p>
4   <label for="blacklist_pattern_pattern">Pattern:</label>
  4 <label for="blacklist_pattern_pattern"><%= _("Pattern")%>:</label>
<%= text_field 'blacklist_pattern', 'pattern' %>
</p>
<p>
<% if @controller.action_name == "new" %>
9   <label for="blacklist_pattern_type">Type:</label>
  9 <label for="blacklist_pattern_type"><%= _("Type")%>:</label>
<select name="blacklist_pattern[type]">
11   <%= options_for_select [ ['String', 'StringPattern'], ['Regex', 'RegexPattern' ] ] %>
  11 <%= options_for_select [ [_('String'), 'StringPattern'], [_('Regex'), 'RegexPattern' ] ] %>
</select>
<% end %>
</p>

rool/rails/typo/trunk/app/views/admin/blacklist/_quick_post.rhtml:

prev.current 
1   <%= start_form_tag :action=>"new" %>
  1 <% form_tag :action=>"new" do %>
<p>
4   <label for="blacklist_pattern_pattern">Pattern:</label>
  4 <label for="blacklist_pattern_pattern"><%= _("Pattern")%>:</label>
<%= text_field 'blacklist_pattern', 'pattern' %>
</p>
<p>
8   <label for="blacklist_pattern_type">Type:</label>
  8 <label for="blacklist_pattern_type"><%= _("Type")%>:</label>
<select name="blacklist_pattern[type]">
10   <%= options_for_select [ ['String', 'StringPattern'], ['Regex', 'RegexPattern' ] ] %>
  10 <%= options_for_select [ [_('String'), 'StringPattern'], [_('Regex'), 'RegexPattern' ] ] %>
</select>
<div id="operations">
14   <%= save("Add pattern") %> or <a href="#" onclick="new Effect.BlindUp('quick-post', {duration: 0.4}); return false;" >Cancel</a>
  14 <%= save(_("Add pattern")) %> <%= _("or")%> <a href="#" onclick="new Effect.BlindUp('quick-post', {duration: 0.4}); return false;" ><%= _("Cancel")%></a>
</div>
16   <%= end_form_tag %>
  16 </p>
  17 <% end %>

rool/rails/typo/trunk/app/views/admin/blacklist/destroy.rhtml:

prev.current 
1   <% @page_heading = 'Blacklist Patterns' %>
  1 <% @page_heading = _('Blacklist Patterns') %>
<% content_for('tasks') do %>
4   <%= task_show 'Show this pattern', @blacklist_pattern.id %>
  4 <%= task_show _('Show this pattern'), @blacklist_pattern.id %>
<% end %>
7   <p>Are you sure you want to delete this item?</p>
8   <%= start_form_tag :action => "destroy", :id => @blacklist_pattern.id %>
  7 <p><%= _("Are you sure you want to delete this item?")%></p>
  8 <% form_tag :action => "destroy", :id => @blacklist_pattern.id do %>
<%= confirm_delete %>
10   <%= end_form_tag %>
  11 <% end %>

rool/rails/typo/trunk/app/views/admin/blacklist/edit.rhtml:

prev.current 
1   <% @page_heading = 'Blacklist Patterns' %>
  1 <% @page_heading = _('Blacklist Patterns') %>
3   <%= start_form_tag :action=>"edit", :id => @blacklist_pattern.id %>
4  
5   <h3>Editing pattern</h3>
6   <div class="form">
  3 <% form_tag :action=>"edit", :id => @blacklist_pattern.id do %>
  4
  5 <h3><%= _("Editing pattern")%></h3>
  6 <div class="form">
<%= render_partial "form" %>
</div>
<div id="operations">
11   <%= save %> or <%= cancel %>
  11 <%= save %> or <%= cancel %>
</div>
14   <%= end_form_tag %>
  15 <% end %>

rool/rails/typo/trunk/app/views/admin/blacklist/list.rhtml:

prev.current 
1   <% @page_heading = 'Blacklist Patterns' %>
  1 <% @page_heading = _('Blacklist Patterns') %>
<% content_for('tasks') do %>
4   <%= task_quickpost('Create new Blacklist') %>
  4 <%= task_quickpost(_('Create new Blacklist')) %>
<% end %>
<div id="quick-post" style="display:none;position:absolute;">

rool/rails/typo/trunk/app/views/admin/cache/list.rhtml:

prev.current 
1   <% @page_heading = 'Cache' %>
  1 <% @page_heading = _('Cache') %>
<% content_for('tasks') do %>
<%= task_sweep 'Empty Page Cache' %>
<% end %>
<div id="users">
7   <p>There are <%= @page_cache_size %> entries in the page cache</p>
  7 <p> <%= _("There are %d entries in the page cache", @page_cache_size) %></p>
</div>

rool/rails/typo/trunk/app/views/admin/categories/_categories.rhtml:

prev.current 
<table>
<tr>
3   <th>Category title</th>
4   <th>Articles</th>
5   <th>Delete</th>
  3 <th><%= _("Category title")%></th>
  4 <th><%= _("Articles")%></th>
  5 <th><%= _("Delete")%></th>
</tr>
<% for category in @categories -%>
<tr <%= alternate_class -%> id="category_<%= category.id -%>">

rool/rails/typo/trunk/app/views/admin/categories/_form.rhtml:

prev.current 
<%= error_messages_for 'category' %>
<!--[form:category]-->
<p>
4   <label for="category_name">Name:</label>
  4 <label for="category_name"><%= _("Name")%>:</label>
<%= text_field 'category', 'name' %>
</p>
<!--[eoform:cateogry]-->

rool/rails/typo/trunk/app/views/admin/categories/_quick_post.rhtml:

prev.current 
1   <%= start_form_tag :action=>"new" %>
  1 <% form_tag :action=>"new" do %>
<p>
4   <label for="category_name">Title:</label><br/>
5   <%= text_field 'category', 'name' %>
  4 <label for="category_name"><%= _("Title")%>:</label><br/>
  5 <%= text_field 'category', 'name' %>
</p>
<div id="operations">
9   <%= save("Add category") %> or <a href="#" onclick="new Effect.BlindUp('quick-post', {duration: 0.4}); return false;" >Cancel</a>
  9 <%= save(_("Add category")) %> <%= _("or")%> <a href="#" onclick="new Effect.BlindUp('quick-post', {duration: 0.4}); return false;" ><%= _("Cancel")%></a>
</div>
11   <%= end_form_tag %>
  11 <% end %>

rool/rails/typo/trunk/app/views/admin/categories/destroy.rhtml:

prev.current 
1   <% @page_heading = 'Categories' %>
  1 <% @page_heading = _('Categories') %>
<% content_for('tasks') do %>
4   <%= task_show 'Show this category', @category.id %>
5   <% end %>
  4 <%= task_show _('Show this category'), @category.id %>
  5 <% end %>
7   <p>Are you sure you want to delete the category '<%= @category.name %>'?</p>
8   <%= start_form_tag :action => "destroy", :id => @category.id %>
9   <%= confirm_delete("Delete this category") %>
10   <%= end_form_tag %>
  8 <p><%= _("Are you sure you want to delete the category ")%> '<%= @category.name %>'?</p>
  9 <% form_tag :action => "destroy", :id => @category.id do %>
  10 <%= confirm_delete(_("Delete this category")) %>
  11 <% end %>

rool/rails/typo/trunk/app/views/admin/categories/edit.rhtml:

prev.current 
1   <% @page_heading = 'Categories' %>
  1 <% @page_heading = _('Categories') %>
3   <%= start_form_tag :action=>"edit", :id => @category.id %>
4   <h3>Editing category</h3>
5   <div class="form">
  3 <% form_tag :action=>"edit", :id => @category.id do %>
  4 <h3><% _("Editing category")%></h3>
  5 <div class="form">
<%= render_partial "form" %>
</div>
<div id="operations">
10   <%= save %> or <%= cancel %>
  10 <%= save %> or <%= cancel %>
</div>
13   <%= end_form_tag %>
  14 <% end %>

rool/rails/typo/trunk/app/views/admin/categories/list.rhtml:

prev.current 
1   <% @page_heading = 'Categories' %>
  1 <% @page_heading = _('Manage Categories') %>
<% content_for('tasks') do -%>
4   <%= task_quickpost('Create new category') -%>
5   <li><%= link_to_remote('Reorder', :update => 'category_container', :url => { :action => 'reorder' }) %></li>
6   <li><%= link_to_remote('Sort alphabetically', :update => 'category_container', :url => { :action => 'asort' }) -%></li>
  4 <%= task_quickpost(_('Create new category')) -%>
  5 <li><%= link_to_remote(_('Reorder'), :update => 'category_container', :url => { :action => 'reorder' }) %></li>
  6 <li><%= link_to_remote(_('Sort alphabetically'), :update => 'category_container', :url => { :action => 'asort' }) -%></li>
  7 <%= tab _("Manage Articles"), :controller=>"content", :action=>"list"%>
  8 <%= tab _("Manage Pages"), :controller=>"pages", :action=>"list" %>
  9 <%= tab _("Manage Resources"), :controller=>"resources", :action=>"list" %>
<% end -%>
<div id="quick-post" style="display:none;position:absolute;">

rool/rails/typo/trunk/app/views/admin/categories/reorder.rhtml:

prev.current 
<% end -%>
</ul>
7   <%= link_to_remote "(Done)", :update => "category_container", :url => { :action => "category_container" } %>
  7 <%= link_to_remote _("(Done)"), :update => "category_container", :url => { :action => "category_container" } %>
<%= sortable_element "category_list", :url => { :action => "order" }, :complete => visual_effect(:highlight, "category_list") %>

rool/rails/typo/trunk/app/views/admin/categories/show.rhtml:

prev.current 
1   <% @page_heading = "Articles in #{h @category.name}" %>
  1 <% @page_heading = _("Articles in") + " #{h @category.name}" %>
<% content_for('tasks') do %>
4   <%= task_edit 'Edit this category', @category.id %>
  4 <%= task_edit _('Edit this category'), @category.id %>
<% end %>
7   <%= start_form_tag :action=>"new" %>
  7 <% form_tag :action=>"new" do %>
<div class="list">
<table cellspacing="1" cellpadding="0">
<% for article in @category.articles -%>
<tr <%= alternate_class -%>>
12   <td><%= image_tag 'checked.gif' %> <%= link_to h(article.title), :controller => "content", :action => "show", :id => article.id %></td>
  12 <td><%= image_tag 'checked.gif' %> <%= link_to h(article.title), :controller => "/admin/content", :action => "show", :id => article.id %></td>
<td><%= distance_of_time_in_words_to_now article.published_at %> ago</td>
14   <td><%= link_to pluralize(article.comments.size, 'comment'), :controller => 'comments', :article_id => article, :action => 'list' %></td>
  14 <td><%= link_to pluralize(article.comments.size, 'comment'), :controller => '/admin/comments', :article_id => article, :action => 'list' %></td>
</tr>
<% end -%>
</table>
</div>
  19 <% end %>

rool/rails/typo/trunk/app/views/admin/comments/_form.rhtml:

prev.current 
<%= error_messages_for 'comment' %>
<!--[form:comment]-->
<p>
4   <label for="comment_author">Author:</label><br/>
  4 <label for="comment_author"><%= _("Author")%>:</label><br/>
<%= text_field 'comment', 'author' %>
</p>
<p>
8   <label for="comment_url">Url:</label><br/>
  8 <label for="comment_url"><%= _("Url") %>:</label><br/>
<%= text_field 'comment', 'url' %>
</p>
<p>
12   <label for="comment_email">Email:</label><br/>
  12 <label for="comment_email"><%= _("Email")%>:</label><br/>
<%= text_field 'comment', 'email' %>
</p>
<p>
16   <label for="comment_body">Body:</label><br/>
  16 <label for="comment_body"><%= _("Body")%>:</label><br/>
<%= text_area 'comment', 'body' %>
</p>
<!--[eoform:comment]-->

rool/rails/typo/trunk/app/views/admin/comments/comments.rhtml:

prev.current 
<% for comment in @comments %>
2   by <strong><%= comment.author %></strong> on <%= comment.created_at %> <%= link_to '[x]', :action => 'comment_destroy', :id => comment.id %> <br />
  2 by <strong><%= comment.author %></strong> <%= _("on")%> <%= comment.created_at %> <%= link_to '[x]', :action => 'comment_destroy', :id => comment.id %> <br />
<%= comment.body %><br /><br />
<% end %>

rool/rails/typo/trunk/app/views/admin/comments/destroy.rhtml:

prev.current 
1   <% @page_heading = "Comments for #{ link_to h(@article.title), :controller => 'content', :action => 'show', :id => @article }" %>
  1 <% @page_heading = _("Comments for") + " #{ link_to h(@article.title), :controller => '/admin/content', :action => 'show', :id => @article }" %>
<% content_for('tasks') do %>
4   <%= task_show 'Show this comment', @comment.id %>
5   <% end %>
  4 <%= task_show _('Show this comment'), @comment.id %>
  5 <% end %>
7   <p>Are you sure you want to delete this item?</p>
8   <%= start_form_tag %>
  7 <p><%= _("Are you sure you want to delete this item?")%></p>
  8 <% form_tag do %>
<%= hidden_field "comment", "id" %>
<%= confirm_delete %>
11   <%= end_form_tag %>
  11 <% end %>

rool/rails/typo/trunk/app/views/admin/comments/edit.rhtml:

prev.current 
1   <% @page_heading = "Comments for #{ link_to h(@article.title), :controller => 'content', :action => 'show', :id => @article }" %>
  1 <% @page_heading = _("Comments for") + " #{ link_to h(@article.title), :controller => '/admin/content', :action => 'show', :id => @article }" %>
<% content_for('tasks') do %>
4   <li><%= comment_url_link 'View comment on your blog', @comment %></li>
5   <% end %>
  4 <li><%= link_to_permalink @comment, _('View comment on your blog') %></li>
  5 <% end %>
7   <%= start_form_tag :action=>"edit", :id => @comment.id %>
  7 <% form_tag :action=>"edit", :id => @comment.id do %>
9   <h3>Editing comment</h3>
10   <div class="form">
  9 <h3><%= _("Editing comment")%></h3>
  10 <div class="form">
<%= render_partial "form" %>
</div>
<div id="operations">
15   <%= save %> or <%= cancel %>
  15 <%= save %> or <%= cancel %>
</div>
18   <%= end_form_tag %>
  18 <% end %>

rool/rails/typo/trunk/app/views/admin/comments/list.rhtml:

prev.current 
1   <% @page_heading = "Comments for #{ link_to h(@article.title), :controller => 'content', :action => 'show', :id => @article }" %>
  1 <% @page_heading = "Comments for #{ link_to h(@article.title), :controller => '/admin/content', :action => 'show', :id => @article }" %>
<% content_for('tasks') do %>
4   <li><%= link_to 'Back to articles', :controller => 'content', :action => 'list' %></li>
5   <%= task_new('Create new comment') %>
  4 <%= task_new('Write a comment') %>
  5 <li><%= link_to _('Manage articles'), :controller => '/admin/content', :action => 'list' %></li>
<% end %>
<div class="list">
<table>
<tr>
11   <th>Author</th>
12   <th>Email</th>
13   <th>Body</th>
14   <th>IP</th>
15   <th>Posted date</th>
16   <th>Edit</th>
17   <th>Delete</th>
  11 <th><%= _("Author")%></th>
  12 <th><%= _("Email")%></th>
  13 <th><%= _("Body")%></th>
  14 <th><%= _("IP")%></th>
  15 <th><%= _("Posted date")%></th>
  16 <th><%= _("Edit")%></th>
  17 <th><%= _("Delete")%></th>
</tr>
<% for comment in @comments -%>
<tr>
<td class="field"><%= image_tag 'checked.gif' %> <%=link_to_unless comment.url.blank?, h(comment.author), comment.url %></td>
<td class="field"><%=h comment.email %></td>
23   <td class="field"><%=link_to truncate(strip_html(comment.body)), :action => 'show', :id => comment.id %> <%= comment_url_link image_tag('go'), comment %></td>
  23 <td class="field"><%=link_to truncate((comment.body).strip_html), :action => 'show', :id => comment.id %> <%= link_to_permalink comment,image_tag('go.png') %></td>
<td class="field"><%=h comment.ip %></td>
<td class="field"><%=h distance_of_time_in_words_to_now(comment.created_at) %></td>
<td class="operation"><%= link_to_edit comment %></td>

rool/rails/typo/trunk/app/views/admin/comments/new.rhtml:

prev.current 
1   <% @page_heading = "Comments for #{ link_to h(@article.title), :controller => 'content', :action => 'show', :id => @article }" %>
  1 <% @page_heading = _("Comments for") + " #{ link_to h(@article.title), :controller => '/admin/content', :action => 'show', :id => @article }" %>
3   <h3>Creating comment</h3>
4  
5   <%= start_form_tag :action=>"new" %>
  3 <h3><%= _("Creating comment")%></h3>
7   <div class="form">
  5 <% form_tag :action=>"new" do %>
  6
  7 <div class="form">
<%= render_partial "form" %>
</div>
<div id="operations">
12   <%= save %> or <%= cancel %>
  12 <%= save %> or <%= cancel %>
</div>
15   <%= end_form_tag %>
  16 <% end %>

rool/rails/typo/trunk/app/views/admin/comments/show.rhtml:

prev.current 
1   <% @page_heading = "Comments for #{ link_to h(@article.title), :controller => 'content', :action => 'show', :id => @article }" %>
  1 <% @page_heading = _("Comments for") + " #{ link_to h(@article.title), :controller => '/admin/content', :action => 'show', :id => @article }" %>
<div class="form">
4   <label>Author:</label> <span class="static"><%=h @comment.author %></span><br/>
5   <label>URL:</label> <span class="static"><%=h @comment.url %></span><br/>
6   <label>Email:</label> <span class="static"><%=h @comment.email %></span><br/>
7   <label>Body:</label> <span class="static"><%=h @comment.body %></span><br/>
8   <label>IP Address:</label> <span class="static"><%=h @comment.ip %></span><br/>
9   <label>Created at:</label> <span class="static"><%=h @comment.created_at %></span><br/>
  4 <label><%= _("Author")%>:</label> <span class="static"><%=h @comment.author %></span><br/>
  5 <label><%= _("URL")%>:</label> <span class="static"><%=h @comment.url %></span><br/>
  6 <label><%= _("Email")%>:</label> <span class="static"><%=h @comment.email %></span><br/>
  7 <label><%= _("Body")%>:</label> <span class="static"><%=h @comment.body %></span><br/>
  8 <label><%= _("IP")%>:</label> <span class="static"><%=h @comment.ip %></span><br/>
  9 <label><%= _("Posted date")%>:</label> <span class="static"><%=h @comment.created_at %></span><br/>
</div>

rool/rails/typo/trunk/app/views/admin/content/_articles.rhtml:

prev.current 
<table cellspacing="1" cellpadding="0">
<tr>
3   <th>Post title</th>
4   <th>Posted</th>
5   <th>Comments</th>
6   <th>Trackbacks</th>
7   <th>Edit</th>
8   <th>Delete</th>
  3 <th><%= _("Post title")%></th>
  4 <th><%= _("Posted at")%></th>
  5 <th><%= _("Comments")%></th>
  6 <th><%= _("Trackbacks")%></th>
  7 <th><%= _("Status")%></th>
  8 <th colspan="3" style="text-align: center;">Action</th>
</tr>
<% for article in @articles %>
<tr <%= alternate_class %>>
12   <td><%= (article.published?) ? image_tag('checked.gif') : image_tag('x-ed.gif') %> <%= link_to h(article.title), {:action => "show", :id => article.id} %> <%= article_link(image_tag('go'), article) %> </td>
13   <td><%= distance_of_time_in_words_to_now article.published_at %> ago</td>
14   <td><%= link_to pluralize(article.comments.size, 'comment'), :controller => 'comments', :article_id => article, :action => 'list' %></td>
15   <td><%= link_to pluralize(article.trackbacks.size, 'trackback'), :controller => 'trackbacks', :article_id => article, :action => 'list' %></td>
  12 <td> <%= link_to_permalink article, h(article.title) %></td>
  13 <td><%= article.published_at.strftime("%d/%m/%Y at %H:%M")%></td>
  14 <td><%= link_to _(pluralize(article.comments.size, 'comment')), :controller => '/admin/comments', :article_id => article, :action => 'list' %></td>
  15 <td><%= link_to _(pluralize(article.trackbacks.size, 'trackback')), :controller => '/admin/trackbacks', :article_id => article, :action => 'list' %></td>
  16 <td class="operation"><%= (article.published?) ? image_tag('checked.png', :alt => "online", :title => _("Online")) : image_tag('cancel.png', :alt => "offline", :title => _("Offline")) %></td>
  17 <td class="operation"><%= link_to image_tag('show.png', :alt => "View article", :title => "Preview article"), {:action => "show", :id => article.id} %></td>
<td class="operation"><%= link_to_edit article %></td>
<td class="operation"><%= link_to_destroy article %></td>
</tr>

rool/rails/typo/trunk/app/views/admin/content/_attachment.rhtml:

prev.current 
1   <% str = update_element_function('attachments', :position => :bottom) do -%>
2   <div id="attachment_<%= attachment_num -%>">
3   <%= file_field 'attachments', "filename_#{attachment_num}" -%>
4   <%= link_to_remote 'Remove',
5   :url => { :action => "attachment_box_remove", :id => attachment_num },
6   :update => "attachment_#{attachment_num}",
7   :confirm => "Really delete attachment #{attachment_num}?" -%>
8   <br />
9   </div>
10   <div id="attachment_<%= attachment_num.succ -%>">
11   <%= link_to_remote 'Add Another Attachment',
12   :url => { :action => "attachment_box_add", :id => attachment_num.succ },
13   :update => "attachment_#{attachment_num.succ}",
14   :asynchronus => false -%>
15   </div>
16   <% end -%>
17   <%= javascript_tag(str) -%>
  1 <div id="attachment_<%= attachment_num -%>"<% if hidden %> style="display: none;"<% end %>>
  2 <%= file_field 'attachments', "filename_#{attachment_num}" -%>
  3 <%= link_to_function(_("Remove"),
  4 update_page do |page|
  5 page << "if (confirm(_(Really delete attachment) +' #{attachment_num}?')){"
  6 page.visual_effect(:toggle_appear, "attachment_#{attachment_num}", :afterFinish => "function(obj){Element.remove(obj.element);}")
  7 page << "}"
  8 end) -%>
  9 <br />
  10 </div>
  11 <div id="attachment_add_<%= attachment_num.succ %>">
  12 <%= link_to_remote _('Add Another Attachment'),
  13 :url => { :action => "attachment_box_add", :id => attachment_num.succ },
  14 :asynchronus => false -%>
  15 </div>

rool/rails/typo/trunk/app/views/admin/content/_form.rhtml:

prev.current 
<%= error_messages_for 'article' %>
<!--[form:articles]-->
3   <p>
4   <label for="article_title">Title:</label><br />
5   <%= text_field 'article', 'title' %>
6   (<%= link_to_function "&raquo; edit permalink", "Toggle.display('permalink')" %>)<br/>
7   </p>
8   <p id="permalink" style="display: none">
9   <label for="article_permalink">Permalink:</label><br />
10   <%= text_field 'article', 'permalink' %>
11   </p>
12   <p>
13   <label for="article_body">Body:</label><br />
14   <%= text_area 'article', 'body', :rows => 25, :style => 'width: 48%;' %>
15   <br/><%= markup_help_popup @article.text_filter, "Markup Help" %>
16   </p>
17   <p>
18   <label for="categories">Categories:</label><br />
19   <select id="categories" name="categories[]" multiple="multiple" size="10" style="width:250px;">
20   <%= options_from_collection_for_select(@categories, "id", "name", @selected) %>
21   </select>
22   </p>
23   <p>
24   <label for="article_keywords">Tags:</label><br/>
25   <%= text_field 'article', 'keywords' %>
26   </p>
27   <p>
28   <a href="#" onclick="Element.toggle('extended'); return false">Add Extended Content</a><br />
29   <div id="extended" style="display:none;">
30   <label for="article_extended">Extended:</label><br />
31   <%= text_area 'article', 'extended', :rows => 30, :style => 'width: 48%;' %>
  3 <fieldset class="set admin" style="display: block">
  4 <legend><%=_("Article Body")%></legend>
  5 <iframe id="preview" class="post" style="display: none;"></iframe>
  6 <div style="width: 48%; float: left;">
  7 <ul>
  8 <li>
  9 <label for="article_title" class="block">Title:</label>
  10 <%= text_field 'article', 'title', :style => 'width: 100%;' %>
  11 </li>
  12 <li>
  13 <label for="article_body"><%= _("Article Content")%>:</label>
  14 <%= markup_help_popup @article.text_filter, image_tag('help.png', :alt => "markup help", :title => "Markup Help") %>
  15 <%= text_area 'article', 'body', :rows => 25, :style => 'width: 100%;' %>
  16 </li>
  17 <li id="extended"<%- if @article.extended.blank? -%> style="display:none;"<%- end -%>>
  18 <label for="article_extended"><%= _("Extended Content")%>:</label>
  19 <%= text_area 'article', 'extended', :rows => 30, :style => 'width: 100%;' %>
  20 <%= link_to_function "Toggle Extended Content (+/-)",update_page { |page| page.visual_effect(:toggle_blind, "extended", :duration => 0.5) } %>
  21 </li>
  22 <li>
  23 <label for="categories" class="block"><%= _("Categories")%>:</label>
  24 <select id="categories" name="categories[]" multiple="multiple" size="10" style="width:250px;">
  25 <%= options_from_collection_for_select(@categories, "id", "name", @selected) %>
  26 </select>
  27 </li>
  28 <li>
  29 <label for="article_keywords"><%= _("Tags")%>:</label>
  30 <%= text_field 'article', 'keywords', :style => 'width: 100%;' %>
  31 </li>
  32 </ul>
  33 <p class="r"><%= save(_("Save")) %> or <%= cancel %></p>
</div>
33   </p>
  35 <br style ="clear: both"/>
  36 </fieldset>
35   <a href="#" onclick="Element.toggle('advanced'); return false;">Toggle Advanced Options (+/-)</a>
36   <div id="advanced" style="display:none;">
37