Crabgrass modifications to add picture tagging

These modifications add the possibility to tag individual pictures and not only the gallery.

The branch is in github.com/janaya/Crabgrass-Core/tree/p...

Pictures are Assets (like attachments in wiki)

The main class for tags is:

vendor/plugins/acts-as-taggable-on/

Files changed/added

app/controllers/assets/tags_controller.rb
app/helpers/assets/tags_helper.rb
app/models/asset.rb
app/views/assets/tags/popup.html.haml
app/views/assets/tags/tag_list.html.haml
app/views/assets/tags/reset.rjs
config/routes.rb
extensions/pages/gallery_page/app/views/gallery_image/show.html.haml
test/functional/assets/tags_controller_test.rb
test/functional/pages/tags
controller
test.rb
test/unit/assets/tag
test.rb

possible errors in tests

no user_login

don’t fetch the page

don’t save the asset (and then the rel table)

Code added/changed

test/functional/pages/tags_controller_test.rb

rails save the association only if you save the page/asset, so after this

@page.tag_list.add(params:add, :parse => true)

is needed to call @page.save

To do

  • Make searching pictures by tag