Class: Marty::ScriptForm
- Inherits:
-
Form
- Object
- Netzke::Form::Base
- Form
- Marty::ScriptForm
show all
- Defined in:
- app/components/marty/script_form.rb
Constant Summary
collapse
- DASH =
0x2012.chr('utf-8')
Constants included
from Permissions
Permissions::ALL_ROLES, Permissions::REQ_ROLES
Instance Method Summary
collapse
#can_perform_action?, #can_perform_actions, #current_user_roles, #has_any_perm?, #has_marty_permissions
Instance Method Details
#can_save?(script) ⇒ Boolean
42
43
44
|
# File 'app/components/marty/script_form.rb', line 42
def can_save?(script)
script && self.class.has_dev_perm? && Mcfly.is_infinity(script.obsoleted_dt)
end
|
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
|
# File 'app/components/marty/script_form.rb', line 149
def configure(c)
super
c.title = "Script Form"
c.model = "Marty::Script"
c.items =
[
{
line_numbers: true,
indent_unit: 4,
tab_mode: "shift",
match_brackets: true,
hide_label: true,
xtype: :codemirror,
mode: "text/x-delorean",
name: :body,
empty_text: "No script selected.",
getter: lambda { |r| r.body },
},
]
end
|
#default_bbar ⇒ Object
140
141
142
143
144
145
|
# File 'app/components/marty/script_form.rb', line 140
def default_bbar
[
:apply,
:do_print,
]
end
|