ui_bibz 1.0.0 → 1.1.0
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 +13 -5
- data/.gitignore +1 -1
- data/.yardoc/checksums +52 -0
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +11 -21
- data/README.md +359 -239
- data/Rakefile +12 -13
- data/doc/UiBibz/Concerns/Models/Searchable/ClassMethods.html +174 -0
- data/doc/UiBibz/Concerns/Models/Searchable.html +120 -0
- data/doc/UiBibz/Helpers/MetaHelper.html +218 -0
- data/doc/UiBibz/Helpers/UiCoreHelper.html +1130 -0
- data/doc/UiBibz/Helpers/UiUxHelper.html +463 -0
- data/doc/UiBibz/Helpers/UtilsHelper.html +187 -0
- data/doc/UiBibz/Rails/Engine.html +123 -0
- data/doc/UiBibz/Rails.html +115 -0
- data/doc/UiBibz/Ui/Base.html +304 -0
- data/doc/UiBibz/Ui/Core/Alert.html +367 -0
- data/doc/UiBibz/Ui/Core/Bar.html +356 -0
- data/doc/UiBibz/Ui/Core/Breadcrumb.html +427 -0
- data/doc/UiBibz/Ui/Core/BreadcrumbLink.html +354 -0
- data/doc/UiBibz/Ui/Core/Button.html +363 -0
- data/doc/UiBibz/Ui/Core/ButtonDropdown.html +385 -0
- data/doc/UiBibz/Ui/Core/ButtonGroup.html +356 -0
- data/doc/UiBibz/Ui/Core/ButtonLink.html +365 -0
- data/doc/UiBibz/Ui/Core/ButtonSplitDropdown.html +387 -0
- data/doc/UiBibz/Ui/Core/Col.html +357 -0
- data/doc/UiBibz/Ui/Core/Component.html +1144 -0
- data/doc/UiBibz/Ui/Core/Dropdown.html +877 -0
- data/doc/UiBibz/Ui/Core/DropdownList.html +369 -0
- data/doc/UiBibz/Ui/Core/Glyph.html +742 -0
- data/doc/UiBibz/Ui/Core/Jumbotron.html +363 -0
- data/doc/UiBibz/Ui/Core/Label.html +361 -0
- data/doc/UiBibz/Ui/Core/List.html +486 -0
- data/doc/UiBibz/Ui/Core/ListGroup.html +446 -0
- data/doc/UiBibz/Ui/Core/Nav.html +474 -0
- data/doc/UiBibz/Ui/Core/NavDropdown.html +376 -0
- data/doc/UiBibz/Ui/Core/NavLink.html +347 -0
- data/doc/UiBibz/Ui/Core/Navbar.html +535 -0
- data/doc/UiBibz/Ui/Core/NavbarForm.html +341 -0
- data/doc/UiBibz/Ui/Core/NavbarNav.html +301 -0
- data/doc/UiBibz/Ui/Core/NavbarText.html +341 -0
- data/doc/UiBibz/Ui/Core/Panel.html +806 -0
- data/doc/UiBibz/Ui/Core/ProgressBar.html +433 -0
- data/doc/UiBibz/Ui/Core/Row.html +335 -0
- data/doc/UiBibz/Ui/Core.html +117 -0
- data/doc/UiBibz/Ui/Ux/Actionable.html +478 -0
- data/doc/UiBibz/Ui/Ux/Actions.html +314 -0
- data/doc/UiBibz/Ui/Ux/Column.html +1177 -0
- data/doc/UiBibz/Ui/Ux/Columns.html +312 -0
- data/doc/UiBibz/Ui/Ux/Grid.html +823 -0
- data/doc/UiBibz/Ui/Ux/Paginable.html +368 -0
- data/doc/UiBibz/Ui/Ux/Searchable.html +363 -0
- data/doc/UiBibz/Ui/Ux/Sortable.html +289 -0
- data/doc/UiBibz/Ui/Ux/Store.html +968 -0
- data/doc/UiBibz/Ui/Ux/Table.html +957 -0
- data/doc/UiBibz/Ui/Ux/TableAction.html +309 -0
- data/doc/UiBibz/Ui/Ux/TablePagination.html +319 -0
- data/doc/UiBibz/Ui/Ux/TablePaginationPerPage.html +331 -0
- data/doc/UiBibz/Ui/Ux/TablePanel.html +576 -0
- data/doc/UiBibz/Ui/Ux/TableSearchField.html +291 -0
- data/doc/UiBibz/Ui/Ux.html +117 -0
- data/doc/UiBibz/Ui.html +117 -0
- data/doc/UiBibz/Utils/Internationalization.html +262 -0
- data/doc/UiBibz/Utils.html +115 -0
- data/doc/UiBibz.html +129 -0
- data/doc/_index.html +635 -0
- data/doc/class_list.html +58 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +339 -0
- data/doc/file.README.html +1022 -0
- data/doc/file_list.html +60 -0
- data/doc/frames.html +26 -0
- data/doc/images/navbar.png +0 -0
- data/doc/index.html +1022 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +181 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +1335 -0
- data/doc/top-level-namespace.html +112 -0
- data/lib/ui_bibz/helpers/ui_core_helper.rb +94 -0
- data/lib/ui_bibz/helpers/ui_ux_helper.rb +43 -0
- data/lib/ui_bibz/rails/engine.rb +2 -1
- data/lib/ui_bibz/ui/{ui.rb → base.rb} +1 -1
- data/lib/ui_bibz/ui/{alert.rb → core/alert.rb} +15 -7
- data/lib/ui_bibz/ui/core/breadcrumb/breadcrumb.rb +71 -0
- data/lib/ui_bibz/ui/{breadcrumb → core/breadcrumb}/components/breadcrumb_link.rb +6 -6
- data/lib/ui_bibz/ui/{button → core/button}/button.rb +13 -6
- data/lib/ui_bibz/ui/{button → core/button}/button_dropdown.rb +15 -4
- data/lib/ui_bibz/ui/{button → core/button}/button_group.rb +14 -6
- data/lib/ui_bibz/ui/{button → core/button}/button_link.rb +14 -6
- data/lib/ui_bibz/ui/{button → core/button}/button_split_dropdown.rb +15 -4
- data/lib/ui_bibz/ui/{grid/components → core}/col.rb +12 -6
- data/lib/ui_bibz/ui/{component.rb → core/component.rb} +7 -7
- data/lib/ui_bibz/ui/{dropdown → core/dropdown}/components/dropdown_list.rb +7 -7
- data/lib/ui_bibz/ui/{dropdown → core/dropdown}/dropdown.rb +18 -7
- data/lib/ui_bibz/ui/{glyph.rb → core/glyph.rb} +18 -10
- data/lib/ui_bibz/ui/{jumbotron.rb → core/jumbotron.rb} +14 -6
- data/lib/ui_bibz/ui/{label.rb → core/label.rb} +14 -6
- data/lib/ui_bibz/ui/{list → core/list}/components/list.rb +8 -8
- data/lib/ui_bibz/ui/{list → core/list}/list_group.rb +28 -6
- data/lib/ui_bibz/ui/core/nav/components/nav_dropdown.rb +64 -0
- data/lib/ui_bibz/ui/{nav → core/nav}/components/nav_link.rb +6 -6
- data/lib/ui_bibz/ui/core/nav/components/navbar_form.rb +45 -0
- data/lib/ui_bibz/ui/core/nav/components/navbar_nav.rb +56 -0
- data/lib/ui_bibz/ui/core/nav/components/navbar_text.rb +45 -0
- data/lib/ui_bibz/ui/core/nav/nav.rb +90 -0
- data/lib/ui_bibz/ui/core/nav/navbar.rb +121 -0
- data/lib/ui_bibz/ui/{panel.rb → core/panel.rb} +36 -8
- data/lib/ui_bibz/ui/{progress_bar → core/progress_bar}/components/bar.rb +7 -7
- data/lib/ui_bibz/ui/{progress_bar → core/progress_bar}/progress_bar.rb +20 -9
- data/lib/ui_bibz/ui/{grid/components → core}/row.rb +12 -4
- data/lib/ui_bibz/ui/{grid → ux}/grid.rb +17 -8
- data/lib/ui_bibz/ui/{table → ux/table}/components/actions.rb +5 -5
- data/lib/ui_bibz/ui/ux/table/components/column.rb +34 -0
- data/lib/ui_bibz/ui/ux/table/components/columns.rb +16 -0
- data/lib/ui_bibz/ui/{table → ux/table}/components/store.rb +4 -4
- data/lib/ui_bibz/ui/{table → ux/table}/components/table_action.rb +2 -2
- data/lib/ui_bibz/ui/{table/ux → ux/table/extensions}/actionable.rb +3 -3
- data/lib/ui_bibz/ui/{table/ux → ux/table/extensions}/paginable.rb +5 -5
- data/lib/ui_bibz/ui/{table/ux → ux/table/extensions}/searchable.rb +4 -4
- data/lib/ui_bibz/ui/{table/ux → ux/table/extensions}/sortable.rb +3 -3
- data/lib/ui_bibz/ui/{table → ux/table}/table.rb +40 -22
- data/lib/ui_bibz/ui/ux/table/table_pagination.rb +51 -0
- data/lib/ui_bibz/ui/{table → ux/table}/table_pagination_per_page.rb +26 -4
- data/lib/ui_bibz/ui/ux/table/table_panel.rb +155 -0
- data/lib/ui_bibz/ui/{table → ux/table}/table_search_field.rb +7 -7
- data/lib/ui_bibz/version.rb +1 -1
- data/lib/ui_bibz.rb +40 -29
- data/test/store_test.rb +2 -2
- data/test/ui/button_test.rb +6 -6
- data/test/ui/component_test.rb +2 -2
- data/test/ui/dropdown_test.rb +1 -1
- data/test/ui/glyph_test.rb +3 -3
- data/test/ui/grid_test.rb +4 -4
- data/test/ui/list_group_test.rb +2 -2
- data/test/ui/nav_test.rb +3 -4
- data/test/ui/panel_test.rb +4 -4
- data/test/ui/table_test.rb +32 -32
- data/test/ui_helper_test.rb +18 -2
- data/ui_bibz.gemspec +1 -0
- data/vendor/assets/stylesheets/ui_bibz.sass +3 -0
- metadata +166 -132
- data/README.rdoc +0 -0
- data/lib/ui_bibz/helpers/ui_helper.rb +0 -119
- data/lib/ui_bibz/ui/breadcrumb/breadcrumb.rb +0 -54
- data/lib/ui_bibz/ui/nav/nav.rb +0 -65
- data/lib/ui_bibz/ui/table/components/column.rb +0 -34
- data/lib/ui_bibz/ui/table/components/columns.rb +0 -16
- data/lib/ui_bibz/ui/table/table_pagination.rb +0 -29
- data/lib/ui_bibz/ui/table/table_panel.rb +0 -66
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-

|
2
2
|
|
3
3
|
[](https://travis-ci.org/thooams/Ui-Bibz)
|
4
4
|
[](https://codeclimate.com/github/thooams/Ui-Bibz)
|
@@ -9,21 +9,17 @@ This project rocks and uses MIT-LICENSE.
|
|
9
9
|
# Ui Bibz
|
10
10
|
> Ui Bibz est un [framework d'interface](http://fr.wikipedia.org/wiki/Framework_d%27interface)
|
11
11
|
> permettant de construire une interface très rapidement et simplement
|
12
|
-
> à l'aide de Ruby on Rails 4 et de Boostrap 3.
|
12
|
+
> à l'aide de [Ruby on Rails 4](http://rubyonrails.org/) et de [Boostrap 3](http://getbootstrap.com/).
|
13
13
|
|
14
14
|
Ui Bibz charge la librairie [boostrap](http://getbootstrap.com/) et
|
15
15
|
[awesomefont](http://fontawesome.io/) en [CDN](https://fr.wikipedia.org/wiki/Content_delivery_network).
|
16
16
|
|
17
|
-
**NB** : [HAML](http://haml.info/) est utilisé pour présenter les exemples de chaque élément.
|
18
|
-
Vous pouvez bien entendu utiliser l'interpréteur [ERB](https://en.wikipedia.org/wiki/ERuby) dans votre application Rails.
|
19
|
-
|
20
17
|
Tous les composants du framework Ui Bibz comportent l'agument *options* et l'argument *html_options*.
|
21
18
|
Ces éléments sont basés sur l'élément ```Component```.
|
22
19
|
Un ```component``` accepte un contenu par variable ou par block.
|
23
20
|
|
24
21
|
### Component
|
25
22
|
|
26
|
-
|
27
23
|
L'élément ```component``` accepte dans content et block :
|
28
24
|
|
29
25
|
* le contenu
|
@@ -44,9 +40,9 @@ L'élément ```component``` à pour ```html_options``` un Hash acceptant les cle
|
|
44
40
|
|
45
41
|
Exemple :
|
46
42
|
|
47
|
-
```
|
43
|
+
```
|
48
44
|
Component.new 'Exemple', { state: :success, glyph: { name: 'pencil', size: 3} }, { class: 'exemple' }
|
49
|
-
|
45
|
+
|
50
46
|
Component.new { state: :success, glyph: 'eye' }, { class: 'exemple' } do
|
51
47
|
'Exemple'
|
52
48
|
end
|
@@ -54,7 +50,7 @@ end
|
|
54
50
|
|
55
51
|
Signature :
|
56
52
|
|
57
|
-
```
|
53
|
+
```
|
58
54
|
Component.new content = nil, options = nil, html_options = nil, &block
|
59
55
|
```
|
60
56
|
|
@@ -66,23 +62,24 @@ dans ```options``` et ```html_options```.
|
|
66
62
|
|
67
63
|
Ajouter la gem dans Rails :
|
68
64
|
|
69
|
-
```
|
65
|
+
```
|
70
66
|
gem "ui_bibz", '~> 1.0.0'
|
71
67
|
```
|
72
68
|
|
73
69
|
Lancer la command suivante :
|
74
70
|
|
75
|
-
```
|
71
|
+
```
|
76
72
|
bundle install
|
77
73
|
```
|
78
74
|
|
79
75
|
Placer la ligne suivante dans ```/app/views/layouts/application.rb```
|
80
|
-
|
76
|
+
|
77
|
+
```
|
81
78
|
= ui_bibz_meta_links
|
82
79
|
```
|
83
80
|
|
84
|
-
Exemple :
|
85
|
-
```
|
81
|
+
Exemple ([haml](http://haml.info/)):
|
82
|
+
```
|
86
83
|
!!!
|
87
84
|
%html
|
88
85
|
%head
|
@@ -93,59 +90,65 @@ Exemple :
|
|
93
90
|
```
|
94
91
|
|
95
92
|
Placer la ligne suivante dans ```/app/assets/stylesheets/applications.css```
|
96
|
-
|
93
|
+
|
94
|
+
```
|
97
95
|
...
|
98
96
|
*= require ui_bibz
|
99
97
|
...
|
100
98
|
```
|
101
99
|
|
102
100
|
Placer la ligne suivante dans ```/app/assets/javascripts/applications.js```
|
103
|
-
|
101
|
+
|
102
|
+
```
|
104
103
|
...
|
105
104
|
//= require ui_bibz
|
106
105
|
...
|
107
106
|
```
|
108
107
|
|
109
|
-
|
110
108
|
## Utilisation
|
111
109
|
|
112
110
|
### Alert
|
113
111
|
|
114
|
-

|
115
113
|
|
116
114
|
L'élément ```notify``` à pour ```options``` un Hash acceptant les clefs :
|
117
115
|
|
118
116
|
* [state](#state-values)
|
119
117
|
* [glyph](#glyph-arguments)
|
120
118
|
|
121
|
-
```
|
122
|
-
|
119
|
+
```
|
120
|
+
notify 'Alert', state: :info, glyph: 'eye'
|
123
121
|
```
|
124
122
|
|
123
|
+
Voir la [doc](UiBibz/Ui/Core/Alert.html)
|
124
|
+
|
125
125
|
### Breadcrumb (fil d'ariane)
|
126
126
|
|
127
|
-

|
128
128
|
|
129
|
-
L'élément ```breadcrumb``` à pour ```
|
129
|
+
L'élément ```breadcrumb``` à pour enfant l'élément ```link``` qui accepte pour option un Hash avec les clefs :
|
130
130
|
|
131
131
|
* [status](#status-values)
|
132
132
|
* [glyph](#glyph-arguments)
|
133
133
|
* url
|
134
134
|
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
135
|
+
```
|
136
|
+
breadcrumb do |b|
|
137
|
+
b.link 'Exemple 1', url: '#exemple-1', glyph: 'home'
|
138
|
+
b.link({ url: '#exemple-2' }, { class:'link' }) do
|
139
|
+
'Exemple 2'
|
140
|
+
end
|
141
|
+
b.link 'Exemple 3', status: :active
|
142
|
+
end
|
142
143
|
```
|
143
144
|
|
145
|
+
Voir la [doc](UiBibz/Ui/Core/Breadcrumb.html)
|
146
|
+
|
144
147
|
### Buttons (Boutons)
|
145
148
|
|
146
149
|
#### Button
|
147
150
|
|
148
|
-

|
149
152
|
|
150
153
|
L'élément ```button``` à pour ```options``` un Hash acceptant les clefs :
|
151
154
|
|
@@ -154,28 +157,34 @@ L'élément ```button``` à pour ```options``` un Hash acceptant les clefs :
|
|
154
157
|
* [glyph](#glyph-arguments)
|
155
158
|
* [size](#size-values)
|
156
159
|
|
157
|
-
```ruby
|
158
|
-
= button 'Button', { state: :danger, size: :xs, glyph: 'star' } , { class: 'my-button' }
|
159
160
|
```
|
161
|
+
button 'Button', { state: :danger, size: :xs, glyph: 'star' } , { class: 'my-button' }
|
162
|
+
```
|
163
|
+
|
164
|
+
Voir la [doc](UiBibz/Ui/Core/Button.html)
|
160
165
|
|
161
166
|
#### Button Dropdown
|
162
167
|
|
163
168
|
L'élément ```button_dropdown``` accepte pour options les mêmes clefs que l'élément
|
164
169
|
[dropdown](#dropdown).
|
165
170
|
|
166
|
-

|
172
|
+
|
174
173
|
```
|
174
|
+
button_dropdown 'Button Dropdown' do |bd|
|
175
|
+
bd.list link_to('Link 1', '#')
|
176
|
+
bd.list 'Header 1', type: :header
|
177
|
+
bd.list link_to('Link 2', '#')
|
178
|
+
bd.list '---'
|
179
|
+
bd.list link_to('Link 3', '#')
|
180
|
+
end
|
181
|
+
```
|
182
|
+
|
183
|
+
Voir la [doc](UiBibz/Ui/Core/ButtonLink.html)
|
175
184
|
|
176
185
|
#### Button group
|
177
186
|
|
178
|
-

|
179
188
|
|
180
189
|
L'élément ```button_group``` à pour ```options``` un Hash acceptant les clefs :
|
181
190
|
|
@@ -188,49 +197,60 @@ L'élément ```list``` à pour ```options``` un Hash acceptant les clefs :
|
|
188
197
|
* [state](#state-values)
|
189
198
|
|
190
199
|
```ruby
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
200
|
+
button_group({ position: :vertical, size: :xs }) do
|
201
|
+
button 'Button 1', status: :active
|
202
|
+
button 'Button 2'
|
203
|
+
button 'Button 3'
|
204
|
+
end
|
205
|
+
|
206
|
+
button_group do
|
207
|
+
button 'Button 1', status: :active
|
208
|
+
button 'Button 2'
|
209
|
+
button 'Button 3'
|
210
|
+
button_dropdown 'Button Dropdown' do |bd|
|
211
|
+
bd.list 'header', type: :header
|
212
|
+
bd.list link_to('Link 1', '#')
|
213
|
+
bd.list '---'
|
214
|
+
bd.list link_to('Link 2', '#')
|
215
|
+
end
|
216
|
+
end
|
205
217
|
```
|
206
218
|
|
219
|
+
Voir la [doc](UiBibz/Ui/Core/ButtonGroup.html)
|
220
|
+
|
207
221
|
#### Button Link (Lien Bouton)
|
208
222
|
|
209
|
-

|
210
224
|
|
211
225
|
L'élément ```button_link``` à pour ```options``` un Hash acceptant les clefs :
|
212
226
|
|
213
227
|
```ruby
|
214
|
-
|
228
|
+
button_link 'Button', { url: '#button', state: :primary, glyph: 'star' }, { class: 'my-button' }
|
215
229
|
```
|
216
230
|
|
231
|
+
Voir la [doc](UiBibz/Ui/Core/ButtonLink.html)
|
232
|
+
|
217
233
|
#### Button Split Dropdown
|
218
234
|
|
219
|
-

|
220
236
|
|
221
237
|
L'élément ```button_split_dropdown```accepte pour options les mêmes clefs
|
222
238
|
que l'élément [dropdown](#dropdown).
|
223
239
|
|
224
240
|
```ruby
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
241
|
+
button_split_dropdown 'Dropdown', state: :primary do |d|
|
242
|
+
d.list do
|
243
|
+
link_to 'Link 1', "#"
|
244
|
+
end
|
245
|
+
d.list 'Header 1', type: :header
|
246
|
+
d.list link_to 'Link 2', '#'
|
247
|
+
d.list '---'
|
248
|
+
d.list link_to 'Link 3', '#'
|
249
|
+
end
|
232
250
|
```
|
233
251
|
|
252
|
+
Voir la [doc](UiBibz/Ui/Core/ButtonSplitDropdown.html)
|
253
|
+
|
234
254
|
### Dropdown
|
235
255
|
|
236
256
|
L'élément ```dropdown``` à pour ```options``` un Hash acceptant les clefs :
|
@@ -245,13 +265,15 @@ L'élément ```list``` est un [component](#component) qui accepte pour options l
|
|
245
265
|
* [glyph](#glyph-arguments)
|
246
266
|
|
247
267
|
```ruby
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
268
|
+
dropdown 'Dropdown', state: :success do |d|
|
269
|
+
d.list do
|
270
|
+
link_to 'Link 1', "#"
|
271
|
+
end
|
272
|
+
d.list 'Header 1', type: :header
|
273
|
+
d.list link_to 'Link 2', '#'
|
274
|
+
d.list '---'
|
275
|
+
d.list link_to 'Link 3', '#'
|
276
|
+
end
|
255
277
|
```
|
256
278
|
|
257
279
|
Pour ajouter une ligne séparatrice, il suffit d'insérer 3 "-" à la suite
|
@@ -264,9 +286,11 @@ d.list '--'
|
|
264
286
|
...
|
265
287
|
```
|
266
288
|
|
289
|
+
Voir la [doc](UiBibz/Ui/Core/Dropdown.html)
|
290
|
+
|
267
291
|
### Progress Bar
|
268
292
|
|
269
|
-

|
270
294
|
|
271
295
|
L'élément ```progress_bar``` à pour ```options``` un Hash acceptant les clefs :
|
272
296
|
|
@@ -279,21 +303,26 @@ L'élément ```progress_bar``` à pour ```options``` un Hash acceptant les clefs
|
|
279
303
|
* sr_only - Boolean to show label (default: false)
|
280
304
|
|
281
305
|
```ruby
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
306
|
+
progress_bar 30
|
307
|
+
|
308
|
+
progress_bar state: :info, sr_only: true, type: :animated do
|
309
|
+
70
|
310
|
+
end
|
311
|
+
|
312
|
+
progress_bar(tap: true) do |pb|
|
313
|
+
pb.bar 10, { state: :success, label: 'Loading...' },{ class: 'test' }
|
314
|
+
pb.bar 30, state: :warning
|
315
|
+
pb.bar(type: :striped) do
|
316
|
+
10
|
317
|
+
end
|
318
|
+
end
|
292
319
|
```
|
293
320
|
|
321
|
+
Voir la [doc](UiBibz/Ui/Core/ProgressBar.html)
|
322
|
+
|
294
323
|
### Glyph
|
295
324
|
|
296
|
-

|
297
326
|
|
298
327
|
Les glyphs utilisés proviennent de [Font Awesome](http://fontawesome.io/).
|
299
328
|
L'élément ```glyph``` peut contenir un hash pour ```content```
|
@@ -303,14 +332,16 @@ L'élément ```glyph``` à pour ```options``` un Hash acceptant les clefs :
|
|
303
332
|
* type
|
304
333
|
|
305
334
|
```ruby
|
306
|
-
|
307
|
-
|
308
|
-
|
335
|
+
glyph 'star', { size: 3, type: 'fw' }, class: 'star-exemple'
|
336
|
+
|
337
|
+
glyph { name: 'star', size: 3, type: 'fw' }
|
309
338
|
```
|
310
339
|
|
340
|
+
Voir la [doc](UiBibz/Ui/Core/Glyph.html)
|
341
|
+
|
311
342
|
### Panel
|
312
343
|
|
313
|
-

|
314
345
|
|
315
346
|
L'élément ```panel``` à pour ```options``` un Hash acceptant les clefs :
|
316
347
|
|
@@ -322,21 +353,26 @@ Les éléments ```header```, ```body```,```footer``` sont des éléments [compon
|
|
322
353
|
Exemple :
|
323
354
|
|
324
355
|
```ruby
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
356
|
+
panel 'danger'
|
357
|
+
|
358
|
+
panel(state: :danger) do
|
359
|
+
'Content'
|
360
|
+
end
|
361
|
+
|
362
|
+
panel({ tap: true, state: :danger }, { class: 'exemple' }) |p|
|
363
|
+
p.header 'Header', glyph: 'eye'
|
364
|
+
p.body(class: 'my-body') do
|
365
|
+
'Content body'
|
366
|
+
end
|
367
|
+
p.footer 'Footer'
|
368
|
+
end
|
335
369
|
```
|
336
370
|
|
371
|
+
Voir la [doc](UiBibz/Ui/Core/Panel.html)
|
372
|
+
|
337
373
|
### Table
|
338
374
|
|
339
|
-

|
340
376
|
|
341
377
|
L'élément ```table``` est un tableau composé d'une recherche, une pagination et un trie de colonnes intégrées.
|
342
378
|
Le tableau est compatible [I18n](http://guides.rubyonrails.org/i18n.html).
|
@@ -344,7 +380,7 @@ Le tableau contient pour chaque ligne un bouton dropdown 'action' avec par défa
|
|
344
380
|
ces 3 actions : voir, éditer, supprimer. Toutes les colonnes sont présentes et
|
345
381
|
affichées par défaut.
|
346
382
|
|
347
|
-
La table doit contenir un store. Ce store doit-être créé dans le controlleur avec la
|
383
|
+
La table doit contenir un store. Ce store doit-être créé dans le *controlleur* avec la
|
348
384
|
méthode ```table_search_pagination```.
|
349
385
|
|
350
386
|
La méthode ```table_search_pagination``` contient 3 arguments :
|
@@ -355,41 +391,41 @@ La méthode ```table_search_pagination``` contient 3 arguments :
|
|
355
391
|
|
356
392
|
Exemple :
|
357
393
|
|
358
|
-
```
|
394
|
+
```
|
359
395
|
# app/controllers/document_controller.rb
|
360
396
|
@documents = Document.table_search_pagination(params, session)
|
361
397
|
```
|
362
398
|
|
363
|
-
Dans le model
|
399
|
+
Dans le *model*, insérer la méthode ```searchable_attributes``` afin de pouvoir
|
364
400
|
faire une recherche sur les attributs souhaités.
|
365
401
|
|
366
402
|
Exemple :
|
367
403
|
|
368
|
-
```
|
404
|
+
```
|
369
405
|
# app/models/document.rb
|
370
406
|
searchable_attributes :name_fr, :name_en
|
371
407
|
```
|
372
408
|
|
373
409
|
Un champ recherche est disponible dans la vue :
|
374
410
|
|
375
|
-

|
376
412
|
|
377
|
-
```
|
378
|
-
|
413
|
+
```
|
414
|
+
table_search_field store: @documents
|
379
415
|
```
|
380
416
|
|
381
417
|
Une pagination est disponible dans la vue :
|
382
418
|
|
383
|
-
```
|
384
|
-
|
419
|
+
```
|
420
|
+
table_pagination store: @documents
|
385
421
|
```
|
386
422
|
|
387
423
|
Un champs select par page est disponible dans la vue :
|
388
424
|
|
389
|
-

|
390
426
|
|
391
|
-
```
|
392
|
-
|
427
|
+
```
|
428
|
+
table_pagination_per_page store: @documents
|
393
429
|
```
|
394
430
|
|
395
431
|
#### Simple Example table
|
@@ -403,7 +439,7 @@ La méthode ```table_search_pagination``` contient 3 arguments :
|
|
403
439
|
|
404
440
|
Exemple :
|
405
441
|
|
406
|
-
```
|
442
|
+
```
|
407
443
|
# app/controllers/document_controller.rb
|
408
444
|
@documents = Document.table_search_pagination(params, session)
|
409
445
|
```
|
@@ -412,7 +448,8 @@ Dans le **model**, insérer la méthode ```searchable_attributes``` afin de pouv
|
|
412
448
|
faire une recherche sur les attributs souhaités.
|
413
449
|
|
414
450
|
Exemple :
|
415
|
-
|
451
|
+
|
452
|
+
```
|
416
453
|
# app/models/document.rb
|
417
454
|
searchable_attributes :name_fr, :name_en
|
418
455
|
```
|
@@ -426,9 +463,10 @@ Dans la **vue**, insérer la méthode ```table``` qui peut contenir plusieurs ar
|
|
426
463
|
Une table comporte des **colonnes** et des **actions**.
|
427
464
|
|
428
465
|
Exemple :
|
429
|
-
|
466
|
+
|
467
|
+
```
|
430
468
|
# app/views/documents/index.html.haml
|
431
|
-
|
469
|
+
table store: @documents
|
432
470
|
```
|
433
471
|
|
434
472
|
Les actions par défauts peuvent être modifiées ([voir exemple complexe](#Complex-Example-table)) :
|
@@ -440,38 +478,45 @@ Les actions par défauts peuvent être modifiées ([voir exemple complexe](#Comp
|
|
440
478
|
Elles sont intégrées à l'intérieur d'un bouton [dropdown](#dropdown).
|
441
479
|
|
442
480
|
Exemple :
|
443
|
-
|
481
|
+
|
482
|
+
```
|
444
483
|
# app/views/documents/index.html.haml
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
* name (nom de la colonne)
|
458
|
-
* data_index (le nom de l'attribut)
|
459
|
-
* count (utilise la méthode count sur l'élément)
|
460
|
-
* date_format (formate l'affichage de la date en utilisant la méthode ```strftime``` ex: '%Y/%M/%D')
|
461
|
-
* format (formate les élements de la colone en utilisant **lambda**)
|
462
|
-
* link (ajoute un lien où l'expression ```:id``` est parsé et remplacé par l'entier correspondant)
|
463
|
-
* sort (permet de trier sur des champs )
|
464
|
-
* custom_sort (indique que le tableau sera triéé d'une manière personnalisée)
|
484
|
+
table store: @documents do |g|
|
485
|
+
g.actions do
|
486
|
+
link_action 'Show', documents_path(:id), glyph: 'eye'
|
487
|
+
link_action 'Edit', edit_document_path(:id), glyph: 'pencil'
|
488
|
+
link_action 'Delete', documents_path(:id), method: :delete, glyph: 'trash', data: { confirm: 'Are you sure?' }
|
489
|
+
link_action "---"
|
490
|
+
link_action 'Duplicate', duplicate_document_path(:id), glyph: 'files-o'
|
491
|
+
link_action 'Alert', alert_document_path(:id), glyph: 'bell'
|
492
|
+
end
|
493
|
+
end
|
494
|
+
```
|
465
495
|
|
466
|
-
```
|
496
|
+
L'ajout de colonnes à travers la méthode ```column``` contient plusieurs arguments et cette méthode est basée sur le component :
|
497
|
+
|
498
|
+
* Content (ex: name)
|
499
|
+
* options (hash)
|
500
|
+
* data_index (le nom de l'attribut)
|
501
|
+
* count (utilise la méthode count sur l'élément)
|
502
|
+
* date_format (formate l'affichage de la date en utilisant la méthode ```strftime``` ex: '%Y/%M/%D')
|
503
|
+
* format (formate les élements de la colone en utilisant **lambda**)
|
504
|
+
* link (ajoute un lien où l'expression ```:id``` est parsé et remplacé par l'entier correspondant)
|
505
|
+
* sort (permet de trier sur des champs )
|
506
|
+
* custom_sort (indique que le tableau sera triéé d'une manière personnalisée)
|
507
|
+
* html_options (hash)
|
508
|
+
|
509
|
+
```
|
467
510
|
# app/views/documents/index.html.haml
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
511
|
+
table store: @documents do |g|
|
512
|
+
g.columns do |c|
|
513
|
+
c.column '#', { data_index: 'id' }
|
514
|
+
c.column 'Name fr', { data_index: 'name_fr', link: edit_document_path(:id)}
|
515
|
+
c.column 'Name en', { data_index: 'name_en' }
|
516
|
+
c.column 'Hotline', { data_index: 'hotline_access', format: lambda{ |records, record| glyph(record.icon) }}
|
517
|
+
c.column 'Updated at', { data_index: 'updated_at', date_format: '%Y' }
|
518
|
+
end
|
519
|
+
end
|
475
520
|
```
|
476
521
|
|
477
522
|
#### Complex Example table
|
@@ -489,14 +534,16 @@ Exemple :
|
|
489
534
|
```
|
490
535
|
|
491
536
|
Dans la vue, insérer la méthod ```table```.
|
492
|
-
NB: On peut créer
|
537
|
+
NB: On peut créer ses propres méthodes comme ```user_name``` dans notre *model* "Document" et
|
493
538
|
l'appeler comme valeur pour la clef ```data_index```.
|
494
539
|
|
495
|
-
```
|
540
|
+
```
|
496
541
|
# app/views/documents/index.html.haml
|
497
|
-
|
498
|
-
|
499
|
-
|
542
|
+
table store: @documents do |g|
|
543
|
+
g.columns do |c|
|
544
|
+
c.column 'Users', { data_index: 'user_name', sort: "user.name" }
|
545
|
+
end
|
546
|
+
end
|
500
547
|
```
|
501
548
|
|
502
549
|
|
@@ -504,15 +551,15 @@ l'appeler comme valeur pour la clef ```data_index```.
|
|
504
551
|
|
505
552
|
Si l'on souhaite, par exemple, dénombrer des utilisateurs qui ont un lien non
|
506
553
|
direct avec les documents.
|
507
|
-
Imaginons par exemple
|
554
|
+
Imaginons par exemple, un utilisateur à des produits et que
|
508
555
|
ces produits contiennent plusieurs documents. On souhaite compter le nombre
|
509
|
-
d'utilisateurs par
|
556
|
+
d'utilisateurs par documents.
|
510
557
|
|
511
558
|
On peut ajouter des arguments dans la méthode ```table_search_pagination```
|
512
559
|
qui vont permettre de faire des jointures.
|
513
560
|
|
514
561
|
Exemple :
|
515
|
-
```
|
562
|
+
```
|
516
563
|
# app/controllers/document_controller.rb
|
517
564
|
arguments = { sortable: {
|
518
565
|
column: 'users',
|
@@ -538,11 +585,13 @@ Pour celà il faut :
|
|
538
585
|
|
539
586
|
Dans la vue :
|
540
587
|
|
541
|
-
```
|
588
|
+
```
|
542
589
|
# app/views/documents/index.html.haml
|
543
|
-
|
544
|
-
|
545
|
-
|
590
|
+
table store: @documents do |g|
|
591
|
+
g.columns do |c|
|
592
|
+
c.column 'Users', { data_index: 'users', count: true, custom_sort: true }
|
593
|
+
end
|
594
|
+
end
|
546
595
|
```
|
547
596
|
|
548
597
|
#### table I18n
|
@@ -559,7 +608,7 @@ Le placeholder du champ recherche est utilisable et traduisible avec les attribu
|
|
559
608
|
|
560
609
|
Exemple :
|
561
610
|
|
562
|
-
```
|
611
|
+
```
|
563
612
|
# config/locales/fr.yml
|
564
613
|
...
|
565
614
|
activerecord:
|
@@ -571,52 +620,67 @@ activerecord:
|
|
571
620
|
...
|
572
621
|
```
|
573
622
|
|
623
|
+
Voir la [doc](UiBibz/Ui/Ux/Table.html)
|
624
|
+
|
574
625
|
### Table Panel
|
575
626
|
|
576
|
-

|
577
628
|
|
578
629
|
Le composant ```table_panel``` est un [tableau](#table) dans un [panel](#panel).
|
579
630
|
|
580
|
-
```
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
631
|
+
```
|
632
|
+
table_panel store: @users
|
633
|
+
|
634
|
+
table_panel({ store: @users, tap: true, glyph: 'home', state: :danger }) do |g|
|
635
|
+
g.columns do |cls|
|
636
|
+
cls.column '#', { data_index: 'id' }
|
637
|
+
cls.column 'Username', { data_index: 'username', link: edit_user_path(:id) }
|
638
|
+
cls.column 'Name', { data_index: 'name' }
|
639
|
+
cls.column({ data_index: 'email' }) do
|
640
|
+
'Email'
|
641
|
+
end
|
642
|
+
cls.column 'Role', { data_index: 'role_name', sort: 'roles.name' }
|
643
|
+
end
|
644
|
+
g.actions do |acs|
|
645
|
+
acs.action 'Action 1', { url: edit_user_path(:id), glyph: 'pencil' }
|
646
|
+
acs.action "---"
|
647
|
+
acs.action { url: user_path(:id), glyph: 'eye' } do
|
648
|
+
'Action 2'
|
649
|
+
end
|
650
|
+
end
|
651
|
+
end
|
595
652
|
```
|
596
653
|
|
654
|
+
Voir la [doc](UiBibz/Ui/Ux/TablePanel.html)
|
655
|
+
|
597
656
|
### List
|
598
657
|
|
599
|
-

|
600
659
|
|
601
660
|
Par défaut une liste à pour tag ```<li>```.
|
602
661
|
Mais elle peut se transformer en lien ```<a>``` à travers l'option ```type:```.
|
603
662
|
Par défaut le tag ```<li>``` est présent.
|
604
663
|
|
605
|
-
```ruby
|
606
|
-
= list_group type: :link do |lg|
|
607
|
-
- lg.list 'Momo', { state: :success, glyph: 'home' }, { href: '#Momo' }
|
608
|
-
- lg.list({ tap: true, status: :active }, { href: '#Toto' }) do |l|
|
609
|
-
- l.header 'My title'
|
610
|
-
- l.body 'My title'
|
611
|
-
# ou
|
612
|
-
= list_group do |lg|
|
613
|
-
- lg.list 'Momo', glyph: 'home', badge: 2
|
614
|
-
- lg.list 'Toto'
|
615
664
|
```
|
665
|
+
list_group type: :link do |lg|
|
666
|
+
lg.list 'Momo', { state: :success, glyph: 'home' }, { href: '#Momo' }
|
667
|
+
lg.list({ tap: true, status: :active }, { href: '#Toto' }) do |l|
|
668
|
+
l.header 'My title'
|
669
|
+
l.body 'My title'
|
670
|
+
end
|
671
|
+
end
|
672
|
+
|
673
|
+
list_group do |lg|
|
674
|
+
lg.list 'Momo', glyph: 'home', badge: 2
|
675
|
+
lg.list 'Toto'
|
676
|
+
end
|
677
|
+
```
|
678
|
+
|
679
|
+
Voir la [doc](UiBibz/Ui/Core/List.html)
|
616
680
|
|
617
681
|
### Nav
|
618
682
|
|
619
|
-

|
620
684
|
|
621
685
|
Par défaut la navigation comporte des onglets "tab".
|
622
686
|
L'élément ```nav``` accepte en option les arguments :
|
@@ -627,15 +691,52 @@ L'élément ```nav``` accepte en option les arguments :
|
|
627
691
|
|
628
692
|
L'élement link est un [component](#component).
|
629
693
|
|
630
|
-
```ruby
|
631
|
-
= nav(type: :pills, position: :justified, tap: true) do |d|
|
632
|
-
d.link 'Test', url: '#test', badge: 6
|
633
|
-
d.link 'Test2', url: '#test2', status: :active
|
634
694
|
```
|
695
|
+
nav(type: :pills, position: :justified) do |d|
|
696
|
+
d.link 'Link 1', url: '#test', badge: 6
|
697
|
+
d.link(url: '#test2', status: :active) do
|
698
|
+
"Link 2"
|
699
|
+
end
|
700
|
+
end
|
701
|
+
```
|
702
|
+
|
703
|
+
Voir la [doc](UiBibz/Ui/Core/Nav.html)
|
704
|
+
|
705
|
+
### Navbar
|
706
|
+
|
707
|
+

|
708
|
+
|
709
|
+
Par défaut la navigation comporte des onglets "tab".
|
710
|
+
L'élément ```navbar``` accepte en option les arguments :
|
711
|
+
|
712
|
+
* type (:default, :inverse)
|
713
|
+
* [glyph](#glyph-values)
|
714
|
+
* position (:top, :bottom)
|
715
|
+
* title (string)
|
716
|
+
|
717
|
+
L'élement link est un [component](#component).
|
718
|
+
L'élement nav est un [component](#component).
|
719
|
+
|
720
|
+
```
|
721
|
+
navbar(type: :inverse, position: :top) do |nb|
|
722
|
+
nb.nav do |n|
|
723
|
+
n.link 'Link 1', url: '#link-1'
|
724
|
+
end
|
725
|
+
nb.nav(position: :right) do |n|
|
726
|
+
n.link 'Link 2', url: '#test', badge: 6
|
727
|
+
n.link(url: '#link-2', status: :active) do
|
728
|
+
"Link 3"
|
729
|
+
end
|
730
|
+
end
|
731
|
+
end
|
732
|
+
```
|
733
|
+
|
734
|
+
Voir la [doc](UiBibz/Ui/Core/Navbar.html)
|
735
|
+
|
635
736
|
|
636
737
|
### Etiquette
|
637
738
|
|
638
|
-

|
639
740
|
|
640
741
|
|
641
742
|
NB : Les méthodes ```Tag, label``` sont déjà utilisées par Rails.
|
@@ -646,22 +747,27 @@ L'élément ```etiquette``` à pour ```options``` un Hash acceptant les clefs :
|
|
646
747
|
|
647
748
|
Exemple :
|
648
749
|
|
649
|
-
```
|
650
|
-
|
651
|
-
|
652
|
-
|
750
|
+
```
|
751
|
+
etiquette 'label'
|
752
|
+
etiquette 'label 2', state: :success
|
753
|
+
etiquette 'label 2', state: :danger
|
653
754
|
```
|
654
755
|
|
756
|
+
Voir la [doc](UiBibz/Ui/Core/Etiquette.html)
|
757
|
+
|
655
758
|
### Row
|
656
759
|
|
657
760
|
Le composant row génére une div avec la class row.
|
658
761
|
|
659
|
-
```
|
660
|
-
|
661
|
-
|
762
|
+
```
|
763
|
+
row class: 'toto' do
|
764
|
+
'content'
|
765
|
+
end
|
662
766
|
# => <div class='row toto'>content</div>
|
663
767
|
```
|
664
768
|
|
769
|
+
Voir la [doc](UiBibz/Ui/Core/Content.html)
|
770
|
+
|
665
771
|
### Col
|
666
772
|
|
667
773
|
L'élément ```col``` est un [composant](#composant) qui accèpte en arguments :
|
@@ -678,19 +784,21 @@ Ces paramètres génèrent les classes qui seront insérées dans la div avec la
|
|
678
784
|
col.
|
679
785
|
|
680
786
|
|
681
|
-
```
|
682
|
-
|
683
|
-
|
684
|
-
|
787
|
+
```
|
788
|
+
col({num: 2, size: :lg}, class: 'test') do
|
789
|
+
'content'
|
790
|
+
end
|
685
791
|
# => <div class='col-lg-2 test'>content</div>
|
686
792
|
|
687
|
-
# ou
|
688
|
-
= col([{ offset: 1, size: :xs}, { num: 3}], class: 'test') do
|
689
|
-
= content
|
690
793
|
|
794
|
+
col([{ offset: 1, size: :xs}, { num: 3}], class: 'test') do
|
795
|
+
'content'
|
796
|
+
end
|
691
797
|
# => <div class='col-xs-offset-1 col-md-3 test'>content</div>
|
692
798
|
```
|
693
799
|
|
800
|
+
Voir la [doc](UiBibz/Ui/Core/Col.html)
|
801
|
+
|
694
802
|
### Grid
|
695
803
|
|
696
804
|
Une grid est un composant qui est composé de 5 vues :
|
@@ -710,37 +818,52 @@ Une vue à pour arguments :
|
|
710
818
|
L'argument ```position``` détermine la position de la vue et l'argument ```num``` determine
|
711
819
|
le nombre de colonnes occupées par la vue.
|
712
820
|
|
713
|
-
```ruby
|
714
|
-
= grid do |g|
|
715
|
-
- g.view num: 3, position: :left do
|
716
|
-
= list_group(type: :link) do |lg|
|
717
|
-
- lg.list 'Link 1', { url: '#link1' }
|
718
|
-
- lg.list 'Link 2', { url: '#link1', status: :active }
|
719
|
-
- lg.list 'Link 1', { url: '#link1' }
|
720
|
-
- lg.list 'Link 3', { url: '#link1' }
|
721
|
-
- lg.list 'Link 4', { url: '#link1' }
|
722
|
-
- g.view({ position: :top}) do
|
723
|
-
= button_group(type: :toolbar) do
|
724
|
-
= button 'option 1'
|
725
|
-
= button 'option 2'
|
726
|
-
= button 'option 3'
|
727
|
-
- g.view position: :center do
|
728
|
-
= table store: @users, type: :bordered
|
729
|
-
- g.view position: :bottom do
|
730
|
-
= 'bottom'
|
731
|
-
|
732
|
-
= grid do |g|
|
733
|
-
- g.view num: 5, position: :left do
|
734
|
-
= 'left'
|
735
|
-
- g.view position: :right do
|
736
|
-
= 'right'
|
737
|
-
- g.view({ position: :top}, { class: 'success'}) do
|
738
|
-
= 'top'
|
739
|
-
- g.view position: :center do
|
740
|
-
= 'center'
|
741
|
-
- g.view position: :bottom do
|
742
|
-
= 'bottom'
|
743
821
|
```
|
822
|
+
grid do |g|
|
823
|
+
g.view num: 3, position: :left do
|
824
|
+
list_group(type: :link) do |lg|
|
825
|
+
lg.list 'Link 1', { url: '#link1' }
|
826
|
+
lg.list 'Link 2', { url: '#link1', status: :active }
|
827
|
+
lg.list 'Link 1', { url: '#link1' }
|
828
|
+
lg.list 'Link 3', { url: '#link1' }
|
829
|
+
lg.list 'Link 4', { url: '#link1' }
|
830
|
+
end
|
831
|
+
end
|
832
|
+
g.view({ position: :top}) do
|
833
|
+
button_group(type: :toolbar) do
|
834
|
+
button 'option 1'
|
835
|
+
button 'option 2'
|
836
|
+
button 'option 3'
|
837
|
+
end
|
838
|
+
end
|
839
|
+
g.view position: :center do
|
840
|
+
table store: @users, type: :bordered
|
841
|
+
end
|
842
|
+
g.view position: :bottom do
|
843
|
+
'bottom'
|
844
|
+
end
|
845
|
+
end
|
846
|
+
|
847
|
+
grid do |g|
|
848
|
+
g.view num: 5, position: :left do
|
849
|
+
'left'
|
850
|
+
end
|
851
|
+
g.view position: :right do
|
852
|
+
'right'
|
853
|
+
end
|
854
|
+
g.view({ position: :top}, { class: 'success'}) do
|
855
|
+
'top'
|
856
|
+
end
|
857
|
+
g.view position: :center do
|
858
|
+
'center'
|
859
|
+
end
|
860
|
+
g.view position: :bottom do
|
861
|
+
'bottom'
|
862
|
+
end
|
863
|
+
end
|
864
|
+
```
|
865
|
+
|
866
|
+
Voir la [doc](UiBibz/Ui/Ux/Grid.html)
|
744
867
|
|
745
868
|
### Arguments and Values
|
746
869
|
|
@@ -784,21 +907,18 @@ comme ci-dessous.
|
|
784
907
|
Exemple :
|
785
908
|
|
786
909
|
```ruby
|
787
|
-
UiBibz::Ui::Panel.new('Exemple', { state: :success }, { class: 'exemple'}).render
|
910
|
+
UiBibz::Ui::Core::Panel.new('Exemple', { state: :success }, { class: 'exemple'}).render
|
788
911
|
# au lieu de
|
789
912
|
panel 'Exemple', { state: :success }, { class: 'exemple' }
|
790
913
|
```
|
791
914
|
|
792
|
-
# Roadmap
|
915
|
+
# Roadmap
|
793
916
|
|
794
917
|
Pour la V2.
|
795
918
|
|
796
919
|
* créer des stores pour les listes, breadcrumb
|
797
|
-
* créer une meilleure documentation
|
798
920
|
* créer d'autres extensions, plugins et une guideline
|
799
921
|
* donner le choix de la dépendence boostrap et awesomefont en CDN ou en local
|
800
922
|
* mise à jour vers bootstrap 4
|
801
|
-
* créer Ui-Bibz Core à partir de cette librairie ( pour l'insérer dans un nouveau
|
802
|
-
framework Ui-Bibz utilisant simple_form pour les champs formulaires ).
|
803
923
|
...
|
804
924
|
|