rails_admin_history_rollback 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/rails_admin/ra.history.js +2 -2
- data/app/views/rails_admin/main/_dashboard_history.html.haml +3 -3
- data/app/views/rails_admin/main/_version.html.haml +3 -3
- data/app/views/rails_admin/main/history.html.haml +2 -2
- data/config/locales/history_rollback.en.yml +8 -2
- data/config/locales/history_rollback.zh_cn.yml +10 -0
- data/lib/rails_admin_history_rollback/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22e90d3b227acb55c2a5eba6bc4073ef41be1172
|
4
|
+
data.tar.gz: 59121658bc7eb3f812bde8864bcae64498db0dff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd52324da788ae84e15be02b0f24170b5234a038729793018ab39af98dc099d88e1fa3368cbd06eda57e6696a8db1f9127f45764b88b8686c8a38291ddf2d422
|
7
|
+
data.tar.gz: cc20fe97527628ba2239595ee7231a4460659941fbc7f08fda3361faee4ef0a63e2a62b83bc335d781509114fd87b5497d5865fd0526ac962420653e250de249
|
@@ -49,10 +49,10 @@
|
|
49
49
|
dialog.find('.cancel-action').unbind().click(function(){
|
50
50
|
dialog.modal('hide');
|
51
51
|
return false;
|
52
|
-
}).html('
|
52
|
+
}).html(table.data('cancel'));
|
53
53
|
|
54
54
|
dialog.find('#version tr').prettyTextDiff();
|
55
|
-
saveButton.attr('href', table.data('rollbackurl')).html('
|
55
|
+
saveButton.attr('href', table.data('rollbackurl')).data('confirm', table.data('confirm')).html(table.data('rollback'));
|
56
56
|
},
|
57
57
|
|
58
58
|
_getModal: function() {
|
@@ -8,8 +8,8 @@
|
|
8
8
|
%tr
|
9
9
|
%th.shrink.user= t("admin.table_headers.username")
|
10
10
|
%th.shrink.items= t("admin.table_headers.item")
|
11
|
-
%th.changes= t("admin.table_headers.changes")
|
12
|
-
%th.rollback= t("admin.table_headers.rollback")
|
11
|
+
%th.changes= t("admin.history_rollback.table_headers.changes")
|
12
|
+
%th.rollback= t("admin.history_rollback.table_headers.rollback")
|
13
13
|
%tbody
|
14
14
|
- @history.each do |t|
|
15
15
|
- abstract_model = RailsAdmin.config(t.table).abstract_model
|
@@ -25,4 +25,4 @@
|
|
25
25
|
- label = Object.const_defined?(t.table) ? t.table.constantize.model_name.human : t.table
|
26
26
|
%td= "#{label} ##{t.item}"
|
27
27
|
%td= t.message
|
28
|
-
%td= link_to("
|
28
|
+
%td= link_to(t("admin.history_rollback.table_headers.view_changes"), "#", class: "changeset", :data => {:url => url_for(action: action(:history_index, abstract_model).action_name, model_name: abstract_model.to_param, version_id: t.version_id)})
|
@@ -1,8 +1,8 @@
|
|
1
|
-
%table#version.table.table-striped{:data => { :title => "#{@abstract_model} version ##{@version.index + 1} <small>[#{@version.event}]</small>", :rollbackurl => url_for(action: action(:history_index, @abstract_model).action_name, model_name: @abstract_model.to_param, version_id: @version.id)}}
|
1
|
+
%table#version.table.table-striped{:data => { :title => "#{@abstract_model} version ##{@version.index + 1} <small>[#{@version.event}]</small>", :rollbackurl => url_for(action: action(:history_index, @abstract_model).action_name, model_name: @abstract_model.to_param, version_id: @version.id), rollback: t("admin.history_rollback.table_headers.rollback"), cancel: t("admin.history_rollback.cancel"), confirm: t("admin.history_rollback.confirm")}}
|
2
2
|
%thead
|
3
3
|
%tr
|
4
|
-
%th
|
5
|
-
%th{:colspan => 3}
|
4
|
+
%th= "#{t('admin.history_rollback.table_headers.field')}"
|
5
|
+
%th{:colspan => 3}= "#{t('admin.history_rollback.table_headers.changes')}"
|
6
6
|
%tbody
|
7
7
|
- @version.changeset.sort.each do |changes|
|
8
8
|
%tr
|
@@ -26,7 +26,7 @@
|
|
26
26
|
- columns << { property_name: "username", css_class: "username", link_text: t('admin.table_headers.username') }
|
27
27
|
- columns << { property_name: "item", css_class: "item", link_text: t('admin.table_headers.item') } if @general
|
28
28
|
- columns << { property_name: "message", css_class: "message", link_text: t('admin.table_headers.message') }
|
29
|
-
- columns << { property_name: "rollback", css_class: "rollback", link_text: t('admin.table_headers.rollback') }
|
29
|
+
- columns << { property_name: "rollback", css_class: "rollback", link_text: t('admin.history_rollback.table_headers.rollback') }
|
30
30
|
|
31
31
|
- columns.each do |column|
|
32
32
|
- property_name = column[:property_name]
|
@@ -50,7 +50,7 @@
|
|
50
50
|
- else
|
51
51
|
%td= "#{@abstract_model.config.label} ##{object.item}"
|
52
52
|
%td= object.message.in?(['delete', 'new']) ? t("admin.actions.#{object.message}.done").capitalize : object.message
|
53
|
-
%td= link_to("
|
53
|
+
%td= link_to(t("admin.history_rollback.table_headers.view_changes"), "#", class: "changeset", :data => {:url => url_for(action: action(:history_index, @abstract_model).action_name, model_name: @abstract_model.to_param, version_id: object.version_id)})
|
54
54
|
|
55
55
|
- unless params[:all] || !@history.respond_to?(:current_page)
|
56
56
|
= paginate(@history, theme: 'twitter-bootstrap', remote: true)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_admin_history_rollback
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rikki Pitt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -70,6 +70,7 @@ files:
|
|
70
70
|
- app/views/rails_admin/main/_version.html.haml
|
71
71
|
- app/views/rails_admin/main/history.html.haml
|
72
72
|
- config/locales/history_rollback.en.yml
|
73
|
+
- config/locales/history_rollback.zh_cn.yml
|
73
74
|
- lib/rails_admin_history_rollback.rb
|
74
75
|
- lib/rails_admin_history_rollback/config/actions/history_index.rb
|
75
76
|
- lib/rails_admin_history_rollback/engine.rb
|
@@ -95,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
96
|
version: '0'
|
96
97
|
requirements: []
|
97
98
|
rubyforge_project:
|
98
|
-
rubygems_version: 2.4.
|
99
|
+
rubygems_version: 2.4.7
|
99
100
|
signing_key:
|
100
101
|
specification_version: 4
|
101
102
|
summary: History rollback with paper_trail for rails_admin
|