bhf 0.6.28 → 0.6.29

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2abb9bd53865cc8d99809706049a86d9b29dbd97
4
- data.tar.gz: 76d5a606c381d4a9cf8f2e81a31922e1c9dcfacf
3
+ metadata.gz: f2ccccdc0ae93b88b1c6a55269d0d31800f945b3
4
+ data.tar.gz: c3a2d36c7265e9d9b542b343c0971109fba40d2f
5
5
  SHA512:
6
- metadata.gz: 7c8ba4ff2d93ca66ae2efe270ccd5c8a3e3f0c28a8167d283f0ef76d96d23e8d91e29aaba62cd6b767fc4521d686929c0837468b6b47a0b127a16a075e9091d2
7
- data.tar.gz: 7ce4e66303a70fea248ce7eb72eb290a1402e2a0e7f7aba8883916e27cc9a0294e6dd5370a8177c89211b6ac984e39507bd1e5ad69110e4ac6a9a80d20f4eec4
6
+ metadata.gz: bd9016726c31d3ad4adbcaceed2c46e4a31e93177b308f6c30e4f94bb178e996c0d2a17c1472802c3202adc263f00b15b84c2a9ca808d02fcceaed3629b2ac36
7
+ data.tar.gz: 57e8ef3b89f26f52432ce5a6a9ab9eb6c0a52e077a11874cd2cdca58630b7f8237cd3c03ddeaf095dbb875ff3267a8890e52c7b0589aca34b6112911fba4d90f
@@ -103,8 +103,7 @@ class Bhf::ApplicationController < ActionController::Base
103
103
  end
104
104
 
105
105
  def redirect_back_or_default(default, msg)
106
- redirect_to(session[:return_to] || default, flash: msg)
107
- session[:return_to] = nil
106
+ redirect_to(params[:return_to] || default, flash: msg)
108
107
  end
109
108
 
110
109
  end
@@ -22,7 +22,7 @@ class Bhf::EmbedEntriesController < Bhf::EntriesController
22
22
  if @quick_edit
23
23
  render json: object_to_bhf_display_hash.merge(edit_path: edit_path), status: :ok
24
24
  else
25
- redirect_back_or_default(edit_path, notice: set_message('create.success', @model))
25
+ redirect_to(edit_path, notice: set_message('create.success', @model))
26
26
  end
27
27
  else
28
28
  @form_url = entry_embed_index_path(@platform.name, @model.get_embedded_parent(params[:entry_id]))
@@ -42,7 +42,7 @@ class Bhf::EmbedEntriesController < Bhf::EntriesController
42
42
  if @quick_edit
43
43
  render json: object_to_bhf_display_hash, status: :ok
44
44
  else
45
- redirect_back_or_default(edit_entry_embed_path(@platform.name, @model.get_embedded_parent(params[:entry_id]), @object), notice: set_message('update.success', @model))
45
+ redirect_to(edit_entry_embed_path(@platform.name, @model.get_embedded_parent(params[:entry_id]), @object), notice: set_message('update.success', @model))
46
46
  end
47
47
  else
48
48
  @form_url = entry_embed_path(@platform.name, @model.get_embedded_parent(params[:entry_id]), @object)
@@ -9,8 +9,13 @@
9
9
  = render partial: "bhf/entries/form/#{field.macro}/#{field.form_type}", locals: {f: f, field: field}
10
10
 
11
11
  - unless @quick_edit
12
+ - if @platform.return_to
13
+ - if (val = eval(@platform.return_to))
14
+ = hidden_field :return_to, :option, name: :return_to, value: val
15
+ -# TODO: remove eval
16
+
12
17
  .node
13
18
  .label
14
19
  .input
15
20
  = f.submit f.object.new_record? ? new_t(@platform) : edit_t(@platform)
16
- = link_to t('bhf.helpers.entry.cancel'), page_path(@platform.page_name), class: 'cancel'
21
+ = link_to t('bhf.helpers.entry.cancel'), page_path(@platform.page_name), class: 'cancel'
data/lib/bhf/i18n.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # TODO: get rid of this
1
2
  module Bhf
2
3
  module I18nTranslationFallbackHelper
3
4
  def self.included(base)
data/lib/bhf/platform.rb CHANGED
@@ -176,6 +176,10 @@ module Bhf
176
176
  table_options 'partial'
177
177
  end
178
178
 
179
+ def return_to
180
+ form_options 'return_to'
181
+ end
182
+
179
183
  private
180
184
 
181
185
  def do_search(chain, search_params)
@@ -2,8 +2,6 @@ module Bhf
2
2
  class Engine < Rails::Engine
3
3
 
4
4
  config.page_title = 'Bahnhof Admin'
5
- # config.current_admin_account = :current_user
6
- # config.session_auth_name = :admin
7
5
  # config.css = ['bhf_extend']
8
6
  # config.on_login_fail = :login_url
9
7
  # config.logout_path = :logout_path
metadata CHANGED
@@ -1,83 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bhf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.28
4
+ version: 0.6.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Pawlik
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-08 00:00:00.000000000 Z
11
+ date: 2014-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 4.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 4.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: turbolinks
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 2.1.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 2.1.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: kaminari
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: 0.12.4
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.12.4
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: haml-rails
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: 0.4.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: 0.4.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: sass-rails
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: 4.0.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: 4.0.0
83
83
  description: Gets you there on time
@@ -87,6 +87,7 @@ extensions: []
87
87
  extra_rdoc_files:
88
88
  - README.md
89
89
  files:
90
+ - README.md
90
91
  - app/assets/images/bhf/ajax_loader.gif
91
92
  - app/assets/images/bhf/bg.png
92
93
  - app/assets/images/bhf/mooeditable-toolbarbuttons-tango.png
@@ -212,7 +213,6 @@ files:
212
213
  - lib/bhf/platform.rb
213
214
  - lib/bhf/settings.rb
214
215
  - lib/rails/generators/bhf/templates/initializer.rb
215
- - README.md
216
216
  homepage: http://github.com/antpaw/bhf
217
217
  licenses:
218
218
  - MIT
@@ -223,17 +223,17 @@ require_paths:
223
223
  - lib
224
224
  required_ruby_version: !ruby/object:Gem::Requirement
225
225
  requirements:
226
- - - '>='
226
+ - - ">="
227
227
  - !ruby/object:Gem::Version
228
228
  version: '0'
229
229
  required_rubygems_version: !ruby/object:Gem::Requirement
230
230
  requirements:
231
- - - '>='
231
+ - - ">="
232
232
  - !ruby/object:Gem::Version
233
233
  version: '0'
234
234
  requirements: []
235
235
  rubyforge_project: nowarning
236
- rubygems_version: 2.0.3
236
+ rubygems_version: 2.2.1
237
237
  signing_key:
238
238
  specification_version: 4
239
239
  summary: Agnostic Rails backend