Commit cf18d9e6 authored by Axel Dürkop's avatar Axel Dürkop
Browse files

Fix routing

parent 7633094a
......@@ -27,7 +27,7 @@
<v-dialog />
<div class="d-flex justify-content-end mb-3">
<a href="#" @click.prevent="showModal" class="share-list">
<i class="fa d-inline fa-lg fa-share-alt-square"></i> Share with your community
<i class="fa d-inline fa-lg fa-share-alt-square"></i> {{ $t('list.share') }}
</a>
</div>
<Group />
......@@ -124,10 +124,12 @@ export default {
// this.$router.replace(
// "/list?groupID=" + this.groupID + "&list_collections"
// );
$i18nRoute({
name: "list",
query: { groupID: this.groupID, list_collections }
});
this.$router.replace(
this.$i18nRoute({
name: "list",
query: { groupID: this.groupID, list_collections: 1 }
})
);
}
// Case: Special collection
......@@ -140,14 +142,16 @@ export default {
// "&collectionKey=" +
// this.collectionKey
// );
$i18nRoute({
name: "list",
query: {
groupID: this.groupID,
list_collections: 1,
collectionKey: this.collectionKey
}
});
this.$router.replace(
this.$i18nRoute({
name: "list",
query: {
groupID: this.groupID,
list_collections: 1,
collectionKey: this.collectionKey
}
})
);
// Case: Complete library
}
......@@ -165,14 +169,16 @@ export default {
// "&hypothesis_group=" +
// this.hypothesis_group
// );
$i18nRoute({
name: "list",
query: {
groupID: this.groupID,
list_collections: 1,
hypothesis_group: this.hypothesis_group
}
});
this.$router.replace(
this.$i18nRoute({
name: "list",
query: {
groupID: this.groupID,
list_collections: 1,
hypothesis_group: this.hypothesis_group
}
})
);
}
// Case: Complete library
......@@ -182,7 +188,9 @@ export default {
this.hypothesis_group == ""
) {
// this.$router.replace("/list?groupID=" + this.groupID);
$i18nRoute({ name: "list", query: { groupID: this.groupID } });
this.$router.replace(
this.$i18nRoute({ name: "list", query: { groupID: this.groupID } })
);
}
}
};
......
......@@ -4,15 +4,15 @@
<div class="row pb-1 justify-content-center">
<div class="col-12">
<div class="pt-3">
<h1>Create a Zocurelia Community</h1>
<h1>{{ $t('new.headline') }}</h1>
<p
class="lead"
>Get started with pasting the group ID of a Zotero list. Optionally, paste the key of a Zotero collection to show just a section of the list.</p>
>{{ $t('new.subline') }}</p>
<form @submit.prevent="submit()" class="needs-validation">
<div class="form-group row">
<label class="control-label col-3 col-form-label" for="GroupID">
Public Zotero Group
{{ $t('new.form.public') }}
<span class="req">*</span>
</label>
<div class="col-3 col-xs-5">
......@@ -39,13 +39,13 @@
id="list_collections"
name="field27"
data-parsley-errors-container="#errId2"
/> List collections of the group
/> {{ $t('new.form.listcollections') }}
</label>
<span id="errId2" class="error"></span>
</div>
</div>
<div v-show="list_collections" class="form-group row">
<label class="control-label col-3" for="CollectionKey">Collection</label>
<label class="control-label col-3" for="CollectionKey">{{ $t('new.form.collection') }}</label>
<div class="controls col-3">
<input
id="CollectionKey"
......@@ -76,7 +76,7 @@
</div>
</div>-->
<div class="form-group row">
<label class="control-label col-3">Hypothesis Settings</label>
<label class="control-label col-3">{{ $t('new.form.hypothesis') }}</label>
<div class="controls col-3">
<label class="checkbox control-label" for="checkbox49">
<input
......@@ -86,13 +86,13 @@
id="checkbox49"
name="field48"
data-parsley-errors-container="#errId5"
/> Private Group
/> {{ $t('new.form.private') }}
</label>
<span id="errId5" class="error"></span>
</div>
</div>
<div v-show="is_private_hypo" class="form-group row">
<label class="control-label col-3" for="Group">Group</label>
<label class="control-label col-3" for="Group">{{ $t('new.form.group') }}</label>
<div class="controls col-3">
<input
id="Group"
......@@ -156,9 +156,12 @@ export default {
},
submit: function() {
this.set_submitted(true);
this.$router.push({
path: "/list"
});
window.console.log(this.$i18nRoute);
this.$router.push(
this.$i18nRoute({
name: "list"
})
);
},
...mapActions([
"create",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment