瀏覽代碼

Refact graphique: reprise des liens 'retour à l'index'

olivier.massot 7 年之前
父節點
當前提交
ab6a046b06

+ 62 - 69
CD67.FicheCollege.MVC/Views/ActionsEdu/Details.cshtml

@@ -9,6 +9,11 @@
 
 <header>
     <h2>@actionEdu.Nom</h2>
+    <div>
+        <a href=@Url.Action("Index", new { annee_id = actionEdu.AnneeId })>
+            <i class="fa fa-list-ul"></i> Retour à l'index
+        </a>
+    </div>
 </header>
 
 @if(Model.Acces==ModeAcces.Suppression) {
@@ -65,69 +70,65 @@
     </dl>
 </fieldset>
 
-@if (Model.Acces == ModeAcces.Lecture)
-{
-
-    <legend>
-        Acteurs
-        <span class="pull-right">
-            <a class="btn btn-primary" href="@Url.Action("Create", "ActionsEduActeurs", new { actionEdu_id = actionEdu.Id })">
-                <i class="fa fa-plus"></i> Ajouter un Acteur
-            </a>
-        </span>
-    </legend>
-
-    <table class="table datatable">
-        <thead>
-            <tr>
-                <th>Acteur</th>
-                <th>Rôle</th>
-                <th>Commentaire</th>
-            </tr>
-        </thead>
-        <tbody>
-            @foreach (ActionEduActeur item in Model.Obj.ActionEduActeurs)
-            {
-                <tr data-url="@Url.Action("Details", "ActionsEduActeurs", new { Id = item.Id })">
-                    <td>@Html.DisplayFor(model => item.Nom)</td>
-                    <td>@Html.DisplayFor(model => item.ActionEduActeurRole.Libelle)</td>
-                    <td>@Html.DisplayFor(model => item.Commentaire)</td>
-                </tr>
-            }
-        </tbody>
-    </table>
-
-    <br/> <br/>
-
-    <legend>
-        Collège(s) concerné(s)
-        <span class="pull-right">
-            <a class="btn btn-primary" href="@Url.Action("Create", "ActionsEduCollege", new { actionEdu_id = actionEdu.Id })">
-                <i class="fa fa-plus"></i> Ajouter un Collège
-            </a>
-        </span>
-    </legend>
-
-    <table class="table datatable">
-        <thead>
-            <tr>
-                <th>Collège</th>
-                <th>Nombre d'élèves</th>
-                <th>Commentaire</th>
-            </tr>
-        </thead>
-        <tbody>
-            @foreach (ActionEduCollege item in Model.Obj.ActionsEduColleges)
-            {
-            <tr data-url="@Url.Action("Details", "ActionsEduCollege", new { Id = item.Id })">
-                <td>@Html.DisplayFor(model => item.College.Libelle)</td>
-                <td>@Html.DisplayFor(model => item.NbEleves)</td>
+<legend>
+    Acteurs
+    <span class="pull-right">
+        <a class="btn btn-primary" href="@Url.Action("Create", "ActionsEduActeurs", new { actionEdu_id = actionEdu.Id })">
+            <i class="fa fa-plus"></i> Ajouter un Acteur
+        </a>
+    </span>
+</legend>
+
+<table class="table datatable">
+    <thead>
+        <tr>
+            <th>Acteur</th>
+            <th>Rôle</th>
+            <th>Commentaire</th>
+        </tr>
+    </thead>
+    <tbody>
+        @foreach (ActionEduActeur item in Model.Obj.ActionEduActeurs)
+        {
+            <tr data-url="@Url.Action("Details", "ActionsEduActeurs", new { Id = item.Id })">
+                <td>@Html.DisplayFor(model => item.Nom)</td>
+                <td>@Html.DisplayFor(model => item.ActionEduActeurRole.Libelle)</td>
                 <td>@Html.DisplayFor(model => item.Commentaire)</td>
             </tr>
-            }
-        </tbody>
-    </table>
-}
+        }
+    </tbody>
+</table>
+
+<br/> <br/>
+
+<legend>
+    Collège(s) concerné(s)
+    <span class="pull-right">
+        <a class="btn btn-primary" href="@Url.Action("Create", "ActionsEduCollege", new { actionEdu_id = actionEdu.Id })">
+            <i class="fa fa-plus"></i> Ajouter un Collège
+        </a>
+    </span>
+</legend>
+
+<table class="table datatable">
+    <thead>
+        <tr>
+            <th>Collège</th>
+            <th>Nombre d'élèves</th>
+            <th>Commentaire</th>
+        </tr>
+    </thead>
+    <tbody>
+        @foreach (ActionEduCollege item in Model.Obj.ActionsEduColleges)
+        {
+        <tr data-url="@Url.Action("Details", "ActionsEduCollege", new { Id = item.Id })">
+            <td><a href=@Url.Action("Details", "Colleges", new { Id = item.College.Id })>@item.College.Libelle</a></td>
+            <td>@Html.DisplayFor(model => item.NbEleves)</td>
+            <td>@Html.DisplayFor(model => item.Commentaire)</td>
+        </tr>
+        }
+    </tbody>
+</table>
 
 @if (Model.Acces == ModeAcces.Suppression)
 {
@@ -144,13 +145,5 @@
     }
 
 }
-else
-{
-    <div>
-        @Html.ActionLink("Retour à la liste des actions", "Index", new { annee_id = actionEdu.AnneeId })
-    </div>
-}
-
-
 
 

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

@@ -31,5 +31,4 @@
     </dl>
 </fieldset>
 
-
 <a href="@Url.Action("Details", "ActionsEdu", new { id = actionEduActeur.ActionEdu.Id })">Retour à l'action</a>

+ 29 - 50
CD67.FicheCollege.MVC/Views/Colleges/Details.cshtml

@@ -10,6 +10,11 @@
 
 <header>
     <h2>@college.Libelle</h2>
+    <div>
+        <a href=@Url.Action("Index", new { annee_id = college.Annee_Id })>
+            <i class="fa fa-list-ul"></i> Retour à l'index
+        </a>
+    </div>
 </header>
 
 @if(Model.Acces==ModeAcces.Suppression) {
@@ -207,56 +212,36 @@
     </table>
 </div>
 
+<br/>
+
 <legend>
     Actions Educatives
 </legend>
 
-<div>
-    <table class="datatable table">
-        <thead>
+
+<table class="table datatable">
+    <thead>
+        <tr>
+            <th>Numéro</th>
+            <th>Nom</th>
+            <th>Nb.Elèves</th>
+            <th>Axe</th>
+            <th>Thematique</th>
+        </tr>
+    </thead>
+    <tbody>
+        @foreach (ActionEduCollege item in college.ActionsEduColleges)
+        {
             <tr>
-                <th>
-                    Numéro
-                </th>
-                <th>
-                    Nom
-                </th>
-                <th>
-                    Nb.Elèves
-                </th>
-                <th>
-                    Axe
-                </th>
-                <th>
-                    Thematique
-                </th>
+                <td>@Html.DisplayFor(model => item.ActionEdu.Numero)</td>
+                <td>@Html.DisplayFor(model => item.ActionEdu.Nom)</td>
+                <td>@Html.DisplayFor(model => item.NbEleves)</td>
+                <td>@Html.DisplayFor(model => item.ActionEdu.ActionEduThematique.ActionEduAxe.Nom)</td>
+                <td>@Html.DisplayFor(model => item.ActionEdu.ActionEduThematique.Nom)</td>
             </tr>
-        </thead>
-        <tbody>
-            @foreach (ActionEduCollege item in college.ActionsEduColleges)
-            {
-                <tr>
-                    <td>
-                        @Html.DisplayFor(model => item.ActionEdu.Numero)
-                    </td>
-                    <td>
-                        @Html.DisplayFor(model => item.ActionEdu.Nom)
-                    </td>
-                    <td>
-                        @Html.DisplayFor(model => item.NbEleves)
-                    </td>
-                    <td>
-                        @Html.DisplayFor(model => item.ActionEdu.ActionEduThematique.ActionEduAxe.Nom)
-                    </td>
-                    <td>
-                        @Html.DisplayFor(model => item.ActionEdu.ActionEduThematique.Nom)
-                    </td>
-                </tr>
-            }
-        </tbody>
-    </table>
-</div>
-
+        }
+    </tbody>
+</table>
 
 @if (Model.Acces == ModeAcces.Suppression)
 {
@@ -273,10 +258,4 @@
 
     }
 
-}
-else
-{
-    <div>
-        @Html.ActionLink("Retour à la liste", "Index", new { annee_id = college.Annee_Id })
-    </div>
 }

+ 5 - 0
CD67.FicheCollege.MVC/Views/Colleges/Type.cshtml

@@ -9,6 +9,11 @@
 
 <header>
     <h2>Type de restauration pour un collège</h2>
+    <div>
+        <a href=@Url.Action("Index", "Restauration", new { annee_id = college.Annee_Id })>
+            <i class="fa fa-list-ul"></i> Retour à l'index
+        </a>
+    </div>
 </header>
 
 @using (Html.BeginForm())