tawork 0.0.27 → 0.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/app/controllers/search_controller.rb +1 -1
- data/app/helpers/application_helper.rb +0 -6
- data/app/views/public_activity/page/_attachment.html.haml +1 -1
- data/app/views/public_activity/page/_created.html.haml +1 -1
- data/app/views/public_activity/page/_reorder.html.haml +1 -1
- data/app/views/public_activity/page/_update_details.html.haml +1 -1
- data/config/initializers/extensions.rb +1 -0
- data/lib/ext/public_activity.rb +30 -0
- data/lib/extensions.rb +2 -0
- data/lib/tawork/version.rb +1 -1
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZWE0YjRhNmIyNzQwY2YyMjczNDgzYWJmYjM0ZjZjN2FjMWQyMDhlYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OWRlNGYwNDE2N2FhM2QxMGI0N2QyZDdjYzczZTRmMTkxN2JiMzFlOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OTkwNmQxNDBjN2IwMzQ5MmI0YjBmMzEwZGU4ZGI2MzVhZTczY2ZjOTNhMGVl
|
10
|
+
NTMzNTI3ODE5NjdkYzM2ZmI2MjUxNTBhYjEyOGFlNzdhZWI0MTAzZjA5Yzhk
|
11
|
+
ZGVlMTljZWU1OWU0MjIzYzgwNmUyMWE3ODdjMjQyZDUxOTljNDU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
N2JjOTc0YjBiMTY5Y2JlYjY5YmJmNTIxNzNiNzY3NWNlYWI5ZmU1MDVhM2Fm
|
14
|
+
YmJkMTdhMjMxMGYwODNlM2I1NjdlMzk2NDkyOTliYTEzY2QwMzg0YmExYTRh
|
15
|
+
NTFiMjUyNjI2NDM1ZDhkYzg4ZjE4N2U1MjJmMDJiZTM0ZjM1OWQ=
|
@@ -15,7 +15,7 @@ class SearchController < ApplicationController
|
|
15
15
|
search_group = "attachments"
|
16
16
|
end
|
17
17
|
|
18
|
-
q = ["title:#{q}
|
18
|
+
q = ["title:#{q}", "filename:#{q}", "name:#{q}", "email:#{q}"].join(" OR ")
|
19
19
|
@searcher = Searcher.search q: q, search_group: search_group
|
20
20
|
|
21
21
|
results = []
|
@@ -17,10 +17,4 @@ module ApplicationHelper
|
|
17
17
|
)
|
18
18
|
end
|
19
19
|
end
|
20
|
-
|
21
|
-
def link_to_trackable activity, path
|
22
|
-
link = send(:"#{path}_path", (activity.trackable || "deleted-#{activity.trackable_id}"))
|
23
|
-
|
24
|
-
link_to((activity.trackable.try(:title) || "[Deleted Page]"), link)
|
25
|
-
end
|
26
20
|
end
|
@@ -1,2 +1,2 @@
|
|
1
1
|
- content_for :action, flush: true do
|
2
|
-
reordered the page: #{
|
2
|
+
reordered the page: #{link_to activity.trackable.title, wiki_page_path(activity.trackable)}
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'extensions'
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'public_activity/models/activity'
|
2
|
+
|
3
|
+
module PublicActivity
|
4
|
+
class Activity
|
5
|
+
def trackable
|
6
|
+
track = super
|
7
|
+
track = DeletedTrackable.new(self) if !track
|
8
|
+
|
9
|
+
track
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
class DeletedTrackable
|
14
|
+
def initialize(activity)
|
15
|
+
@activity = activity
|
16
|
+
end
|
17
|
+
|
18
|
+
def id
|
19
|
+
@activity.trackable_id
|
20
|
+
end
|
21
|
+
|
22
|
+
def to_param
|
23
|
+
["deleted", @activity.trackable_id].join("-")
|
24
|
+
end
|
25
|
+
|
26
|
+
def title
|
27
|
+
"[Deleted #{@activity.trackable_type}]"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
data/lib/extensions.rb
ADDED
data/lib/tawork/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tawork
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.28
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adnan Ali
|
@@ -193,6 +193,7 @@ files:
|
|
193
193
|
- config/initializers/config.rb
|
194
194
|
- config/initializers/devise.rb
|
195
195
|
- config/initializers/elasticsearch.rb
|
196
|
+
- config/initializers/extensions.rb
|
196
197
|
- config/initializers/filter_parameter_logging.rb
|
197
198
|
- config/initializers/gollum.rb
|
198
199
|
- config/initializers/haml_gfm.rb
|
@@ -230,6 +231,8 @@ files:
|
|
230
231
|
- db/seeds.rb
|
231
232
|
- init.rb
|
232
233
|
- lib/assets/.keep
|
234
|
+
- lib/ext/public_activity.rb
|
235
|
+
- lib/extensions.rb
|
233
236
|
- lib/searcher.rb
|
234
237
|
- lib/tasks/.keep
|
235
238
|
- lib/tawork.rb
|