Cook step titles
Dieser Commit ist enthalten in:
Ursprung
620f30368e
Commit
92fb880502
3 geänderte Dateien mit 7 neuen und 3 gelöschten Zeilen
|
@ -71,6 +71,10 @@ export default {
|
|||
return index === 0 && !required;
|
||||
}.property('step.index', 'wizard.required'),
|
||||
|
||||
cookedTitle: function() {
|
||||
return cook(this.get('step.title'));
|
||||
}.property('step.title'),
|
||||
|
||||
cookedDescription: function() {
|
||||
return cook(this.get('step.description'));
|
||||
}.property('step.description'),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class='wizard-step-contents'>
|
||||
{{#if step.title}}
|
||||
<h1 class='wizard-step-title'>{{step.title}}</h1>
|
||||
<h1 class='wizard-step-title'>{{cookedTitle}}</h1>
|
||||
{{/if}}
|
||||
|
||||
{{#if step.description}}
|
||||
|
|
|
@ -127,8 +127,8 @@ end
|
|||
|
||||
::WizardStepSerializer.class_eval do
|
||||
def title
|
||||
return object.title if object.title
|
||||
I18n.t("#{object.key || i18n_key}.title", default: '')
|
||||
return PrettyText.cook(object.title) if object.title
|
||||
PrettyText.cook(I18n.t("#{object.key || i18n_key}.title", default: ''))
|
||||
end
|
||||
|
||||
def description
|
||||
|
|
Laden …
In neuem Issue referenzieren