mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-21 07:26:15 +08:00
removed serializer code
This commit is contained in:
parent
6d8d804c71
commit
0e2f9ff81d
|
@ -12,7 +12,7 @@
|
|||
:value="element.attributes.orderable.name"
|
||||
:sa_value="element.attributes.orderable.sa_name"
|
||||
:characterLimit="10000"
|
||||
:placeholder="element.attributes.orderable.placeholder"
|
||||
:placeholder="i18n.t('protocols.steps.checklist.checklist_name')"
|
||||
:allowBlank="false"
|
||||
:autofocus="editingName"
|
||||
:smartAnnotation="true"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<InlineEdit
|
||||
:value="element.attributes.orderable.name"
|
||||
:characterLimit="255"
|
||||
:placeholder="element.attributes.orderable.placeholder"
|
||||
:placeholder="i18n.t('protocols.steps.table.table_name')"
|
||||
:allowBlank="false"
|
||||
:autofocus="editingName"
|
||||
:attributeName="`${i18n.t('Table')} ${i18n.t('name')}`"
|
||||
|
|
|
@ -6,11 +6,7 @@ class ChecklistSerializer < ActiveModel::Serializer
|
|||
include ApplicationHelper
|
||||
include ActionView::Helpers::TextHelper
|
||||
|
||||
attributes :id, :name, :urls, :icon, :sa_name, :checklist_items, :parent_type, :placeholder
|
||||
|
||||
def placeholder
|
||||
I18n.t('protocols.steps.checklist.checklist_name')
|
||||
end
|
||||
attributes :id, :name, :urls, :icon, :sa_name, :checklist_items, :parent_type
|
||||
|
||||
def icon
|
||||
'fa-list-ul'
|
||||
|
|
|
@ -4,16 +4,12 @@ class ResultTableSerializer < ActiveModel::Serializer
|
|||
include Canaid::Helpers::PermissionsHelper
|
||||
include Rails.application.routes.url_helpers
|
||||
|
||||
attributes :name, :contents, :urls, :icon, :metadata, :parent_type, :placeholder
|
||||
attributes :name, :contents, :urls, :icon, :metadata, :parent_type
|
||||
|
||||
def contents
|
||||
object.contents_utf_8
|
||||
end
|
||||
|
||||
def placeholder
|
||||
I18n.t('protocols.steps.table.table_name')
|
||||
end
|
||||
|
||||
def icon
|
||||
'fa-table'
|
||||
end
|
||||
|
|
|
@ -4,16 +4,12 @@ class TableSerializer < ActiveModel::Serializer
|
|||
include Canaid::Helpers::PermissionsHelper
|
||||
include Rails.application.routes.url_helpers
|
||||
|
||||
attributes :name, :contents, :urls, :icon, :metadata, :parent_type, :placeholder
|
||||
attributes :name, :contents, :urls, :icon, :metadata, :parent_type
|
||||
|
||||
def contents
|
||||
object.contents_utf_8
|
||||
end
|
||||
|
||||
def placeholder
|
||||
I18n.t('protocols.steps.table.table_name')
|
||||
end
|
||||
|
||||
def icon
|
||||
'fa-table'
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue