Details
Description
Testing indicates just adding a record to civicrm_case_activity has the desired effect but only if editing is disabled since editing the activity has undesirable results. So along with CRM-4754 blocking editing of emails, the idea is:
If civicase component enabled, and activity type is Inbound Email, add button to non-case activity view screen "File on case".
Button to present to user a list of cases via a jquery popup with a drop-down of all open cases, displayed as "<client name> - <case type>" to allow distinguishing multiple cases for same client.
Row inserted into case_activity table.
Then go to manage case screen. (Discussed a bit and while it will definitely be desired to verify the first couple times a user uses this feature, it might become a nuisance after a while and they might prefer to stay at the activity view, but decided that needing to see it went somewhere is better.)