Sha256: a95fa03d800f18b7361e7062547d71c998b5ff6c35e1bac84608a1f90731111e
Contents?: true
Size: 1.01 KB
Versions: 22
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 client_class do |c| c.close_me = l(<<-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_cls = 'fa fa-clock glyph' end ###################################################################### endpoint :submit do |params| res = super(params) client.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
22 entries across 22 versions & 1 rubygems