card-mod-history 0.11.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/set/all/history/act_listing.rb +8 -6
- data/set/all/history/views.rb +31 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e56c80e7368e6e50232d70a870e2fa72741733cce665d369f6152d22ec589005
|
4
|
+
data.tar.gz: 915d13a68cf8a78914a6f576788ecb2daf9bb699d98f17161e0cbb5616f66b6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fcfceefcf692a0e1dc150233f0e12382b965abac9b22f613fc05a9506f93b1a06dd8d86eb958e007cf75fa9b41eb6164795d20ac65da53bcf7c0e1c9401c4a1a
|
7
|
+
data.tar.gz: 40a34f8e8d507bf69dbfd377185a884d3fd6ce2d376fc2bd1a8f902af4f6b66af8c0b2e6d56bf4cf05f58cb2d131dfe5ec1ef9d680de09dc32877860148d9a7f
|
@@ -1,5 +1,3 @@
|
|
1
|
-
ACTS_PER_PAGE = Card.config.acts_per_page
|
2
|
-
|
3
1
|
format :html do
|
4
2
|
def act_from_context
|
5
3
|
if (act_id = params["act_id"])
|
@@ -79,7 +77,7 @@ format :html do
|
|
79
77
|
end
|
80
78
|
|
81
79
|
def acts_per_page
|
82
|
-
@acts_per_page ||
|
80
|
+
@acts_per_page ||= Card.config.acts_per_page || 10
|
83
81
|
end
|
84
82
|
|
85
83
|
def acts_page_from_params
|
@@ -87,11 +85,15 @@ format :html do
|
|
87
85
|
end
|
88
86
|
|
89
87
|
def act_paging acts, context
|
88
|
+
return unless controller.request # paginate requires a request
|
90
89
|
wrap_with :div, class: "slotter btn-sm" do
|
91
|
-
|
92
|
-
|
90
|
+
paginate current_page_acts(acts), act_paging_opts(context)
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
def act_paging_opts context
|
95
|
+
{ remote: true, theme: "twitter-bootstrap-4" }.tap do |opts|
|
93
96
|
opts[:total_pages] = 10 if limited_paging? context
|
94
|
-
paginate acts, opts
|
95
97
|
end
|
96
98
|
end
|
97
99
|
|
data/set/all/history/views.rb
CHANGED
@@ -32,4 +32,35 @@ format :html do
|
|
32
32
|
view :action_expanded do
|
33
33
|
action_content action_from_context, :expanded
|
34
34
|
end
|
35
|
+
|
36
|
+
view :change do
|
37
|
+
voo.show :title_link
|
38
|
+
voo.hide :menu
|
39
|
+
wrap do
|
40
|
+
[_render_title,
|
41
|
+
_render_menu,
|
42
|
+
_render_last_action]
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
view :last_action do
|
47
|
+
%(
|
48
|
+
<span class="last-update">
|
49
|
+
#{render_last_action_verb} #{render_acted_at} ago by
|
50
|
+
#{nest card.last_actor, view: :link}
|
51
|
+
</span>
|
52
|
+
)
|
53
|
+
end
|
54
|
+
|
55
|
+
view :last_action_verb, cache: :never do
|
56
|
+
return unless (act = card.last_act)
|
57
|
+
return unless (action = act.action_on card.id)
|
58
|
+
|
59
|
+
case action.action_type
|
60
|
+
when :create then "added"
|
61
|
+
when :delete then "deleted"
|
62
|
+
else
|
63
|
+
link_to_view :history, "edited", class: "last-edited", rel: "nofollow"
|
64
|
+
end
|
65
|
+
end
|
35
66
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: card-mod-history
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ethan McCutchen
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2021-03-02 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: card
|
@@ -18,14 +18,14 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.101.
|
21
|
+
version: 1.101.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 1.101.
|
28
|
+
version: 1.101.1
|
29
29
|
description: ''
|
30
30
|
email:
|
31
31
|
- info@decko.org
|