Browse Source

Corrections diverses

olivier.massot 7 years ago
parent
commit
7463b48722

+ 5 - 2
CD67.FicheCollege.MVC/Scripts/cd67-main.js

@@ -8,8 +8,11 @@
     });
 
     $('.datatable').on('click', 'tbody>tr', function () {
-        var url = $(this).data('url');
-        window.location.href = url;
+        if ($(this).attr('data-url') !== undefined)
+        {
+            var url = $(this).data('url');
+            window.location.href = url;
+        }
     });
 
 

+ 0 - 1
CD67.FicheCollege.MVC/Views/Colleges/Details.cshtml

@@ -251,7 +251,6 @@
                     <td>
                         @Html.DisplayFor(model => item.ActionEdu.ActionEduThematique.Nom)
                     </td>
-
                 </tr>
             }
         </tbody>

+ 18 - 22
CD67.FicheCollege.MVC/Views/Restauration/Index.cshtml

@@ -51,28 +51,24 @@ else
     <tbody>
         @foreach (College college in Model.Obj.Colleges)
         {
-        <tr data-url="@Url.Action("Details", new { id = college.Id })">
-
-                <td>
-                    @Html.DisplayFor(modelcollege => college.CodeRne)
-                </td>
-                <td>
-                    @Html.DisplayFor(modelcollege => college.Libelle)
-                    <noscript>
-                        @Html.ActionLink(" > Voir", "Details", new { id = college.Id })
-                    </noscript>
-                </td>
-                <td>
-                    @Html.DisplayFor(modelcollege => college.AdresseComplete)
-                </td>
-                <td>
-                    @Html.DisplayFor(modelcollege => college.RestaurationType.Libelle)<br />
-                </td>
-                <td>
-                    <a href="@Url.Action("Type", "Colleges", new { id = college.Id })">
-                        <span class="glyphicon glyphicon-pencil fa-2x color1" title="Modifier" style="vertical-align: middle" aria-hidden="true"></span>
-                    </a>
-                </td>
+        <tr>
+            <td>
+                @Html.DisplayFor(modelcollege => college.CodeRne)
+            </td>
+            <td>
+                <a href="@Url.Action("Details", "Colleges", new { id = college.Id })">@Html.DisplayFor(modelcollege => college.Libelle)</a>
+            </td>
+            <td>
+                @Html.DisplayFor(modelcollege => college.AdresseComplete)
+            </td>
+            <td>
+                @Html.DisplayFor(modelcollege => college.RestaurationType.Libelle)<br />
+            </td>
+            <td>
+                <a href="@Url.Action("Type", "Colleges", new { id = college.Id })">
+                    <span class="glyphicon glyphicon-pencil fa-2x color1" title="Modifier" style="vertical-align: middle" aria-hidden="true"></span>
+                </a>
+            </td>
         </tr>
         }
     </tbody>