OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Better table columns
Oliver Günthera4c9860730af
diff --git a/app/components/op_primer/border_box_table_component.html.erb b/app/components/op_primer/border_box_table_component.html.erbindex 60a5ca6177b..f7488e61583 100644--- a/app/components/op_primer/border_box_table_component.html.erb+++ b/app/components/op_primer/border_box_table_component.html.erb@@ -49,7 +49,7 @@ See COPYRIGHT and LICENSE files for more details.render_blank_slateelserows.each do |row|- render(row_class.new(row:, table: self))+ concat render(row_class.new(row:, table: self))endendenddiff --git a/modules/auth_saml/app/components/saml/providers/row_component.rb b/modules/auth_saml/app/components/saml/providers/row_component.rbindex ef5ef2f5eb4..d76e40b5f18 100644--- a/modules/auth_saml/app/components/saml/providers/row_component.rb+++ b/modules/auth_saml/app/components/saml/providers/row_component.rb@@ -11,12 +11,12 @@ module Samlhref: url_for(action: :show, id: provider.id))) { provider.display_name || provider.name }- if provider.idp_sso_target_url+ if provider.idp_sso_service_urlconcat render(Primer::Beta::Text.new(tag: :p,font_size: :small,color: :subtle- )) { provider.idp_sso_target_url }+ )) { provider.idp_sso_service_url }endend@@ -33,7 +33,15 @@ module Samlenddef users- "1234"+ User.where("identity_url LIKE ?", "%#{provider.slug}%").count.to_s+ end++ def creator+ helpers.avatar(provider.creator, size: :mini, hide_name: false)+ end++ def created_at+ helpers.format_time provider.created_atenddef delete_linkdiff --git a/modules/auth_saml/app/components/saml/providers/table_component.rb b/modules/auth_saml/app/components/saml/providers/table_component.rbindex fde31d890db..564072dc3dc 100644--- a/modules/auth_saml/app/components/saml/providers/table_component.rb+++ b/modules/auth_saml/app/components/saml/providers/table_component.rb@@ -1,7 +1,7 @@module Samlmodule Providersclass TableComponent < ::OpPrimer::BorderBoxTableComponent- columns :name, :users+ columns :name, :users, :creator, :created_atdef initial_sort%i[id asc]@@ -18,7 +18,9 @@ module Samldef headers[['name', { caption: I18n.t('attributes.name') }],- ['users', { caption: I18n.t(:label_user_plural) }]+ ['users', { caption: I18n.t(:label_user_plural) }],+ ['creator', { caption: I18n.t("js.label_created_by") }],+ ['created_at', { caption: Saml::Provider.human_attribute_name(:created_at) }]]enddiff --git a/modules/auth_saml/app/models/saml/provider.rb b/modules/auth_saml/app/models/saml/provider.rbindex abc2e786405..ff5db3dbd16 100644--- a/modules/auth_saml/app/models/saml/provider.rb+++ b/modules/auth_saml/app/models/saml/provider.rb@@ -9,6 +9,9 @@ module Samlstore_attribute :options, :metadata_url, :stringstore_attribute :options, :metadata_xml, :string+ store_attribute :options, :idp_sso_service_url, :string+ store_attribute :options, :idp_slo_service_url, :string+store_attribute :options, :mapping_login, :jsonstore_attribute :options, :mapping_mail, :jsonstore_attribute :options, :mapping_firstname, :json