diff --git a/app/controllers/common/requests.rb b/app/controllers/common/requests.rb index 62b68eb8dfc4fe70adfabdae6f76549400cdce54..476a71c504521c2fd81feccafa3bacfeb0c58b58 100644 --- a/app/controllers/common/requests.rb +++ b/app/controllers/common/requests.rb @@ -8,16 +8,12 @@ module Common::Requests extend ActiveSupport::Concern - include Common::Tracking::Action - included do helper_method :current_state helper_method :request_path helper_method :requests_path before_filter :fetch_request, only: %i[update destroy show] - track_actions :update, if: :approved? - after_filter :create_notices, only: :create after_filter :dismiss_notices, only: :update end @@ -105,11 +101,6 @@ module Common::Requests end end - def track_action(event = nil, options = {}) - event ||= @req.event - super event, @req.event_attrs.merge(options) - end - def create_notices Notice::RequestNotice.create! @req if @req.persisted? end diff --git a/app/controllers/group/groups_controller.rb b/app/controllers/group/groups_controller.rb index f40e51b11284d405bf9809fc37f9702e2b40dd94..05b08e3d1fd4aa4dbf5b38adb9c1f59a13420d46 100644 --- a/app/controllers/group/groups_controller.rb +++ b/app/controllers/group/groups_controller.rb @@ -12,7 +12,6 @@ class Group::GroupsController < Group::BaseController before_filter :initialize_group, only: %w[new create] before_filter :fetch_associations, only: :destroy - track_actions :create after_filter :notify_former_users, only: :destroy guard :may_ALIAS_group? diff --git a/app/controllers/group/memberships_controller.rb b/app/controllers/group/memberships_controller.rb index 90327cf4b9e7257164e1c90f26b6b182a4ef8fa3..4036e417cf5275185d142bcb3f57c0dabeab6d82 100644 --- a/app/controllers/group/memberships_controller.rb +++ b/app/controllers/group/memberships_controller.rb @@ -5,14 +5,11 @@ # class Group::MembershipsController < Group::BaseController - include Common::Tracking::Action guard index: :may_list_memberships?, destroy: :may_destroy_membership?, create: :may_create_membership? - track_actions :create, :destroy, unless: :federation_view? - # # list all the memberships # diff --git a/app/controllers/group/requests_controller.rb b/app/controllers/group/requests_controller.rb index 61b29c8742a6a2e9ae365fd31f3777d63f7ab58b..23edc45add4f1f5fc51b6b6cf3c70ebcc1c35906 100644 --- a/app/controllers/group/requests_controller.rb +++ b/app/controllers/group/requests_controller.rb @@ -12,8 +12,6 @@ class Group::RequestsController < Group::BaseController # permissions handled by model: guard create: :allow, update: :allow, destroy: :allow - track_actions :create - rescue_render create: :index def index @@ -48,10 +46,6 @@ class Group::RequestsController < Group::BaseController REQUEST_TYPES[params[:type]].try.constantize end - def track_action - super "request_to_#{params[:type]}" if REQUEST_TYPES.key? params[:type] - end - def current_view case params[:view] when 'incoming' then :to_group diff --git a/app/controllers/group/structures_controller.rb b/app/controllers/group/structures_controller.rb index 05c91330e9ddedd5d8b16ff7bcf11782368a1e41..70ba7f143864a846b597702c6c204ff9ca18a284 100644 --- a/app/controllers/group/structures_controller.rb +++ b/app/controllers/group/structures_controller.rb @@ -1,10 +1,7 @@ class Group::StructuresController < Group::SettingsController - include Common::Tracking::Action guard :may_edit_group_structure?, actions: %i[new create destroy] - track_actions :create - def show; end def new @@ -47,7 +44,4 @@ class Group::StructuresController < Group::SettingsController params.fetch(:group, {}).permit :name, :full_name, :language end - def track_action - super("#{action_string}_group", group: @committee) - end end diff --git a/app/controllers/stars_controller.rb b/app/controllers/stars_controller.rb index ef58db0093b917e02ee6f6b5fb0398c9dfc65ebe..fceb432c4a0a3f6765094712335aba8dc2625406 100644 --- a/app/controllers/stars_controller.rb +++ b/app/controllers/stars_controller.rb @@ -24,6 +24,7 @@ class StarsController < ApplicationController include Common::Tracking::Action before_filter :fetch_starred + track_actions :create def create @starred.stars.create(user: current_user) diff --git a/config/en.yml b/config/en.yml index 14b5f19ae0016ea4ffa7166bf4ca229aead80bcd..ae9f244323c635d6e25d653fbe35f109f9e4f463 100644 --- a/config/en.yml +++ b/config/en.yml @@ -80,7 +80,7 @@ en: ### en/crabgrass.yml crabgrass: description_html: ', <a href="https://www.gnu.org/licenses/agpl-3.0.html"> AGPL - software libre</a> for network organizing. + software libre</a> for network organizing ' get_involved: Get Involved @@ -843,20 +843,7 @@ en: ######################################## ### en/unsorted.yml view_label: View - activity_contact_created: "%{user} added %{other_user} as a friend" - activity_group_created: "%{user} created %{group_type} %{group}" - activity_group_destroyed: "%{group} was destroyed by %{user}" - activity_message: "%{author} wrote: %{message}" - activity_message_received: 'You received %{message_tag} from %{other_user}: %{title}' activity_twinkled: '%{user} has starred your post "%{post}"' - activity_unread: You have %{count} unread [private messages] - activity_unread_singular: You have an unread [private message] - activity_user_destroyed: "%{user} has retired" - activity_user_joined_group: "%{user} has joined %{group_type} %{group}" - activity_user_joined_site: "%{user} has joined %{group}" - activity_user_left_group: "%{user} has left %{group_type} %{group}" - activity_user_left_site: "%{user} has left %{group}" - activity_wall_message: "%{author} wrote to %{user}: %{message}" asset_version_list_version_heading: version created_on: Created on delete_version_confirm: Are you sure you want to delete this version? @@ -982,7 +969,6 @@ en: cant_find_wiki_section: Can't find wiki section %{section} changes_made: Changes made %{when}. changes_might_be_overwritten: Your changes might be overwritten. - comparing_changes_header: Comparing changes between %{old_version} and %{new_version}. diff_link: view changes edit_wiki: Edit Wiki force_save_button: Break Lock and Save diff --git a/config/locales/en/unsorted.yml b/config/locales/en/unsorted.yml index cfbc57d10ee7db91c95dabd14df2e0e5014f65f3..a625c85f465ecc30191c7a73fa1c6b00546eb785 100644 --- a/config/locales/en/unsorted.yml +++ b/config/locales/en/unsorted.yml @@ -4,20 +4,7 @@ en: view_label: View ## ACTIVITIES - activity_contact_created: "%{user} added %{other_user} as a friend" - activity_group_created: "%{user} created %{group_type} %{group}" - activity_group_destroyed: "%{group} was destroyed by %{user}" - activity_message: "%{author} wrote: %{message}" - activity_message_received: "You received %{message_tag} from %{other_user}: %{title}" - activity_twinkled: "%{user} has starred your post \"%{post}\"" - activity_unread: "You have %{count} unread [private messages]" - activity_unread_singular: "You have an unread [private message]" - activity_user_destroyed: "%{user} has retired" - activity_user_joined_group: "%{user} has joined %{group_type} %{group}" - activity_user_joined_site: "%{user} has joined %{group}" - activity_user_left_group: "%{user} has left %{group_type} %{group}" - activity_user_left_site: "%{user} has left %{group}" - activity_wall_message: "%{author} wrote to %{user}: %{message}" + activity_twinkled: '%{user} has starred your post "%{post}"' ## ASSETS asset_version_list_version_heading: version diff --git a/db/migrate/20180515155729_drop_activities.rb b/db/migrate/20180515155729_drop_activities.rb new file mode 100644 index 0000000000000000000000000000000000000000..be898b03e3fe7861af112d3b7e74c55efff3f626 --- /dev/null +++ b/db/migrate/20180515155729_drop_activities.rb @@ -0,0 +1,8 @@ +class DropActivities < ActiveRecord::Migration + def up + drop_table :activities + end + def down + fail ActiveRecord::IrreversibleMigration + end +end diff --git a/db/schema.rb b/db/schema.rb index b7f5e9ba95fdcf1188f643738ca09551a246705d..d44327cf22b44563d95a3782090537f5bf9c283b 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,27 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20180426154112) do - - create_table "activities", force: :cascade do |t| - t.integer "subject_id", limit: 4 - t.string "subject_type", limit: 255 - t.string "subject_name", limit: 255 - t.integer "item_id", limit: 4 - t.string "item_type", limit: 255 - t.string "item_name", limit: 255 - t.string "type", limit: 255 - t.string "extra", limit: 255 - t.integer "key", limit: 4 - t.datetime "created_at" - t.integer "access", limit: 2, default: 2 - t.integer "related_id", limit: 4 - t.integer "site_id", limit: 4 - t.boolean "flag" - end - - add_index "activities", ["created_at"], :name => "created_at" - execute "CREATE INDEX subject_0_4_0 ON activities (subject_id,subject_type(4),access)" +ActiveRecord::Schema.define(version: 20180515155729) do create_table "asset_versions", force: :cascade do |t| t.integer "asset_id", limit: 4