Project

General

Profile

Defect #38145 » 38145-v2.patch

Go MAEDA, 2023-01-11 15:43

View differences:

app/helpers/application_helper.rb
255 255
    if block
256 256
      object = yield object
257 257
    end
258
    case object.class.name
259
    when 'Array'
258
    case object
259
    when Array
260 260
      formatted_objects = object.map {|o| format_object(o, html)}
261 261
      html ? safe_join(formatted_objects, ', ') : formatted_objects.join(', ')
262
    when 'Time'
262
    when Time
263 263
      format_time(object)
264
    when 'Date'
264
    when Date
265 265
      format_date(object)
266
    when 'Fixnum'
266
    when Integer
267 267
      object.to_s
268
    when 'Float'
268
    when Float
269 269
      sprintf "%.2f", object
270
    when 'User', 'Group'
270
    when User, Group
271 271
      html ? link_to_principal(object) : object.to_s
272
    when 'Project'
272
    when Project
273 273
      html ? link_to_project(object) : object.to_s
274
    when 'Version'
274
    when Version
275 275
      html ? link_to_version(object) : object.to_s
276
    when 'TrueClass'
276
    when TrueClass
277 277
      l(:general_text_Yes)
278
    when 'FalseClass'
278
    when FalseClass
279 279
      l(:general_text_No)
280
    when 'Issue'
280
    when Issue
281 281
      object.visible? && html ? link_to_issue(object) : "##{object.id}"
282
    when 'Attachment'
282
    when Attachment
283 283
      if html
284 284
        content_tag(
285 285
          :span,
......
294 294
      else
295 295
        object.filename
296 296
      end
297
    when 'CustomValue', 'CustomFieldValue'
297
    when CustomValue, CustomFieldValue
298 298
      return "" unless object.customized&.visible?
299 299

  
300 300
      if object.custom_field
(2-2/2)