informix_rails 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/informix_rails/version.rb +1 -1
- data/lib/informix_rails.rb +35 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cbee7497371cc96e325400bd25f2c7a7aca30725ce87b85e6390d6389caa302
|
4
|
+
data.tar.gz: 924d98eb97349ba1e64b943ee1c6d2dea4a9d8e52789d41ceba3492b661b8d73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cdc245a080fcafe949b9ae7b3489bf9e6a50d452e06543401960f1efe1f3683ae9c1500fe2fb39ced60decdd3c529960f03f5f6121791612ca62949f7f536e7a
|
7
|
+
data.tar.gz: ed5b0b5e313c9da25a56a8e7292ebd61c59991dfb9107399a08a65e3848d3419c77c87441ef216b282df25dcbc55cca91953867165962716e1c7ab15e6f3f020
|
data/Gemfile.lock
CHANGED
data/lib/informix_rails.rb
CHANGED
@@ -22,7 +22,7 @@ module InformixRails
|
|
22
22
|
output.each do |line|
|
23
23
|
content += convert_line(line) unless line.strip.empty?
|
24
24
|
end
|
25
|
-
content
|
25
|
+
wrap_content(content)
|
26
26
|
end
|
27
27
|
|
28
28
|
def read(file)
|
@@ -55,13 +55,45 @@ module InformixRails
|
|
55
55
|
end
|
56
56
|
|
57
57
|
def wrap_content(content)
|
58
|
-
|
58
|
+
content = wrap_form(content)
|
59
|
+
content = add_actions(content)
|
60
|
+
content = wrap_box(content)
|
61
|
+
content
|
62
|
+
end
|
63
|
+
|
64
|
+
def wrap_container(content)
|
65
|
+
"<div class='flex-container'>\n"\
|
66
|
+
"#{content}\n"\
|
67
|
+
"</div>\n\n"
|
68
|
+
end
|
69
|
+
|
70
|
+
def wrap_form(content)
|
71
|
+
"<%= form_with(model: @model, html: {autocomplete: 'off'}) do |form| %>\n"\
|
72
|
+
"#{content}"\
|
73
|
+
"<% end %>\n"
|
74
|
+
end
|
75
|
+
|
76
|
+
def wrap_box(content)
|
77
|
+
"<div class='one_box'>\n"\
|
78
|
+
"#{content}"\
|
79
|
+
"</div>\n"
|
80
|
+
end
|
81
|
+
|
82
|
+
def add_actions(content)
|
83
|
+
"#{content}"\
|
84
|
+
"<div class='item_actions'>\n"\
|
85
|
+
"Option:\n"\
|
86
|
+
"<span class='links'>\n"\
|
87
|
+
"Add\nEd\nDel\nNx\nPr\nFd\nVw\n"\
|
88
|
+
"<%= link_to_kb 'X', '/menus/main', ['x','f7'] %>\n"\
|
89
|
+
"<%= form.submit 'OK[F11]', id: 'ok', 'data-reset_form-target':'button' %>\n"\
|
90
|
+
"</span>\n"
|
59
91
|
end
|
60
92
|
|
61
93
|
def convert_line(line)
|
62
94
|
content = split_items(line).map{ |item|
|
63
95
|
convert_item(item)}.join("\n")
|
64
|
-
|
96
|
+
wrap_container(content)
|
65
97
|
end
|
66
98
|
|
67
99
|
def split_items(line)
|