bhf 0.7.8 → 0.7.9
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 +4 -4
- data/app/views/layouts/bhf/application.haml +4 -4
- data/config/locales/en.yml +2 -3
- data/lib/bhf.rb +19 -28
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6258a93fccb709c75facbf4c58f86773f25c8d45
|
|
4
|
+
data.tar.gz: bf9b39ef971a4c9107135615df4debda7db5d616
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3dce6785d36d190332c0eaea91c33e7d482df8075ade512648dce0decb4ddc072e68184f925dd0171d5d8e35f3f638b24b5e97ef67f79757d60eca0354a67988
|
|
7
|
+
data.tar.gz: 03e40f0335a6097dfa8fb9cec8150c98b7014827dfbfced2211bc2f5c6306daee6fbca117bf4db54b0f42c02b10067bebaa50c911f4cb93d5861d514904149a1
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
%meta{charset: 'utf-8'}
|
|
5
5
|
%title= @title
|
|
6
6
|
%link{href: "/favicon.ico?#{@app_title.to_s.downcase}", rel: 'icon', type: 'image/x-icon'}
|
|
7
|
-
-
|
|
7
|
+
- Bhf::Engine.config.bhf.css.each do |css|
|
|
8
8
|
= stylesheet_link_tag css
|
|
9
9
|
%body
|
|
10
|
+
|
|
10
11
|
%header
|
|
11
|
-
|
|
12
12
|
%h1
|
|
13
13
|
- logo = if params[:bhf_area] && Rails.application.assets.find_asset("logo_#{params[:bhf_area]}_bhf.svg")
|
|
14
14
|
- "logo_#{params[:bhf_area]}_bhf.svg"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
= link_to image_tag(logo), @root_link ? @root_link : main_app.root_url, :'data-no-turbolink' => true
|
|
19
19
|
|
|
20
|
-
- if @areas
|
|
20
|
+
- if @areas && @areas.length > 1
|
|
21
21
|
= select_tag :area_select, options_from_collection_for_select(@areas, 'path', 'name', main_app.bhf_path(params[:bhf_area])), class: 'icon'
|
|
22
22
|
|
|
23
23
|
- if @config && @config.pages.any?
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
= render 'bhf/user'
|
|
37
37
|
= render 'bhf/footer'
|
|
38
38
|
|
|
39
|
-
-
|
|
39
|
+
- Bhf::Engine.config.bhf.js.each do |js|
|
|
40
40
|
= javascript_include_tag js, {:'data-turbolinks-eval' => false}
|
data/config/locales/en.yml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
en:
|
|
1
|
+
en:
|
|
2
2
|
bhf:
|
|
3
3
|
page_title: "%{title} – Admin"
|
|
4
4
|
areas:
|
|
@@ -41,10 +41,9 @@ en:
|
|
|
41
41
|
input:
|
|
42
42
|
date_format:
|
|
43
43
|
timestamp: '%Y-%m-%d %H:%M'
|
|
44
|
-
datetime:
|
|
44
|
+
datetime: '%Y-%m-%d %H:%M'
|
|
45
45
|
date: '%Y-%m-%d'
|
|
46
46
|
time: '%H:%M'
|
|
47
|
-
|
|
48
47
|
quick_edit:
|
|
49
48
|
buttons:
|
|
50
49
|
cancel: Cancel
|
data/lib/bhf.rb
CHANGED
|
@@ -1,46 +1,39 @@
|
|
|
1
|
-
def d(var)
|
|
2
|
-
raise var.inspect.split(', ').join(",\n")
|
|
3
|
-
end
|
|
4
|
-
require 'haml'
|
|
5
|
-
require 'kaminari'
|
|
6
|
-
|
|
7
1
|
module Bhf
|
|
8
2
|
class Engine < Rails::Engine
|
|
9
3
|
|
|
10
4
|
isolate_namespace Bhf
|
|
11
5
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
config.bhf.abstract_config = []
|
|
24
|
-
|
|
25
|
-
# config.bhf.bhf_logic = YAML::load(IO.read('config/bhf.yml'))
|
|
6
|
+
config.bhf = OpenStruct.new(
|
|
7
|
+
on_login_fail: :root_url,
|
|
8
|
+
logout_path: :logout_path,
|
|
9
|
+
session_auth_name: :is_admin,
|
|
10
|
+
session_account_id: :admin_account_id,
|
|
11
|
+
account_model: 'User',
|
|
12
|
+
account_model_find_method: 'find',
|
|
13
|
+
css: ['bhf/application'],
|
|
14
|
+
js: ['bhf/application'],
|
|
15
|
+
abstract_config: []
|
|
16
|
+
)
|
|
26
17
|
|
|
27
|
-
initializer 'bhf.
|
|
18
|
+
initializer 'bhf.helper' do |app|
|
|
28
19
|
ActiveSupport.on_load :action_controller do
|
|
29
20
|
helper Bhf::FrontendHelper
|
|
30
21
|
end
|
|
31
22
|
end
|
|
32
23
|
|
|
33
|
-
initializer 'bhf.
|
|
34
|
-
|
|
35
|
-
|
|
24
|
+
initializer 'bhf.model_hooks' do
|
|
25
|
+
ActiveSupport.on_load :active_record do
|
|
26
|
+
include Bhf::ActiveRecord::Object
|
|
36
27
|
end
|
|
37
|
-
|
|
38
|
-
|
|
28
|
+
ActiveSupport.on_load :mongoid do
|
|
29
|
+
include Bhf::Mongoid::Document
|
|
39
30
|
end
|
|
40
31
|
end
|
|
41
32
|
end
|
|
42
33
|
end
|
|
43
34
|
|
|
35
|
+
require 'haml'
|
|
36
|
+
require 'kaminari'
|
|
44
37
|
require 'bhf/active_record/active_record'
|
|
45
38
|
require 'bhf/mongoid/document'
|
|
46
39
|
require 'bhf/data'
|
|
@@ -49,5 +42,3 @@ require 'bhf/config_parser'
|
|
|
49
42
|
require 'bhf/settings'
|
|
50
43
|
require 'bhf/pagination'
|
|
51
44
|
require 'bhf/form'
|
|
52
|
-
|
|
53
|
-
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bhf
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.
|
|
4
|
+
version: 0.7.9
|
|
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-
|
|
11
|
+
date: 2014-06-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|