org: add organization settings
This commit is contained in:
parent
8787b14e53
commit
e1ccccac71
|
@ -15,6 +15,13 @@ export function ownerProjectsLink(ownertype, ownername) {
|
|||
return { name: ownertype + " projects", params: { ownername: ownername } }
|
||||
}
|
||||
|
||||
export function ownerSettingsLink(ownertype, ownername) {
|
||||
if (ownertype == "user") {
|
||||
return { name: ownertype + " settings", params: { username: ownername } }
|
||||
} else if (ownertype == "org") {
|
||||
return { name: ownertype + " settings", params: { orgname: ownername } }
|
||||
}
|
||||
}
|
||||
|
||||
export function userLocalRunsLink(username) {
|
||||
return { name: "user local runs", params: { username: username } }
|
||||
|
@ -28,9 +35,6 @@ export function userLocalRunTaskLink(username, runid, taskid) {
|
|||
return { name: "user local run task", params: { username: username, runid: runid, taskid: taskid } }
|
||||
}
|
||||
|
||||
export function userSettingsLink(username) {
|
||||
return { name: "user settings", params: { username: username } }
|
||||
}
|
||||
|
||||
// Note, when creating a router link containing a project/projectgroup ref (a
|
||||
// path), unfortunately, we cannot use route name and params since it will path
|
||||
|
|
|
@ -26,6 +26,16 @@
|
|||
</router-link>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="is-right">
|
||||
<li :class="[{ 'is-active': $route.name.endsWith('project group settings') }]">
|
||||
<router-link :to="ownerSettingsLink('org', orgname)">
|
||||
<span class="icon is-small">
|
||||
<i class="mdi mdi-settings"/>
|
||||
</span>
|
||||
<span>Organization Settings</span>
|
||||
</router-link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<router-view></router-view>
|
||||
</div>
|
||||
|
@ -33,7 +43,11 @@
|
|||
|
||||
|
||||
<script>
|
||||
import { ownerLink, ownerProjectsLink } from "@/util/link.js";
|
||||
import {
|
||||
ownerLink,
|
||||
ownerProjectsLink,
|
||||
ownerSettingsLink
|
||||
} from "@/util/link.js";
|
||||
|
||||
export default {
|
||||
name: "Org",
|
||||
|
@ -43,7 +57,8 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
ownerLink: ownerLink,
|
||||
ownerProjectsLink: ownerProjectsLink
|
||||
ownerProjectsLink: ownerProjectsLink,
|
||||
ownerSettingsLink: ownerSettingsLink
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
</ul>
|
||||
<ul class="is-right">
|
||||
<li :class="[{ 'is-active': $route.name.endsWith('user settings') }]">
|
||||
<router-link :to="userSettingsLink(username)">
|
||||
<router-link :to="ownerSettingsLink('user', username)">
|
||||
<span class="icon is-small">
|
||||
<i class="mdi mdi-settings"/>
|
||||
</span>
|
||||
|
@ -90,7 +90,7 @@ import {
|
|||
userLocalRunsLink,
|
||||
userLocalRunLink,
|
||||
userLocalRunTaskLink,
|
||||
userSettingsLink
|
||||
ownerSettingsLink
|
||||
} from "@/util/link.js";
|
||||
|
||||
import { fetchRun } from "@/util/data.js";
|
||||
|
@ -121,7 +121,7 @@ export default {
|
|||
userLocalRunsLink: userLocalRunsLink,
|
||||
userLocalRunLink: userLocalRunLink,
|
||||
userLocalRunTaskLink: userLocalRunTaskLink,
|
||||
userSettingsLink: userSettingsLink
|
||||
ownerSettingsLink: ownerSettingsLink
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue