Sha256: 5dbfab6b33b5cf851afe8e4766581013f4051c195c17bebb22a2d8baadaf71d9
Contents?: true
Size: 1.01 KB
Versions: 28
Compression:
Stored size: 1.01 KB
Contents
class Marty::NewPostingForm < Marty::Form extend ::Marty::Permissions # override this to set permissions for posting types has_marty_permissions read: :any js_configure do |c| c.close_me = <<-JS function() { // assume we're embedded in a window this.netzkeGetParentComponent().close(); } JS end action :apply do |a| a.text = I18n.t("create_posting") a.tooltip = I18n.t("create_posting") a.icon = :time_add end ###################################################################### endpoint :netzke_submit do |params, this| res = super(params, this) this.close_me res end def configure(c) super c.model = "Marty::Posting" c.items = [ { name: :posting_type__name, scope: lambda { |r| r.where(name: Marty::NewPostingForm.can_perform_actions) }, }, :comment, ] end end NewPostingForm = Marty::NewPostingForm
Version data entries
28 entries across 28 versions & 1 rubygems