Преглед изворни кода

v8-2758 - add hideTitle param

Olivier Massot пре 4 година
родитељ
комит
34b944a917
2 измењених фајлова са 7 додато и 3 уклоњено
  1. 2 1
      pages/structures/_id.vue
  2. 5 2
      pages/structures/index.vue

+ 2 - 1
pages/structures/_id.vue

@@ -4,7 +4,7 @@
       <v-layout>
         <v-btn
           v-if="parent"
-          :to="{path: '/structures', query: { parent: parent, view: view, theme: theme }}"
+          :to="{path: '/structures', query: { parent: parent, view: view, theme: theme, hideTitle: hideTitle }}"
           nuxt
           plain
         >
@@ -245,6 +245,7 @@ export default Vue.extend({
       parent: this.$route.query.parent ? parseInt(this.$route.query.parent as string) : null,
       view: this.$route.query.view ?? 'map',
       theme: this.$route.query.theme ?? 'orange',
+      hideTitle: this.$route.query.hideTitle ?? false,
       showTel: false,
       showMail: false
     }

+ 5 - 2
pages/structures/index.vue

@@ -5,9 +5,10 @@
     <!-- Header -->
     <v-row>
       <v-layout>
-        <h2 class="flex">
+        <h2 v-show="!hideTitle">
           {{ $t("member_companies") }}
         </h2>
+        <div class="flex" />
         <v-btn-toggle mandatory dense :value="mapview ? 0 : 1" @change="viewChanged">
           <v-btn>
             {{ $t("map") }}
@@ -274,7 +275,7 @@
                     <v-card-actions :class="listview ? 'align-self-end' : 'justify-end'">
                       <v-btn
                         class="see"
-                        :to="{path: '/structures/' + structure.id, query: { parent: parent, view: view, theme: theme }}"
+                        :to="{path: '/structures/' + structure.id, query: { parent: parent, view: view, theme: theme, hideTitle: hideTitle }}"
                         nuxt
                       >
                         <span style="margin-right: 6px;">{{ $t("see_more") }}</span>
@@ -326,10 +327,12 @@ export default Vue.extend({
     return true
   },
   data () {
+    console.log(this.$route.query)
     return {
       parent: parseInt(this.$route.query.parent as string),
       view: this.$route.query.view ?? 'map',
       theme: this.$route.query.theme ?? 'orange',
+      hideTitle: this.$route.query.hideTitle ?? false,
       structures: [] as Array<Structure>,
       filteredStructures: [] as Array<Structure>,
       federations: [] as Array<{ id: number | null, name: string | null }>,