ui_bibz 2.0.0.alpha24 → 2.0.0.alpha26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CONTRIBUTORS.md +19 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +60 -55
- data/app/assets/javascripts/interface.coffee +11 -0
- data/app/assets/javascripts/ui_bibz.coffee +3 -1
- data/app/assets/stylesheets/table.sass +1 -2
- data/app/assets/stylesheets/ui_bibz.sass +2 -0
- data/app/inputs/custom_inputs/autocomplete_input.rb +3 -2
- data/app/inputs/custom_inputs/date_picker_input.rb +2 -2
- data/app/inputs/custom_inputs/dropdown_select_input.rb +2 -2
- data/app/inputs/custom_inputs/formula_input.rb +2 -2
- data/app/inputs/custom_inputs/markdown_editor_input.rb +2 -2
- data/app/inputs/custom_inputs/multi_column_input.rb +2 -2
- data/app/inputs/custom_inputs/multi_select_input.rb +2 -2
- data/app/inputs/custom_inputs/radios_input.rb +20 -0
- data/app/inputs/custom_inputs/surround_input.rb +2 -2
- data/app/inputs/custom_inputs/switch_input.rb +2 -2
- data/config/initializers/will_paginate.rb +79 -0
- data/lib/ui_bibz.rb +56 -30
- data/lib/ui_bibz/helpers/ui_core_helper.rb +45 -37
- data/lib/ui_bibz/ui/core/alert.rb +1 -2
- data/lib/ui_bibz/ui/core/{breadcrumb/breadcrumb.rb → breadcrumb.rb} +5 -5
- data/lib/ui_bibz/ui/core/cards/card.rb +6 -6
- data/lib/ui_bibz/ui/core/cards/components/block/card_block_link.rb +1 -1
- data/lib/ui_bibz/ui/core/cards/components/block/card_block_text.rb +1 -1
- data/lib/ui_bibz/ui/core/cards/components/block/card_block_title.rb +1 -1
- data/lib/ui_bibz/ui/core/cards/components/card_block.rb +4 -4
- data/lib/ui_bibz/ui/core/cards/components/card_footer.rb +1 -1
- data/lib/ui_bibz/ui/core/cards/components/card_header.rb +1 -1
- data/lib/ui_bibz/ui/core/cards/components/card_image.rb +1 -1
- data/lib/ui_bibz/ui/core/cards/components/card_list_group.rb +2 -2
- data/lib/ui_bibz/ui/core/component.rb +4 -51
- data/lib/ui_bibz/ui/core/component/glyph_extension.rb +19 -0
- data/lib/ui_bibz/ui/core/component/klass_extension.rb +38 -0
- data/lib/ui_bibz/ui/core/{dropdown → dropdowns}/components/dropdown_divider.rb +1 -1
- data/lib/ui_bibz/ui/core/{dropdown → dropdowns}/components/dropdown_header.rb +2 -2
- data/lib/ui_bibz/ui/core/{dropdown → dropdowns}/components/dropdown_link.rb +2 -2
- data/lib/ui_bibz/ui/core/{dropdown → dropdowns}/dropdown.rb +11 -12
- data/lib/ui_bibz/ui/core/{buttons/button_split_dropdown.rb → dropdowns/split_dropdown.rb} +6 -10
- data/lib/ui_bibz/ui/core/{buttons → forms/buttons}/button.rb +5 -5
- data/lib/ui_bibz/ui/core/{buttons → forms/buttons}/button_choice.rb +8 -8
- data/lib/ui_bibz/ui/core/{buttons → forms/buttons}/button_group.rb +5 -5
- data/lib/ui_bibz/ui/core/{buttons → forms/buttons}/button_link.rb +13 -9
- data/lib/ui_bibz/ui/core/forms/choices/checkbox_field.rb +98 -0
- data/lib/ui_bibz/ui/core/forms/choices/radio_field.rb +98 -0
- data/lib/ui_bibz/ui/core/{inputs → forms/choices}/switch_field.rb +3 -3
- data/lib/ui_bibz/ui/core/{inputs → forms/dates}/date_picker_field.rb +6 -6
- data/lib/ui_bibz/ui/core/{inputs → forms/numbers}/formula_field.rb +5 -5
- data/lib/ui_bibz/ui/core/{inputs → forms/selects}/dropdown_select_field.rb +5 -5
- data/lib/ui_bibz/ui/core/{inputs → forms/selects}/multi_column_field.rb +5 -5
- data/lib/ui_bibz/ui/core/{inputs → forms/selects}/multi_select_field.rb +8 -8
- data/lib/ui_bibz/ui/core/{inputs → forms/textareas}/markdown_editor_field.rb +5 -5
- data/lib/ui_bibz/ui/core/{inputs → forms/texts}/autocomplete_field.rb +5 -5
- data/lib/ui_bibz/ui/core/{inputs → forms/texts}/surround_field.rb +5 -5
- data/lib/ui_bibz/ui/core/glyph.rb +2 -1
- data/lib/ui_bibz/ui/core/{list → lists}/components/list.rb +11 -11
- data/lib/ui_bibz/ui/core/{list/components → lists/components/list}/list_body.rb +2 -2
- data/lib/ui_bibz/ui/core/{list/components → lists/components/list}/list_header.rb +2 -2
- data/lib/ui_bibz/ui/core/{list → lists}/list_group.rb +4 -4
- data/lib/ui_bibz/ui/core/navs/components/nav_dropdown.rb +1 -1
- data/lib/ui_bibz/ui/core/navs/components/navbar_form.rb +3 -1
- data/lib/ui_bibz/ui/core/paths/breadcrumb.rb +109 -0
- data/lib/ui_bibz/ui/core/{breadcrumb → paths}/components/breadcrumb_link.rb +6 -6
- data/lib/ui_bibz/ui/core/{stars.rb → star.rb} +14 -14
- data/lib/ui_bibz/ui/core/tag.rb +1 -2
- data/lib/ui_bibz/ui/core/{modal → windows}/components/modal_body.rb +2 -2
- data/lib/ui_bibz/ui/core/{modal → windows}/components/modal_footer.rb +2 -2
- data/lib/ui_bibz/ui/core/{modal → windows}/components/modal_header.rb +2 -2
- data/lib/ui_bibz/ui/core/{modal → windows}/modal.rb +8 -8
- data/lib/ui_bibz/ui/ux/tables/components/actions.rb +9 -9
- data/lib/ui_bibz/ui/ux/tables/extensions/actionable.rb +1 -1
- data/lib/ui_bibz/ui/ux/tables/table_pagination.rb +5 -4
- data/lib/ui_bibz/version.rb +1 -1
- data/test/dummy/app/controllers/users_controller.rb +18 -0
- data/test/dummy/app/models/user.rb +1 -0
- data/test/dummy/config/application.rb +1 -1
- data/test/dummy/config/initializers/simple_form_bootstrap.rb +155 -0
- data/test/simple_form_test.rb +123 -0
- data/test/test_helper.rb +2 -2
- data/test/ui/breadcrumb_test.rb +2 -2
- data/test/ui/button_test.rb +13 -39
- data/test/ui/dropdown_test.rb +14 -1
- data/test/ui/glyph_test.rb +6 -0
- data/test/ui/input_dropdown_select_field_test.rb +9 -9
- data/test/ui/input_switch_field_test.rb +11 -11
- data/test/ui/inputs_test.rb +26 -12
- data/test/ui/list_group_test.rb +2 -2
- data/test/ui/{stars_test.rb → star_test.rb} +7 -7
- data/test/ui/table_test.rb +3 -3
- data/test/ui_helper_test.rb +6 -1
- data/ui_bibz.gemspec +4 -3
- data/vendor/assets/stylesheets/awesome-bootstrap-checkbox.scss +250 -0
- metadata +65 -39
- data/lib/ui_bibz/helpers/pagination_helper.rb +0 -55
- data/lib/ui_bibz/ui/core/buttons/button_dropdown.rb +0 -82
@@ -1,10 +1,10 @@
|
|
1
1
|
module CustomInputs
|
2
2
|
class SwitchInput < SimpleForm::Inputs::Base
|
3
|
-
include UiBibz::Ui::Core::
|
3
|
+
include UiBibz::Ui::Core::Forms::Choices
|
4
4
|
|
5
5
|
def input(wrapper_options)
|
6
6
|
options = @options.merge({ builder: @builder })
|
7
|
-
UiBibz::Ui::Core::
|
7
|
+
UiBibz::Ui::Core::Forms::Choices::SwitchField.new(attribute_name, options, input_html_options).render
|
8
8
|
end
|
9
9
|
|
10
10
|
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
require 'will_paginate/view_helpers/action_view'
|
2
|
+
|
3
|
+
module WillPaginate
|
4
|
+
module ActionView
|
5
|
+
def will_paginate(collection = nil, options = {})
|
6
|
+
options, collection = collection, nil if collection.is_a? Hash
|
7
|
+
collection ||= infer_collection_from_controller
|
8
|
+
|
9
|
+
options = options.symbolize_keys
|
10
|
+
options[:renderer] ||= BootstrapLinkRenderer
|
11
|
+
options[:previous_label] = '«'
|
12
|
+
options[:next_label] = '»'
|
13
|
+
options[:inner_window] = 2
|
14
|
+
|
15
|
+
super(collection, options)
|
16
|
+
end
|
17
|
+
|
18
|
+
class BootstrapLinkRenderer < LinkRenderer
|
19
|
+
ELLIPSIS = '…'
|
20
|
+
|
21
|
+
def to_html
|
22
|
+
list_items = pagination.map do |item|
|
23
|
+
case item
|
24
|
+
when Fixnum
|
25
|
+
page_number(item)
|
26
|
+
else
|
27
|
+
send(item)
|
28
|
+
end
|
29
|
+
end.join(@options[:link_separator])
|
30
|
+
|
31
|
+
list_wrapper = tag :ul, list_items, class: 'pagination', role: 'group'
|
32
|
+
tag :nav, list_wrapper, class: @options[:class]
|
33
|
+
end
|
34
|
+
|
35
|
+
def container_attributes
|
36
|
+
super.except(*[:link_options])
|
37
|
+
end
|
38
|
+
|
39
|
+
protected
|
40
|
+
|
41
|
+
def page_number(page)
|
42
|
+
link_options = @options[:link_options] || {}
|
43
|
+
|
44
|
+
if page == current_page
|
45
|
+
tag :li, tag(:span, page, class: 'page-link'), class: 'page-item active'
|
46
|
+
else
|
47
|
+
link_options.merge! class: 'page-link', rel: rel_value(page)
|
48
|
+
tag :li, link(page, page, link_options), class: 'page-item'
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def previous_or_next_page(page, text, classname)
|
53
|
+
link_options = @options[:link_options] || {}
|
54
|
+
|
55
|
+
if page
|
56
|
+
link_wrapper = link(text, page, link_options.merge(class: 'page-link'))
|
57
|
+
tag :li, link_wrapper, class: '%s page-item' % classname
|
58
|
+
else
|
59
|
+
span_wrapper = tag(:span, text, class: 'page-link')
|
60
|
+
tag :li, span_wrapper, class: '%s page-item disabled' % classname
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
def gap
|
65
|
+
tag :li, tag(:i, ELLIPSIS, class: 'page-link'), class: 'page-item disabled'
|
66
|
+
end
|
67
|
+
|
68
|
+
def previous_page
|
69
|
+
num = @collection.current_page > 1 && @collection.current_page - 1
|
70
|
+
previous_or_next_page num, @options[:previous_label], 'previous'
|
71
|
+
end
|
72
|
+
|
73
|
+
def next_page
|
74
|
+
num = @collection.current_page < @collection.total_pages && @collection.current_page + 1
|
75
|
+
previous_or_next_page num, @options[:next_label], 'next'
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
data/lib/ui_bibz.rb
CHANGED
@@ -13,17 +13,6 @@ module UiBibz
|
|
13
13
|
# Core
|
14
14
|
module Core
|
15
15
|
|
16
|
-
# Button section
|
17
|
-
module Buttons
|
18
|
-
autoload :Button, "ui_bibz/ui/core/buttons/button"
|
19
|
-
autoload :ButtonChoice, "ui_bibz/ui/core/buttons/button_choice"
|
20
|
-
autoload :ButtonDropdown, "ui_bibz/ui/core/buttons/button_dropdown"
|
21
|
-
autoload :ButtonGroup, "ui_bibz/ui/core/buttons/button_group"
|
22
|
-
autoload :ButtonLink, "ui_bibz/ui/core/buttons/button_link"
|
23
|
-
autoload :ButtonSplitDropdown, "ui_bibz/ui/core/buttons/button_split_dropdown"
|
24
|
-
end
|
25
|
-
|
26
|
-
# Card section
|
27
16
|
module Cards
|
28
17
|
autoload :Card, "ui_bibz/ui/core/cards/card"
|
29
18
|
autoload :CardColumn, "ui_bibz/ui/core/cards/card_column"
|
@@ -31,45 +20,82 @@ module UiBibz
|
|
31
20
|
autoload :CardGroup, "ui_bibz/ui/core/cards/card_group"
|
32
21
|
end
|
33
22
|
|
34
|
-
|
35
|
-
|
36
|
-
autoload :
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
23
|
+
module Dropdowns
|
24
|
+
autoload :Dropdown, "ui_bibz/ui/core/dropdowns/dropdown"
|
25
|
+
autoload :SplitDropdown, "ui_bibz/ui/core/dropdowns/split_dropdown"
|
26
|
+
end
|
27
|
+
|
28
|
+
module Forms
|
29
|
+
|
30
|
+
module Dates
|
31
|
+
autoload :DatePickerField, "ui_bibz/ui/core/forms/dates/date_picker_field"
|
32
|
+
end
|
33
|
+
|
34
|
+
module Choices
|
35
|
+
autoload :SwitchField, "ui_bibz/ui/core/forms/choices/switch_field"
|
36
|
+
autoload :CheckboxField, "ui_bibz/ui/core/forms/choices/checkbox_field"
|
37
|
+
autoload :RadioField, "ui_bibz/ui/core/forms/choices/radio_field"
|
38
|
+
end
|
39
|
+
|
40
|
+
module Numbers
|
41
|
+
autoload :FormulaField, "ui_bibz/ui/core/forms/numbers/formula_field"
|
42
|
+
end
|
43
|
+
|
44
|
+
module Selects
|
45
|
+
autoload :DropdownSelectField, "ui_bibz/ui/core/forms/selects/dropdown_select_field"
|
46
|
+
autoload :MultiColumnField, "ui_bibz/ui/core/forms/selects/multi_column_field"
|
47
|
+
autoload :MultiSelectField, "ui_bibz/ui/core/forms/selects/multi_select_field"
|
48
|
+
end
|
49
|
+
|
50
|
+
module Buttons
|
51
|
+
autoload :Button, "ui_bibz/ui/core/forms/buttons/button"
|
52
|
+
autoload :ButtonChoice, "ui_bibz/ui/core/forms/buttons/button_choice"
|
53
|
+
autoload :ButtonGroup, "ui_bibz/ui/core/forms/buttons/button_group"
|
54
|
+
autoload :ButtonLink, "ui_bibz/ui/core/forms/buttons/button_link"
|
55
|
+
end
|
56
|
+
|
57
|
+
module Texts
|
58
|
+
autoload :AutocompleteField, "ui_bibz/ui/core/forms/texts/autocomplete_field"
|
59
|
+
autoload :SurroundField, "ui_bibz/ui/core/forms/texts/surround_field"
|
60
|
+
end
|
61
|
+
|
62
|
+
module Textareas
|
63
|
+
autoload :MarkdownEditorField, "ui_bibz/ui/core/forms/textareas/markdown_editor_field"
|
64
|
+
end
|
65
|
+
|
45
66
|
end
|
46
67
|
|
47
|
-
# Layout section
|
48
68
|
module Layouts
|
49
69
|
autoload :Row, "ui_bibz/ui/core/layouts/row"
|
50
70
|
autoload :Col, "ui_bibz/ui/core/layouts/col"
|
51
71
|
autoload :Container, "ui_bibz/ui/core/layouts/container"
|
52
72
|
end
|
53
73
|
|
54
|
-
|
74
|
+
module Lists
|
75
|
+
autoload :ListGroup, "ui_bibz/ui/core/lists/list_group"
|
76
|
+
end
|
77
|
+
|
55
78
|
module Navs
|
56
79
|
autoload :Nav, "ui_bibz/ui/core/navs/nav"
|
57
80
|
autoload :Navbar, "ui_bibz/ui/core/navs/navbar"
|
58
81
|
end
|
59
82
|
|
83
|
+
module Paths
|
84
|
+
autoload :Breadcrumb, "ui_bibz/ui/core/paths/breadcrumb"
|
85
|
+
end
|
86
|
+
|
87
|
+
module Windows
|
88
|
+
autoload :Modal, "ui_bibz/ui/core/windows/modal"
|
89
|
+
end
|
90
|
+
|
60
91
|
# Other section
|
61
92
|
autoload :Alert, "ui_bibz/ui/core/alert"
|
62
|
-
autoload :Breadcrumb, "ui_bibz/ui/core/breadcrumb/breadcrumb"
|
63
93
|
autoload :Component, "ui_bibz/ui/core/component"
|
64
|
-
autoload :Dropdown, "ui_bibz/ui/core/dropdown/dropdown"
|
65
94
|
autoload :Glyph, "ui_bibz/ui/core/glyph"
|
66
95
|
autoload :Jumbotron, "ui_bibz/ui/core/jumbotron"
|
67
96
|
autoload :Tag, "ui_bibz/ui/core/tag"
|
68
|
-
autoload :ListGroup, "ui_bibz/ui/core/list/list_group"
|
69
|
-
autoload :Modal, "ui_bibz/ui/core/modal/modal"
|
70
97
|
autoload :Progress, "ui_bibz/ui/core/progress"
|
71
|
-
autoload :
|
72
|
-
autoload :Tab, "ui_bibz/ui/core/nav/tab"
|
98
|
+
autoload :Star, "ui_bibz/ui/core/star"
|
73
99
|
end
|
74
100
|
|
75
101
|
# Ux
|
@@ -7,7 +7,7 @@ module UiBibz::Helpers::UiCoreHelper
|
|
7
7
|
# +options+ (Hash)
|
8
8
|
# +html_options+ (Hash)
|
9
9
|
def button content = nil, options = nil, html_options = nil, &block
|
10
|
-
UiBibz::Ui::Core::Buttons::Button.new(content, options, html_options, &block).render
|
10
|
+
UiBibz::Ui::Core::Forms::Buttons::Button.new(content, options, html_options, &block).render
|
11
11
|
end
|
12
12
|
|
13
13
|
# Button Choice Component
|
@@ -15,16 +15,7 @@ module UiBibz::Helpers::UiCoreHelper
|
|
15
15
|
# +options+ (Hash)
|
16
16
|
# +html_options+ (Hash)
|
17
17
|
def button_choice content = nil, options = nil, html_options = nil, &block
|
18
|
-
UiBibz::Ui::Core::Buttons::ButtonChoice.new(content, options, html_options, &block).render
|
19
|
-
end
|
20
|
-
|
21
|
-
# Button Dropdown Component
|
22
|
-
#
|
23
|
-
# +name+ (String) [Required]
|
24
|
-
# +options+ (Hash)
|
25
|
-
# +html_options+ (Hash)
|
26
|
-
def button_dropdown name, options = nil, html_options = nil, &block
|
27
|
-
UiBibz::Ui::Core::Buttons::ButtonDropdown.new(name, options, html_options).tap(&block).render
|
18
|
+
UiBibz::Ui::Core::Forms::Buttons::ButtonChoice.new(content, options, html_options, &block).render
|
28
19
|
end
|
29
20
|
|
30
21
|
# Button Group Component
|
@@ -32,7 +23,7 @@ module UiBibz::Helpers::UiCoreHelper
|
|
32
23
|
# +options+ (Hash)
|
33
24
|
# +html_options+ (Hash)
|
34
25
|
def button_group content = nil, options = nil, html_options = nil, &block
|
35
|
-
UiBibz::Ui::Core::Buttons::ButtonGroup.new(content, options, html_options, &block).render
|
26
|
+
UiBibz::Ui::Core::Forms::Buttons::ButtonGroup.new(content, options, html_options, &block).render
|
36
27
|
end
|
37
28
|
|
38
29
|
# Button Link Component
|
@@ -40,17 +31,9 @@ module UiBibz::Helpers::UiCoreHelper
|
|
40
31
|
# +options+ (Hash)
|
41
32
|
# +html_options+ (Hash)
|
42
33
|
def button_link content = nil, options = nil, html_options = nil, &block
|
43
|
-
UiBibz::Ui::Core::Buttons::ButtonLink.new(content, options, html_options, &block).render
|
34
|
+
UiBibz::Ui::Core::Forms::Buttons::ButtonLink.new(content, options, html_options, &block).render
|
44
35
|
end
|
45
36
|
|
46
|
-
# Button Split Dropdown Component
|
47
|
-
#
|
48
|
-
# +name+ (String) [Required]
|
49
|
-
# +options+ (Hash)
|
50
|
-
# +html_options+ (Hash)
|
51
|
-
def button_split_dropdown name, options = nil, html_options = nil, &block
|
52
|
-
UiBibz::Ui::Core::Buttons::ButtonSplitDropdown.new(name, options, html_options).tap(&block).render
|
53
|
-
end
|
54
37
|
|
55
38
|
# Button section end ----------------------------------------------------
|
56
39
|
|
@@ -104,7 +87,7 @@ module UiBibz::Helpers::UiCoreHelper
|
|
104
87
|
# +options+ (Hash)
|
105
88
|
# +html_options+ (Hash)
|
106
89
|
def date_picker_field content = nil, options = nil, html_options = nil, &block
|
107
|
-
UiBibz::Ui::Core::
|
90
|
+
UiBibz::Ui::Core::Forms::Dates::DatePickerField.new(content, options, html_options, &block).render
|
108
91
|
end
|
109
92
|
|
110
93
|
# Markdown Editor Field Component
|
@@ -112,7 +95,7 @@ module UiBibz::Helpers::UiCoreHelper
|
|
112
95
|
# +options+ (Hash)
|
113
96
|
# +html_options+ (Hash)
|
114
97
|
def markdown_editor_field content = nil, options = nil, html_options = nil, &block
|
115
|
-
UiBibz::Ui::Core::
|
98
|
+
UiBibz::Ui::Core::Forms::Textareas::MarkdownEditorField.new(content, options, html_options, &block).render
|
116
99
|
end
|
117
100
|
|
118
101
|
# Multi Column Field Component
|
@@ -120,7 +103,7 @@ module UiBibz::Helpers::UiCoreHelper
|
|
120
103
|
# +options+ (Hash)
|
121
104
|
# +html_options+ (Hash)
|
122
105
|
def multi_column_field content = nil, options = nil, html_options = nil, &block
|
123
|
-
UiBibz::Ui::Core::
|
106
|
+
UiBibz::Ui::Core::Forms::Selects::MultiColumnField.new(content, options, html_options, &block).render
|
124
107
|
end
|
125
108
|
|
126
109
|
# Multi Select Field Component
|
@@ -128,7 +111,7 @@ module UiBibz::Helpers::UiCoreHelper
|
|
128
111
|
# +options+ (Hash)
|
129
112
|
# +html_options+ (Hash)
|
130
113
|
def multi_select_field content = nil, options = nil, html_options = nil, &block
|
131
|
-
UiBibz::Ui::Core::
|
114
|
+
UiBibz::Ui::Core::Forms::Selects::MultiSelectField.new(content, options, html_options, &block).render
|
132
115
|
end
|
133
116
|
|
134
117
|
# Formula Field Component
|
@@ -136,7 +119,7 @@ module UiBibz::Helpers::UiCoreHelper
|
|
136
119
|
# +options+ (Hash)
|
137
120
|
# +html_options+ (Hash)
|
138
121
|
def formula_field content = nil, options = nil, html_options = nil, &block
|
139
|
-
UiBibz::Ui::Core::
|
122
|
+
UiBibz::Ui::Core::Forms::Numbers::FormulaField.new(content, options, html_options, &block).render
|
140
123
|
end
|
141
124
|
|
142
125
|
# Surround Field Component
|
@@ -144,7 +127,7 @@ module UiBibz::Helpers::UiCoreHelper
|
|
144
127
|
# +options+ (Hash)
|
145
128
|
# +html_options+ (Hash)
|
146
129
|
def surround_field content = nil, options = nil, html_options = nil, &block
|
147
|
-
UiBibz::Ui::Core::
|
130
|
+
UiBibz::Ui::Core::Forms::Texts::SurroundField.new(content, options, html_options, &block).render
|
148
131
|
end
|
149
132
|
|
150
133
|
# Switch Field Component
|
@@ -152,7 +135,23 @@ module UiBibz::Helpers::UiCoreHelper
|
|
152
135
|
# +options+ (Hash)
|
153
136
|
# +html_options+ (Hash)
|
154
137
|
def switch_field content = nil, options = nil, html_options = nil, &block
|
155
|
-
UiBibz::Ui::Core::
|
138
|
+
UiBibz::Ui::Core::Forms::Choices::SwitchField.new(content, options, html_options, &block).render
|
139
|
+
end
|
140
|
+
|
141
|
+
# Checkbox Field Component
|
142
|
+
#
|
143
|
+
# +options+ (Hash)
|
144
|
+
# +html_options+ (Hash)
|
145
|
+
def checkbox_field content = nil, options = nil, html_options = nil, &block
|
146
|
+
UiBibz::Ui::Core::Forms::Choices::CheckboxField.new(content, options, html_options, &block).render
|
147
|
+
end
|
148
|
+
|
149
|
+
# Radio Field Component
|
150
|
+
#
|
151
|
+
# +options+ (Hash)
|
152
|
+
# +html_options+ (Hash)
|
153
|
+
def radio_field content = nil, options = nil, html_options = nil, &block
|
154
|
+
UiBibz::Ui::Core::Forms::Choices::RadioField.new(content, options, html_options, &block).render
|
156
155
|
end
|
157
156
|
|
158
157
|
# Dropdown Select Field Component
|
@@ -160,7 +159,7 @@ module UiBibz::Helpers::UiCoreHelper
|
|
160
159
|
# +options+ (Hash)
|
161
160
|
# +html_options+ (Hash)
|
162
161
|
def dropdown_select_field content = nil, options = nil, html_options = nil, &block
|
163
|
-
UiBibz::Ui::Core::
|
162
|
+
UiBibz::Ui::Core::Forms::Selects::DropdownSelectField.new(content, options, html_options, &block).render
|
164
163
|
end
|
165
164
|
|
166
165
|
# Autocomplete Field Component
|
@@ -168,7 +167,7 @@ module UiBibz::Helpers::UiCoreHelper
|
|
168
167
|
# +options+ (Hash)
|
169
168
|
# +html_options+ (Hash)
|
170
169
|
def autocomplete_field content = nil, options = nil, html_options = nil, &block
|
171
|
-
UiBibz::Ui::Core::
|
170
|
+
UiBibz::Ui::Core::Forms::Texts::AutocompleteField.new(content, options, html_options, &block).render
|
172
171
|
end
|
173
172
|
|
174
173
|
# Input section end ----------------------------------------------------
|
@@ -241,9 +240,9 @@ module UiBibz::Helpers::UiCoreHelper
|
|
241
240
|
#
|
242
241
|
def breadcrumb content = nil, options = nil, html_options = nil, &block
|
243
242
|
if is_tap(content, options)
|
244
|
-
UiBibz::Ui::Core::Breadcrumb.new(content, options, html_options).tap(&block).render
|
243
|
+
UiBibz::Ui::Core::Paths::Breadcrumb.new(content, options, html_options).tap(&block).render
|
245
244
|
else
|
246
|
-
UiBibz::Ui::Core::Breadcrumb.new(content, options, html_options, &block).render
|
245
|
+
UiBibz::Ui::Core::Paths::Breadcrumb.new(content, options, html_options, &block).render
|
247
246
|
end
|
248
247
|
end
|
249
248
|
|
@@ -253,7 +252,16 @@ module UiBibz::Helpers::UiCoreHelper
|
|
253
252
|
# +options+ (Hash)
|
254
253
|
# +html_options+ (Hash)
|
255
254
|
def dropdown name, options = nil, html_options = nil, &block
|
256
|
-
UiBibz::Ui::Core::Dropdown.new(name, options, html_options).tap(&block).render
|
255
|
+
UiBibz::Ui::Core::Dropdowns::Dropdown.new(name, options, html_options).tap(&block).render
|
256
|
+
end
|
257
|
+
|
258
|
+
# Split Dropdown Component
|
259
|
+
#
|
260
|
+
# +name+ (String) [Required]
|
261
|
+
# +options+ (Hash)
|
262
|
+
# +html_options+ (Hash)
|
263
|
+
def split_dropdown name, options = nil, html_options = nil, &block
|
264
|
+
UiBibz::Ui::Core::Dropdowns::SplitDropdown.new(name, options, html_options).tap(&block).render
|
257
265
|
end
|
258
266
|
|
259
267
|
# Glyph Component
|
@@ -293,7 +301,7 @@ module UiBibz::Helpers::UiCoreHelper
|
|
293
301
|
# +options+ (Hash)
|
294
302
|
# +html_options+ (Hash)
|
295
303
|
def list_group content = nil, options = nil, html_options = nil, &block
|
296
|
-
UiBibz::Ui::Core::ListGroup.new(content, options, html_options).tap(&block).render
|
304
|
+
UiBibz::Ui::Core::Lists::ListGroup.new(content, options, html_options).tap(&block).render
|
297
305
|
end
|
298
306
|
|
299
307
|
# Modal Component
|
@@ -301,7 +309,7 @@ module UiBibz::Helpers::UiCoreHelper
|
|
301
309
|
# +options+ (Hash)
|
302
310
|
# +html_options+ (Hash)
|
303
311
|
def modal content = nil, options = nil, html_options = nil, &block
|
304
|
-
UiBibz::Ui::Core::Modal.new(content, options, html_options).tap(&block).render
|
312
|
+
UiBibz::Ui::Core::Windows::Modal.new(content, options, html_options).tap(&block).render
|
305
313
|
end
|
306
314
|
|
307
315
|
# Progress Component
|
@@ -316,8 +324,8 @@ module UiBibz::Helpers::UiCoreHelper
|
|
316
324
|
#
|
317
325
|
# +options+ (Hash)
|
318
326
|
# +html_options+ (Hash)
|
319
|
-
def
|
320
|
-
UiBibz::Ui::Core::
|
327
|
+
def star content = nil, options = nil, html_options = nil, &block
|
328
|
+
UiBibz::Ui::Core::Star.new(content, options, html_options, &block).render
|
321
329
|
end
|
322
330
|
|
323
331
|
# Other section end ----------------------------------------------------
|
@@ -17,7 +17,7 @@ module UiBibz::Ui::Core
|
|
17
17
|
#
|
18
18
|
# ==== Components
|
19
19
|
#
|
20
|
-
# +link+ is UiBibz::Ui::Core::BreadcrumbLink component
|
20
|
+
# +link+ is UiBibz::Ui::Core::BreadCrumb::Components::BreadcrumbLink component
|
21
21
|
#
|
22
22
|
# ==== Signatures
|
23
23
|
#
|
@@ -53,7 +53,7 @@ module UiBibz::Ui::Core
|
|
53
53
|
#
|
54
54
|
# breadcrumb({store: @users, link_label: name, link_url: user_path(:id)})
|
55
55
|
#
|
56
|
-
class Breadcrumb < Component
|
56
|
+
class Breadcrumb < UiBibz::Ui::Core::Component
|
57
57
|
|
58
58
|
# See UiBibz::Ui::Core::Component.initialize
|
59
59
|
def initialize content = nil, options = nil, html_options = nil, &block
|
@@ -70,7 +70,7 @@ module UiBibz::Ui::Core
|
|
70
70
|
# Add breadcrumb link items
|
71
71
|
# See UiBibz::Ui::Core::BreadcrumbLink
|
72
72
|
def link content = nil, options = nil, html_options = nil, &block
|
73
|
-
@links << BreadcrumbLink.new(content, options, html_options, &block).render
|
73
|
+
@links << UiBibz::Ui::Core::Breadcrumbs::Components::BreadcrumbLink.new(content, options, html_options, &block).render
|
74
74
|
end
|
75
75
|
|
76
76
|
private
|
@@ -98,9 +98,9 @@ module UiBibz::Ui::Core
|
|
98
98
|
def generate_links
|
99
99
|
@options[:store].each do |item|
|
100
100
|
if item == @options[:store].last
|
101
|
-
@links << BreadcrumbLink.new(item.send(link_label), status: :disabled).render
|
101
|
+
@links << UiBibz::Ui::Core::Breadcrumb::Components::BreadcrumbLink.new(item.send(link_label), status: :disabled).render
|
102
102
|
else
|
103
|
-
@links << BreadcrumbLink.new(item.send(link_label), url: inject_url(link_url, item)).render
|
103
|
+
@links << UiBibz::Ui::Core::Breadcrumb::Components::BreadcrumbLink.new(item.send(link_label), url: inject_url(link_url, item)).render
|
104
104
|
end
|
105
105
|
end
|
106
106
|
end
|