class AdminConfiguration

Public Instance Methods

layout() click to toggle source
# File Views/Admin/Configuration.rb, line 2
def layout
  @order = 600
  @update = true
  set_data_class(:ConfigBases)

  gui_vbox do
    gui_hbox :nogroup do
      gui_vbox :nogroup do
        show_str :dputs_logfile
        show_str :dputs_logall
        show_block :vars_wide
        show_field :template_dir
        show_field :diploma_dir
        show_field :exam_dir
        show_list_drop :card_student, 'ConfigBase.templates'
        show_list_drop :card_responsible, 'ConfigBase.templates'
        show_list_drop :presence_sheet, 'ConfigBase.templates'
        show_list_drop :presence_sheet_small, 'ConfigBase.templates'
        show_arg :server_url, :width => 300
      end
      gui_vbox :nogroup do
        show_block :narrow
      end
      gui_vbox :nogroup do
        show_block :vars_narrow
      end
    end
    show_button :save
  end
end
rpc_button_save(session, data) click to toggle source
# File Views/Admin/Configuration.rb, line 38
def rpc_button_save(session, data)
  ConfigBase.store(data.to_sym)
  dputs(3) { "Configuration is now #{ConfigBase.get_functions.inspect}" }

  rpc_update(session)
end
rpc_update(session) click to toggle source
# File Views/Admin/Configuration.rb, line 33
def rpc_update(session)
  reply(:empty_nonlists) +
      update_form_data(ConfigBases.singleton)
end