improved industriels display
This commit is contained in:
@@ -116,30 +116,30 @@
|
||||
</vsa-heading>
|
||||
<vsa-content>
|
||||
<section class="industriels">
|
||||
<section v-if="material.distributor">
|
||||
<span class="label">{{ $t("materio.Distributor") }}</span>
|
||||
<ul>
|
||||
<li v-for="distrib in material.distributor" v-bind:key="distrib.id">
|
||||
<h2>{{ distrib.name }}</h2>
|
||||
<p v-if="distrib.website">
|
||||
<a target="_blank" :href="distrib.website.url">{{distrib.website.url}}</a>
|
||||
</p>
|
||||
<p v-if="distrib.email"><a :href="'mailto:'+distrib.email">{{ distrib.email }}</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section v-if="material.manufacturer">
|
||||
<span class="label">{{ $t("materio.Manufacturer") }}</span>
|
||||
<ul>
|
||||
<li v-for="manu in material.manufacturer" v-bind:key="manu.id">
|
||||
<h2>{{ manu.name }}</h2>
|
||||
<p v-if="manu.website">
|
||||
<a target="_blank" :href="manu.website.url">{{manu.website.url}}</a>
|
||||
<a target="_blank" :href="manu.website.url">{{shortUrl(manu.website.url)}}</a>
|
||||
</p>
|
||||
<p v-if="manu.email"><a :href="'mailto:'+manu.email">{{ manu.email }}</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section v-if="material.distributor">
|
||||
<span class="label">{{ $t("materio.Distributor") }}</span>
|
||||
<ul>
|
||||
<li v-for="distrib in material.distributor" v-bind:key="distrib.id">
|
||||
<h2>{{ distrib.name }}</h2>
|
||||
<p v-if="distrib.website">
|
||||
<a target="_blank" :href="distrib.website.url">{{shortUrl(distrib.website.url)}}</a>
|
||||
</p>
|
||||
<p v-if="distrib.email"><a :href="'mailto:'+distrib.email">{{ distrib.email }}</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
</vsa-content>
|
||||
</vsa-item>
|
||||
@@ -295,6 +295,9 @@ export default {
|
||||
},
|
||||
prettyFileSize(bytes){
|
||||
return prettyBytes(parseInt(bytes))
|
||||
},
|
||||
shortUrl(url){
|
||||
return url.replace(/^http:\/\//, '').replace(/^www\./, '')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user