Sha256: 8e4c7f3d437440da9b6e6b2b550d7cf8f3d681bde50cb94d47d4f463de18c7da
Contents?: true
Size: 1021 Bytes
Versions: 84
Compression:
Stored size: 1021 Bytes
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 = :time_add 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
84 entries across 84 versions & 1 rubygems