mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-15 12:44:03 +00:00
Cleanup obj_desc_and_link
This commit is contained in:
parent
7d70f7685e
commit
75ee1371de
3 changed files with 138 additions and 140 deletions
|
|
@ -21,10 +21,12 @@
|
|||
- model_name = attribute.chomp('_id').camelize
|
||||
- if version.event != 'create'
|
||||
%td
|
||||
= object_last_description(model_name, values[0])
|
||||
- associated_object = current_or_last_object_state(model_name, values[0])
|
||||
= associated_object.try(:title) || associated_object.try(:name)
|
||||
= "(ID: #{values[0].blank? ? '-' : values[0]})"
|
||||
%td
|
||||
= object_last_description(model_name, values[1])
|
||||
- associated_object = current_or_last_object_state(model_name, values[1])
|
||||
= associated_object.try(:title) || associated_object.try(:name)
|
||||
= "(ID: #{values[1].blank? ? '-' : values[1]})"
|
||||
|
||||
- else
|
||||
|
|
@ -42,7 +44,8 @@
|
|||
- if attribute.include?('_id')
|
||||
- model_name = attribute.chomp('_id').camelize
|
||||
%td
|
||||
= object_last_description(model_name, value)
|
||||
- associated_object = current_or_last_object_state(model_name, value)
|
||||
= associated_object.try(:title) || associated_object.try(:name)
|
||||
= "(ID: #{value.blank? ? '-' : value})"
|
||||
- else
|
||||
%td= value.blank? ? '-' : value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue