Changesets can be listed by changeset number.
The Git repository is here.
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 16 years ago)
Affected files:
rool/rails/typo/trunk/vendor/plugins/haml/
rool/rails/typo/trunk/vendor/plugins/haml/bin/
rool/rails/typo/trunk/vendor/plugins/haml/lib/
rool/rails/typo/trunk/vendor/plugins/haml/lib/haml/
rool/rails/typo/trunk/app/views/admin/shared/
rool/rails/typo/trunk/lang/
rool/rails/typo/trunk/public/files/
rool/rails/typo/trunk/public/stylesheets/textmate/
rool/rails/typo/trunk/spec/
rool/rails/typo/trunk/spec/controllers/
rool/rails/typo/trunk/spec/fixtures/
rool/rails/typo/trunk/spec/helpers/
rool/rails/typo/trunk/spec/models/
rool/rails/typo/trunk/tmp/pids/
rool/rails/typo/trunk/vendor/cached_model/
rool/rails/typo/trunk/vendor/cached_model/lib/
rool/rails/typo/trunk/vendor/cached_model/test/
rool/rails/typo/trunk/vendor/memcache-client/
rool/rails/typo/trunk/vendor/memcache-client/lib/
rool/rails/typo/trunk/vendor/memcache-client/test/
rool/rails/typo/trunk/vendor/plugins/action_view_patch/
rool/rails/typo/trunk/vendor/plugins/action_view_patch/lib/
rool/rails/typo/trunk/vendor/plugins/action_view_patch/test/
rool/rails/typo/trunk/vendor/plugins/aimpresence_sidebar/
rool/rails/typo/trunk/vendor/plugins/aimpresence_sidebar/lib/
rool/rails/typo/trunk/vendor/plugins/aimpresence_sidebar/test/
rool/rails/typo/trunk/vendor/plugins/aimpresence_sidebar/views/
rool/rails/typo/trunk/vendor/plugins/amazon_sidebar/
rool/rails/typo/trunk/vendor/plugins/amazon_sidebar/lib/
rool/rails/typo/trunk/vendor/plugins/amazon_sidebar/views/
rool/rails/typo/trunk/vendor/plugins/archives_sidebar/
rool/rails/typo/trunk/vendor/plugins/archives_sidebar/lib/
rool/rails/typo/trunk/vendor/plugins/archives_sidebar/test/
rool/rails/typo/trunk/vendor/plugins/archives_sidebar/views/
rool/rails/typo/trunk/vendor/plugins/audioscrobbler_sidebar/
rool/rails/typo/trunk/vendor/plugins/audioscrobbler_sidebar/lib/
rool/rails/typo/trunk/vendor/plugins/audioscrobbler_sidebar/test/
rool/rails/typo/trunk/vendor/plugins/audioscrobbler_sidebar/views/
rool/rails/typo/trunk/vendor/plugins/backpack_sidebar/
rool/rails/typo/trunk/vendor/plugins/backpack_sidebar/lib/
rool/rails/typo/trunk/vendor/plugins/backpack_sidebar/test/
rool/rails/typo/trunk/vendor/plugins/backpack_sidebar/views/
rool/rails/typo/trunk/vendor/plugins/category_sidebar/
rool/rails/typo/trunk/vendor/plugins/category_sidebar/lib/
rool/rails/typo/trunk/vendor/plugins/category_sidebar/test/
rool/rails/typo/trunk/vendor/plugins/category_sidebar/views/
rool/rails/typo/trunk/vendor/plugins/delicious_sidebar/
rool/rails/typo/trunk/vendor/plugins/delicious_sidebar/lib/
rool/rails/typo/trunk/vendor/plugins/delicious_sidebar/test/
rool/rails/typo/trunk/vendor/plugins/delicious_sidebar/views/
rool/rails/typo/trunk/vendor/plugins/flickr_sidebar/
rool/rails/typo/trunk/vendor/plugins/flickr_sidebar/lib/
rool/rails/typo/trunk/vendor/plugins/flickr_sidebar/test/
rool/rails/typo/trunk/vendor/plugins/flickr_sidebar/views/
rool/rails/typo/trunk/vendor/plugins/fortythree_sidebar/
rool/rails/typo/trunk/vendor/plugins/fortythree_sidebar/lib/
rool/rails/typo/trunk/vendor/plugins/fortythree_sidebar/test/
rool/rails/typo/trunk/vendor/plugins/fortythree_sidebar/views/
rool/rails/typo/trunk/vendor/plugins/fortythreeplaces_sidebar/
rool/rails/typo/trunk/vendor/plugins/fortythreeplaces_sidebar/lib/
rool/rails/typo/trunk/vendor/plugins/fortythreeplaces_sidebar/test/
rool/rails/typo/trunk/vendor/plugins/fortythreeplaces_sidebar/views/
rool/rails/typo/trunk/vendor/plugins/haml/lib/haml/helpers/
rool/rails/typo/trunk/vendor/plugins/haml/test/
rool/rails/typo/trunk/vendor/plugins/haml/test/mocks/
rool/rails/typo/trunk/vendor/plugins/haml/test/results/
rool/rails/typo/trunk/vendor/plugins/haml/test/rhtml/
rool/rails/typo/trunk/vendor/plugins/haml/test/templates/
rool/rails/typo/trunk/vendor/plugins/localization/
rool/rails/typo/trunk/vendor/plugins/localization/lib/
rool/rails/typo/trunk/vendor/plugins/magnolia_sidebar/
rool/rails/typo/trunk/vendor/plugins/magnolia_sidebar/lib/
rool/rails/typo/trunk/vendor/plugins/magnolia_sidebar/test/
rool/rails/typo/trunk/vendor/plugins/magnolia_sidebar/views/
rool/rails/typo/trunk/vendor/plugins/recent_comments_sidebar/
rool/rails/typo/trunk/vendor/plugins/recent_comments_sidebar/lib/
rool/rails/typo/trunk/vendor/plugins/recent_comments_sidebar/test/
rool/rails/typo/trunk/vendor/plugins/recent_comments_sidebar/views/
rool/rails/typo/trunk/vendor/plugins/static_sidebar/
rool/rails/typo/trunk/vendor/plugins/static_sidebar/lib/
rool/rails/typo/trunk/vendor/plugins/static_sidebar/views/
rool/rails/typo/trunk/vendor/plugins/tada_sidebar/
rool/rails/typo/trunk/vendor/plugins/tada_sidebar/lib/
rool/rails/typo/trunk/vendor/plugins/tada_sidebar/test/
rool/rails/typo/trunk/vendor/plugins/tada_sidebar/views/
rool/rails/typo/trunk/vendor/plugins/tag_sidebar/
rool/rails/typo/trunk/vendor/plugins/tag_sidebar/lib/
rool/rails/typo/trunk/vendor/plugins/tag_sidebar/test/
rool/rails/typo/trunk/vendor/plugins/tag_sidebar/views/
rool/rails/typo/trunk/vendor/plugins/technorati_sidebar/
rool/rails/typo/trunk/vendor/plugins/technorati_sidebar/lib/
rool/rails/typo/trunk/vendor/plugins/technorati_sidebar/test/
rool/rails/typo/trunk/vendor/plugins/technorati_sidebar/views/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_amazon/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_amazon/lib/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_amazon/tasks/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_amazon/test/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_code/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_code/lib/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_code/tasks/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_code/test/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_flickr/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_flickr/lib/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_flickr/tasks/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_flickr/test/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_htmlfilter/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_htmlfilter/lib/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_htmlfilter/tasks/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_htmlfilter/test/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_lightbox/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_lightbox/lib/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_lightbox/tasks/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_lightbox/test/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_markdown/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_markdown/lib/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_markdown/tasks/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_markdown/test/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_none/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_none/lib/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_none/tasks/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_none/test/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_smartypants/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_smartypants/lib/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_smartypants/tasks/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_smartypants/test/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_sparkline/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_sparkline/lib/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_sparkline/tasks/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_sparkline/test/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile/lib/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile/tasks/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile/test/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile_and_markdown/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile_and_markdown/lib/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile_and_markdown/tasks/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile_and_markdown/test/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_tmcode/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_tmcode/lib/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_tmcode/tasks/
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_tmcode/test/
rool/rails/typo/trunk/vendor/plugins/upcoming_sidebar/
rool/rails/typo/trunk/vendor/plugins/upcoming_sidebar/lib/
rool/rails/typo/trunk/vendor/plugins/upcoming_sidebar/test/
rool/rails/typo/trunk/vendor/plugins/upcoming_sidebar/views/
rool/rails/typo/trunk/vendor/plugins/xbox_sidebar/
rool/rails/typo/trunk/vendor/plugins/xbox_sidebar/lib/
rool/rails/typo/trunk/vendor/plugins/xbox_sidebar/test/
rool/rails/typo/trunk/vendor/plugins/xbox_sidebar/views/
rool/rails/typo/trunk/vendor/plugins/xml_sidebar/
rool/rails/typo/trunk/vendor/plugins/xml_sidebar/lib/
rool/rails/typo/trunk/vendor/plugins/xml_sidebar/test/
rool/rails/typo/trunk/vendor/plugins/xml_sidebar/views/
rool/rails/typo/trunk/CHANGES-4.1
rool/rails/typo/trunk/README.SIDEBARS
rool/rails/typo/trunk/TODO-4.1
rool/rails/typo/trunk/app/models/categorization.rb
rool/rails/typo/trunk/app/models/content_state/ham.rb
rool/rails/typo/trunk/app/models/content_state/just_marked_as_ham.rb
rool/rails/typo/trunk/app/models/content_state/just_marked_as_spam.rb
rool/rails/typo/trunk/app/models/content_state/just_presumed_ham.rb
rool/rails/typo/trunk/app/models/content_state/just_withdrawn.rb
rool/rails/typo/trunk/app/models/content_state/presumed_ham.rb
rool/rails/typo/trunk/app/models/content_state/presumed_spam.rb
rool/rails/typo/trunk/app/models/content_state/spam.rb
rool/rails/typo/trunk/app/models/content_state/unclassified.rb
rool/rails/typo/trunk/app/models/content_state/withdrawn.rb
rool/rails/typo/trunk/app/models/feedback.rb
rool/rails/typo/trunk/app/models/notification.rb
rool/rails/typo/trunk/app/views/admin/shared/_edit.rhtml
rool/rails/typo/trunk/app/views/articles/read_and_comment.rhtml
rool/rails/typo/trunk/app/views/layouts/minimal.rhtml
rool/rails/typo/trunk/db/migrate/048_remove_count_caching.rb
rool/rails/typo/trunk/db/migrate/049_move_feedback_to_new_state_machine.rb
rool/rails/typo/trunk/db/migrate/050_add_status_confirmed_field_to_content.rb
rool/rails/typo/trunk/db/migrate/051_fix_canonical_server_url.rb
rool/rails/typo/trunk/db/migrate/052_remove_cached_html.rb
rool/rails/typo/trunk/db/migrate/053_promote_canonical_server_url.rb
rool/rails/typo/trunk/db/migrate/054_upgrade_sidebar_objects.rb
rool/rails/typo/trunk/db/migrate/055_link_sidebars_to_blog.rb
rool/rails/typo/trunk/db/migrate/056_create_notifications.rb
rool/rails/typo/trunk/db/migrate/057_add_categorization_model.rb
rool/rails/typo/trunk/db/migrate/058_separate_entries_and_feedback.rb
rool/rails/typo/trunk/db/migrate/059_cleanup_feedback_table.rb
rool/rails/typo/trunk/db/migrate/060_cleanup_contents_table.rb
rool/rails/typo/trunk/db/migrate/061_convert_title_prefix_setting.rb
rool/rails/typo/trunk/lang/fr_FR.rb
rool/rails/typo/trunk/lib/generators/sidebar/templates/Rakefile
rool/rails/typo/trunk/lib/generators/sidebar/templates/content.rhtml
rool/rails/typo/trunk/lib/generators/sidebar/templates/init.rb
rool/rails/typo/trunk/lib/generators/sidebar/templates/sidebar.rb
rool/rails/typo/trunk/lib/generators/sidebar/templates/unit_test.rb
rool/rails/typo/trunk/lib/memory_profiler.rb
rool/rails/typo/trunk/lib/route_cache.rb
rool/rails/typo/trunk/lib/sidebars/consolidated_plugin.rb
rool/rails/typo/trunk/lib/typo_deprecated.rb
rool/rails/typo/trunk/public/.htaccess
rool/rails/typo/trunk/public/images/bracket.gif
rool/rails/typo/trunk/public/images/cancel.png
rool/rails/typo/trunk/public/images/checked.png
rool/rails/typo/trunk/public/images/edit.png
rool/rails/typo/trunk/public/images/help.png
rool/rails/typo/trunk/public/images/show.png
rool/rails/typo/trunk/public/javascripts/codecollapse.js
rool/rails/typo/trunk/public/stylesheets/codecollapse.css
rool/rails/typo/trunk/public/stylesheets/minimal.css
rool/rails/typo/trunk/public/stylesheets/textmate/dawn.css
rool/rails/typo/trunk/public/stylesheets/textmate/iplastic.css
rool/rails/typo/trunk/public/stylesheets/textmate/space_cadet.css
rool/rails/typo/trunk/public/stylesheets/textmate/textmate.css
rool/rails/typo/trunk/public/stylesheets/textmate/twilight.css
rool/rails/typo/trunk/script/process/inspector
rool/rails/typo/trunk/spec/controllers/accounts_controller_spec.rb
rool/rails/typo/trunk/spec/controllers/articles_controller_spec.rb
rool/rails/typo/trunk/spec/fixtures/articles_tags.yml
rool/rails/typo/trunk/spec/fixtures/blacklist_patterns.yml
rool/rails/typo/trunk/spec/fixtures/blogs.yml
rool/rails/typo/trunk/spec/fixtures/categories.yml
rool/rails/typo/trunk/spec/fixtures/categorizations.yml
rool/rails/typo/trunk/spec/fixtures/contents.yml
rool/rails/typo/trunk/spec/fixtures/feedback.yml
rool/rails/typo/trunk/spec/fixtures/notifications.yml
rool/rails/typo/trunk/spec/fixtures/page_caches.yml
rool/rails/typo/trunk/spec/fixtures/redirects.yml
rool/rails/typo/trunk/spec/fixtures/resources.yml
rool/rails/typo/trunk/spec/fixtures/sidebars.yml
rool/rails/typo/trunk/spec/fixtures/tags.yml
rool/rails/typo/trunk/spec/fixtures/text_filters.yml
rool/rails/typo/trunk/spec/fixtures/triggers.yml
rool/rails/typo/trunk/spec/fixtures/users.yml
rool/rails/typo/trunk/spec/fixtures/whiteboards.yml
rool/rails/typo/trunk/spec/helpers/admin_base_helper_spec.rb
rool/rails/typo/trunk/spec/models/amazon_sidebar_spec.rb
rool/rails/typo/trunk/spec/models/audioscrobbler_spec.rb
rool/rails/typo/trunk/spec/models/blog_spec.rb
rool/rails/typo/trunk/spec/models/cache_support_spec.rb
rool/rails/typo/trunk/spec/models/category_spec.rb
rool/rails/typo/trunk/spec/models/configuration_spec.rb
rool/rails/typo/trunk/spec/models/content_state_spec.rb
rool/rails/typo/trunk/spec/models/delegate_to_content_state_spec.rb
rool/rails/typo/trunk/spec/models/delicious_spec.rb
rool/rails/typo/trunk/spec/models/flickr_spec.rb
rool/rails/typo/trunk/spec/models/metafragment_spec.rb
rool/rails/typo/trunk/spec/models/page_cache_spec.rb
rool/rails/typo/trunk/spec/models/page_spec.rb
rool/rails/typo/trunk/spec/models/ping_spec.rb
rool/rails/typo/trunk/spec/models/redirect_spec.rb
rool/rails/typo/trunk/spec/models/resource_spec.rb
rool/rails/typo/trunk/spec/models/static_sidebar_spec.rb
rool/rails/typo/trunk/spec/models/tag_spec.rb
rool/rails/typo/trunk/spec/models/text_filter_spec.rb
rool/rails/typo/trunk/spec/models/theme_spec.rb
rool/rails/typo/trunk/spec/models/trackback_spec.rb
rool/rails/typo/trunk/spec/models/trigger_spec.rb
rool/rails/typo/trunk/spec/models/user_spec.rb
rool/rails/typo/trunk/test/fixtures/categorizations.yml
rool/rails/typo/trunk/test/fixtures/feedback.yml
rool/rails/typo/trunk/test/unit/amazon_sidebar_test.rb
rool/rails/typo/trunk/test/unit/cache_support_test.rb
rool/rails/typo/trunk/test/unit/content_state/feedback_states_test.rb
rool/rails/typo/trunk/test/unit/notification_test.rb
rool/rails/typo/trunk/test/unit/static_sidebar_test.rb
rool/rails/typo/trunk/themes/risc_os_open/views/shared/fixed_footer.rhtml
rool/rails/typo/trunk/themes/risc_os_open/views/shared/fixed_header.rhtml
rool/rails/typo/trunk/themes/risc_os_open/views/shared/fixed_sidebar.rhtml
rool/rails/typo/trunk/vendor/cached_model/History.txt
rool/rails/typo/trunk/vendor/cached_model/LICENSE.txt
rool/rails/typo/trunk/vendor/cached_model/Manifest.txt
rool/rails/typo/trunk/vendor/cached_model/README.txt
rool/rails/typo/trunk/vendor/cached_model/Rakefile
rool/rails/typo/trunk/vendor/cached_model/lib/cached_model.rb
rool/rails/typo/trunk/vendor/cached_model/test/test_cached_model.rb
rool/rails/typo/trunk/vendor/memcache-client/History.txt
rool/rails/typo/trunk/vendor/memcache-client/LICENSE.txt
rool/rails/typo/trunk/vendor/memcache-client/Manifest.txt
rool/rails/typo/trunk/vendor/memcache-client/README.txt
rool/rails/typo/trunk/vendor/memcache-client/Rakefile
rool/rails/typo/trunk/vendor/memcache-client/lib/memcache.rb
rool/rails/typo/trunk/vendor/memcache-client/lib/memcache_util.rb
rool/rails/typo/trunk/vendor/memcache-client/test/test_mem_cache.rb
rool/rails/typo/trunk/vendor/plugins/action_view_patch/Rakefile
rool/rails/typo/trunk/vendor/plugins/action_view_patch/init.rb
rool/rails/typo/trunk/vendor/plugins/action_view_patch/lib/action_view_patch.rb
rool/rails/typo/trunk/vendor/plugins/action_view_patch/test/action_view_patch_test.rb
rool/rails/typo/trunk/vendor/plugins/aimpresence_sidebar/Rakefile
rool/rails/typo/trunk/vendor/plugins/aimpresence_sidebar/init.rb
rool/rails/typo/trunk/vendor/plugins/aimpresence_sidebar/lib/aimpresence_sidebar.rb
rool/rails/typo/trunk/vendor/plugins/aimpresence_sidebar/test/aimpresence_sidebar_test.rb
rool/rails/typo/trunk/vendor/plugins/aimpresence_sidebar/views/content.rhtml
rool/rails/typo/trunk/vendor/plugins/amazon_sidebar/init.rb
rool/rails/typo/trunk/vendor/plugins/amazon_sidebar/lib/amazon_sidebar.rb
rool/rails/typo/trunk/vendor/plugins/amazon_sidebar/views/content.rhtml
rool/rails/typo/trunk/vendor/plugins/archives_sidebar/Rakefile
rool/rails/typo/trunk/vendor/plugins/archives_sidebar/init.rb
rool/rails/typo/trunk/vendor/plugins/archives_sidebar/lib/archives_sidebar.rb
rool/rails/typo/trunk/vendor/plugins/archives_sidebar/test/archives_sidebar_test.rb
rool/rails/typo/trunk/vendor/plugins/archives_sidebar/views/content.rhtml
rool/rails/typo/trunk/vendor/plugins/audioscrobbler_sidebar/Rakefile
rool/rails/typo/trunk/vendor/plugins/audioscrobbler_sidebar/init.rb
rool/rails/typo/trunk/vendor/plugins/audioscrobbler_sidebar/lib/audioscrobbler.rb
rool/rails/typo/trunk/vendor/plugins/audioscrobbler_sidebar/lib/audioscrobbler_sidebar.rb
rool/rails/typo/trunk/vendor/plugins/audioscrobbler_sidebar/test/audioscrobbler_sidebar_test.rb
rool/rails/typo/trunk/vendor/plugins/audioscrobbler_sidebar/views/content.rhtml
rool/rails/typo/trunk/vendor/plugins/backpack_sidebar/Rakefile
rool/rails/typo/trunk/vendor/plugins/backpack_sidebar/init.rb
rool/rails/typo/trunk/vendor/plugins/backpack_sidebar/lib/backpack.rb
rool/rails/typo/trunk/vendor/plugins/backpack_sidebar/lib/backpack_sidebar.rb
rool/rails/typo/trunk/vendor/plugins/backpack_sidebar/test/backpack_sidebar_test.rb
rool/rails/typo/trunk/vendor/plugins/backpack_sidebar/views/content.rhtml
rool/rails/typo/trunk/vendor/plugins/category_sidebar/Rakefile
rool/rails/typo/trunk/vendor/plugins/category_sidebar/init.rb
rool/rails/typo/trunk/vendor/plugins/category_sidebar/lib/category_sidebar.rb
rool/rails/typo/trunk/vendor/plugins/category_sidebar/test/category_sidebar_test.rb
rool/rails/typo/trunk/vendor/plugins/category_sidebar/views/content.rhtml
rool/rails/typo/trunk/vendor/plugins/delicious_sidebar/Rakefile
rool/rails/typo/trunk/vendor/plugins/delicious_sidebar/init.rb
rool/rails/typo/trunk/vendor/plugins/delicious_sidebar/lib/delicious.rb
rool/rails/typo/trunk/vendor/plugins/delicious_sidebar/lib/delicious_sidebar.rb
rool/rails/typo/trunk/vendor/plugins/delicious_sidebar/test/delicious_sidebar_test.rb
rool/rails/typo/trunk/vendor/plugins/delicious_sidebar/views/content.rhtml
rool/rails/typo/trunk/vendor/plugins/flickr_sidebar/Rakefile
rool/rails/typo/trunk/vendor/plugins/flickr_sidebar/init.rb
rool/rails/typo/trunk/vendor/plugins/flickr_sidebar/lib/flickr.rb
rool/rails/typo/trunk/vendor/plugins/flickr_sidebar/lib/flickr_sidebar.rb
rool/rails/typo/trunk/vendor/plugins/flickr_sidebar/test/flickr_sidebar_test.rb
rool/rails/typo/trunk/vendor/plugins/flickr_sidebar/views/content.rhtml
rool/rails/typo/trunk/vendor/plugins/fortythree_sidebar/Rakefile
rool/rails/typo/trunk/vendor/plugins/fortythree_sidebar/init.rb
rool/rails/typo/trunk/vendor/plugins/fortythree_sidebar/lib/fortythree.rb
rool/rails/typo/trunk/vendor/plugins/fortythree_sidebar/lib/fortythree_sidebar.rb
rool/rails/typo/trunk/vendor/plugins/fortythree_sidebar/test/fortythree_sidebar_test.rb
rool/rails/typo/trunk/vendor/plugins/fortythree_sidebar/views/content.rhtml
rool/rails/typo/trunk/vendor/plugins/fortythreeplaces_sidebar/Rakefile
rool/rails/typo/trunk/vendor/plugins/fortythreeplaces_sidebar/init.rb
rool/rails/typo/trunk/vendor/plugins/fortythreeplaces_sidebar/lib/fortythree.rb
rool/rails/typo/trunk/vendor/plugins/fortythreeplaces_sidebar/lib/fortythreeplaces_sidebar.rb
rool/rails/typo/trunk/vendor/plugins/fortythreeplaces_sidebar/test/fortythreeplaces_sidebar_test.rb
rool/rails/typo/trunk/vendor/plugins/fortythreeplaces_sidebar/views/content.rhtml
rool/rails/typo/trunk/vendor/plugins/haml/MIT-LICENSE
rool/rails/typo/trunk/vendor/plugins/haml/REFERENCE
rool/rails/typo/trunk/vendor/plugins/haml/Rakefile
rool/rails/typo/trunk/vendor/plugins/haml/VERSION
rool/rails/typo/trunk/vendor/plugins/haml/bin/haml
rool/rails/typo/trunk/vendor/plugins/haml/init.rb
rool/rails/typo/trunk/vendor/plugins/haml/lib/haml/buffer.rb
rool/rails/typo/trunk/vendor/plugins/haml/lib/haml/engine.rb
rool/rails/typo/trunk/vendor/plugins/haml/lib/haml/helpers.rb
rool/rails/typo/trunk/vendor/plugins/haml/lib/haml/helpers/action_view_mods.rb
rool/rails/typo/trunk/vendor/plugins/haml/lib/haml/template.rb
rool/rails/typo/trunk/vendor/plugins/haml/test/benchmark.rb
rool/rails/typo/trunk/vendor/plugins/haml/test/engine_test.rb
rool/rails/typo/trunk/vendor/plugins/haml/test/helper_test.rb
rool/rails/typo/trunk/vendor/plugins/haml/test/mocks/article.rb
rool/rails/typo/trunk/vendor/plugins/haml/test/profile.rb
rool/rails/typo/trunk/vendor/plugins/haml/test/results/content_for_layout.xhtml
rool/rails/typo/trunk/vendor/plugins/haml/test/results/eval_suppressed.xhtml
rool/rails/typo/trunk/vendor/plugins/haml/test/results/helpers.xhtml
rool/rails/typo/trunk/vendor/plugins/haml/test/results/helpful.xhtml
rool/rails/typo/trunk/vendor/plugins/haml/test/results/just_stuff.xhtml
rool/rails/typo/trunk/vendor/plugins/haml/test/results/list.xhtml
rool/rails/typo/trunk/vendor/plugins/haml/test/results/original_engine.xhtml
rool/rails/typo/trunk/vendor/plugins/haml/test/results/partials.xhtml
rool/rails/typo/trunk/vendor/plugins/haml/test/results/silent_script.xhtml
rool/rails/typo/trunk/vendor/plugins/haml/test/results/standard.xhtml
rool/rails/typo/trunk/vendor/plugins/haml/test/results/tag_parsing.xhtml
rool/rails/typo/trunk/vendor/plugins/haml/test/results/very_basic.xhtml
rool/rails/typo/trunk/vendor/plugins/haml/test/results/whitespace_handling.xhtml
rool/rails/typo/trunk/vendor/plugins/haml/test/rhtml/standard.rhtml
rool/rails/typo/trunk/vendor/plugins/haml/test/runner.rb
rool/rails/typo/trunk/vendor/plugins/haml/test/template_test.rb
rool/rails/typo/trunk/vendor/plugins/haml/test/templates/_partial.haml
rool/rails/typo/trunk/vendor/plugins/haml/test/templates/_text_area.haml
rool/rails/typo/trunk/vendor/plugins/haml/test/templates/content_for_layout.haml
rool/rails/typo/trunk/vendor/plugins/haml/test/templates/eval_suppressed.haml
rool/rails/typo/trunk/vendor/plugins/haml/test/templates/helpers.haml
rool/rails/typo/trunk/vendor/plugins/haml/test/templates/helpful.haml
rool/rails/typo/trunk/vendor/plugins/haml/test/templates/just_stuff.haml
rool/rails/typo/trunk/vendor/plugins/haml/test/templates/list.haml
rool/rails/typo/trunk/vendor/plugins/haml/test/templates/original_engine.haml
rool/rails/typo/trunk/vendor/plugins/haml/test/templates/partialize.haml
rool/rails/typo/trunk/vendor/plugins/haml/test/templates/partials.haml
rool/rails/typo/trunk/vendor/plugins/haml/test/templates/silent_script.haml
rool/rails/typo/trunk/vendor/plugins/haml/test/templates/standard.haml
rool/rails/typo/trunk/vendor/plugins/haml/test/templates/tag_parsing.haml
rool/rails/typo/trunk/vendor/plugins/haml/test/templates/very_basic.haml
rool/rails/typo/trunk/vendor/plugins/haml/test/templates/whitespace_handling.haml
rool/rails/typo/trunk/vendor/plugins/localization/CHANGELOG
rool/rails/typo/trunk/vendor/plugins/localization/README
rool/rails/typo/trunk/vendor/plugins/localization/init.rb
rool/rails/typo/trunk/vendor/plugins/localization/lib/localization.rb
rool/rails/typo/trunk/vendor/plugins/magnolia_sidebar/Rakefile
rool/rails/typo/trunk/vendor/plugins/magnolia_sidebar/init.rb
rool/rails/typo/trunk/vendor/plugins/magnolia_sidebar/lib/magnolia_aggregation.rb
rool/rails/typo/trunk/vendor/plugins/magnolia_sidebar/lib/magnolia_sidebar.rb
rool/rails/typo/trunk/vendor/plugins/magnolia_sidebar/test/magnolia_sidebar_test.rb
rool/rails/typo/trunk/vendor/plugins/magnolia_sidebar/views/content.rhtml
rool/rails/typo/trunk/vendor/plugins/recent_comments_sidebar/Rakefile
rool/rails/typo/trunk/vendor/plugins/recent_comments_sidebar/init.rb
rool/rails/typo/trunk/vendor/plugins/recent_comments_sidebar/lib/recent_comments_sidebar.rb
rool/rails/typo/trunk/vendor/plugins/recent_comments_sidebar/test/recent_comments_sidebar_test.rb
rool/rails/typo/trunk/vendor/plugins/recent_comments_sidebar/views/content.rhtml
rool/rails/typo/trunk/vendor/plugins/static_sidebar/init.rb
rool/rails/typo/trunk/vendor/plugins/static_sidebar/lib/static_sidebar.rb
rool/rails/typo/trunk/vendor/plugins/static_sidebar/views/content.rhtml
rool/rails/typo/trunk/vendor/plugins/tada_sidebar/Rakefile
rool/rails/typo/trunk/vendor/plugins/tada_sidebar/init.rb
rool/rails/typo/trunk/vendor/plugins/tada_sidebar/lib/tada.rb
rool/rails/typo/trunk/vendor/plugins/tada_sidebar/lib/tada_sidebar.rb
rool/rails/typo/trunk/vendor/plugins/tada_sidebar/test/tada_sidebar_test.rb
rool/rails/typo/trunk/vendor/plugins/tada_sidebar/views/content.rhtml
rool/rails/typo/trunk/vendor/plugins/tag_sidebar/Rakefile
rool/rails/typo/trunk/vendor/plugins/tag_sidebar/init.rb
rool/rails/typo/trunk/vendor/plugins/tag_sidebar/lib/tag_sidebar.rb
rool/rails/typo/trunk/vendor/plugins/tag_sidebar/test/tag_sidebar_test.rb
rool/rails/typo/trunk/vendor/plugins/tag_sidebar/views/content.rhtml
rool/rails/typo/trunk/vendor/plugins/technorati_sidebar/Rakefile
rool/rails/typo/trunk/vendor/plugins/technorati_sidebar/init.rb
rool/rails/typo/trunk/vendor/plugins/technorati_sidebar/lib/technorati.rb
rool/rails/typo/trunk/vendor/plugins/technorati_sidebar/lib/technorati_sidebar.rb
rool/rails/typo/trunk/vendor/plugins/technorati_sidebar/test/technorati_sidebar_test.rb
rool/rails/typo/trunk/vendor/plugins/technorati_sidebar/views/content.rhtml
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_amazon/README
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_amazon/Rakefile
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_amazon/init.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_amazon/install.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_amazon/lib/typo_textfilter_amazon.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_amazon/tasks/typo_textfilter_amazon_tasks.rake
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_amazon/test/typo_textfilter_amazon_test.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_code/README
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_code/Rakefile
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_code/init.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_code/install.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_code/lib/typo_textfilter_code.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_code/tasks/typo_textfilter_code_tasks.rake
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_code/test/typo_textfilter_code_test.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_flickr/README
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_flickr/Rakefile
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_flickr/init.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_flickr/install.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_flickr/lib/typo_textfilter_flickr.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_flickr/tasks/typo_textfilter_flickr_tasks.rake
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_flickr/test/typo_textfilter_flickr_test.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_htmlfilter/README
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_htmlfilter/Rakefile
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_htmlfilter/init.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_htmlfilter/install.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_htmlfilter/lib/typo_textfilter_htmlfilter.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_htmlfilter/tasks/typo_textfilter_htmlfilter_tasks.rake
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_htmlfilter/test/typo_textfilter_htmlfilter_test.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_lightbox/README
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_lightbox/Rakefile
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_lightbox/init.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_lightbox/install.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_lightbox/lib/typo_textfilter_lightbox.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_lightbox/tasks/typo_textfilter_lightbox_tasks.rake
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_lightbox/test/typo_textfilter_lightbox_test.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_markdown/README
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_markdown/Rakefile
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_markdown/init.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_markdown/install.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_markdown/lib/typo_textfilter_markdown.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_markdown/tasks/typo_textfilter_markdown_tasks.rake
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_markdown/test/typo_textfilter_markdown_test.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_none/README
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_none/Rakefile
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_none/init.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_none/install.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_none/lib/typo_textfilter_none.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_none/tasks/typo_textfilter_none_tasks.rake
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_none/test/typo_textfilter_none_test.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_smartypants/README
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_smartypants/Rakefile
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_smartypants/init.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_smartypants/install.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_smartypants/lib/typo_textfilter_smartypants.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_smartypants/tasks/typo_textfilter_smartypants_tasks.rake
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_smartypants/test/typo_textfilter_smartypants_test.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_sparkline/README
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_sparkline/Rakefile
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_sparkline/init.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_sparkline/install.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_sparkline/lib/typo_textfilter_sparkline.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_sparkline/tasks/typo_textfilter_sparkline_tasks.rake
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_sparkline/test/typo_textfilter_sparkline_test.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile/README
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile/Rakefile
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile/init.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile/install.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile/lib/typo_textfilter_textile.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile/tasks/typo_textfilter_textile_tasks.rake
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile/test/typo_textfilter_textile_test.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile_and_markdown/README
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile_and_markdown/Rakefile
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile_and_markdown/init.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile_and_markdown/install.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile_and_markdown/lib/typo_textfilter_textile_and_markdown.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile_and_markdown/tasks/typo_textfilter_textile_and_markdown_tasks.rake
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_textile_and_markdown/test/typo_textfilter_textile_and_markdown_test.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_tmcode/README
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_tmcode/Rakefile
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_tmcode/init.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_tmcode/install.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_tmcode/lib/typo_textfilter_tmcode.rb
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_tmcode/tasks/typo_textfilter_tmcode_tasks.rake
rool/rails/typo/trunk/vendor/plugins/typo_textfilter_tmcode/test/typo_textfilter_tmcode_test.rb
rool/rails/typo/trunk/vendor/plugins/upcoming_sidebar/Rakefile
rool/rails/typo/trunk/vendor/plugins/upcoming_sidebar/init.rb
rool/rails/typo/trunk/vendor/plugins/upcoming_sidebar/lib/upcoming.rb
rool/rails/typo/trunk/vendor/plugins/upcoming_sidebar/lib/upcoming_sidebar.rb
rool/rails/typo/trunk/vendor/plugins/upcoming_sidebar/test/upcoming_sidebar_test.rb
rool/rails/typo/trunk/vendor/plugins/upcoming_sidebar/views/content.rhtml
rool/rails/typo/trunk/vendor/plugins/xbox_sidebar/Rakefile
rool/rails/typo/trunk/vendor/plugins/xbox_sidebar/init.rb
rool/rails/typo/trunk/vendor/plugins/xbox_sidebar/lib/xbox_sidebar.rb
rool/rails/typo/trunk/vendor/plugins/xbox_sidebar/test/xbox_sidebar_test.rb
rool/rails/typo/trunk/vendor/plugins/xbox_sidebar/views/content.rhtml
rool/rails/typo/trunk/vendor/plugins/xml_sidebar/Rakefile
rool/rails/typo/trunk/vendor/plugins/xml_sidebar/init.rb
rool/rails/typo/trunk/vendor/plugins/xml_sidebar/lib/xml_sidebar.rb
rool/rails/typo/trunk/vendor/plugins/xml_sidebar/test/xml_sidebar_test.rb
rool/rails/typo/trunk/vendor/plugins/xml_sidebar/views/content.rhtml
rool/rails/typo/trunk/MAINTAINERS (diff)
rool/rails/typo/trunk/README (diff)
rool/rails/typo/trunk/Rakefile (diff)
rool/rails/typo/trunk/app/apis/blogger_service.rb (diff)
rool/rails/typo/trunk/app/apis/meta_weblog_service.rb (diff)
rool/rails/typo/trunk/app/apis/movable_type_service.rb (diff)
rool/rails/typo/trunk/app/controllers/accounts_controller.rb (diff)
rool/rails/typo/trunk/app/controllers/admin/blacklist_controller.rb (diff)
rool/rails/typo/trunk/app/controllers/admin/cache_controller.rb (diff)
rool/rails/typo/trunk/app/controllers/admin/comments_controller.rb (diff)
rool/rails/typo/trunk/app/controllers/admin/content_controller.rb (diff)
rool/rails/typo/trunk/app/controllers/admin/feedback_controller.rb (diff)
rool/rails/typo/trunk/app/controllers/admin/general_controller.rb (diff)
rool/rails/typo/trunk/app/controllers/admin/pages_controller.rb (diff)
rool/rails/typo/trunk/app/controllers/admin/sidebar_controller.rb (diff)
rool/rails/typo/trunk/app/controllers/admin/textfilters_controller.rb (diff)
rool/rails/typo/trunk/app/controllers/admin/themes_controller.rb (diff)
rool/rails/typo/trunk/app/controllers/admin/users_controller.rb (diff)
rool/rails/typo/trunk/app/controllers/application.rb (diff)
rool/rails/typo/trunk/app/controllers/articles_controller.rb (diff)
rool/rails/typo/trunk/app/controllers/backend_controller.rb (diff)
rool/rails/typo/trunk/app/controllers/content_controller.rb (diff)
rool/rails/typo/trunk/app/controllers/live_controller.rb (diff)
rool/rails/typo/trunk/app/controllers/redirect_controller.rb (diff)
rool/rails/typo/trunk/app/controllers/textfilter_controller.rb (diff)
rool/rails/typo/trunk/app/controllers/theme_controller.rb (diff)
rool/rails/typo/trunk/app/controllers/xml_controller.rb (diff)
rool/rails/typo/trunk/app/helpers/admin/base_helper.rb (diff)
rool/rails/typo/trunk/app/helpers/admin/content_helper.rb (diff)
rool/rails/typo/trunk/app/helpers/admin/feedback_helper.rb (diff)
rool/rails/typo/trunk/app/helpers/admin/pages_helper.rb (diff)
rool/rails/typo/trunk/app/helpers/application_helper.rb (diff)
rool/rails/typo/trunk/app/helpers/articles_helper.rb (diff)
rool/rails/typo/trunk/app/helpers/mail_helper.rb (diff)
rool/rails/typo/trunk/app/helpers/sidebar_helper.rb (diff)
rool/rails/typo/trunk/app/helpers/xml_helper.rb (diff)
rool/rails/typo/trunk/app/models/article.rb (diff)
rool/rails/typo/trunk/app/models/blog.rb (diff)
rool/rails/typo/trunk/app/models/blog_sweeper.rb (diff)
rool/rails/typo/trunk/app/models/category.rb (diff)
rool/rails/typo/trunk/app/models/comment.rb (diff)
rool/rails/typo/trunk/app/models/content.rb (diff)
rool/rails/typo/trunk/app/models/content_state/base.rb (diff)
rool/rails/typo/trunk/app/models/content_state/draft.rb (diff)
rool/rails/typo/trunk/app/models/content_state/factory.rb (diff)
rool/rails/typo/trunk/app/models/content_state/just_published.rb (diff)
rool/rails/typo/trunk/app/models/content_state/new.rb (diff)
rool/rails/typo/trunk/app/models/content_state/publication_pending.rb (diff)
rool/rails/typo/trunk/app/models/content_state/published.rb (diff)
rool/rails/typo/trunk/app/models/email_notifier.rb (diff)
rool/rails/typo/trunk/app/models/notification_mailer.rb (diff)
rool/rails/typo/trunk/app/models/page.rb (diff)
rool/rails/typo/trunk/app/models/ping.rb (diff)
rool/rails/typo/trunk/app/models/sidebar.rb (diff)
rool/rails/typo/trunk/app/models/tag.rb (diff)
rool/rails/typo/trunk/app/models/text_filter.rb (diff)
rool/rails/typo/trunk/app/models/theme.rb (diff)
rool/rails/typo/trunk/app/models/trackback.rb (diff)
rool/rails/typo/trunk/app/models/user.rb (diff)
rool/rails/typo/trunk/app/views/accounts/login.rhtml (diff)
rool/rails/typo/trunk/app/views/accounts/logout.rhtml (diff)
rool/rails/typo/trunk/app/views/accounts/signup.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/base/_recent_comments.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/base/_recent_trackbacks.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/blacklist/_blacklist_patterns.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/blacklist/_form.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/blacklist/_quick_post.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/blacklist/destroy.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/blacklist/edit.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/blacklist/list.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/cache/list.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/categories/_categories.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/categories/_form.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/categories/_quick_post.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/categories/destroy.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/categories/edit.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/categories/list.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/categories/reorder.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/categories/show.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/comments/_form.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/comments/comments.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/comments/destroy.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/comments/edit.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/comments/list.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/comments/new.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/comments/show.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/content/_articles.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/content/_attachment.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/content/_form.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/content/_pages.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/content/_quick_post.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/content/_show_categories.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/content/_show_resources.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/content/destroy.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/content/edit.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/content/list.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/content/new.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/content/preview.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/content/show.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/feedback/_item.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/feedback/list.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/general/index.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/general/update_database.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/pages/_form.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/pages/_pages.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/pages/_quick_post.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/pages/destroy.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/pages/edit.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/pages/list.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/pages/new.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/pages/preview.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/pages/show.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/resources/_itunes_category_edit.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/resources/_metadata_add.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/resources/_metadata_edit.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/resources/_mime_edit.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/resources/_pages.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/resources/_resources.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/resources/destroy.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/resources/list.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/resources/new.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/sidebar/_active.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/sidebar/_availables.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/sidebar/_publish.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/sidebar/_target.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/sidebar/index.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/textfilters/_form.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/textfilters/_macros.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/textfilters/_textfilters.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/textfilters/destroy.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/textfilters/edit.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/textfilters/list.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/textfilters/macro_help.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/textfilters/new.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/textfilters/show.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/textfilters/show_help.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/themes/index.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/trackbacks/_form.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/trackbacks/destroy.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/trackbacks/edit.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/trackbacks/list.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/trackbacks/new.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/trackbacks/show.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/users/_form.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/users/_user.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/users/destroy.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/users/edit.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/users/list.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/users/new.rhtml (diff)
rool/rails/typo/trunk/app/views/admin/users/show.rhtml (diff)
rool/rails/typo/trunk/app/views/articles/_article.rhtml (diff)
rool/rails/typo/trunk/app/views/articles/_comment.rhtml (diff)
rool/rails/typo/trunk/app/views/articles/_comment_box.rhtml (diff)
rool/rails/typo/trunk/app/views/articles/_trackback.rhtml (diff)
rool/rails/typo/trunk/app/views/articles/archives.rhtml (diff)
rool/rails/typo/trunk/app/views/articles/comment_preview.rhtml (diff)
rool/rails/typo/trunk/app/views/articles/groupings.rhtml (diff)
rool/rails/typo/trunk/app/views/articles/index.rhtml (diff)
rool/rails/typo/trunk/app/views/articles/read.rhtml (diff)
rool/rails/typo/trunk/app/views/articles/view_page.rhtml (diff)
rool/rails/typo/trunk/app/views/layouts/administration.rhtml (diff)
rool/rails/typo/trunk/app/views/live/search.rhtml (diff)
rool/rails/typo/trunk/app/views/notification_mailer/_mail_footer.rhtml (diff)
rool/rails/typo/trunk/app/views/notification_mailer/article.rhtml (diff)
rool/rails/typo/trunk/app/views/notification_mailer/comment.rhtml (diff)
rool/rails/typo/trunk/app/views/settings/done.rhtml (diff)
rool/rails/typo/trunk/app/views/settings/install.rhtml (diff)
rool/rails/typo/trunk/app/views/shared/_search.rhtml (diff)
rool/rails/typo/trunk/app/views/sidebar/_sidebar.rhtml (diff)
rool/rails/typo/trunk/app/views/xml/_atom10_item_article.rxml (diff)
rool/rails/typo/trunk/app/views/xml/_atom10_item_comment.rxml (diff)
rool/rails/typo/trunk/app/views/xml/_atom10_item_trackback.rxml (diff)
rool/rails/typo/trunk/app/views/xml/_googlesitemap_item_article.rxml (diff)
rool/rails/typo/trunk/app/views/xml/_googlesitemap_item_category.rxml (diff)
rool/rails/typo/trunk/app/views/xml/_googlesitemap_item_page.rxml (diff)
rool/rails/typo/trunk/app/views/xml/_googlesitemap_item_tag.rxml (diff)
rool/rails/typo/trunk/app/views/xml/_itunes_item_resource.rxml (diff)
rool/rails/typo/trunk/app/views/xml/_rss20_item_article.rxml (diff)
rool/rails/typo/trunk/app/views/xml/_rss20_item_comment.rxml (diff)
rool/rails/typo/trunk/app/views/xml/atom10_feed.rxml (diff)
rool/rails/typo/trunk/app/views/xml/itunes_feed.rxml (diff)
rool/rails/typo/trunk/app/views/xml/rsd.rxml (diff)
rool/rails/typo/trunk/app/views/xml/rss20_feed.rxml (diff)
rool/rails/typo/trunk/bin/typo (diff)
rool/rails/typo/trunk/config/boot.rb (diff)
rool/rails/typo/trunk/config/environment.rb (diff)
rool/rails/typo/trunk/config/environments/production.rb (diff)
rool/rails/typo/trunk/config/environments/test.rb (diff)
rool/rails/typo/trunk/config/routes.rb (diff)
rool/rails/typo/trunk/db/migrate/046_fixup_forthcoming_publications.rb (diff)
rool/rails/typo/trunk/db/schema.mysql.sql (diff)
rool/rails/typo/trunk/db/schema.postgresql.sql (diff)
rool/rails/typo/trunk/db/schema.rb (diff)
rool/rails/typo/trunk/db/schema.sqlite.sql (diff)
rool/rails/typo/trunk/db/schema.sqlserver.sql (diff)
rool/rails/typo/trunk/db/schema_version (diff)
rool/rails/typo/trunk/doc/Installer.txt (diff)
rool/rails/typo/trunk/lib/email_notify.rb (diff)
rool/rails/typo/trunk/lib/generators/sidebar/sidebar_generator.rb (diff)
rool/rails/typo/trunk/lib/jabber_notify.rb (diff)
rool/rails/typo/trunk/lib/rails_patch/active_record.rb (diff)
rool/rails/typo/trunk/lib/sidebars/component_plugin.rb (diff)
rool/rails/typo/trunk/lib/sidebars/plugin.rb (diff)
rool/rails/typo/trunk/lib/spam_protection.rb (diff)
rool/rails/typo/trunk/lib/tasks/release.rake (diff)
rool/rails/typo/trunk/lib/text_filter_plugin.rb (diff)
rool/rails/typo/trunk/lib/typo_version.rb (diff)
rool/rails/typo/trunk/public/500.html (diff)
rool/rails/typo/trunk/public/dispatch.rb (diff)
rool/rails/typo/trunk/public/images/delete.png
rool/rails/typo/trunk/public/javascripts/controls.js (diff)
rool/rails/typo/trunk/public/javascripts/dragdrop.js (diff)
rool/rails/typo/trunk/public/javascripts/effects.js (diff)
rool/rails/typo/trunk/public/javascripts/prototype.js (diff)
rool/rails/typo/trunk/public/javascripts/typo.js (diff)
rool/rails/typo/trunk/public/stylesheets/administration.css (diff)
rool/rails/typo/trunk/test/fixtures/blogs.yml (diff)
rool/rails/typo/trunk/test/fixtures/contents.yml (diff)
rool/rails/typo/trunk/test/fixtures/sidebars.yml (diff)
rool/rails/typo/trunk/test/functional/accounts_controller_test.rb (diff)
rool/rails/typo/trunk/test/functional/admin/article_preview_test.rb (diff)
rool/rails/typo/trunk/test/functional/admin/blacklist_controller_test.rb (diff)
rool/rails/typo/trunk/test/functional/admin/categories_controller_test.rb (diff)
rool/rails/typo/trunk/test/functional/admin/comments_controller_test.rb (diff)
rool/rails/typo/trunk/test/functional/admin/content_controller_test.rb (diff)
rool/rails/typo/trunk/test/functional/admin/feedback_controller_test.rb (diff)
rool/rails/typo/trunk/test/functional/admin/general_controller_test.rb (diff)
rool/rails/typo/trunk/test/functional/admin/pages_controller_test.rb (diff)
rool/rails/typo/trunk/test/functional/admin/resources_controller_test.rb (diff)
rool/rails/typo/trunk/test/functional/admin/textfilters_controller_test.rb (diff)
rool/rails/typo/trunk/test/functional/admin/themes_controller_test.rb (diff)
rool/rails/typo/trunk/test/functional/admin/trackbacks_controller_test.rb (diff)
rool/rails/typo/trunk/test/functional/admin/users_controller_test.rb (diff)
rool/rails/typo/trunk/test/functional/articles_controller_test.rb (diff)
rool/rails/typo/trunk/test/functional/backend_controller_test.rb (diff)
rool/rails/typo/trunk/test/functional/redirect_controller_test.rb (diff)
rool/rails/typo/trunk/test/functional/textfilter_controller_test.rb (diff)
rool/rails/typo/trunk/test/functional/theme_controller_test.rb (diff)
rool/rails/typo/trunk/test/functional/xml_controller_test.rb (diff)
rool/rails/typo/trunk/test/mocks/test/xmlrpc_mock.rb (diff)
rool/rails/typo/trunk/test/mocks/themes/azure/layouts/default.rhtml (diff)
rool/rails/typo/trunk/test/test_helper.rb (diff)
rool/rails/typo/trunk/test/unit/article_test.rb (diff)
rool/rails/typo/trunk/test/unit/blog_test.rb (diff)
rool/rails/typo/trunk/test/unit/category_test.rb (diff)
rool/rails/typo/trunk/test/unit/comment_test.rb (diff)
rool/rails/typo/trunk/test/unit/content_state/factory_test.rb (diff)
rool/rails/typo/trunk/test/unit/magnolia_test.rb (diff)
rool/rails/typo/trunk/test/unit/page_test.rb (diff)
rool/rails/typo/trunk/test/unit/ping_test.rb (diff)
rool/rails/typo/trunk/test/unit/sidebar_test.rb (diff)
rool/rails/typo/trunk/test/unit/tag_test.rb (diff)
rool/rails/typo/trunk/test/unit/text_filter_test.rb (diff)
rool/rails/typo/trunk/test/unit/theme_test.rb (diff)
rool/rails/typo/trunk/test/unit/trackback_test.rb (diff)
rool/rails/typo/trunk/test/unit/user_test.rb (diff)
rool/rails/typo/trunk/themes/azure/layouts/default.rhtml (diff)
rool/rails/typo/trunk/themes/risc_os_open/layouts/default.rhtml (diff)
rool/rails/typo/trunk/themes/scribbish/layouts/default.rhtml (diff)
rool/rails/typo/trunk/themes/scribbish/stylesheets/content.css (diff)
rool/rails/typo/trunk/themes/scribbish/views/articles/_article.rhtml (diff)
rool/rails/typo/trunk/themes/scribbish/views/articles/_comment.rhtml (diff)
rool/rails/typo/trunk/themes/scribbish/views/articles/_comment_form.rhtml (diff)
rool/rails/typo/trunk/themes/scribbish/views/articles/_search.rhtml (diff)
rool/rails/typo/trunk/themes/scribbish/views/articles/comment_preview.rhtml (diff)
rool/rails/typo/trunk/themes/scribbish/views/articles/index.rhtml (diff)
rool/rails/typo/trunk/themes/scribbish/views/articles/read.rhtml (diff)
rool/rails/typo/trunk/vendor/akismet/akismet.rb (diff)
rool/rails/typo/trunk/vendor/flickr/flickr.rb (diff)
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 | ||
25 | ||
26 | ||
27 | ||
28 | ||
29 | ||
30 | ||
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 | | |
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 | ||
11 | require 'tasks/rails' |
rool/rails/typo/trunk/app/apis/blogger_service.rb:
prev. | current | |
:lastname => "", | ||
:nickname => username, | ||
:email => "", | ||
58 | | |
58 | :url => this_blog.base_url | |
) | ||
end | ||
def getUsersBlogs(appkey, username, password) | ||
[BloggerStructs::Blog.new( | ||
64 | | |
65 | | |
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 | | |
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 | | |
161 | | |
162 | | |
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 | | |
178 | | |
179 | | |
180 | | |
181 | | |
182 | | |
183 | | |
184 | | |
185 | | |
186 | | |
187 | | |
188 | | |
189 | ||
190 | | |
191 | | |
192 | | |
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 | | |
87 | Category.find(:all).collect do |c| | |
MovableTypeStructs::CategoryList.new( | ||
:categoryId => c.id, | ||
:categoryName => c.name | ||
... | ... | |
end | ||
def getPostCategories(postid, username, password) | ||
96 | | |
96 | this_blog.articles.find(postid).categorizations.collect do |c| | |
MovableTypeStructs::CategoryPerPost.new( | ||
98 | | |
99 | | |
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 | | |
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 | | |
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 | | |
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 | | |
17 | redirect_to :controller => '/admin/general' | |
end | ||
def sweep_html | ||
21 | | |
22 | | |
23 | | |
24 | | |
25 | | |
21 | expire_fragment(/^contents_html.*/) | |
flash[:notice] = 'HTML was cleared' | ||
28 | | |
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 | | |
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 | | |
9 | | |
10 | | |
11 | | |
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 | | |
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 | | |
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 :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 | | |
40 | | |
41 | | |
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 | | |
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 | | |
49 | | |
50 | | |
51 | ||
def attachment_save(attachment) | ||
begin | ||
Resource.create(:filename => attachment.original_filename, | ||
... | ... | |
def do_add_or_remove_fu | ||
attrib, action = params[:action].split('_') | ||
68 | | |
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 | ||
82 | ||
83 | ||
84 | | |
99 | ||
100 | @article.attributes = params[:article] | |
setup_categories | ||
@selected = @article.categories.collect { |c| c.id } | ||
if request.post? | ||
... | ... | |
end | ||
def set_article_categories | ||
124 | | |
125 | | |
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 | | |
133 | | |
134 | | |
135 | | |
136 | | |
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 | | |
7 | conditions = ['blog_id = :blog_id', {:blog_id => Blog.default.id}] | |
if params[:search] | ||
6 | | |
7 | | |
8 | | |
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 | | |
13 | | |
15 | conditions.first << ' and (published = :published)' | |
16 | conditions.last.merge!(:published => false) | |
end | ||
16 | | |
17 | | |
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 | | |
27 | | |
28 | | |
34 | begin | |
35 | Feedback.destroy(params[:id]) | |
flash[:notice] = "Deleted" | ||
30 | | |
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 | | |
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 | | |
51 | count += Feedback.delete(id) ## XXX Should this be #destroy? | |
end | ||
flash[:notice] = "Deleted #{count} item(s)" | ||
49 | | |
54 | ||
55 | # Sweep cache | |
56 | PageCache.sweep_all | |
57 | expire_fragment(/.*/) | |
58 | when 'Mark Checked Items as Ham' | |
ids.each do |id| | ||
51 | | |
52 | | |
53 | | |
54 | | |
60 | feedback = Feedback.find(id) | |
61 | feedback.mark_as_ham! | |
end | ||
56 | | |
57 | | |
63 | flash[:notice]= "Marked #{ids.size} item(s) as Ham" | |
64 | when 'Mark Checked Items as Spam' | |
ids.each do |id| | ||
59 | | |
60 | | |
61 | | |
62 | | |
66 | feedback = Feedback.find(id) | |
67 | feedback.mark_as_spam! | |
end | ||
64 | | |
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 | | |
4 | | |
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 | | |
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 | | |
47 | headers["Content-Type"] = "text/html; charset=utf-8" | |
@page = this_blog.pages.build(params[:page]) | ||
47 | | |
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 | | |
4 | | |
5 | | |
3 | @available = available | |
# Reset the staged position based on the active position. | ||
7 | | |
8 | | |
9 | | |
10 | | |
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 | | |
end | ||
def set_active | ||
# Get all available plugins | ||
18 | | |
19 | | |
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 | | |
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 | | |
31 | | |
32 | | |
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 | | |
54 | | |
48 | params[:configure] ||= { } | |
49 | this_blog.sidebars.update_all('active_position = null') | |
flash[:sidebars].each do |id| | ||
56 | | |
57 | | |
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 | | |
63 | Sidebar.delete_all(['blog_id = ? and active_position is null', | |
64 | this_blog.id]) | |
end | ||
index | ||
end | ||
... | ... | |
end | ||
def available | ||
71 | | |
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 | | |
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 | | |
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 | | |
9 | @users = User.find :all | |
end | ||
def show | ||
13 | | |
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 | | |
17 | | |
18 | | |
18 | # Extra filter to prime URL writing so that it doesn't make invalid | |
19 | # assumptions about protocol or port | |
20 | | |
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 | | |
29 | | |
30 | | |
31 | | |
32 | | |
33 | | |
34 | | |
33 | def reset_local_cache | |
34 | CachedModel.cache_reset | |
35 | session[:user].reload if session[:user] | |
end | ||
37 | | |
38 | | |
39 | | |
40 | ||
38 | # Axe? | |
def server_url | ||
42 | | |
40 | this_blog.base_url | |
end | ||
def cache | ||
$cache ||= SimpleCache.new 1.hour | ||
end | ||
49 | | |
50 | | |
51 | | |
52 | | |
47 | @@blog_id_for = Hash.new | |
54 | | |
55 | | |
56 | | |
57 | | |
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 | | |
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 | | |
4 | | |
5 | | |
6 | | |
7 | | |
8 | | |
9 | | |
10 | | |
11 | | |
12 | | |
13 | | |
14 | | |
15 | | |
16 | | |
17 | | |
18 | | |
19 | ||
before_filter :verify_config | ||
layout :theme_layout, :except => [:comment_preview, :trackback] | ||
cache_sweeper :blog_sweeper | ||
26 | | |
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 | | |
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 | | |
43 | | |
44 | | |
45 | | |
46 | | |
47 | | |
48 | | |
49 | | |
50 | | |
51 | | |
52 | | |
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 | | |
100 | unless request.xhr? || this_blog.sp_allow_non_ajax_comments | |
render_error("non-ajax commenting is disabled") | ||
return | ||
end | ||
113 | | |
114 | | |
115 | | |
116 | ||
unless hubssolib_logged_in? | ||
render_error("You are not logged in; you cannot comment on articles") | ||
return | ||
... | ... | |
if request.post? | ||
begin | ||
124 | | |
125 | | |
@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 | | |
129 | ||
130 | | |
131 | | |
132 | | |
133 | | |
134 | ||
135 | | |
136 | | |
137 | | |
138 | | |
139 | ||
120 | @comment.author ||= 'Anonymous' | |
@comment.save! | ||
141 | ||
122 | add_to_cookies(:typoapp_author, @comment.author) | |
add_to_cookies(:typoapp_url, @comment.url) | ||
143 | | |
set_headers | ||
render :partial => "comment", :object => @comment | ||
... | ... | |
end | ||
end | ||
218 | | |
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 | | |
204 | render :action => action | |
rescue ActiveRecord::RecordNotFound, NoMethodError => e | ||
error("Post not found...") | ||
end | ||
... | ... | |
end | ||
def set_headers | ||
237 | | |
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 | | |
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 | | |
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 | | |
22 | # model :user | |
helper :theme | ||
before_filter :auto_discovery_defaults | ||
... | ... | |
def auto_discovery_defaults | ||
@auto_discovery_url_rss = | ||
51 | | |
51 | request.instance_variable_get(:@auto_discovery_url_rss) | |
@auto_discovery_url_atom = | ||
53 | | |
53 | request.instance_variable_get(:@auto_discovery_url_atom) | |
unless @auto_discovery_url_rss && @auto_discovery_url_atom | ||
auto_discovery_feed(:type => 'feed') | ||
56 | | |
57 | | |
58 | | |
59 | | |
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 | | |
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 | | |
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 | ||
21 | | |
22 |
rool/rails/typo/trunk/app/controllers/theme_controller.rb:
prev. | current | |
session :off | ||
def stylesheets | ||
6 | | |
6 | render_theme_item(:stylesheets, params[:filename], 'text/css; charset=utf-8') | |
end | ||
def javascript | ||
10 | | |
10 | render_theme_item(:javascript, params[:filename], 'text/javascript; charset=utf-8') | |
end | ||
def images | ||
... | ... | |
private | ||
26 | | |
27 | | |
28 | | |
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 | | |
20 | headers["Status"] = "301 Moved Permanently" | |
return redirect_to(:format=>'atom') | ||
end | ||
@feed_title = this_blog.blog_name | ||
24 | | |
25 | @link = this_blog.base_url | |
@format = NORMALIZED_FORMAT_FOR[@format] | ||
... | ... | |
return | ||
end | ||
33 | | |
34 | headers["Content-Type"] = "#{CONTENT_TYPE_FOR[@format]}; charset=utf-8" | |
if respond_to?("prep_#{params[:type]}") | ||
self.send("prep_#{params[:type]}") | ||
... | ... | |
protected | ||
68 | | |
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 | | |
93 | fetch_items(article.comments, 'published_at DESC', 25) | |
@items.unshift(article) | ||
@feed_title << ": #{article.title}" | ||
95 | | |
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 | | |
103 | | |
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 | | |
111 | | |
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 | | |
18 | | |
22 | output << "<a href=\"#{value}\">#{key}</a>" | |
23 | end if @tasks | |
20 | | |
25 | output.join("<br />\n") | |
end | ||
def current_user_notice | ||
... | ... | |
def tab(label, options = {}) | ||
if controller.controller_name =~ /#{options[:controller].split('/').last}/ | ||
33 | | |
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 | | |
57 | link_to image_tag('go.png'), :action => 'show', :id => record.id | |
end | ||
def link_to_edit(record) | ||
56 | | |
61 | link_to image_tag('edit.png', :alt => "edit", :title => "Edit content"), :action => 'edit', :id => record.id | |
end | ||
def link_to_destroy(record) | ||
60 | | |
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 | | |
3 | link_to truncate(article.title, 60), :controller => '/admin/content', :action => 'edit', :id => article.id | |
end | ||
5 | | |
5 | ||
def task_showmod(title) | ||
7 | | |
8 | | |
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 | | |
6 | | |
7 | | |
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 | | |
10 | | |
14 | # this_blog.url_for(options) | |
15 | super(options) | |
end | ||
13 | | |
14 | | |
15 | | |
16 | ||
17 | | |
18 | | |
19 | | |
20 | ||
21 | | |
22 | | |
23 | | |
24 | ||
25 | | |
26 | | |
27 | | |
28 | ||
29 | | |
30 | | |
31 | | |
32 | | |
33 | ||
18 | # Basic english pluralizer. | |
19 | # Axe? | |
def pluralize(size, word) | ||
case size | ||
36 | | |
22 | when 0 then "no #{word.pluralize}" | |
when 1 then "1 #{word}" | ||
38 | | |
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 | | |
44 | | |
36 | link_to_permalink(article,pluralize(article.published_comments.size, 'comment'),'comments') | |
end | ||
def trackbacks_link(article) | ||
48 | | |
49 | | |
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 | | |
59 | | |
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 | | |
127 | html(article, what, true) | |
end | ||
def comment_html(comment) | ||
84 | | |
131 | html(comment, :body, true) | |
end | ||
def page_html(page) | ||
88 | | |
135 | html(page, :body, true) | |
end | ||
91 | | |
138 | def strip_html(text) | |
139 | typo_deprecated "use text.strip_html" | |
text.strip_html | ||
end | ||
94 | | |
95 | | |
96 | | |
97 | | |
98 | | |
99 | | |
100 | | |
101 | | |
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 | | |
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 | | |
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 | | |
20 | | |
21 | | |
22 | | |
23 | | |
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 | | |
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 | | |
52 | blog_name | |
end | ||
end | ||
def page_header | ||
52 | | |
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 | | |
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 | | |
77 | #{ page_header_includes.join("\n") } | |
<script type="text/javascript">#{ @content_for_script }</script> | ||
HTML | ||
).chomp | ||
... | ... | |
end | ||
def category_links(article) | ||
80 | | |
81 | | |
82 | | |
83 | | |
93 | "Posted in " + article.categories.map { |c| link_to h(c.name), c.permalink_url, :rel => 'tag'}.join(", ") | |
end | ||
def tag_links(article) | ||
87 | | |
88 | | |
89 | | |
90 | | |
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 | | |
112 | return n ? n.link_to_permalink("#{n.title} »") : '' | |
end | ||
def prev_link(article) | ||
p = article.previous | ||
110 | | |
117 | return p ? n.link_to_permalink("« #{p.title}") : '' | |
end | ||
113 | | |
114 | | |
115 | | |
116 | | |
117 | | |
118 | | |
119 | | |
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 | | |
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 | | |
155 | | |
156 | case | |
157 | when grouping_class == Tag | |
%{<ul id="taglist" class="tags">} | ||
157 | | |
159 | when grouping_class == Category | |
%{<ul class="categorylist">} | ||
else | ||
'<ul>' |
rool/rails/typo/trunk/app/helpers/mail_helper.rb:
prev. | current | |
module MailHelper | ||
2 | | |
3 | | |
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 | | |
4 | | |
5 | | |
6 | | |
7 | | |
8 | | |
9 | ||
10 | | |
11 | | |
12 | | |
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 | | |
17 | | |
18 | | |
19 | | |
20 | | |
21 | | |
end |
rool/rails/typo/trunk/app/helpers/xml_helper.rb:
prev. | current | |
h(post.title) | ||
end | ||
10 | | |
11 | | |
12 | | |
13 | ||
14 | | |
15 | | |
16 | | |
17 | ||
def blog_title | ||
this_blog.blog_name || "Unnamed blog" | ||
end | ||
21 | | |
22 | | |
23 | | |
24 | | |
def collection_lastmod(collection) | ||
article_updated = collection.articles.find(:first, :order => 'updated_at DESC') | ||
... | ... | |
times.max.xmlschema | ||
end | ||
end | ||
40 | ||
41 | | |
42 | | |
43 | | |
end |
rool/rails/typo/trunk/app/models/article.rb:
prev. | current | |
content_fields :body, :extended | ||
9 | | |
10 | | |
11 | | |
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 | | |
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 | | |
26 | | |
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 | | |
61 | html.gsub(/<a [^>]*>/) do |tag| | |
if(tag =~ /href="([^"]+)"/) | ||
urls.push($1) | ||
end | ||
end | ||
37 | | |
67 | urls.uniq | |
end | ||
40 | | |
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 | | |
87 | elsif pingback_or_trackback_urls.include?(url) | |
ping.send_pingback_or_trackback(articleurl) | ||
end | ||
end | ||
59 | | |
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 | | |
72 | | |
104 | blog.articles.find(:first, :conditions => ['published_at > ?', published_at], | |
105 | :order => 'published_at asc') | |
end | ||
def previous | ||
76 | | |
77 | | |
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 | | |
168 | def notify_user_via_email(user) | |
if user.notify_via_email? | ||
137 | | |
170 | EmailNotify.send_article(self, user) | |
end | ||
end | ||
141 | | |
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 | | |
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 | | |
244 | before_create :set_defaults, :create_guid | |
before_save :set_published_at | ||
after_save :keywords_to_tags | ||
247 | after_create :add_notifications | |
167 | | |
168 | | |
169 | | |
170 | | |
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 | | |
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 | | |
196 | | |
197 | | |
198 | | |
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 | | |
206 | | |
207 | | |
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 | | |
221 | | |
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 | ||
class BlogRequest | ||
4 | | |
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 | ||
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 | | |
27 | :conditions => {:published => true}, | |
:include => [:categories, :tags], | ||
26 | | |
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 | | |
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 | | |
81 | | |
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 | | |
91 | | |
92 | | |
93 | | |
94 | | |
95 | | |
end | ||
98 | ||
115 | # Check that all required blog settings have a value. | |
def is_ok? | ||
settings.has_key?('blog_name') | ||
end | ||
103 | | |
104 | | |
120 | # The +Theme+ object for the current theme. | |
121 | def current_theme | |
122 | @cached_theme ||= Theme.find(theme) | |
end | ||
107 | | |
108 | | |
109 | | |
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 | | |
112 | | |
149 | return RouteCache[options] | |
150 | else | |
151 | raise "Invalid URL in url_for: #{options.inspect}" | |
152 | end | |
end | ||
115 | | |
116 | | |
117 | | |
155 | # The URL for a static file. | |
156 | def file_url(filename) | |
157 | "#{base_url}/files/#{filename}" | |
end | ||
120 | | |
121 | | |
160 | # The base server URL. | |
161 | def server_url | |
162 | base_url | |
end | ||
124 | | |
125 | | |
126 | ||
127 | | |
128 | | |
165 | # Deprecated | |
166 | def canonical_server_url | |
167 | typo_deprecated "Use base_url instead" | |
168 | base_url | |
end | ||
131 | | |
132 | | |
133 | | |
134 | | |
135 | | |
171 | def [](key) # :nodoc: | |
172 | typo_deprecated "Use blog.#{key}" | |
173 | self.send(key) | |
end | ||
138 | | |
139 | | |
176 | def []=(key, value) # :nodoc: | |
177 | typo_deprecated "Use blog.#{key}=" | |
178 | self.send("#{key}=", value) | |
end | ||
142 | | |
143 | | |
181 | def has_key?(key) # :nodoc: | |
182 | typo_deprecated "Why?" | |
183 | self.class.fields.has_key?(key.to_s) | |
end | ||
146 | | |
147 | | |
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 | | |
151 | | |
152 | | |
153 | | |
154 | | |
155 | | |
156 | | |
157 | | |
158 | | |
159 | | |
160 | | |
191 | def current_theme_path # :nodoc: | |
192 | typo_deprecated "use current_theme.path" | |
193 | Theme.themes_root + "/" + theme | |
end | ||
162 | ||
163 | | |
164 | | |
165 | | |
166 | | |
167 | | |
168 | | |
169 | | |
170 | ||
171 | | |
172 | | |
173 | | |
174 | | |
175 | | |
176 | | |
177 | | |
178 | ||
179 | | |
180 | ||
181 | | |
182 | | |
183 | | |
184 | | |
end | ||
rool/rails/typo/trunk/app/models/blog_sweeper.rb:
prev. | current | |
class BlogSweeper < ActionController::Caching::Sweeper | ||
2 | | |
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 | | |
10 | expire_for(record, true) | |
end | ||
12 | | |
13 | def expire_for(record, destroying = false) | |
case record | ||
14 | | |
15 | | |
16 | | |
when Page | ||
18 | | |
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 | ||
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 | | |
4 | | |
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 | | |
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 | | |
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 | ||
6 | | |
7 | ||
8 | | |
9 | ||
10 | | |
5 | class Comment < Feedback | |
6 | belongs_to :article | |
belongs_to :user | ||
12 | ||
8 | content_fields :body | |
validates_presence_of :author, :body | ||
14 | | |
15 | | |
11 | attr_accessor :user_agent | |
12 | attr_accessor :referrer | |
13 | attr_accessor :permalink | |
18 | | |
19 | | |
20 | | |
21 | ||
22 | | |
15 | def notify_user_via_email(user) | |
if user.notify_via_email? | ||
24 | | |
17 | EmailNotify.send_comment(self, user) | |
end | ||
end | ||
28 | | |
21 | def notify_user_via_jabber(user) | |
if user.notify_via_jabber? | ||
30 | | |
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 | | |
41 | | |
34 | def default_text_filter | |
35 | blog.comment_text_filter.to_text_filter | |
end | ||
protected | ||
46 | | |
47 | | |
48 | | |
49 | | |
50 | | |
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 | | |
54 | | |
46 | def originator | |
47 | author | |
end | ||
57 | | |
58 | | |
50 | def additional_akismet_options | |
51 | { :user_agent => user_agent, | |
52 | :referrer => referrer, | |
53 | :permalink => permalink } | |
end | ||
61 | | |
62 | | |
63 | ||
64 | | |
65 | | |
66 | | |
67 | | |
68 | | |
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 | | |
73 | | |
74 | | |
65 | def content_fields | |
66 | [:body] | |
end | ||
76 | | |
77 | | |
78 | | |
79 | | |
80 | | |
81 | | |
82 | | |
83 | | |
84 | | |
end |
rool/rails/typo/trunk/app/models/content.rb:
prev. | current | |
composed_of :state, :class_name => 'ContentState::Factory', | ||
:mapping => %w{ state memento } | ||
14 | | |
15 | | |
16 | | |
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 | | |
33 | after_save :post_trigger, :state_after_save | |
serialize :whiteboard | ||
@@content_fields = Hash.new | ||
@@html_map = Hash.new | ||
28 | | |
29 | | |
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 | | |
49 | | |
50 | | |
51 | | |
end | ||
self[field] | ||
end | ||
unless self.method_defined?("#{field}_html") | ||
define_method("#{field}_html") do | ||
57 | | |
58 | | |
59 | | |
60 | | |
61 | | |
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 | | |
86 | @@html_map[self][attrib] = true | |
end | ||
end | ||
if field | ||
... | ... | |
end | ||
def find_published(what = :all, options = {}) | ||
83 | | |
84 | | |
85 | | |
86 | | |
87 | | |
88 | | |
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 | | |
108 | | |
109 | | |
110 | | |
111 | | |
119 | def content_fields | |
120 | @@content_fields[self.class] | |
end | ||
def state_before_save | ||
115 | | |
124 | state.before_save(self) | |
end | ||
118 | | |
127 | def state_after_save | |
128 | state.after_save(self) | |
129 | end | |
120 | | |
121 | | |
122 | | |
123 | | |
124 | | |
131 | def html_map(field=nil) | |
132 | self.class.html_map(field) | |
end | ||
127 | | |
128 | | |
129 | | |
130 | | |
131 | | |
132 | | |
133 | | |
134 | | |
135 | def cache_key(field) | |
136 | id ? "contents_html/#{id}/#{field}" : nil | |
end | ||
137 | | |
138 | | |
139 | ||
140 | | |
141 | | |
142 | | |
143 | | |
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 | | |
147 | raise "Unknown field: #{field.inspect} in article.html" | |
end | ||
end | ||
149 | | |
150 | | |
151 | | |
152 | | |
153 | | |
154 | | |
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 | | |
164 | | |
165 | | |
166 | | |
167 | | |
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 | | |
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 | | |
185 | | |
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 | | |
223 | | |
224 | | |
272 | def send_notification_to_user(user) | |
273 | notify_user_via_email(user) | |
274 | notify_user_via_jabber(user) | |
end | ||
227 | | |
228 | | |
277 | def send_notifications() | |
278 | state.send_notifications(self) | |
end | ||
230 | | |
231 | | |
232 | | |
233 | | |
234 | | |
235 | | |
236 | | |
237 | | |
238 | | |
239 | | |
240 | | |
241 | | |
242 | | |
244 | | |
245 | | |
281 | # deprecated | |
282 | def full_html | |
283 | typo_deprecated "use .html instead" | |
284 | html | |
285 | end | |
247 | | |
248 | | |
249 | | |
250 | | |
287 | end | |
252 | | |
253 | | |
254 | | |
255 | | |
256 | | |
257 | | |
258 | | |
259 | | |
260 | | |
289 | class Object | |
290 | def to_text_filter | |
291 | TextFilter.find_by_name(self.to_s) || TextFilter.find_by_name('none') | |
end | ||
262 | | |
263 | | |
264 | | |
265 | | |
266 | | |
267 | | |
268 | | |
269 | | |
270 | | |
271 | | |
272 | | |
273 | | |
274 | | |
275 | | |
276 | | |
end | ||
279 | ||
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 | | |
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 | | |
true | ||
end | ||
22 | | |
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 | | |
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 Singleton | ||
5 | | |
6 | | |
7 | | |
8 | | |
9 | | |
10 | | |
11 | | |
13 | | |
5 | def enter_hook(content) | |
6 | super | |
content[:published] = false | ||
15 | | |
16 | | |
8 | content[:published_at] = nil | |
end | ||
def change_published_state(content, boolean) | ||
content[:published] = boolean | ||
21 | | |
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 | | |
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 Singleton | ||
6 | | |
7 | | |
8 | | |
9 | | |
10 | | |
11 | | |
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 | | |
20 | | |
21 | | |
16 | def just_changed_published_status? | |
true | ||
end | ||
25 | | |
26 | | |
27 | | |
28 | | |
29 | | |
30 | | |
20 | def published?(content) | |
21 | true | |
end | ||
33 | | |
34 | | |
35 | | |
24 | # def enter_hook(content) | |
25 | # super | |
26 | # end | |
37 | | |
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 | | |
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 Singleton | ||
5 | | |
6 | | |
7 | | |
8 | | |
9 | | |
10 | | |
11 | | |
13 | | |
5 | def enter_hook(content) | |
6 | super | |
content[:published] = false | ||
content[:published_at] = nil | ||
16 | | |
end | ||
def before_save(content) | ||
... | ... | |
def change_published_state(content, boolean) | ||
content[:published] = boolean | ||
26 | | |
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 Singleton | ||
5 | | |
6 | | |
7 | | |
8 | | |
9 | | |
10 | | |
11 | | |
13 | | |
5 | def enter_hook(content) | |
6 | super | |
content[:published] = false if content.new_record? | ||
15 | | |
end | ||
18 | | |
19 | | |
20 | | |
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 Singleton | ||
5 | | |
6 | | |
7 | | |
8 | | |
9 | | |
11 | | |
5 | def published?(content) | |
true | ||
end | ||
15 | | |
16 | | |
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 | | |
21 | | |
16 | if ! boolean | |
17 | content[:published] = false | |
content[:published_at] = nil | ||
23 | | |
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 | | |
30 | | |
31 | | |
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 | | |
content.send_notifications | ||
true | ||
end |
rool/rails/typo/trunk/app/models/notification_mailer.rb:
prev. | current | |
class NotificationMailer < ActionMailer::Base | ||
helper :mail | ||
3 | ||
4 | | |
5 | | |
3 | ||
4 | def article(article, user) | |
5 | setup(user, article) | |
@subject = "[#{article.blog.blog_name}] New article: #{article.title}" | ||
@body[:article] = article | ||
end | ||
10 | | |
11 | | |
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 | | |
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 | | |
25 | def setup(user, content) | |
@body[:user] = user | ||
27 | | |
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 | | |
14 | | |
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 | | |
18 | ||
19 | | |
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 | | |
43 | | |
44 | | |
45 | ||
46 | | |
47 | | |
48 | | |
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 | | |
91 | | |
92 | | |
93 | | |
88 | Pinger.new(origin_url, self).send_pingback_or_trackback | |
end | ||
def send_trackback(trackback_url, origin_url) | ||
97 | | |
98 | | |
92 | trackback_uri = URI.parse(trackback_url) | |
100 | | |
101 | | |
102 | | |
103 | | |
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 | | |
106 | | |
107 | | |
108 | | |
109 | | |
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 | | |
end | ||
def send_weblogupdatesping(server_url, origin_url) | ||
115 | | |
116 | | |
117 | | |
118 | | |
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 | | |
125 | | |
126 | | |
114 | begin | |
115 | server = XMLRPC::Client.new2(URI.parse(xml_rpc_url).to_s) | |
128 | | |
129 | | |
130 | | |
131 | | |
132 | | |
133 | | |
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 | | |
end | ||
end |
rool/rails/typo/trunk/app/models/sidebar.rb:
prev. | current | |
class Sidebar < ActiveRecord::Base | ||
2 | ||
serialize :config | ||
3 | belongs_to :blog | |
5 | | |
6 | | |
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 | | |
10 | | |
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 | | |
14 | | |
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 | | |
26 | | |
213 | def html_id | |
214 | short_name + '-' + id.to_s | |
end | ||
29 | | |
30 | | |
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 | | |
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 | ||
4 | ||
3 | class TextFilter < CachedModel | |
serialize :filters | ||
serialize :params | ||
def self.available_filters | ||
9 | | |
10 | | |
11 | | |
12 | | |
13 | | |
14 | | |
15 | ||
16 | | |
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 | | |
22 | | |
23 | | |
24 | | |
25 | | |
19 | @cached_filter_types ||= {} | |
27 | | |
28 | | |
29 | | |
30 | | |
31 | | |
21 | unless @cached_filter_types[filters] | |
22 | types={"macropre" => [], | |
23 | "macropost" => [], | |
24 | "markup" => [], | |
25 | "postprocess" => [], | |
26 | "other" => []} | |
33 | | |
28 | filters.each { |filter| types[TYPEMAP[filter.superclass]].push(filter) } | |
35 | | |
30 | @cached_filter_types[filters] = types | |
31 | end | |
32 | ||
33 | @cached_filter_types[filters] | |
end | ||
def self.filters_map | ||
39 | | |
37 | TextFilterPlugin.filter_map | |
end | ||
42 | | |
43 | ||
40 | def self.filter_text(blog, text, content, filters, filterparams={}) | |
map=TextFilter.filters_map | ||
45 | | |
filters.each do |filter| | ||
next if filter == nil | ||
begin | ||
50 | | |
51 | | |
52 | | |
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 | | |
57 | def self.filter_text_by_name(blog, text, filtername) | |
f = TextFilter.find_by_name(filtername) | ||
63 | | |
59 | f.filter_text_for_content blog, text, nil | |
end | ||
66 | | |
67 | | |
68 | | |
69 | | |
70 | | |
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 | | |
74 | | |
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 | | |
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 | ||
4 | | |
5 | | |
6 | ||
3 | class Trackback < Feedback | |
4 | belongs_to :article | |
content_fields :excerpt | ||
8 | ||
9 | | |
validates_presence_of :title, :excerpt, :url | ||
11 | | |
13 | | |
14 | | |
15 | | |
16 | ||
def initialize(*args, &block) | ||
super(*args, &block) | ||
self.title ||= self.url | ||
self.blog_name ||= "" | ||
end | ||
23 | | |
24 | | |
25 | | |
14 | before_create :process_trackback | |
27 | | |
28 | | |
29 | ||
def make_nofollow | ||
31 | | |
32 | | |
33 | | |
17 | typo_deprecated 'Do it via postprocessing.' | |
end | ||
def process_trackback | ||
... | ... | |
end | ||
end | ||
43 | | |
44 | | |
45 | | |
46 | | |
47 | | |
48 | | |
49 | | |
50 | | |
27 | def article_allows_feedback? | |
28 | return true if article.allow_pings? | |
29 | errors.add(:article, 'Article is not pingable') | |
30 | false | |
end | ||
53 | | |
54 | | |
55 | | |
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 | | |
59 | | |
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 | ||
5 | | |
6 | | |
7 | | |
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 | | |
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 | ||
1 | <% form_tag :action=> "login" do %> | |
<div title="Account login" id="loginform"> | ||
5 | | |
6 | | |
7 | | |
8 | | |
9 | | |
10 | | |
11 | | |
12 | | |
13 | | |
15 | | |
16 | | |
6 | <h3>Typo</h3> | |
18 | | |
19 | | |
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') %> »" class="primary" /> | |
23 | <p><%= link_to "« " + _('Back to the blog'), { :controller => '/articles' } %></p> | |
</div> | ||
</div> | ||
23 | ||
27 | <% end %> | |
rool/rails/typo/trunk/app/views/accounts/logout.rhtml:
prev. | current | |
1 | ||
1 | <h3><%= _("Logoff")%></h3> | |
<div class="memo"> | ||
<p> | ||
5 | | |
6 | | |
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 | | |
10 | | |
8 | ||
9 | <%= link_to "« " + _('Login'), :action => "login" %><br /> | |
10 | ||
</div> | ||
rool/rails/typo/trunk/app/views/accounts/signup.rhtml:
prev. | current | |
1 | ||
1 | <% form_tag :action=> "signup" do %> | |
<%= error_messages_for 'user' %><br/> | ||
<div title="Account signup" id="loginform"> | ||
6 | | |
6 | <h3><%= _('Signup') %></h3> | |
<div class="form"> | ||
8 | | |
8 | <label for="user_login"><%= _("Desired login") %>:</label><br/> | |
<%= text_field "user", "login", :size => 20 %><br/> | ||
11 | | |
11 | <label for="user_login"><%= _("Display name")%>:</label><br/> | |
<%= text_field "user", "name", :size => 30 %><br/> | ||
14 | | |
14 | <label for="user_login"><%= _("Email")%>:</label><br/> | |
<%= text_field "user", "email", :size => 30 %><br/> | ||
17 | | |
17 | <label for="user_password"><%= _("Choose password")%>:</label><br/> | |
<%= password_field "user", "password", :size => 30 %><br/> | ||
19 | | |
19 | <label for="user_password_confirmation"><%= _("Confirm password")%>:</label><br/> | |
<%= password_field "user", "password_confirmation", :size => 30 %><br/> | ||
21 | | |
21 | <input type="submit" value="<%= _('Signup') %>" class="primary" /> | |
</div> | ||
</div> | ||
25 | ||
25 | <% end %> | |
rool/rails/typo/trunk/app/views/admin/base/_recent_comments.rhtml:
prev. | current | |
1 | ||
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 | | |
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 | ||
1 | <h2><%=_("Recent trackbacks")%></h2> | |
<ul class="recent"> | ||
<% for trackback in Trackback.find(:all, :limit => 5, :order => 'id DESC' ) %> | ||
<li> | ||
5 | | |
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 | | |
4 | | |
5 | | |
6 | | |
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 | | |
4 | <label for="blacklist_pattern_pattern"><%= _("Pattern")%>:</label> | |
<%= text_field 'blacklist_pattern', 'pattern' %> | ||
</p> | ||
<p> | ||
<% if @controller.action_name == "new" %> | ||
9 | | |
9 | <label for="blacklist_pattern_type"><%= _("Type")%>:</label> | |
<select name="blacklist_pattern[type]"> | ||
11 | | |
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 | ||
1 | <% form_tag :action=>"new" do %> | |
<p> | ||
4 | | |
4 | <label for="blacklist_pattern_pattern"><%= _("Pattern")%>:</label> | |
<%= text_field 'blacklist_pattern', 'pattern' %> | ||
</p> | ||
<p> | ||
8 | | |
8 | <label for="blacklist_pattern_type"><%= _("Type")%>:</label> | |
<select name="blacklist_pattern[type]"> | ||
10 | | |
10 | <%= options_for_select [ [_('String'), 'StringPattern'], [_('Regex'), 'RegexPattern' ] ] %> | |
</select> | ||
<div id="operations"> | ||
14 | | |
14 | <%= save(_("Add pattern")) %> <%= _("or")%> <a href="#" onclick="new Effect.BlindUp('quick-post', {duration: 0.4}); return false;" ><%= _("Cancel")%></a> | |
</div> | ||
16 | ||
16 | </p> | |
17 | <% end %> |
rool/rails/typo/trunk/app/views/admin/blacklist/destroy.rhtml:
prev. | current | |
1 | | |
1 | <% @page_heading = _('Blacklist Patterns') %> | |
<% content_for('tasks') do %> | ||
4 | | |
4 | <%= task_show _('Show this pattern'), @blacklist_pattern.id %> | |
<% end %> | ||
7 | | |
8 | | |
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 | | |
11 | <% end %> |
rool/rails/typo/trunk/app/views/admin/blacklist/edit.rhtml:
prev. | current | |
1 | | |
1 | <% @page_heading = _('Blacklist Patterns') %> | |
3 | | |
4 | | |
5 | | |
6 | | |
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 | | |
11 | <%= save %> or <%= cancel %> | |
</div> | ||
14 | | |
15 | <% end %> |
rool/rails/typo/trunk/app/views/admin/blacklist/list.rhtml:
prev. | current | |
1 | | |
1 | <% @page_heading = _('Blacklist Patterns') %> | |
<% content_for('tasks') do %> | ||
4 | | |
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 | | |
1 | <% @page_heading = _('Cache') %> | |
<% content_for('tasks') do %> | ||
<%= task_sweep 'Empty Page Cache' %> | ||
<% end %> | ||
<div id="users"> | ||
7 | | |
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 | | |
4 | | |
5 | | |
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 | | |
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 | ||
1 | <% form_tag :action=>"new" do %> | |
<p> | ||
4 | | |
5 | | |
4 | <label for="category_name"><%= _("Title")%>:</label><br/> | |
5 | <%= text_field 'category', 'name' %> | |
</p> | ||
<div id="operations"> | ||
9 | | |
9 | <%= save(_("Add category")) %> <%= _("or")%> <a href="#" onclick="new Effect.BlindUp('quick-post', {duration: 0.4}); return false;" ><%= _("Cancel")%></a> | |
</div> | ||
11 | ||
11 | <% end %> |
rool/rails/typo/trunk/app/views/admin/categories/destroy.rhtml:
prev. | current | |
1 | | |
1 | <% @page_heading = _('Categories') %> | |
<% content_for('tasks') do %> | ||
4 | | |
5 | | |
4 | <%= task_show _('Show this category'), @category.id %> | |
5 | <% end %> | |
7 | | |
8 | | |
9 | | |
10 | | |
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 | | |
1 | <% @page_heading = _('Categories') %> | |
3 | | |
4 | | |
5 | | |
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 | | |
10 | <%= save %> or <%= cancel %> | |
</div> | ||
13 | | |
14 | <% end %> |
rool/rails/typo/trunk/app/views/admin/categories/list.rhtml:
prev. | current | |
1 | | |
1 | <% @page_heading = _('Manage Categories') %> | |
<% content_for('tasks') do -%> | ||
4 | | |
5 | | |
6 | | |
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 | ||
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 | | |
1 | <% @page_heading = _("Articles in") + " #{h @category.name}" %> | |
<% content_for('tasks') do %> | ||
4 | | |
4 | <%= task_edit _('Edit this category'), @category.id %> | |
<% end %> | ||
7 | | |
7 | <% form_tag :action=>"new" do %> | |
<div class="list"> | ||
<table cellspacing="1" cellpadding="0"> | ||
<% for article in @category.articles -%> | ||
<tr <%= alternate_class -%>> | ||
12 | | |
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 | | |
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 | | |
4 | <label for="comment_author"><%= _("Author")%>:</label><br/> | |
<%= text_field 'comment', 'author' %> | ||
</p> | ||
<p> | ||
8 | | |
8 | <label for="comment_url"><%= _("Url") %>:</label><br/> | |
<%= text_field 'comment', 'url' %> | ||
</p> | ||
<p> | ||
12 | | |
12 | <label for="comment_email"><%= _("Email")%>:</label><br/> | |
<%= text_field 'comment', 'email' %> | ||
</p> | ||
<p> | ||
16 | | |
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 | ||
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 | | |
1 | <% @page_heading = _("Comments for") + " #{ link_to h(@article.title), :controller => '/admin/content', :action => 'show', :id => @article }" %> | |
<% content_for('tasks') do %> | ||
4 | | |
5 | | |
4 | <%= task_show _('Show this comment'), @comment.id %> | |
5 | <% end %> | |
7 | | |
8 | | |
7 | <p><%= _("Are you sure you want to delete this item?")%></p> | |
8 | <% form_tag do %> | |
<%= hidden_field "comment", "id" %> | ||
<%= confirm_delete %> | ||
11 | | |
11 | <% end %> |
rool/rails/typo/trunk/app/views/admin/comments/edit.rhtml:
prev. | current | |
1 | | |
1 | <% @page_heading = _("Comments for") + " #{ link_to h(@article.title), :controller => '/admin/content', :action => 'show', :id => @article }" %> | |
<% content_for('tasks') do %> | ||
4 | | |
5 | | |
4 | <li><%= link_to_permalink @comment, _('View comment on your blog') %></li> | |
5 | <% end %> | |
7 | | |
7 | <% form_tag :action=>"edit", :id => @comment.id do %> | |
9 | | |
10 | | |
9 | <h3><%= _("Editing comment")%></h3> | |
10 | <div class="form"> | |
<%= render_partial "form" %> | ||
</div> | ||
<div id="operations"> | ||
15 | | |
15 | <%= save %> or <%= cancel %> | |
</div> | ||
18 | | |
18 | <% end %> |
rool/rails/typo/trunk/app/views/admin/comments/list.rhtml:
prev. | current | |
1 | | |
1 | <% @page_heading = "Comments for #{ link_to h(@article.title), :controller => '/admin/content', :action => 'show', :id => @article }" %> | |
<% content_for('tasks') do %> | ||
4 | | |
5 | | |
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 | | |
12 | | |
13 | | |
14 | | |
15 | | |
16 | | |
17 | | |
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 | | |
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 | | |
1 | <% @page_heading = _("Comments for") + " #{ link_to h(@article.title), :controller => '/admin/content', :action => 'show', :id => @article }" %> | |
3 | | |
4 | | |
5 | | |
3 | <h3><%= _("Creating comment")%></h3> | |
7 | | |
5 | <% form_tag :action=>"new" do %> | |
6 | ||
7 | <div class="form"> | |
<%= render_partial "form" %> | ||
</div> | ||
<div id="operations"> | ||
12 | | |
12 | <%= save %> or <%= cancel %> | |
</div> | ||
15 | | |
16 | <% end %> |
rool/rails/typo/trunk/app/views/admin/comments/show.rhtml:
prev. | current | |
1 | | |
1 | <% @page_heading = _("Comments for") + " #{ link_to h(@article.title), :controller => '/admin/content', :action => 'show', :id => @article }" %> | |
<div class="form"> | ||
4 | | |
5 | | |
6 | | |
7 | | |
8 | | |
9 | | |
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 | | |
4 | | |
5 | | |
6 | | |
7 | | |
8 | | |
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 | | |
13 | | |
14 | | |
15 | | |
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 | ||
2 | | |
3 | | |
4 | | |
5 | | |
6 | | |
7 | | |
8 | | |
9 | | |
10 | | |
11 | | |
12 | | |
13 | | |
14 | | |
15 | | |
16 | ||
17 | ||
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 | ||
4 | | |
5 | | |
6 | | |
7 | ||
8 | ||
9 | | |
10 | | |
11 | ||
12 | ||
13 | | |
14 | | |
15 | | |
16 | ||
17 | ||
18 | | |
19 | | |
20 | | |
21 | | |
22 | ||
23 | ||
24 | | |
25 | | |
26 | ||
27 | ||
28 | | |
29 | | |
30 | | |
31 | | |
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 | ||
35 | <br style ="clear: both"/> | |
36 | </fieldset> | |
35 | ||
36 | ||
37 |