Image Gallery: 1 of 19 cherry picked commits

started image uploading, more haml conversion
(cherry picked from commit 03c3228f688314ffa516423a0254e9d5239b6113)

Conflicts:
	app/controllers/images_controller.rb
	app/models/image.rb
	app/views/activities/index.html.haml
	app/views/activities/show.pdf.prawn
	app/views/images/_list_item.html.haml
	app/views/images/edit.html.haml
	app/views/images/show.html.haml
	app/views/shared/_image_item.html.haml
	spec/controllers/images_controller_spec.rb
	spec/models/image_spec.rb
fix haml for image edit view
(cherry picked from commit eeb7ff37c77d1ba5d24b5c1ecc5af18612f8e3e2)
remember to use '-' in haml for code that doesn't render
(cherry picked from commit 3e2cfcdcedb3ee06649004f6c973770173059453)
Image Gallery: more cherrypicks  (models/image)

comment out most of models/image.rb
(cherry picked from commit 3495d15def51ef6f1177963d2bc12a2abcab0314)

Conflicts:
	.gitignore
uncomment models.image.rb
(cherry picked from commit 74ae830c44302e4b08ed939a922d82c5aad3f4a6)
comment out has_attachment from models/image.rb
for some reason this is still causing a problem with fcgi and lighttpd
(cherry picked from commit fbf593e06d510291df3f40f4af49dabfd67dba08)
Image Gallery: more merged cherrypicks.

add Changeable library for model instances

adds object#changeable? method which retruns true
if user has admin or manager roles or
if user is the author of object.

Is often used like this:

if component.changeable?(current_user)
  display_edit_button
end(cherry picked from commit e3a341d08ab97432c084adbc319e526d4c8286e5)

Conflicts:
	app/models/assessment_target.rb
	app/models/big_idea.rb
	app/models/data_collector.rb
	app/models/domain.rb
	app/models/expectation.rb
	app/models/expectation_indicator.rb
	app/models/expectation_stem.rb
	app/models/grade_span_expectation.rb
	app/models/interactive_model.rb
	app/models/investigation.rb
	app/models/knowledge_statement.rb
	app/models/multiple_choice.rb
	app/models/open_response.rb
	app/models/page.rb
	app/models/page_element.rb
	app/models/section.rb
	app/models/unifying_theme.rb
	app/models/user.rb
	app/models/xhtml.rb
	lib/changeable.rb
Repurpose the Image model for  uploaded images
(cherry picked from commit 647cd82b43c0a661be976d8baa755e4258829e4e)

Conflicts:
	app/controllers/images_controller.rb
	app/helpers/application_helper.rb
	app/views/images/_list_item.html.haml
	config/routes.rb
	db/schema.rb
Remove "draft" as an image publication option. Clean up some image views.
(cherry picked from commit 59f70e5cc9c76367c25a4d2ab13d95c3625dc343)
Move the search spinner inline with the title
(cherry picked from commit 4f3236d059c955e1a2bc4c39fe9d645fd8bfd05e)
Resize uploaded images to fit in screen size

Adjust attribution font sizes to be more reasonable.
(cherry picked from commit 7f03c7bb4aec0720570d8c012f13172f2f13530c)
Show the full-sized image in the show page

Also show the correct byte size for the resized image.
(cherry picked from commit 0248c51d2fb6c1530e13fb5277b2254f1082c775)
Fix the font scaling

It will now calculate the correct scaling ratio,
based on the final image size.
(cherry picked from commit 9e3905379a42be6574eb11904b9a9383ac62a312)
Add some info text for image uploads
(cherry picked from commit 640f3af1dec37b5661f18b7a92212cdf3637bc05)
Fix images pagination

Also, remove the drafts checkbox in the search form,
since images can't be created in a draft state anyway.
(cherry picked from commit 115954b94ac43bf5364568500c10ed73b7606c2f)
Explicitly return true
(cherry picked from commit e20aafd823d54c680515a700eb279e5c5293a4ab)
Image Gallery: +"uploaded by" attribution to image

(cherry picked from commit 1f9bbe6708ef5f4314a4b7881314c4bff2a1a136)

Conflicts:
	lib/paperclip_processors/attributor.rb
Images can be filtered to only show the current user's images
(cherry picked from commit 6d7fca560c9151d44be7098c4e3b95b8600e2b6c)
Clean up image filenames up upload
(cherry picked from commit c3580c4e964936a0eab0df7a10b223c8d6fe4d35)
WIP Image Gallery: merge-fix updates for Rails 3: Paperclip changes.