New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor the "publish as" screen #1122
Refactor the "publish as" screen #1122
Conversation
js/components/widgets/publish-as.vue
Outdated
<div class="row text-center" v-if="$root.me.organizations.length <= 0"> | ||
<p class="col-xs-12 lead"> | ||
{{ _("You are not member of any organization.") }} | ||
{{ _("Maybe you should find or create your own.") }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
find one
js/components/widgets/publish-as.vue
Outdated
<a v-link.literal="/organization/new" class="btn btn-flat btn-primary">{{ _('Find or create your organization') }}</a> | ||
<div class="row text-center" v-if="$root.me.organizations.length <= 0"> | ||
<p class="col-xs-12 lead"> | ||
{{ _("You are not member of any organization.") }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a member (I think)
js/components/widgets/publish-as.vue
Outdated
<p class="col-xs-12">{{ _("Maybe you should find or create your own.") }}</p> | ||
<div class="col-xs-12 text-center"> | ||
<a v-link.literal="/organization/new" class="btn btn-flat btn-primary">{{ _('Find or create your organization') }}</a> | ||
<div class="row text-center" v-if="$root.me.organizations.length <= 0"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can drop the <= 0
?
@@ -53,6 +59,11 @@ export default { | |||
this.selected = null; | |||
return true; | |||
} | |||
}, | |||
watch: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need that, data
not enough? this.$root.me.organizations
not always defined when component is loaded?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sometimes, $root.me
is not yet loaded when the UI is displayed (when you have a direct link to the new dataset form by example)
Try to ensure more user publish as their organization from the first time.
Try to make more user publish as their organization from the first time.
To do so, I:
I'm not member of any organization
I'm member of one or more organization(s)
Note
This PR also fixes a bug: some parts where displayed when they shouldn't.