Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 09:20:29 +01:00
Use wizard name in no access messages
Dieser Commit ist enthalten in:
Ursprung
aa7dd16827
Commit
20f605b899
5 geänderte Dateien mit 14 neuen und 8 gelöschten Zeilen
|
@ -10,4 +10,4 @@ export default Ember.Component.extend({
|
|||
CustomWizard.skip(this.get('wizardId'));
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
|
|
@ -17,10 +17,12 @@ export default Ember.Route.extend({
|
|||
const minTrust = model.get('min_trust');
|
||||
const wizardId = model.get('id');
|
||||
const user = model.get('user');
|
||||
const name = model.get('name');
|
||||
|
||||
controller.setProperties({
|
||||
requiresLogin: !user,
|
||||
user,
|
||||
name,
|
||||
completed,
|
||||
notPermitted: !permitted,
|
||||
minTrust,
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
{{wizard-no-access text=(i18n 'wizard.none') wizardId=wizardId}}
|
||||
{{else}}
|
||||
{{#if requiresLogin}}
|
||||
{{wizard-no-access text=(i18n 'wizard.requires_login' level=minTrust) wizardId=wizardId}}
|
||||
{{wizard-no-access text=(i18n 'wizard.requires_login' name=name) wizardId=wizardId}}
|
||||
{{else}}
|
||||
{{#if notPermitted}}
|
||||
{{wizard-no-access text=(i18n 'wizard.not_permitted' level=minTrust) wizardId=wizardId}}
|
||||
{{wizard-no-access text=(i18n 'wizard.not_permitted' name=name level=minTrust) wizardId=wizardId}}
|
||||
{{else}}
|
||||
{{#if completed}}
|
||||
{{wizard-no-access text=(i18n 'wizard.completed') wizardId=wizardId}}
|
||||
{{wizard-no-access text=(i18n 'wizard.completed' name=name) wizardId=wizardId}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
|
|
@ -177,11 +177,11 @@ en:
|
|||
filter_placeholder: "Search..."
|
||||
|
||||
wizard:
|
||||
completed: "You have completed this wizard."
|
||||
not_permitted: "You need to be trust level {{level}} or higher to access this wizard."
|
||||
completed: "You have completed the {{name}} wizard."
|
||||
not_permitted: "You need to be trust level {{level}} or higher to access the {{name}} wizard."
|
||||
none: "There is no wizard here."
|
||||
return_to_site: "Return to {{siteName}}"
|
||||
requires_login: "You need to be logged in to access this wizard."
|
||||
requires_login: "You need to be logged in to access the {{name}} wizard."
|
||||
|
||||
wizard_composer:
|
||||
show_preview: "Preview Post"
|
||||
|
|
|
@ -64,7 +64,7 @@ class ::Wizard::Step
|
|||
end
|
||||
|
||||
::WizardSerializer.class_eval do
|
||||
attributes :id, :background, :completed, :required, :min_trust, :permitted, :user
|
||||
attributes :id, :name, :background, :completed, :required, :min_trust, :permitted, :user
|
||||
|
||||
def id
|
||||
object.id
|
||||
|
@ -74,6 +74,10 @@ end
|
|||
object.respond_to?(:id)
|
||||
end
|
||||
|
||||
def name
|
||||
object.name
|
||||
end
|
||||
|
||||
def background
|
||||
object.background
|
||||
end
|
||||
|
|
Laden …
In neuem Issue referenzieren