lato_view 1.1 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +0 -12
- data/app/assets/javascripts/lato_view/build/FormManager.js +8 -2
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/actionbar/cell.rb +1 -1
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/actionbar/views/show.html.erb +0 -0
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/block/cell.rb +1 -1
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/buttongroup/cell.rb +1 -5
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/buttongroup/views/show.html.erb +0 -0
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/dropdown/cell.rb +2 -2
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/dropdown/views/show.html.erb +0 -0
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/index/cell.rb +2 -2
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/index/views/head.html.erb +0 -0
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/index/views/rows.html.erb +0 -0
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/input/cell.rb +5 -4
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/input/views/checkbox.html.erb +0 -0
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/input/views/date.html.erb +0 -0
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/input/views/editor.html.erb +0 -0
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/input/views/email.html.erb +0 -0
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/input/views/file.html.erb +0 -6
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/input/views/multiple-select.html.erb +0 -0
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/input/views/number.html.erb +0 -0
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/input/views/password.html.erb +0 -0
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/input/views/radio.html.erb +0 -0
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/input/views/select.html.erb +0 -0
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/input/views/text.html.erb +0 -0
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/input/views/textarea.html.erb +0 -0
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/input/views/time.html.erb +0 -0
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/searchbar/cell.rb +1 -6
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/searchbar/views/show.html.erb +0 -0
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/table/cell.rb +2 -2
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/table/views/head.html.erb +0 -0
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/table/views/row.html.erb +0 -0
- data/app/{concepts/lato_view → cells/lato_view/cells_v1}/table/views/rows.html.erb +0 -0
- data/app/cells/lato_view/component/button/cell.rb +30 -0
- data/app/cells/lato_view/component/button/views/show.html.erb +1 -0
- data/app/cells/lato_view/component/buttongroup/cell.rb +31 -0
- data/app/cells/lato_view/component/buttongroup/views/show.html.erb +13 -0
- data/app/cells/lato_view/component/dropdown/cell.rb +26 -0
- data/app/cells/lato_view/component/dropdown/views/show.html.erb +43 -0
- data/app/cells/lato_view/component/form/cell.rb +35 -0
- data/app/cells/lato_view/component/form/views/open.html.erb +3 -0
- data/app/cells/lato_view/component/form/views/show.html.erb +1 -0
- data/app/cells/lato_view/component/searchbar/cell.rb +36 -0
- data/app/cells/lato_view/component/searchbar/views/show.html.erb +9 -0
- data/app/cells/lato_view/input/checkbox/cell.rb +48 -0
- data/app/cells/lato_view/input/checkbox/views/show.html.erb +17 -0
- data/app/cells/lato_view/input/date/cell.rb +45 -0
- data/app/cells/lato_view/input/date/views/show.html.erb +11 -0
- data/app/cells/lato_view/input/editor/cell.rb +45 -0
- data/app/cells/lato_view/input/editor/views/show.html.erb +12 -0
- data/app/cells/lato_view/input/email/cell.rb +45 -0
- data/app/cells/lato_view/input/email/views/show.html.erb +11 -0
- data/app/cells/lato_view/input/file/cell.rb +51 -0
- data/app/cells/lato_view/input/file/views/show.html.erb +18 -0
- data/app/cells/lato_view/input/number/cell.rb +45 -0
- data/app/cells/lato_view/input/number/views/show.html.erb +11 -0
- data/app/cells/lato_view/input/password/cell.rb +46 -0
- data/app/cells/lato_view/input/password/views/show.html.erb +15 -0
- data/app/cells/lato_view/input/radio/cell.rb +63 -0
- data/app/cells/lato_view/input/radio/views/show.html.erb +20 -0
- data/app/cells/lato_view/input/select/cell.rb +87 -0
- data/app/cells/lato_view/input/select/views/show.html.erb +21 -0
- data/app/cells/lato_view/input/text/cell.rb +45 -0
- data/app/cells/lato_view/input/text/views/show.html.erb +11 -0
- data/app/cells/lato_view/input/textarea/cell.rb +45 -0
- data/app/cells/lato_view/input/textarea/views/show.html.erb +12 -0
- data/app/cells/lato_view/input/time/cell.rb +45 -0
- data/app/cells/lato_view/input/time/views/show.html.erb +11 -0
- data/app/cells/lato_view/layout/actionbar/cell.rb +29 -0
- data/app/cells/lato_view/layout/actionbar/views/show.html.erb +13 -0
- data/app/cells/lato_view/layout/block/cell.rb +37 -0
- data/app/cells/lato_view/layout/index/cell.rb +73 -0
- data/app/cells/lato_view/layout/index/views/head.html.erb +12 -0
- data/app/cells/lato_view/layout/index/views/rows.html.erb +49 -0
- data/app/controllers/lato_view/assets_controller.rb +3 -6
- data/app/controllers/lato_view/develop_controller.rb +5 -5
- data/app/helpers/lato_view/application_helper.rb +19 -10
- data/config/example.yml +2 -2
- data/config/initializers/init.rb +1 -1
- data/config/initializers/lists.rb +2 -18
- data/config/initializers/ram.rb +1 -13
- data/config/routes.rb +1 -0
- data/lib/lato_view.rb +5 -7
- data/lib/lato_view/cells.rb +16 -0
- data/lib/lato_view/engine.rb +6 -5
- data/lib/lato_view/interface.rb +4 -5
- data/lib/lato_view/interface/assets.rb +67 -76
- data/lib/lato_view/interface/images.rb +52 -58
- data/lib/lato_view/interface/navigation.rb +6 -11
- data/lib/lato_view/interface/themes.rb +22 -28
- data/lib/tasks/{lato_starter_tasks.rake → lato_view_tasks.rake} +1 -4
- metadata +76 -115
- data/lib/lato_view/concepts.rb +0 -19
- data/test/controllers/lato_view/api/v1/api_controller_test.rb +0 -9
- data/test/controllers/lato_view/application_controller_test.rb +0 -9
- data/test/controllers/lato_view/back/back_controller_test.rb +0 -9
- data/test/dummy/README.rdoc +0 -28
- data/test/dummy/Rakefile +0 -6
- data/test/dummy/app/assets/javascripts/application.js +0 -13
- data/test/dummy/app/assets/stylesheets/application.css +0 -15
- data/test/dummy/app/controllers/application_controller.rb +0 -5
- data/test/dummy/app/helpers/application_helper.rb +0 -2
- data/test/dummy/app/views/layouts/application.html.erb +0 -14
- data/test/dummy/bin/bundle +0 -3
- data/test/dummy/bin/rails +0 -4
- data/test/dummy/bin/rake +0 -4
- data/test/dummy/bin/setup +0 -29
- data/test/dummy/config.ru +0 -4
- data/test/dummy/config/application.rb +0 -25
- data/test/dummy/config/boot.rb +0 -5
- data/test/dummy/config/database.yml +0 -25
- data/test/dummy/config/environment.rb +0 -5
- data/test/dummy/config/environments/development.rb +0 -41
- data/test/dummy/config/environments/production.rb +0 -79
- data/test/dummy/config/environments/test.rb +0 -42
- data/test/dummy/config/initializers/assets.rb +0 -11
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy/config/initializers/cookies_serializer.rb +0 -3
- data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/test/dummy/config/initializers/inflections.rb +0 -16
- data/test/dummy/config/initializers/mime_types.rb +0 -4
- data/test/dummy/config/initializers/session_store.rb +0 -3
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/test/dummy/config/locales/en.yml +0 -23
- data/test/dummy/config/routes.rb +0 -3
- data/test/dummy/config/secrets.yml +0 -22
- data/test/dummy/public/404.html +0 -67
- data/test/dummy/public/422.html +0 -67
- data/test/dummy/public/500.html +0 -66
- data/test/dummy/public/favicon.ico +0 -0
- data/test/integration/navigation_test.rb +0 -8
- data/test/lato_view_test.rb +0 -7
- data/test/test_helper.rb +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89b82e856b760020c611eb0d7dcc7557b57efaf1
|
4
|
+
data.tar.gz: cf71b82f469fe3df7a84a2da9a274beef28671ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc72f337e0bd011804c5906ae6fa1c0dfb37876b11bf9eb2d6958dd29c1e9cd1e216eb3ce231cc1dcc6d207dfb50935b1210a5de360bb3d344dd56f8cb75eb1b
|
7
|
+
data.tar.gz: 98c56e8503ead112912518f376b36ef47f0a812b8745ffe0d4b80ccdfd55cadcac3667c111ee478171c2d4ce401870bc8df404ebea58d877c16b810a978eec8f
|
data/Rakefile
CHANGED
@@ -4,18 +4,6 @@ rescue LoadError
|
|
4
4
|
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
5
|
end
|
6
6
|
|
7
|
-
require 'rdoc/task'
|
8
|
-
|
9
|
-
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
-
rdoc.rdoc_dir = 'doc'
|
11
|
-
rdoc.title = 'LatoView'
|
12
|
-
rdoc.rdoc_files.include('README.md')
|
13
|
-
rdoc.rdoc_files.include('lib/lato_view.rb')
|
14
|
-
rdoc.rdoc_files.include('lib/lato_view/**/*.rb')
|
15
|
-
rdoc.rdoc_files.include('app/helpers/**/*.rb')
|
16
|
-
rdoc.rdoc_files.include('app/concepts/**/*.rb')
|
17
|
-
end
|
18
|
-
|
19
7
|
APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
|
20
8
|
load 'rails/tasks/engine.rake'
|
21
9
|
|
@@ -14,12 +14,18 @@ var FormManager = (function($) {
|
|
14
14
|
firstDay: 1,
|
15
15
|
min: new Date(1900, 0, 1),
|
16
16
|
max: new Date(3000, 12, 31),
|
17
|
-
format: 'dd/mm/yyyy'
|
17
|
+
format: 'dd/mm/yyyy',
|
18
|
+
hiddenPrefix: '',
|
19
|
+
hiddenSuffix: ''
|
18
20
|
});
|
19
21
|
};
|
20
22
|
|
21
23
|
var _manageTimePicker = function() {
|
22
|
-
var $timePicker = $('.time-picker').pickatime(
|
24
|
+
var $timePicker = $('.time-picker').pickatime({
|
25
|
+
format: 'H:i',
|
26
|
+
hiddenPrefix: '',
|
27
|
+
hiddenSuffix: ''
|
28
|
+
});
|
23
29
|
};
|
24
30
|
|
25
31
|
var _manageFileUploader = function() {
|
@@ -2,7 +2,7 @@ module LatoView
|
|
2
2
|
# Cella che si occupa di generare una actionbar in grado di contenere
|
3
3
|
# il titolo della pagina e i link alle principali azioni. Puo' inoltre
|
4
4
|
# contenere anche dei widget per altri tipi di interazioni.
|
5
|
-
module Actionbar
|
5
|
+
module CellsV1::Actionbar
|
6
6
|
# Cella Actionbar
|
7
7
|
class Cell < Cell
|
8
8
|
|
File without changes
|
@@ -1,10 +1,8 @@
|
|
1
1
|
module LatoView
|
2
2
|
# Elemento grafico composto da un insieme di link uniti in orizzontale
|
3
|
-
module Buttongroup
|
3
|
+
module CellsV1::Buttongroup
|
4
4
|
# Cella Buttongroup
|
5
5
|
class Cell < Cell
|
6
|
-
# Lista stili possibili per il bottongroup
|
7
|
-
@@styles = VIEW_CELLSSTYLES
|
8
6
|
|
9
7
|
# Lista di links da mostrare nella Actionbar secondo la
|
10
8
|
# struttura [['Nome link', 'url'], ['Nome link', 'url']]
|
@@ -20,8 +18,6 @@ module LatoView
|
|
20
18
|
attr_accessor :style
|
21
19
|
|
22
20
|
def initialize(links: nil, size: nil, style: 'normal')
|
23
|
-
# eseguo brevi controlli sull'input
|
24
|
-
raise 'Bottongroup Concept: style value in not correct' unless @@styles.include? style.to_s
|
25
21
|
# assegno i valori alle variabili di istanza
|
26
22
|
@links = links if links && check_links(links)
|
27
23
|
@size = size
|
File without changes
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module LatoView
|
2
2
|
# Cella che si occupa di generare un pannello di dropdown in grado di
|
3
3
|
# contenere una lista di link
|
4
|
-
module Dropdown
|
4
|
+
module CellsV1::Dropdown
|
5
5
|
# Cella Actionbar
|
6
6
|
class Cell < Cell
|
7
7
|
# Lista di links da mostrare nel Dropdown secondo la
|
@@ -39,7 +39,7 @@ module LatoView
|
|
39
39
|
raise 'Dropdown Concept: links content must have two value' if link.length != 2
|
40
40
|
end
|
41
41
|
end
|
42
|
-
|
42
|
+
|
43
43
|
end
|
44
44
|
# Fine cella
|
45
45
|
end
|
File without changes
|
@@ -3,7 +3,7 @@ module LatoView
|
|
3
3
|
# insieme ai link alle azioni di visualizzazione, modifica e eliminazione.
|
4
4
|
# Il corretto funzionamento dei link alle azioni necessita che i routes del
|
5
5
|
# modello siano settati attraverso la funzione 'resources'
|
6
|
-
module Index
|
6
|
+
module CellsV1::Index
|
7
7
|
# Cella Index
|
8
8
|
class Cell < Cell
|
9
9
|
# Istanze del database da stampare
|
@@ -105,7 +105,7 @@ module LatoView
|
|
105
105
|
show_link(id)
|
106
106
|
end
|
107
107
|
|
108
|
-
|
108
|
+
|
109
109
|
end
|
110
110
|
# Fine cella
|
111
111
|
end
|
File without changes
|
File without changes
|
@@ -1,12 +1,13 @@
|
|
1
1
|
module LatoView
|
2
2
|
# Cella che gestisce tutti i possibili input utilizzabili nei form
|
3
|
-
module Input
|
3
|
+
module CellsV1::Input
|
4
4
|
# Cella Input
|
5
5
|
class Cell < Cell
|
6
6
|
# Lista di tipologie di input accettate
|
7
|
-
@@types =
|
8
|
-
|
9
|
-
|
7
|
+
@@types = %w(text number select password email editor checkbox radio
|
8
|
+
textarea file date multiple-select time)
|
9
|
+
# Lista dei parametri accettati per l'attributo width
|
10
|
+
@@widths = VIEW_INPUTWIDTH
|
10
11
|
|
11
12
|
# Tipologia di input da inizializzare
|
12
13
|
# (text, number, select, password, email, multiple-select, date,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/app/{concepts/lato_view → cells/lato_view/cells_v1}/input/views/multiple-select.html.erb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,15 +1,12 @@
|
|
1
1
|
module LatoView
|
2
2
|
# Elemento grafico composto da una barra di ricerca utilizzabile insieme
|
3
3
|
# alla gemma 'ransack' per eseguire la ricerca tra le entita' di un modello.
|
4
|
-
module Searchbar
|
4
|
+
module CellsV1::Searchbar
|
5
5
|
# Cella Searchbar
|
6
6
|
class Cell < Cell
|
7
7
|
# includo i formhelper di ransack
|
8
8
|
include Ransack::Helpers::FormHelper
|
9
9
|
|
10
|
-
# Lista stili possibili per la searchbar
|
11
|
-
@@styles = VIEW_CELLSSTYLES
|
12
|
-
|
13
10
|
# Nome dell'istanza del database da utilizzare nella ricerca
|
14
11
|
# * *default*: nil
|
15
12
|
attr_accessor :elements
|
@@ -41,8 +38,6 @@ module LatoView
|
|
41
38
|
|
42
39
|
def initialize(elements: nil, filter: nil, url: nil, method: 'get',
|
43
40
|
style: 'normal', remote: false, custom_class: '')
|
44
|
-
# eseguo brevi controlli sull'input
|
45
|
-
raise 'Searchbar Concept: style value in not correct' unless @@styles.include? style.to_s
|
46
41
|
# assegno i valori alle variabili di istanza
|
47
42
|
@elements = elements
|
48
43
|
@filter = filter
|
File without changes
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module LatoView
|
2
2
|
# Cella usata per la generazione di tabelle.
|
3
|
-
module Table
|
3
|
+
module CellsV1::Table
|
4
4
|
# Cella Table
|
5
5
|
class Cell < Cell
|
6
6
|
# Array contenente l'intestazione della tabella
|
@@ -81,7 +81,7 @@ module LatoView
|
|
81
81
|
raise 'Table Concept: rows content must be an array' unless row.is_a? Array
|
82
82
|
end
|
83
83
|
end
|
84
|
-
|
84
|
+
|
85
85
|
end
|
86
86
|
# Fine cella
|
87
87
|
end
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module LatoView
|
2
|
+
class Component::Button::Cell < Cell
|
3
|
+
|
4
|
+
@@colors = %w(normal yellow green red)
|
5
|
+
@@sizes = %w(normal small)
|
6
|
+
|
7
|
+
attr_accessor :title, :url, :color, :size
|
8
|
+
|
9
|
+
def initialize(title: '', url: '', color: 'normal', size: 'normal')
|
10
|
+
# save params
|
11
|
+
@title = title
|
12
|
+
@url = url
|
13
|
+
@color = color
|
14
|
+
@size = size
|
15
|
+
# check params
|
16
|
+
check_params
|
17
|
+
end
|
18
|
+
|
19
|
+
def show
|
20
|
+
render 'show.html'
|
21
|
+
end
|
22
|
+
|
23
|
+
# check params
|
24
|
+
private def check_params
|
25
|
+
raise 'Button Cell: color value in not correct' unless @@colors.include? @color.to_s
|
26
|
+
raise 'Button Cell: size value in not correct' unless @@sizes.include? @size.to_s
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= link_to @title, @url, class: "lato-button button-#{@color} button-#{@size}" %>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module LatoView
|
2
|
+
class Component::Buttongroup::Cell < Cell
|
3
|
+
|
4
|
+
@@styles = VIEW_COMPONENTSTYLES
|
5
|
+
@@sizes = %w()
|
6
|
+
|
7
|
+
# NB: links must be an array of hash {name: 'name', url: 'url'}
|
8
|
+
attr_accessor :links, :size, :style
|
9
|
+
|
10
|
+
def initialize(links: [], size: '', style: 'normal')
|
11
|
+
# save params
|
12
|
+
@links = links
|
13
|
+
@size = size
|
14
|
+
@style = style
|
15
|
+
# check params
|
16
|
+
check_params
|
17
|
+
end
|
18
|
+
|
19
|
+
def show
|
20
|
+
render 'show.html'
|
21
|
+
end
|
22
|
+
|
23
|
+
# check params
|
24
|
+
private def check_params
|
25
|
+
raise 'Bottongroup Cell: style value in not correct' unless @@styles.include? @style.to_s
|
26
|
+
raise 'Bottongroup Cell: size value in not correct' unless @@sizes.include? @size.to_s
|
27
|
+
raise 'Bottongroup Cell: links must be an array' unless @links.is_a? Array
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module LatoView
|
2
|
+
class Component::Dropdown::Cell < Cell
|
3
|
+
|
4
|
+
# NB: links must be an array of hash {name: 'name', url: 'url'}
|
5
|
+
attr_accessor :links, :title, :open_text
|
6
|
+
|
7
|
+
def initialize(links: [], title: '', open_text: nil)
|
8
|
+
# save params
|
9
|
+
@links = links
|
10
|
+
@title = title
|
11
|
+
@open_text = open_text
|
12
|
+
# check params
|
13
|
+
check_params
|
14
|
+
end
|
15
|
+
|
16
|
+
def show
|
17
|
+
render 'show.html'
|
18
|
+
end
|
19
|
+
|
20
|
+
# check params
|
21
|
+
private def check_params
|
22
|
+
raise 'Dropdown Cell: links must be an array' unless @links.is_a? Array
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<div class="arranger">
|
2
|
+
|
3
|
+
<% if @title %>
|
4
|
+
|
5
|
+
<div class="arrange-voice"><%= @title %></div>
|
6
|
+
|
7
|
+
<% end %>
|
8
|
+
|
9
|
+
<div class="dropdown">
|
10
|
+
|
11
|
+
<% if @open_text %>
|
12
|
+
|
13
|
+
<div class="active-voice">
|
14
|
+
<span class="voice-text"><%= @open_text %></span>
|
15
|
+
<span class="drop-icon"></span>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<% else %>
|
19
|
+
|
20
|
+
<div class="active-voice">
|
21
|
+
<span class="voice-text"><%= @links[:name] %></span>
|
22
|
+
<span class="drop-icon"></span>
|
23
|
+
</div>
|
24
|
+
|
25
|
+
<% end %>
|
26
|
+
|
27
|
+
<div class="the-drop">
|
28
|
+
<ul>
|
29
|
+
|
30
|
+
<% @links.each do |link| %>
|
31
|
+
|
32
|
+
<li>
|
33
|
+
<a href="<%= link[:url] %>"><%= link[:name] %></a>
|
34
|
+
</li>
|
35
|
+
|
36
|
+
<% end %>
|
37
|
+
|
38
|
+
</ul>
|
39
|
+
</div>
|
40
|
+
|
41
|
+
</div>
|
42
|
+
|
43
|
+
</div>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module LatoView
|
2
|
+
class Component::Form::Cell < Cell
|
3
|
+
|
4
|
+
attr_accessor :url, :method, :remote, :multipart, :custom_class
|
5
|
+
|
6
|
+
def initialize(url: '', method: :post, remote: false, multipart: false, custom_class: '')
|
7
|
+
# save params
|
8
|
+
@url = url
|
9
|
+
@method = method
|
10
|
+
@remote = remote
|
11
|
+
@multipart = multipart
|
12
|
+
@custom_class = custom_class
|
13
|
+
# check params
|
14
|
+
check_params
|
15
|
+
end
|
16
|
+
|
17
|
+
def show
|
18
|
+
render 'show.html'
|
19
|
+
end
|
20
|
+
|
21
|
+
def open
|
22
|
+
render 'open.html'
|
23
|
+
end
|
24
|
+
|
25
|
+
def close
|
26
|
+
'</form>'
|
27
|
+
end
|
28
|
+
|
29
|
+
# check params
|
30
|
+
private def check_params
|
31
|
+
# TODO: Check values
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
|