From 1e792e6b649ec65cb531fc7dd05d1a140e049aea Mon Sep 17 00:00:00 2001
From: Valentin Rigal <rigal@teklia.com>
Date: Wed, 13 Sep 2023 13:57:35 +0000
Subject: [PATCH] Model details link

---
 src/components/Model/Model.vue       |  8 ++++++++
 src/components/Model/ModelPicker.vue | 10 +++-------
 src/views/Model/List.vue             |  8 +-------
 3 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/src/components/Model/Model.vue b/src/components/Model/Model.vue
index 71b07518b..93e05e456 100644
--- a/src/components/Model/Model.vue
+++ b/src/components/Model/Model.vue
@@ -1,4 +1,12 @@
 <template>
+  <router-link
+    class="button is-pulled-right"
+    :to="{ name: 'model', params: { modelId } }"
+    target="_blank"
+    title="Open model version details in a new tab"
+  >
+    Model details
+  </router-link>
   <div class="title is-4">Versions</div>
   <div class="control">
     <VersionList
diff --git a/src/components/Model/ModelPicker.vue b/src/components/Model/ModelPicker.vue
index a0da34592..21340110a 100644
--- a/src/components/Model/ModelPicker.vue
+++ b/src/components/Model/ModelPicker.vue
@@ -8,7 +8,7 @@
         :value="modelValue?.name"
       />
     </div>
-    <Modal is-large v-model="opened" :title="placeholder">
+    <Modal v-model="opened" :title="placeholder">
       <button
         type="button"
         class="button is-info is-pulled-right mb-2"
@@ -57,17 +57,13 @@
             <thead>
               <tr>
                 <th>Name</th>
-                <th>Description</th>
-                <th></th>
+                <th class="is-narrow"></th>
               </tr>
             </thead>
             <tbody>
               <tr v-for="model in results" :key="model.id">
                 <td :title="model.name">
-                  {{ truncateShort(model.name) }}
-                </td>
-                <td :title="model.description">
-                  {{ truncateShort(model.description) }}
+                  {{ truncateLong(model.name) }}
                 </td>
                 <td>
                   <button
diff --git a/src/views/Model/List.vue b/src/views/Model/List.vue
index 84b310402..f1aa09a23 100644
--- a/src/views/Model/List.vue
+++ b/src/views/Model/List.vue
@@ -61,8 +61,6 @@
               <thead>
                 <tr>
                   <th>Name</th>
-                  <th>Description</th>
-                  <th></th>
                 </tr>
               </thead>
               <tbody>
@@ -74,12 +72,8 @@
                   :class="{ 'is-selected': selectedModel === model.id }"
                 >
                   <td :title="model.name">
-                    {{ truncateShort(model.name) }}
+                    {{ truncateLong(model.name) }}
                   </td>
-                  <td :title="model.description">
-                    {{ truncateShort(model.description) }}
-                  </td>
-                  <td></td>
                 </tr>
               </tbody>
             </table>
-- 
GitLab