agola-web/src/views/Org.vue

112 lines
3.1 KiB
Vue
Raw Normal View History

2018-12-09 13:21:20 +00:00
<template>
<div>
<nav class="mb-4 bg-grey-light rounded font-sans w-full">
<ol class="list-reset flex text-grey-dark">
<li>
<a>org</a>
</li>
<li>
<span class="mx-2">/</span>
</li>
<li>
<router-link :to="ownerLink('org', orgname)">{{orgname}}</router-link>
</li>
</ol>
</nav>
<div class="mb-8 flex justify-between">
<span class="text-3xl">{{orgname}}</span>
<createprojectbutton v-on:click="goToCreate($event)"/>
</div>
<div class="flex justify-between">
<ul class="flex-grow tab">
<li
class="tab-element"
:class="[{ 'tab-element-selected': $route.name === 'org projects' || $route.name === 'org' }]"
>
2019-05-06 11:43:15 +00:00
<router-link :to="ownerProjectsLink('org', orgname)">
<i class="mr-1 mdi mdi-home"/>
2019-05-06 11:43:15 +00:00
<span>Projects</span>
</router-link>
2018-12-09 13:21:20 +00:00
</li>
<li
class="tab-element"
:class="[{ 'tab-element-selected': $route.name === 'org members' }]"
>
2019-05-14 11:18:09 +00:00
<router-link :to="orgMembersLink(orgname)">
<i class="mr-1 mdi mdi-account-group"/>
2019-05-14 11:18:09 +00:00
<span>Members</span>
</router-link>
</li>
2018-12-09 13:21:20 +00:00
</ul>
<ul class="flex tab">
<li
class="tab-element"
:class="[{ 'tab-element-selected': $route.name.endsWith('org project group settings') }]"
>
2019-05-14 13:47:35 +00:00
<router-link :to="projectGroupSettingsLink('org', orgname, [])">
<i class="mr-1 mdi mdi-settings"/>
2019-05-14 13:47:35 +00:00
<span>Root Project Group Settings</span>
</router-link>
</li>
<li
class="tab-element"
:class="[{ 'tab-element-selected': $route.name.endsWith('org settings') }]"
>
2019-05-06 22:31:44 +00:00
<router-link :to="ownerSettingsLink('org', orgname)">
<i class="mr-1 mdi mdi-settings"/>
2019-05-06 22:31:44 +00:00
<span>Organization Settings</span>
</router-link>
</li>
</ul>
2018-12-09 13:21:20 +00:00
</div>
<router-view class="mt-8"></router-view>
2018-12-09 13:21:20 +00:00
</div>
</template>
<script>
2019-05-06 22:31:44 +00:00
import {
ownerLink,
ownerProjectsLink,
ownerSettingsLink,
2019-05-14 11:18:09 +00:00
orgMembersLink,
projectGroupCreateProjectGroupLink,
2019-05-14 13:47:35 +00:00
projectGroupCreateProjectLink,
projectGroupSettingsLink
2019-05-06 22:31:44 +00:00
} from "@/util/link.js";
2019-03-30 12:15:43 +00:00
import createprojectbutton from "@/components/createprojectbutton.vue";
2018-12-09 13:21:20 +00:00
export default {
name: "Org",
components: { createprojectbutton },
2018-12-09 13:21:20 +00:00
props: {
2019-03-30 12:15:43 +00:00
orgname: String
},
methods: {
ownerLink: ownerLink,
2019-05-06 22:31:44 +00:00
ownerProjectsLink: ownerProjectsLink,
ownerSettingsLink: ownerSettingsLink,
2019-05-14 11:18:09 +00:00
orgMembersLink: orgMembersLink,
projectGroupCreateProjectGroupLink: projectGroupCreateProjectGroupLink,
projectGroupCreateProjectLink: projectGroupCreateProjectLink,
2019-05-14 13:47:35 +00:00
projectGroupSettingsLink: projectGroupSettingsLink,
goToCreate(type) {
if (type == "project") {
2019-05-14 13:47:35 +00:00
this.$router.push(
projectGroupCreateProjectLink("org", this.orgname, [])
);
return;
}
this.$router.push(
2019-05-14 13:47:35 +00:00
projectGroupCreateProjectGroupLink("org", this.orgname, [])
);
}
2018-12-09 13:21:20 +00:00
}
};
</script>
<style scoped lang="scss">
</style>