bhf 0.3.10 → 0.3.11
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/bhf/application_controller.rb +0 -2
- data/app/controllers/bhf/embed_entries_controller.rb +78 -0
- data/app/controllers/bhf/entries_controller.rb +7 -6
- data/app/controllers/bhf/pages_controller.rb +1 -0
- data/app/helpers/bhf/entries_helper.rb +8 -4
- data/app/views/bhf/entries/_form.haml +1 -1
- data/app/views/bhf/entries/edit.haml +1 -1
- data/app/views/bhf/entries/form/belongs_to/_select.haml +1 -1
- data/app/views/bhf/entries/form/belongs_to/_static.haml +2 -5
- data/app/views/bhf/entries/form/column/_array.haml +8 -0
- data/app/views/bhf/entries/form/embeds_many/_static.haml +14 -0
- data/app/views/bhf/entries/form/embeds_one/_static.haml +13 -0
- data/app/views/bhf/entries/form/has_and_belongs_to_many/_static.haml +2 -6
- data/app/views/bhf/entries/form/has_many/_static.haml +2 -6
- data/app/views/bhf/entries/form/has_one/_static.haml +2 -5
- data/app/views/bhf/entries/new.haml +1 -1
- data/app/views/bhf/helper/_reflection_node.haml +2 -2
- data/app/views/bhf/pages/_platform.haml +6 -8
- data/app/views/bhf/pages/macro/belongs_to/_default.haml +1 -1
- data/app/views/bhf/pages/macro/column/_array.haml +1 -0
- data/app/views/bhf/pages/macro/column/_boolean.haml +1 -1
- data/app/views/bhf/pages/macro/embeds_many/_default.haml +1 -0
- data/app/views/bhf/pages/macro/embeds_one/_default.haml +1 -0
- data/app/views/bhf/pages/macro/has_and_belongs_to_many/_default.haml +1 -2
- data/app/views/bhf/pages/macro/has_many/_default.haml +2 -2
- data/app/views/bhf/pages/macro/has_one/_default.haml +2 -2
- data/app/views/bhf/pages/show.haml +1 -1
- data/app/views/kaminari/bhf/_gap.html.haml +1 -0
- data/app/views/kaminari/bhf/_next_page.html.haml +2 -0
- data/app/views/kaminari/bhf/_page.html.haml +2 -0
- data/app/views/kaminari/bhf/_paginator.html.haml +10 -0
- data/app/views/kaminari/bhf/_prev_page.html.haml +2 -0
- data/app/views/layouts/bhf/application.haml +1 -1
- data/app/views/layouts/bhf/quick_edit.haml +4 -2
- data/config/locales/de.yml +3 -4
- data/config/locales/en.yml +9 -6
- data/config/routes.rb +1 -0
- data/lib/bhf.rb +1 -0
- data/lib/bhf/active_record/active_record.rb +11 -2
- data/lib/bhf/active_record/upload.rb +9 -9
- data/lib/bhf/data.rb +2 -2
- data/lib/bhf/mongoid/document.rb +138 -0
- data/lib/bhf/pagination.rb +42 -42
- data/lib/bhf/platform.rb +8 -9
- data/lib/engine.rb +1 -2
- data/public/images/bhf/pictos.png +0 -0
- data/public/javascripts/bhf.js +1 -1
- data/public/stylesheets/bhf.css +1 -1
- metadata +22 -23
- data/public/images/bhf/button_bg.png +0 -0
- data/public/images/bhf/button_bg_2.png +0 -0
- data/public/images/bhf/button_bg_a.png +0 -0
- data/public/images/bhf/icon_delete.png +0 -0
- data/public/images/bhf/icon_delete_a.png +0 -0
- data/public/images/bhf/icon_delete_h.png +0 -0
- data/public/images/bhf/icon_drag.png +0 -0
- data/public/images/bhf/icon_drag_a.png +0 -0
- data/public/images/bhf/icon_drag_h.png +0 -0
- data/public/images/bhf/icon_edit.png +0 -0
- data/public/images/bhf/icon_edit_a.png +0 -0
- data/public/images/bhf/icon_edit_h.png +0 -0
@@ -0,0 +1,78 @@
|
|
1
|
+
class Bhf::EmbedEntriesController < Bhf::EntriesController
|
2
|
+
|
3
|
+
def new
|
4
|
+
@form_url = bhf_entry_embed_index_path(@platform.name, @model.get_embedded_parent(params[:entry_id]))
|
5
|
+
|
6
|
+
render 'bhf/entries/new', ({:layout => 'bhf/quick_edit'} if @quick_edit) || {}
|
7
|
+
end
|
8
|
+
|
9
|
+
def edit
|
10
|
+
@form_url = bhf_entry_embed_path(@platform.name, @model.get_embedded_parent(params[:entry_id]), @object)
|
11
|
+
|
12
|
+
render 'bhf/entries/edit', ({:layout => 'bhf/quick_edit'} if @quick_edit) || {}
|
13
|
+
end
|
14
|
+
|
15
|
+
def create
|
16
|
+
before_save
|
17
|
+
if @object.save
|
18
|
+
manage_many_to_many
|
19
|
+
after_save
|
20
|
+
|
21
|
+
edit_path = edit_bhf_entry_embed_path(@platform.name, @model.get_embedded_parent(params[:entry_id]), @object)
|
22
|
+
if @quick_edit
|
23
|
+
render :json => object_to_bhf_display_hash.merge(:edit_path => edit_path), :status => :ok
|
24
|
+
else
|
25
|
+
redirect_back_or_default(edit_path, :notice => set_message('create.success', @model))
|
26
|
+
end
|
27
|
+
else
|
28
|
+
@form_url = bhf_entry_embed_index_path(@platform.name, @model.get_embedded_parent(params[:entry_id]))
|
29
|
+
|
30
|
+
r_settings = {:status => :unprocessable_entity}
|
31
|
+
r_settings[:layout] = 'bhf/quick_edit' if @quick_edit
|
32
|
+
render 'bhf/entries/new', r_settings
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def update
|
37
|
+
before_save
|
38
|
+
if @object.update_attributes(params[@model_sym])
|
39
|
+
manage_many_to_many
|
40
|
+
after_save
|
41
|
+
|
42
|
+
if @quick_edit
|
43
|
+
render :json => object_to_bhf_display_hash, :status => :ok
|
44
|
+
else
|
45
|
+
redirect_back_or_default(edit_bhf_entry_embed_path(@platform.name, @model.get_embedded_parent(params[:entry_id]), @object), :notice => set_message('update.success', @model))
|
46
|
+
end
|
47
|
+
else
|
48
|
+
@form_url = bhf_entry_embed_path(@platform.name, @model.get_embedded_parent(params[:entry_id]), @object)
|
49
|
+
|
50
|
+
r_settings = {:status => :unprocessable_entity}
|
51
|
+
r_settings[:layout] = 'bhf/quick_edit' if @quick_edit
|
52
|
+
render 'bhf/entries/edit', r_settings
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def destroy
|
57
|
+
@object.destroy
|
58
|
+
if @quick_edit
|
59
|
+
head :ok
|
60
|
+
else
|
61
|
+
redirect_back_or_default(bhf_page_path(@platform.page_name), :notice => set_message('destory.success', @model))
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
|
66
|
+
private
|
67
|
+
|
68
|
+
def load_object
|
69
|
+
@object = @model.bhf_find_embed(params[:entry_id], params[:id])
|
70
|
+
after_load
|
71
|
+
end
|
72
|
+
|
73
|
+
def load_new_object
|
74
|
+
@object = @model.bhf_new_embed(params[:entry_id], params[@model_sym])
|
75
|
+
after_load
|
76
|
+
end
|
77
|
+
|
78
|
+
end
|
@@ -1,11 +1,9 @@
|
|
1
1
|
class Bhf::EntriesController < Bhf::ApplicationController
|
2
2
|
before_filter :load_platform, :load_model, :set_page, :set_quick_edit
|
3
3
|
before_filter :load_object, :except => [:create, :new, :sort]
|
4
|
+
before_filter :load_new_object, :only => [:create, :new]
|
4
5
|
|
5
6
|
def new
|
6
|
-
@object = @model.new
|
7
|
-
after_load
|
8
|
-
|
9
7
|
@form_url = bhf_entries_path(@platform.name)
|
10
8
|
end
|
11
9
|
|
@@ -16,9 +14,6 @@ class Bhf::EntriesController < Bhf::ApplicationController
|
|
16
14
|
end
|
17
15
|
|
18
16
|
def create
|
19
|
-
@object = @model.new(params[@model_sym])
|
20
|
-
after_load
|
21
|
-
|
22
17
|
before_save
|
23
18
|
if @object.save
|
24
19
|
manage_many_to_many
|
@@ -95,6 +90,11 @@ class Bhf::EntriesController < Bhf::ApplicationController
|
|
95
90
|
after_load
|
96
91
|
end
|
97
92
|
|
93
|
+
def load_new_object
|
94
|
+
@object = @model.new(params[@model_sym])
|
95
|
+
after_load
|
96
|
+
end
|
97
|
+
|
98
98
|
def manage_many_to_many
|
99
99
|
return unless params[:has_and_belongs_to_many]
|
100
100
|
params[:has_and_belongs_to_many].each_pair do |relation, ids|
|
@@ -131,4 +131,5 @@ class Bhf::EntriesController < Bhf::ApplicationController
|
|
131
131
|
def set_quick_edit
|
132
132
|
@quick_edit = request.xhr?
|
133
133
|
end
|
134
|
+
|
134
135
|
end
|
@@ -14,6 +14,7 @@ class Bhf::PagesController < Bhf::ApplicationController
|
|
14
14
|
|
15
15
|
@platforms = platform_options.each_with_object([]) do |opts, obj|
|
16
16
|
platform = Bhf::Platform.new(opts, @page, current_account)
|
17
|
+
next if platform.model.bhf_embedded?
|
17
18
|
platform.pagination = Bhf::Pagination.new(platform.entries_per_page)
|
18
19
|
paginate_platform_objects(platform)
|
19
20
|
obj << platform
|
@@ -13,11 +13,15 @@ module Bhf
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def is_image?(file)
|
16
|
-
|
17
|
-
return true if file.downcase.include? file_extention
|
18
|
-
end
|
19
|
-
false
|
16
|
+
file.match(/\.png|\.jpg|\.jpeg|\.gif|\.svg/i).to_b
|
20
17
|
end
|
21
18
|
|
19
|
+
def reflection_title(f, field)
|
20
|
+
title = f.object.class.human_attribute_name(field.reflection.name)
|
21
|
+
if field.link
|
22
|
+
title = t("bhf.platforms.#{field.link}.title", :count => f.object.send(field.reflection.name).to_a.count, :default => title)
|
23
|
+
end
|
24
|
+
title
|
25
|
+
end
|
22
26
|
end
|
23
27
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
= form_for @object, :url => @form_url, :builder => Bhf::Form::Builder, :html => html do |f|
|
3
3
|
|
4
4
|
- if f.object.errors.any?
|
5
|
-
= render :partial => 'validation_errors', :locals => {:f => f}
|
5
|
+
= render :partial => 'bhf/entries/validation_errors', :locals => {:f => f}
|
6
6
|
|
7
7
|
- @platform.fields.each do |field|
|
8
8
|
- unless field.form_type == :hidden
|
@@ -1,2 +1,2 @@
|
|
1
1
|
%h3= edit_t @platform
|
2
|
-
= render 'form'
|
2
|
+
= render 'bhf/entries/form'
|
@@ -1,7 +1,7 @@
|
|
1
1
|
- data_source ||= field.reflection.klass.all
|
2
2
|
- fk = field.reflection.primary_key_name
|
3
3
|
.node
|
4
|
-
.label= f.label fk
|
4
|
+
.label= f.label fk, reflection_title(f, field)
|
5
5
|
.input
|
6
6
|
= f.select fk, options_from_collection_for_select(data_source, :id, :to_bhf_s, f.object.send(fk)), :include_blank => true
|
7
7
|
= render :partial => 'bhf/helper/field_errors', :locals => {:f => f, :field => fk}
|
@@ -1,9 +1,6 @@
|
|
1
1
|
= reflection_node f, field do
|
2
2
|
- ref_object = f.object.send(field.reflection.name)
|
3
3
|
- if ref_object.blank?
|
4
|
-
= t 'bhf.helpers.entry.empty'
|
4
|
+
= t 'bhf.helpers.entry.empty', :count => 1
|
5
5
|
- else
|
6
|
-
|
7
|
-
= link_to ref_object.to_bhf_s, edit_bhf_entry_path(field.link, ref_object), :class => 'quick_edit'
|
8
|
-
- else
|
9
|
-
= ref_object.to_bhf_s
|
6
|
+
= link_to_if field.link, ref_object.to_bhf_s, edit_bhf_entry_path(field.link || 0, ref_object), :class => 'quick_edit'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
= node f, field do
|
2
|
+
.array_holder
|
3
|
+
= f.fields_for field.name do |x|
|
4
|
+
- if f.object.send(field.name).blank?
|
5
|
+
= x.text_field nil, :class => 'array_fields', :id => nil
|
6
|
+
- else
|
7
|
+
- f.object.send(field.name).each do |entry|
|
8
|
+
= x.text_field nil, :value => entry, :class => 'array_fields', :id => nil
|
@@ -0,0 +1,14 @@
|
|
1
|
+
= reflection_node f, field do
|
2
|
+
- ref_objects = f.object.send(field.reflection.name)
|
3
|
+
- if ref_objects.blank?
|
4
|
+
= t 'bhf.helpers.entry.empty', :count => 2
|
5
|
+
- else
|
6
|
+
%ul.relation
|
7
|
+
- ref_objects.each do |ref_object|
|
8
|
+
%li
|
9
|
+
= link_to_if field.link, ref_object.to_bhf_s, edit_bhf_entry_embed_path(field.link || 0, f.object, ref_object), :class => 'quick_edit'
|
10
|
+
= link_to_if field.link, '×'.html_safe, bhf_entry_embed_path(field.link || 0, f.object, ref_object), :method => :delete, :confirm => t('bhf.helpers.promts.confirm'), :class => 'delete', :remote => true
|
11
|
+
|
12
|
+
- # FIXME: empty ul js problem
|
13
|
+
- if field.link
|
14
|
+
= link_to '+', new_bhf_entry_embed_path(field.link, f.object), :class => 'add_field quick_edit'
|
@@ -0,0 +1,13 @@
|
|
1
|
+
= reflection_node f, field do
|
2
|
+
- ref_objects = f.object.send(field.reflection.name)
|
3
|
+
- if ref_objects.blank?
|
4
|
+
= t 'bhf.helpers.entry.empty', :count => 0
|
5
|
+
- else
|
6
|
+
%ul.relation
|
7
|
+
- ref_objects.to_a.each do |ref_object|
|
8
|
+
%li
|
9
|
+
= link_to_if field.link, ref_object.to_bhf_s, edit_bhf_entry_embed_path(field.link || 0, f.object, ref_object), :class => 'quick_edit'
|
10
|
+
= link_to_if field.link, '×'.html_safe, bhf_entry_embed_path(field.link || 0, f.object, ref_object), :method => :delete, :confirm => t('bhf.helpers.promts.confirm'), :class => 'delete', :remote => true
|
11
|
+
|
12
|
+
- if field.link
|
13
|
+
= link_to '+', new_bhf_entry_embed_path(field.link, f.object), :class => 'add_field quick_edit'
|
@@ -1,12 +1,8 @@
|
|
1
1
|
= reflection_node f, field do
|
2
2
|
- ref_objects = f.object.send(field.reflection.name)
|
3
3
|
- if ref_objects.blank?
|
4
|
-
= t 'bhf.helpers.
|
4
|
+
= t 'bhf.helpers.entry.empty', :count => 2
|
5
5
|
- else
|
6
6
|
%ul
|
7
7
|
- ref_objects.each do |ref_object|
|
8
|
-
%li
|
9
|
-
- if field.link
|
10
|
-
= link_to ref_object.to_bhf_s, edit_bhf_entry_path(field.link, ref_object), :class => 'quick_edit'
|
11
|
-
- else
|
12
|
-
= ref_object.to_bhf_s
|
8
|
+
%li= link_to_if field.link, ref_object.to_bhf_s, edit_bhf_entry_path(field.link || 0, ref_object), :class => 'quick_edit'
|
@@ -1,12 +1,8 @@
|
|
1
1
|
= reflection_node f, field do
|
2
2
|
- ref_objects = f.object.send(field.reflection.name)
|
3
3
|
- if ref_objects.blank?
|
4
|
-
= t 'bhf.helpers.
|
4
|
+
= t 'bhf.helpers.entry.empty', :count => 2
|
5
5
|
- else
|
6
6
|
%ul
|
7
7
|
- ref_objects.each do |ref_object|
|
8
|
-
%li
|
9
|
-
- if field.link
|
10
|
-
= link_to ref_object.to_bhf_s, edit_bhf_entry_path(field.link, ref_object), :class => 'quick_edit'
|
11
|
-
- else
|
12
|
-
= ref_object.to_bhf_s
|
8
|
+
%li= link_to_if field.link, ref_object.to_bhf_s, edit_bhf_entry_path(field.link || 0, ref_object), :class => 'quick_edit'
|
@@ -1,9 +1,6 @@
|
|
1
1
|
= reflection_node f, field do
|
2
2
|
- ref_object = f.object.send(field.reflection.name)
|
3
3
|
- if ref_object.blank?
|
4
|
-
= t 'bhf.helpers.entry.empty'
|
4
|
+
= t 'bhf.helpers.entry.empty', :count => 1
|
5
5
|
- else
|
6
|
-
|
7
|
-
= link_to ref_object.to_bhf_s, edit_bhf_entry_path(field.link, ref_object), :class => 'quick_edit'
|
8
|
-
- else
|
9
|
-
= ref_object.to_bhf_s
|
6
|
+
= link_to_if field.link, ref_object.to_bhf_s, edit_bhf_entry_path(field.link || 0, ref_object), :class => 'quick_edit'
|
@@ -1,2 +1,2 @@
|
|
1
1
|
%h3= new_t @platform
|
2
|
-
= render 'form'
|
2
|
+
= render 'bhf/entries/form'
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.node
|
2
2
|
.label
|
3
|
-
%p= f
|
3
|
+
%p= reflection_title(f, field)
|
4
4
|
.input
|
5
5
|
= input
|
6
6
|
= render :partial => 'bhf/helper/field_errors', :locals => {:f => f, :field => field.reflection.name}
|
7
|
-
= render :partial => 'bhf/helper/info', :locals => {:info => field.info}
|
7
|
+
= render :partial => 'bhf/helper/info', :locals => {:info => field.info}
|
@@ -13,9 +13,7 @@
|
|
13
13
|
- platform.columns.each do |column|
|
14
14
|
%th{:class => "#{column.field.macro} #{column.field.display_type} #{order_class(column.name, platform.name)}"}
|
15
15
|
- column_name = platform.model.human_attribute_name(column.name)
|
16
|
-
|
17
|
-
= column.field.macro == :column ? link : column_name
|
18
|
-
|
16
|
+
= link_to_if column.field.macro == :column, column_name, current_order_path(column.name, platform.name)
|
19
17
|
%th.action
|
20
18
|
|
21
19
|
%tfoot
|
@@ -29,7 +27,7 @@
|
|
29
27
|
- edit_link = edit_bhf_entry_path(platform.name, object)
|
30
28
|
%tr{:id => "#{object.id}_#{platform.name}"}
|
31
29
|
- if platform.sortable
|
32
|
-
%td
|
30
|
+
%td.drag
|
33
31
|
%span.handle
|
34
32
|
- platform.columns.each do |column|
|
35
33
|
%td{:class => "#{column.field.macro} #{column.field.display_type}", :'data-column-name' => column.name}
|
@@ -37,13 +35,13 @@
|
|
37
35
|
- ' '
|
38
36
|
- else
|
39
37
|
- render(:partial => "bhf/pages/macro/#{column.field.macro}/#{column.field.display_type}", :locals => {:column => column, :object => object})
|
40
|
-
|
41
|
-
|
38
|
+
= link_to_if !has_link?(column.field.overwrite_display_type), a.html_safe, edit_link, :class => 'quick_edit'
|
39
|
+
|
42
40
|
%td.action
|
43
41
|
= link_to edit_t(platform), edit_link, :class => 'edit'
|
44
42
|
= link_to delete_t(platform), bhf_entry_path(platform.name, object), :method => :delete, :confirm => t('bhf.helpers.promts.confirm'), :class => 'delete'
|
45
|
-
|
43
|
+
- # TODO: :remote => true
|
46
44
|
- else
|
47
45
|
%td.no_entries{:colspan => platform.columns_count}
|
48
|
-
= t 'bhf.pagination.info
|
46
|
+
= t 'bhf.pagination.info', :name_zero => platform.title, :count => 0
|
49
47
|
= link_to new_t(platform), new_bhf_entry_path(platform.name)
|
@@ -1,2 +1,2 @@
|
|
1
1
|
- ref_object = object.send(column.name)
|
2
|
-
= ref_object.blank? ? t('bhf.helpers.entry.empty') : ref_object.to_bhf_s
|
2
|
+
= ref_object.blank? ? t('bhf.helpers.entry.empty', :count => 1) : ref_object.to_bhf_s
|
@@ -0,0 +1 @@
|
|
1
|
+
= object.send(column.name)[0..5].join(', ')
|
@@ -1 +1 @@
|
|
1
|
-
= t("bhf.helpers.boolean.#{object.send(column.name) ? 'a' : 'b'}")
|
1
|
+
= t("bhf.helpers.boolean.#{object.send(column.name) ? 'a' : 'b'}")
|
@@ -0,0 +1 @@
|
|
1
|
+
= render :partial => 'bhf/pages/macro/has_many/default', :locals => {:ref_objects => object.send(column.name)}
|
@@ -0,0 +1 @@
|
|
1
|
+
= render :partial => 'bhf/pages/macro/has_one/default', :locals => {:ref_object => object.send(column.name)}
|
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
= ref_objects.blank? ? t('bhf.helpers.entries.empty') : ref_objects.collect(&:to_bhf_s).join(', ')
|
1
|
+
= render :partial => 'bhf/pages/macro/has_many/default', :locals => {:ref_objects => object.send(column.name)}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
- ref_objects
|
2
|
-
= ref_objects.blank? ? t('bhf.helpers.
|
1
|
+
- ref_objects ||= object.send(column.name)
|
2
|
+
= ref_objects.blank? ? t('bhf.helpers.entry.empty', :count => 2) : ref_objects.collect(&:to_bhf_s).join(', ')
|
@@ -1,2 +1,2 @@
|
|
1
|
-
- ref_object
|
2
|
-
= ref_object.blank? ? t('bhf.helpers.entry.empty') : ref_object.to_bhf_s
|
1
|
+
- ref_object ||= object.send(column.name)
|
2
|
+
= ref_object.blank? ? t('bhf.helpers.entry.empty', :count => 1) : ref_object.to_bhf_s
|
@@ -0,0 +1 @@
|
|
1
|
+
%span.page_number.gap= t('bhf.pagination.truncate')
|
@@ -8,7 +8,7 @@
|
|
8
8
|
- ([:bhf] + Bhf::Engine.config.css.to_a).each do |css|
|
9
9
|
= stylesheet_link_tag "/stylesheets/#{css}"
|
10
10
|
= javascript_include_tag '/javascripts/bhf'
|
11
|
-
=# javascript_include_tag '/javascripts/bhf/mootools-core-1.3.2-full-compat-yc.js', '/javascripts/bhf/mootools-more-1.3.2.1.js', '/javascripts/bhf/mootools_rails_driver-0.4.1.js', '/javascripts/bhf/class/BrowserUpdate', '/javascripts/bhf/class/Ajaxify', '/javascripts/bhf/class/AjaxEdit', '/javascripts/bhf/class/MooEditable', '/javascripts/bhf/class/Datepicker', '/javascripts/bhf/class/MultipleFields', '/javascripts/bhf/bhf_application'
|
11
|
+
=# javascript_include_tag '/javascripts/bhf/mootools-core-1.3.2-full-compat-yc.js', '/javascripts/bhf/mootools-more-1.3.2.1.js', '/javascripts/bhf/mootools_rails_driver-0.4.1.js', '/javascripts/bhf/class/BrowserUpdate', '/javascripts/bhf/class/Ajaxify', '/javascripts/bhf/class/AjaxEdit', '/javascripts/bhf/class/MooEditable', '/javascripts/bhf/class/Datepicker', '/javascripts/bhf/class/MultipleFields', '/javascripts/bhf/class/ArrayFields', '/javascripts/bhf/bhf_application'
|
12
12
|
%body
|
13
13
|
%header
|
14
14
|
%h1= link_to image_tag('/images/logo_bhf.png'), root_url
|
@@ -1,5 +1,7 @@
|
|
1
1
|
%button.alt_button.cancel= t('bhf.quick_edit.buttons.cancel')
|
2
2
|
%button.alt_button.open= t('bhf.quick_edit.buttons.open')
|
3
3
|
= yield
|
4
|
-
|
5
|
-
%button.
|
4
|
+
.button.group
|
5
|
+
%button.save{:class => ('create' if @object.new_record?)}= @object.new_record? ? t('bhf.quick_edit.buttons.create') : t('bhf.quick_edit.buttons.save')
|
6
|
+
- unless @object.new_record?
|
7
|
+
%button.save_and_next{:title => t('bhf.quick_edit.buttons.save_and_next')}= t('bhf.quick_edit.buttons.save_and_next')
|
data/config/locales/de.yml
CHANGED
@@ -14,8 +14,6 @@ de:
|
|
14
14
|
delete: "%{platform_name} löschen"
|
15
15
|
empty: Leer
|
16
16
|
cancel: Abbrechen
|
17
|
-
entries:
|
18
|
-
empty: Leer
|
19
17
|
login:
|
20
18
|
success: Login war erfolgreich
|
21
19
|
error: Konnte nicht eingeloggen
|
@@ -34,14 +32,15 @@ de:
|
|
34
32
|
cancel: Abbrechen
|
35
33
|
open: Öffnen
|
36
34
|
save: Speichern
|
37
|
-
|
35
|
+
create: Erstellen
|
36
|
+
save_and_next: Speichern und weiter zum nächsten Eintrag gehen
|
38
37
|
|
39
38
|
pagination:
|
40
39
|
previous_label: « Vorheriges
|
41
40
|
next_label: Nächstes »
|
41
|
+
truncate: …
|
42
42
|
load_more: Mehr anzeigen
|
43
43
|
load_less: Weniger anzeigen
|
44
|
-
entry: Eintrag
|
45
44
|
entries: Einträge
|
46
45
|
info:
|
47
46
|
default: "Es werden <strong>%{offset_start} - %{offset_end}</strong> von <strong>%{count}</strong> %{name} angezeigt"
|