class CashboxActivity
Public Instance Methods
layout()
click to toggle source
# File Views/Cashbox/Activity.rb, line 4 def layout @update = true @order = 15 @functions_need = [:activities] gui_hboxg do gui_vboxg :nogroup do show_entity_activity_all :activities, :single, :name, :flexheight => 1, :width => 200, :callback => true show_block_ro :show end gui_vboxg :nogroup do gui_vboxg :nogroup do show_entity_person :students, :single, :full_name, :flexheight => 1, :callback => true, :width => 300 show_str :full_name show_button :search_student, :new_student, :signed_up_students # show_print :print_activity end end gui_vboxg :nogroup do gui_vbox :nogroup do show_table :table_activities, :headings => %w( Start End ) show_date :date_start end show_button :pay_act, :delete end gui_window :printing do show_html :msg_print show_int_hidden :step show_button :print_next, :close end end end
rpc_list_choice_activities(session, data)
click to toggle source
# File Views/Cashbox/Activity.rb, line 93 def rpc_list_choice_activities(session, data) reply(:empty_nonlists_update, data._activities.to_hash) + rpc_button_signed_up_students(session, data) end
rpc_list_choice_students(session, data)
click to toggle source
# File Views/Cashbox/Activity.rb, line 98 def rpc_list_choice_students(session, data) return reply(:empty, %w(full_name table_activities)) unless data._students act_table = ActivityPayments.for_user(data._students).collect { |act| [act.activitypayment_id, [act.date_start, act.date_end]] }.sort { |a, b| a[1] <=> b[1] }.reverse reply(:empty_update, :table_activities => act_table) + reply(:update, :date_start => Date.today.to_web) end
rpc_update(session)
click to toggle source
# File Views/Cashbox/Activity.rb, line 41 def rpc_update(session) # reply_print(session) + reply(:update, :date_start => Date.today.to_web) end