Skip to content
Snippets Groups Projects
Commit 08846553 authored by Timothee P's avatar Timothee P :sunflower:
Browse files

add feature_type link in feature_details

parent 0b44192f
No related branches found
No related tags found
No related merge requests found
...@@ -63,6 +63,37 @@ ...@@ -63,6 +63,37 @@
<div class="seven wide column"> <div class="seven wide column">
<table class="ui very basic table"> <table class="ui very basic table">
<tbody> <tbody>
<tr v-if="feature_type">
<td>
<b> Type de signalement </b>
</td>
<td>
<router-link
:to="{
name: 'details-type-signalement',
params: { feature_type_slug: feature_type.slug },
}"
class="feature-type-title"
>
<img
v-if="feature_type.geom_type === 'point'"
class="list-image-type"
src="@/assets/img/marker.png"
>
<img
v-if="feature_type.geom_type === 'linestring'"
class="list-image-type"
src="@/assets/img/line.png"
>
<img
v-if="feature_type.geom_type === 'polygon'"
class="list-image-type"
src="@/assets/img/polygon.png"
>
{{ feature_type.title }}
</router-link>
</td>
</tr>
<div <div
v-for="(field, index) in feature.feature_data" v-for="(field, index) in feature.feature_data"
:key="'field' + index" :key="'field' + index"
...@@ -445,6 +476,9 @@ export default { ...@@ -445,6 +476,9 @@ export default {
'linked_features', 'linked_features',
'statusChoices' 'statusChoices'
]), ]),
...mapGetters('feature_type', [
'feature_type',
]),
DJANGO_BASE_URL() { DJANGO_BASE_URL() {
return this.$store.state.configuration.VUE_APP_DJANGO_BASE; return this.$store.state.configuration.VUE_APP_DJANGO_BASE;
}, },
...@@ -790,4 +824,15 @@ export default { ...@@ -790,4 +824,15 @@ export default {
.prewrap { .prewrap {
white-space: pre-wrap; white-space: pre-wrap;
} }
.feature-type-title {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
line-height: 1.5em;
}
.list-image-type {
margin-right: 5px;
height: 25px;
vertical-align: bottom;
}
</style> </style>
\ No newline at end of file
...@@ -1263,7 +1263,7 @@ export default { ...@@ -1263,7 +1263,7 @@ export default {
margin-right: 5px; margin-right: 5px;
height: 25px; height: 25px;
vertical-align: bottom; vertical-align: bottom;
} }
.feature-type-container { .feature-type-container {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment