Skip to content
Snippets Groups Projects
Commit b819743a authored by Petr.Kalashnikov's avatar Petr.Kalashnikov
Browse files

Merge branch 'move_article_reference' into 'master'

Move article reference line

See merge request spraksamlingane/beta.ordbok.uib.no!32
parents dac640ad def84689
No related branches found
No related tags found
No related merge requests found
<template>
<li :class="['definition', 'level'+level]" :ref="'def' + body.id" :id="'def' + body.id">
<ul class="explanations">
<DefElement :body="explanation" :dictionary="dictionary" v-for="(explanation, index) in explanations" :key="index" @article-click="article_link_click" />
<DefElement :body="explanation" :dictionary="dictionary" :has_article_ref=has_article_ref(explanation) v-for="(explanation, index) in explanations" :key="index" @article-click="article_link_click" />
</ul>
<div v-if="examples.length">
<h4>{{example_header}}</h4>
......@@ -64,7 +64,16 @@ var Definition = {
methods: {
article_link_click: function(item) {
this.$emit('article-click', item)
}
},
has_article_ref: function(item){
if(item.items.length && item.items[0].type_ == "article_ref")
{
return "true";
}
else{
return "false";
}
}
},
watch:{
$route(to, from) {
......@@ -96,4 +105,10 @@ h4 {
padding-left: 12px;
padding-top: 6px;
}
li[has_article_ref="true"] {
margin-top: 8px;
margin-left: -25px;
}
</style>
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