From ae6d91dd25cf2d2168c32e99d967d6e69760de85 Mon Sep 17 00:00:00 2001
From: Eliot Berriot <contact@eliotberriot.com>
Date: Sun, 24 Jun 2018 14:07:55 +0200
Subject: [PATCH] Fox #324: Remove link to generic radios, since they don't
 have detail pages

---
 changes/changelog.d/324.bugfix       | 1 +
 front/src/components/radios/Card.vue | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)
 create mode 100644 changes/changelog.d/324.bugfix

diff --git a/changes/changelog.d/324.bugfix b/changes/changelog.d/324.bugfix
new file mode 100644
index 00000000..77f81d37
--- /dev/null
+++ b/changes/changelog.d/324.bugfix
@@ -0,0 +1 @@
+Remove link to generic radios, since they don't have detail pages (#324)
diff --git a/front/src/components/radios/Card.vue b/front/src/components/radios/Card.vue
index 62de6ec6..bab1e2a1 100644
--- a/front/src/components/radios/Card.vue
+++ b/front/src/components/radios/Card.vue
@@ -2,9 +2,12 @@
     <div class="ui card">
       <div class="content">
         <div class="header">
-          <router-link class="discrete link" :to="{name: 'library.radios.detail', params: {id: radio.id}}">
+          <router-link v-if="radio.id" class="discrete link" :to="{name: 'library.radios.detail', params: {id: radio.id}}">
             {{ radio.name }}
           </router-link>
+          <template v-else>
+            {{ radio.name }}
+          </template>
         </div>
         <div class="description">
           {{ radio.description }}
-- 
GitLab