mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-12-16 05:42:13 +08:00
Placeholder text (titles, description field) [SCI-9081]
This commit is contained in:
parent
103b62798b
commit
6d8d804c71
6 changed files with 23 additions and 8 deletions
|
|
@ -12,7 +12,7 @@
|
|||
:value="element.attributes.orderable.name"
|
||||
:sa_value="element.attributes.orderable.sa_name"
|
||||
:characterLimit="10000"
|
||||
:placeholder="''"
|
||||
:placeholder="element.attributes.orderable.placeholder"
|
||||
:allowBlank="false"
|
||||
:autofocus="editingName"
|
||||
:smartAnnotation="true"
|
||||
|
|
|
|||
|
|
@ -7,12 +7,13 @@
|
|||
@click="$emit('reorder')">
|
||||
<i class="sn-icon sn-icon-sort"></i>
|
||||
</div>
|
||||
|
||||
<div v-if="!locked || element.attributes.orderable.name" :key="reloadHeader"
|
||||
class="grow-1 text-ellipsis whitespace-nowrap grow my-1 font-bold">
|
||||
<InlineEdit
|
||||
:value="element.attributes.orderable.name"
|
||||
:characterLimit="255"
|
||||
:placeholder="''"
|
||||
:placeholder="element.attributes.orderable.placeholder"
|
||||
:allowBlank="false"
|
||||
:autofocus="editingName"
|
||||
:attributeName="`${i18n.t('Table')} ${i18n.t('name')}`"
|
||||
|
|
|
|||
|
|
@ -6,7 +6,11 @@ class ChecklistSerializer < ActiveModel::Serializer
|
|||
include ApplicationHelper
|
||||
include ActionView::Helpers::TextHelper
|
||||
|
||||
attributes :id, :name, :urls, :icon, :sa_name, :checklist_items, :parent_type
|
||||
attributes :id, :name, :urls, :icon, :sa_name, :checklist_items, :parent_type, :placeholder
|
||||
|
||||
def placeholder
|
||||
I18n.t('protocols.steps.checklist.checklist_name')
|
||||
end
|
||||
|
||||
def icon
|
||||
'fa-list-ul'
|
||||
|
|
|
|||
|
|
@ -4,12 +4,16 @@ class ResultTableSerializer < ActiveModel::Serializer
|
|||
include Canaid::Helpers::PermissionsHelper
|
||||
include Rails.application.routes.url_helpers
|
||||
|
||||
attributes :name, :contents, :urls, :icon, :metadata, :parent_type
|
||||
attributes :name, :contents, :urls, :icon, :metadata, :parent_type, :placeholder
|
||||
|
||||
def contents
|
||||
object.contents_utf_8
|
||||
end
|
||||
|
||||
def placeholder
|
||||
I18n.t('protocols.steps.table.table_name')
|
||||
end
|
||||
|
||||
def icon
|
||||
'fa-table'
|
||||
end
|
||||
|
|
|
|||
|
|
@ -4,12 +4,16 @@ class TableSerializer < ActiveModel::Serializer
|
|||
include Canaid::Helpers::PermissionsHelper
|
||||
include Rails.application.routes.url_helpers
|
||||
|
||||
attributes :name, :contents, :urls, :icon, :metadata, :parent_type
|
||||
attributes :name, :contents, :urls, :icon, :metadata, :parent_type, :placeholder
|
||||
|
||||
def contents
|
||||
object.contents_utf_8
|
||||
end
|
||||
|
||||
def placeholder
|
||||
I18n.t('protocols.steps.table.table_name')
|
||||
end
|
||||
|
||||
def icon
|
||||
'fa-table'
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1156,8 +1156,8 @@ en:
|
|||
unlinked: "unlinked"
|
||||
linked: "linked"
|
||||
no_description: "No protocol description"
|
||||
enter_name: "Enter protocol name"
|
||||
empty_description_edit_label: "Click here to enter Protocol Description (optional)"
|
||||
enter_name: "Protocol title"
|
||||
empty_description_edit_label: "Add description"
|
||||
keywords: "Keywords"
|
||||
no_keywords: "no keywords"
|
||||
protocol_created: "Protocol created:"
|
||||
|
|
@ -3030,7 +3030,7 @@ en:
|
|||
ztoa_html: "<i class=\"fas fa-sort-alpha-up\"></i> Name Z to A"
|
||||
|
||||
steps:
|
||||
placeholder: 'Enter step name'
|
||||
placeholder: 'Step name'
|
||||
default_name: 'Untitled step'
|
||||
completed: 'Completed'
|
||||
uncompleted: 'Uncompleted'
|
||||
|
|
@ -3090,8 +3090,10 @@ en:
|
|||
description: 'Tables have become content blocks and require a name. To be able to edit the table, please add the name now:'
|
||||
save: 'Save table title'
|
||||
error: "Table name can't be empty"
|
||||
table_name: "Table name"
|
||||
checklist:
|
||||
default_name: 'Checklist %{position}'
|
||||
checklist_name: "Checklist name"
|
||||
empty_checklist: 'Doesn’t contain any checklist items'
|
||||
text:
|
||||
placeholder: 'Enter step text'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue