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
Improve IFC models table
Wieland Lindenthalca0b6e0bb391
diff --git a/modules/ifc_models/app/cells/ifc_models/models/row_cell.rb b/modules/ifc_models/app/cells/ifc_models/models/row_cell.rbindex 87e6114db95..d41ff49f758 100644--- a/modules/ifc_models/app/cells/ifc_models/models/row_cell.rb+++ b/modules/ifc_models/app/cells/ifc_models/models/row_cell.rb@@ -6,8 +6,12 @@ module IFCModelsinclude ::Redmine::I18ndef title- link_to model.title,- ifc_models_project_ifc_model_path(model.project, model)+ if still_processing?+ model.title+ else+ link_to model.title,+ ifc_models_project_ifc_model_path(model.project, model)+ endenddef updated_at@@ -20,13 +24,17 @@ module IFCModelsenddef processing- if model.xkt_attachment.present?- I18n.t('ifc_models.processing_state.completed')- else+ if still_processing?I18n.t('ifc_models.processing_state.in_progress')+ else+ I18n.t('ifc_models.processing_state.completed')endend+ def still_processing?+ model.xkt_attachment.nil? || model.metadata_attachment.nil?+ end+###def button_linksdiff --git a/modules/ifc_models/app/cells/ifc_models/models/table_cell.rb b/modules/ifc_models/app/cells/ifc_models/models/table_cell.rbindex babd2de698e..ea075dcaf82 100644--- a/modules/ifc_models/app/cells/ifc_models/models/table_cell.rb+++ b/modules/ifc_models/app/cells/ifc_models/models/table_cell.rb@@ -2,10 +2,10 @@ module IFCModelsmodule Modelsclass TableCell < ::TableCellinclude ::IconsHelper- columns :title, :updated_at, :uploader, :processing+ columns :title, :created_at, :updated_at, :uploader, :processingdef initial_sort- [:updated_at, :desc]+ [:created_at, :asc]enddef sortable?@@ -27,6 +27,7 @@ module IFCModelsdef headers[['title', caption: IFCModel.human_attribute_name(:title)],+ ['created_at', caption: IFCModel.human_attribute_name(:created_at)],['updated_at', caption: IFCModel.human_attribute_name(:updated_at)],['uploader', caption: IFCModel.human_attribute_name(:uploader)],['processing', caption: I18n.t('ifc_models.processing_state.label')],diff --git a/modules/ifc_models/app/controllers/ifc_models/ifc_models_controller.rb b/modules/ifc_models/app/controllers/ifc_models/ifc_models_controller.rbindex 09fdb77bbc0..f11733f51b7 100644--- a/modules/ifc_models/app/controllers/ifc_models/ifc_models_controller.rb+++ b/modules/ifc_models/app/controllers/ifc_models/ifc_models_controller.rb@@ -42,7 +42,7 @@ module ::IFCModelsdef index@ifc_models = @project.ifc_models- .order('updated_at DESC')+ .order('created_at ASC').includes(:uploader, :project)end