X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/917c3ca20c36318578c4dfab7de076d97a2f87fe..9429158c8ecf253a700c7eb4f87ad142a8e1522c:/apps/workbench/app/helpers/application_helper.rb diff --git a/apps/workbench/app/helpers/application_helper.rb b/apps/workbench/app/helpers/application_helper.rb index 0a872446d5..786716eb33 100644 --- a/apps/workbench/app/helpers/application_helper.rb +++ b/apps/workbench/app/helpers/application_helper.rb @@ -12,7 +12,11 @@ module ApplicationHelper end def current_api_host - "#{Rails.configuration.Services.Controller.ExternalURL.hostname}:#{Rails.configuration.Services.Controller.ExternalURL.port}" + if Rails.configuration.Services.Controller.ExternalURL.port == 443 + "#{Rails.configuration.Services.Controller.ExternalURL.hostname}" + else + "#{Rails.configuration.Services.Controller.ExternalURL.hostname}:#{Rails.configuration.Services.Controller.ExternalURL.port}" + end end def current_uuid_prefix @@ -243,11 +247,15 @@ module ApplicationHelper end input_type = 'text' + opt_selection = nil attrtype = object.class.attribute_info[attr.to_sym].andand[:type] if attrtype == 'text' or attr == 'description' input_type = 'textarea' elsif attrtype == 'datetime' input_type = 'date' + elsif attrtype == 'boolean' + input_type = 'select' + opt_selection = ([{value: "true", text: "true"}, {value: "false", text: "false"}]).to_json else input_type = 'text' end @@ -275,6 +283,7 @@ module ApplicationHelper "data-emptytext" => '(none)', "data-placement" => "bottom", "data-type" => input_type, + "data-source" => opt_selection, "data-title" => "Edit #{attr.to_s.gsub '_', ' '}", "data-name" => htmloptions['selection_name'] || attr, "data-object-uuid" => object.uuid,