mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-11-26 11:14:23 +01:00
Added Alias detail page.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<template>
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
<translate class="headline">Recipients</translate>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
<p v-for="recipient in alias.recipients" :key="recipient">{{ recipient }}</p>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
alias: Object
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,33 @@
|
||||
<template>
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
<translate class="headline">General information</translate>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col cols="6"><translate>Creation date</translate></v-col>
|
||||
<v-col cols="6">{{ alias.creation|date }}</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col cols="6"><translate>Modified</translate></v-col>
|
||||
<v-col cols="6">{{ alias.last_modification|date }}</v-col>
|
||||
</v-row>
|
||||
<v-row v-if="alias.expiry">
|
||||
<v-col cols="6"><translate>Expire at</translate></v-col>
|
||||
<v-col cols="6"></v-col>
|
||||
</v-row>
|
||||
<v-row v-if="alias.description">
|
||||
<v-col cols="6"><translate>Description</translate></v-col>
|
||||
<v-col cols="6">{{ alias.description }}</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
alias: Object
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -38,7 +38,9 @@
|
||||
</router-link>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ item.identity }}
|
||||
<router-link :to="{ name: 'AliasDetail', params: { id: item.pk } }">
|
||||
{{ item.identity }}
|
||||
</router-link>
|
||||
</template>
|
||||
</template>
|
||||
<template v-slot:item.tags="{ item }">
|
||||
|
||||
@@ -83,6 +83,15 @@ const routes = [
|
||||
allowedRoles: ['DomainAdmins', 'Resellers', 'SuperAdmins']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/identities/aliases/:id',
|
||||
name: 'AliasDetail',
|
||||
component: () => import('../views/identities/Alias.vue'),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
allowedRoles: ['DomainAdmins', 'Resellers', 'SuperAdmins']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/identities/aliases/:id/edit',
|
||||
name: 'AliasEdit',
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-toolbar flat>
|
||||
<v-toolbar-title><translate>Alias</translate> {{ alias.address }}</v-toolbar-title>
|
||||
<v-btn color="primary" icon :to="{ name: 'AliasEdit', params: { id: alias.pk } }">
|
||||
<v-icon>mdi-circle-edit-outline</v-icon>
|
||||
</v-btn>
|
||||
</v-toolbar>
|
||||
<v-row>
|
||||
<v-col cols="6">
|
||||
<alias-summary :alias="alias" />
|
||||
<alias-recipients :alias="alias" class="mt-2" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import aliases from '@/api/aliases'
|
||||
import AliasRecipients from '@/components/identities/AliasRecipients'
|
||||
import AliasSummary from '@/components/identities/AliasSummary'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
AliasRecipients,
|
||||
AliasSummary
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
alias: { pk: this.$route.params.id }
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
aliases.get(this.$route.params.id).then(resp => {
|
||||
this.alias = resp.data
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.v-toolbar {
|
||||
background-color: #f7f8fa !important;
|
||||
}
|
||||
</style>
|
||||
@@ -509,7 +509,7 @@ class AliasSerializer(v1_serializers.AliasSerializer):
|
||||
field
|
||||
for field in v1_serializers.AliasSerializer.Meta.fields
|
||||
if field != "internal"
|
||||
) + ("expire_at", "description")
|
||||
) + ("expire_at", "description", "creation", "last_modification")
|
||||
|
||||
|
||||
class UserForwardSerializer(serializers.Serializer):
|
||||
|
||||
Reference in New Issue
Block a user