agola-web/src/views/Org.vue

91 lines
2.3 KiB
Vue
Raw Normal View History

2018-12-09 13:21:20 +00:00
<template>
<div>
<nav class="breadcrumb" aria-label="breadcrumbs">
<ul>
<li>
<a>org</a>
</li>
<li>
<router-link :to="ownerLink('org', orgname)">{{orgname}}</router-link>
</li>
</ul>
</nav>
<div class="name">
<span class="is-size-3">{{orgname}}</span>
<div class="is-pulled-right">
<createprojectbutton v-on:click="goToCreate($event)"/>
</div>
</div>
2018-12-09 13:21:20 +00:00
<div class="tabs">
<ul>
2019-03-30 12:15:43 +00:00
<li :class="[{ 'is-active': $route.name === 'org projects' || $route.name === 'org' }]">
2019-05-06 11:43:15 +00:00
<router-link :to="ownerProjectsLink('org', orgname)">
<span class="icon is-small">
<i class="mdi mdi-home"/>
</span>
<span>Projects</span>
</router-link>
2018-12-09 13:21:20 +00:00
</li>
</ul>
2019-05-06 22:31:44 +00:00
<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>
2018-12-09 13:21:20 +00:00
</div>
2019-03-30 12:15:43 +00:00
<router-view></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,
projectGroupCreateProjectGroupLink,
projectGroupCreateProjectLink
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,
projectGroupCreateProjectGroupLink: projectGroupCreateProjectGroupLink,
projectGroupCreateProjectLink: projectGroupCreateProjectLink,
goToCreate(type) {
if (type == "project") {
this.$router.push(projectGroupCreateProjectLink("org", this.orgname));
return;
}
this.$router.push(
projectGroupCreateProjectGroupLink("org", this.orgname)
);
}
2018-12-09 13:21:20 +00:00
}
};
</script>
<style scoped lang="scss">
@import "@/css/_variables.scss";
.name {
2018-12-09 13:21:20 +00:00
padding-left: 5px;
margin-bottom: 25px;
}
</style>